From ba37a7c71aad98fb717fa9a00760c4206368e52d Mon Sep 17 00:00:00 2001 From: "birendra.gupta" Date: Tue, 23 Jul 2024 18:16:07 +0530 Subject: [PATCH] Update UIKIt to v4.3.17 --- dist/index.js | 4 ++-- dist/index.js.map | 2 +- dist/types/CometChatMessageComposer/hooks.d.ts | 1 + dist/types/Shared/Utils/MessageUtils.d.ts | 1 + package.json | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2a3d24bb..d3df5c0f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7,11 +7,11 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */"production"===process.env.NODE_ENV?a.exports=function(){if(e)return l;e=1;var n=t,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,l={},c=null,C=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(C=t.ref),t)s.call(t,r)&&!a.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:C,props:l,_owner:i.current}}return l.Fragment=r,l.jsx=c,l.jsxs=c,l}():a.exports=(c||(c=1,"production"!==process.env.NODE_ENV&&function(){var e=t,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,A="@@iterator",x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=1&&C>=0&&a[c]!==l[C];)C--;for(;c>=1&&C>=0;c--,C--)if(a[c]!==l[C]){if(1!==c||1!==C)do{if(c--,--C<0||a[c]!==l[C]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&H.set(e,d),d}}while(c>=1&&C>=0);break}}}finally{Q=!1,V.current=r,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},e,{value:F}),info:R({},e,{value:k}),warn:R({},e,{value:T}),error:R({},e,{value:M}),group:R({},e,{value:B}),groupCollapsed:R({},e,{value:L}),groupEnd:R({},e,{value:U})})}P<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=s}var g=e?e.displayName||e.name:"",u=g?G(g):"";return"function"==typeof e&&H.set(e,u),u}function z(e,t,n){if(null==e)return"";if("function"==typeof e)return K(e,!(!(o=e.prototype)||!o.isReactComponent));var o;if("string"==typeof e)return G(e);switch(e){case d:return G("Suspense");case g:return G("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return K(e.render,!1);case u:return z(e.type,t,n);case p:var r=e,s=r._payload,i=r._init;try{return z(i(s),t,n)}catch(e){}}return""}H=new N;var J=Object.prototype.hasOwnProperty,Y={},_=x.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);_.setExtraStackFrame(n)}else _.setExtraStackFrame(null)}var Z=Array.isArray;function X(e){return Z(e)}function q(e){return""+e}function $(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var ee,te,ne,oe=x.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0};ne={};var se=function(e,t,o,r,s,i,a){var l={$$typeof:n,type:e,key:t,ref:o,props:a,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ie(e,t,n,o,r){var s,i={},a=null,l=null;for(s in void 0!==n&&($(n),a=""+n),function(e){if(J.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&($(t.key),a=""+t.key),function(e){if(J.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(l=t.ref,function(e,t){if("string"==typeof e.ref&&oe.current&&t&&oe.current.stateNode!==t){var n=S(oe.current.type);ne[n]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(oe.current.type),e.ref),ne[n]=!0)}}(t,r)),t)J.call(t,s)&&!re.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)void 0===i[s]&&(i[s]=c[s])}if(a||l){var C="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){ee||(ee=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,C),l&&function(e,t){var n=function(){te||(te=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,C)}return se(e,a,l,r,o,oe.current,i)}var ae,le=x.ReactCurrentOwner,ce=x.ReactDebugCurrentFrame;function Ce(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);ce.setExtraStackFrame(n)}else ce.setExtraStackFrame(null)}function de(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function ge(){if(le.current){var e=S(le.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ae=!1;var ue={};function pe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ge();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ue[n]){ue[n]=!0;var o="";e&&e._owner&&e._owner!==le.current&&(o=" It was passed a child from "+S(e._owner.type)+"."),Ce(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),Ce(null)}}}function he(e,t){if("object"==typeof e)if(X(e))for(var n=0;n",I=" Did you accidentally export a JSX literal instead of a component?"):F=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,I)}var T=ie(e,t,o,m,A);if(null==T)return T;if(x){var M=t.children;if(void 0!==M)if(C)if(X(M)){for(var B=0;B{o(e)}),[])]}function b(e){const n=A(e),o=t.useCallback((function e(t){if("object"==typeof t&&t)if(t instanceof s.CometChat.CometChatException){const e=n.current;if(e)return e(t)}else if(t instanceof Error)return e(new s.CometChat.CometChatException({code:"ERROR",name:t.name,message:t.message}));console.log(t)}),[n]);return o}function y(e){const{name:n,labelText:o,checked:r,disabled:s,checkboxStyle:i,onChange:a}=e,l=t.useRef();return function(e){const{ref:n,onChangePropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-checkbox-changed",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:l,onChangePropRef:A(a)}),d.jsx("cometchat-checkbox",{ref:l,name:n,labelText:o,...r?{checked:r}:{},...s?{disabled:s}:{},...(c=i,C="checkboxStyle",c?{[C]:JSON.stringify(c)}:{})});var c,C}function w(e){return{boxSizing:"border-box",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",boxShadow:e?.boxShadow,display:"flex",flexDirection:"column",overflow:"hidden"}}function f(e){return{flexShrink:"0",padding:e?"0px 12px":"19px 16px",display:"flex",flexDirection:"column",boxSizing:"border-box"}}function D(e,t,o){return{textAlign:t===n.TitleAlignment.left?"left":"center",font:e?.titleTextFont||"700 22px Inter, sans-serif",color:e?.titleTextColor||"rgb(20, 20, 20)",boxSizing:"border-box"}}function E(e){return{border:e?.searchBorder||"none",borderRadius:e?.searchBorderRadius||"8px",width:"100%",height:"32px",background:e?.searchBackground||"rgb(20, 20, 20, 0.04)",searchTextFont:e?.searchTextFont||"400 15px Inter, sans-serif",searchTextColor:e?.searchTextColor||"rgb(20, 20, 20)",placeholderTextFont:e?.searchPlaceholderTextFont||"400 15px Inter, sans-serif",placeholderTextColor:e?.searchPlaceholderTextColor||"rgb(20, 20, 20, 0.46)",searchIconTint:e?.searchIconTint||"rgb(20, 20, 20, 0.46)"}}function v(e){return{iconTint:e?.loadingIconTint||"rgb(20, 20, 20, 0.58)"}}function I(e){return{font:e?.sectionHeaderTextFont||"500 12px Inter, sans-serif",color:e?.sectionHeaderTextColor||"rbg(20, 20, 20, 0.46)",textAlign:"left",padding:"8px 0"}}function S(e){return{textFont:e?.errorStateTextFont||"700 22px Inter, sans-serif",textColor:e?.errorStateTextColor||"rgb(20, 20, 20, 0.33)"}}function F(e){return{textFont:e?.emptyStateTextFont||"700 22px Inter, sans-serif",textColor:e?.emptyStateTextColor||"rgb(20, 20, 20, 0.33)"}}function k(e,t){let n;const o=t[e];if("function"==typeof o){const e=o.call(t);n=String(void 0===e&&t?.id?t?.id:e)}else n=String(o);return n}const T=(0,t.memo)((function(e){const{title:o="",titleAlignment:r=n.TitleAlignment.left,hideSearch:i=!1,searchText:a="",onSearch:l,searchPlaceholderText:c="Search",searchIconURL:C,list:g,listItem:u,showSectionHeader:p=!0,sectionHeaderKey:h,listItemKey:m,onScrolledToBottom:y,onScrolledToTop:T,state:M,loadingView:B,loadingIconURL:L,hideError:U=!1,errorStateView:R,errorStateText:P="Error",emptyStateView:O,emptyStateText:j,scrollToBottom:V=!1,onError:G,listStyle:H=null,scrolledUpCallback:Q}=e,[N,K]=x(null),z=t.useRef(null),J=t.useRef(null),Y=t.useRef(null),_=t.useRef(!1),W=t.useRef(null),Z=t.useRef([0,0]),X=t.useRef(!1),q=A(T),$=A(y),ee=A(l),te=b(G);!function(e){const{onSearchRef:n,searchInputElement:o,intersectionObserverRootRef:r,intersectionObserverBottomTargetRef:s,intersectionObserverTopTargetRef:i,onScrolledToBottomRef:a,onScrolledToTopRef:l,timeoutIdRef:c,scrollToBottom:C,didComponentScrollToBottomRef:d,scrollHeightTupleRef:g,didTopObserverCallbackRunRef:u,errorHandler:p,scrolledUpCallback:h}=e;t.useEffect((()=>{if(!o)return;function e(e){const t=e.detail.searchText;null!==c.current&&window.clearTimeout(c.current),c.current=window.setTimeout((()=>{n.current?.(t),c.current=null}),500)}const t="cc-search-changed";return o.addEventListener(t,e),()=>{o.removeEventListener(t,e)}}),[o,n,c]),t.useEffect((()=>{if(!r.current||!s.current)return;let e=!1;const t=r.current,n=s.current,o=new IntersectionObserver((async function(n){const o=n[0];if(o&&h&&h(o.isIntersecting),d.current&&o.isIntersecting)d.current=!1;else if(!(!o.isIntersecting||e||t.scrollHeight<=t.clientHeight)){e=!0;try{await Promise.all([a.current?.()])}catch(e){p(e)}e=!1}}),{root:t,threshold:.1});return o.observe(n),()=>{o.unobserve(n)}}),[p,d,s,r,a,h]),t.useEffect((()=>{if(!r.current||!i.current)return;let e=!1;const t=r.current,n=i.current,o=new IntersectionObserver((async function(n){if(!(!n[0].isIntersecting||e||t.scrollHeight<=t.clientHeight)){e=!0;try{await Promise.all([l.current?.()])}catch(e){p(e)}e=!1,u.current=!0}}),{root:t,threshold:.1});return o.observe(n),()=>{o.unobserve(n)}}),[p,u,r,i,l]),t.useEffect((()=>{r.current&&(r.current.scrollHeight>r.current.clientHeight?0!==Math.round(r.current.scrollHeight-g.current[1])&&(g.current[0]=g.current[1],g.current[1]=r.current.scrollHeight,!C&&u.current&&0!==g.current[0]&&(r.current.scrollTop=Math.max(g.current[1]-g.current[0],0))):(g.current[0]=0,g.current[1]=0),u.current&&(u.current=!1))})),t.useEffect((()=>{setTimeout((()=>{const e=r.current;C&&(e?.scrollHeight??0)>(e?.clientHeight??0)&&null!==s.current&&(d.current=!0,s.current.scrollIntoView(!1))}))}))}({onSearchRef:ee,searchInputElement:N,intersectionObserverRootRef:z,intersectionObserverBottomTargetRef:Y,onScrolledToBottomRef:$,onScrolledToTopRef:q,intersectionObserverTopTargetRef:J,timeoutIdRef:W,scrollToBottom:V,didComponentScrollToBottomRef:_,scrollHeightTupleRef:Z,didTopObserverCallbackRunRef:X,errorHandler:te,scrolledUpCallback:Q});const ne=""===o;return d.jsxs("div",{className:"cc-list",style:w(H),children:[d.jsxs("div",{className:"cc-list__header",style:f(ne),children:[d.jsx("div",{className:"cc-list__title",style:D(H,r),children:o}),i?null:d.jsx("cometchat-search-input",{ref:K,searchText:a,placeholderText:c,searchIconURL:C,searchInputStyle:JSON.stringify(E(H)),style:{paddingTop:"16px"}})]}),d.jsxs("div",{ref:z,className:"cc-list__content",style:{overflow:"hidden auto",overflowX:"hidden",display:"flex",flexDirection:"column",width:"100%",height:"100%",boxSizing:"border-box",padding:"0 16px"},children:[d.jsx("div",{ref:J}),function(){if(M===n.States.loading&&0===g.length||M===n.States.empty||M===n.States.error)return null;let e="";return g.map(((t,n)=>{let o=null;if(p){let r;void 0===h?(te(new s.CometChat.CometChatException({code:"ERROR",name:"Error",message:"'sectionHeaderKey' prop must be provided when 'showSectionHeader' prop is set to true. 'showSectionHeader' is set to be true by default"})),r=" "):r=(k(h,t)||" ")[0].toUpperCase();let i=null;0===n?(i=d.jsx("div",{className:"cc-list__section-header",style:I(H),children:r}),e=r):e!==r?(i=d.jsx("div",{className:"cc-list__section-separator",children:d.jsx("div",{className:"cc-list__section-header",style:I(H),children:r})}),e=r):i=d.jsx("div",{className:"cc-list__section-separator"}),o=d.jsx("div",{className:"cc-list__section",children:i})}return d.jsxs("div",{className:"cc-list__item",children:[o,u(t,n)]},m?k(m,t):n)}))}(),function(){let e=null;switch(M){case n.States.loading:0===g.length&&(e=function(){let e;return e=B?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__loading-view cc-list__loading-view--custom",children:B}):d.jsx("div",{className:"cc-list__loading-view cc-list__loading-view--default",style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},children:d.jsx("cometchat-loader",{iconURL:L,loaderStyle:JSON.stringify(v(H))})}),d.jsx("div",{className:"cc-list__loading-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}());break;case n.States.error:e=function(){if(U)return null;let e;return e=R?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__error-view cc-list__error-view--custom",children:R}):d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},className:"cc-list__error-view cc-list__error-view--default",children:d.jsx("cometchat-label",{text:P,labelStyle:JSON.stringify(S(H))})}),d.jsx("div",{className:"cc-list__error-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}();break;case n.States.empty:e=function(){let e;return e=!O&&j?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},className:"cc-list__empty-view cc-list__empty-view--default",children:d.jsx("cometchat-label",{text:j,labelStyle:JSON.stringify(F(H))})}):d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__empty-view cc-list__empty-view--custom",children:O}),d.jsx("div",{className:"cc-list__empty-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}();case n.States.loaded:}return e}(),d.jsx("div",{ref:Y,style:{height:"1px",border:"1px solid transparent"}})]})]})}));var M="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function B(e){const{id:o,avatarURL:r,avatarName:s,statusIndicatorColor:i,statusIndicatorIcon:a,title:l,isActive:c,subtitleView:C,tailView:g,menuView:u,hideSeparator:p,avatarStyle:h,statusIndicatorStyle:m,listItemStyle:x,onClick:b,subtitleViewClassName:y,tailViewClassName:w,menuViewClassName:f,loadingIconURL:D=M,userPresencePlacement:E=n.UserPresencePlacement.bottom}=e,v=t.useRef();function I(e){return void 0!==e?{className:e}:{}}function S(e,t){return e?{[t]:JSON.stringify(e)}:{}}return function(e){const{ref:n,onListItemClickPropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-listitem-clicked",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:v,onListItemClickPropRef:A(b)}),d.jsxs("cometchat-list-item",{ref:v,id:o,avatarURL:r,avatarName:s,title:l,statusIndicatorColor:i,statusIndicatorIcon:a,loadingIconURL:D,userPresencePlacement:E,...c?{isActive:c}:{},...p?{hideSeparator:p}:{},...S(h,"avatarStyle"),...S(m,"statusIndicatorStyle"),...S(x,"listItemStyle"),children:[C?d.jsx("div",{slot:"subtitleView",...I(y),children:C}):null,g?d.jsx("div",{slot:"tailView",...I(w),children:g}):null,u?d.jsx("div",{slot:"menuView",...I(f),children:u}):null]})}function L(e){const{data:n,moreIconURL:o,topMenuSize:s,menuListStyle:i,onOptionClick:a}=e,l=t.useRef(),c=A(a);return function(e){const{data:n,idToOnClickMapRef:o,ref:s,onOptionClickPropRef:i}=e;t.useEffect((()=>{const e=new Map;o.current=e;for(let t=0;t{const e=s.current,t="cc-menu-clicked",n=e=>{const t=r.CometChatUIKitUtility.clone(e.detail.data);t.onClick=o.current?.get(t.id),e.detail.data=t,i.current?.(e)};return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}),[s,o,i])}({data:n,idToOnClickMapRef:t.useRef(null),ref:l,onOptionClickPropRef:c}),d.jsx("cometchat-menu-list",{ref:l,moreIconURL:o,topMenuSize:s,...(C=i,g="menuListStyle",C?{[g]:JSON.stringify(C)}:{}),data:JSON.stringify(n)});var C,g}function U(e){const{name:n,labelText:o,checked:r,disabled:s,radioButtonStyle:i,onChange:a}=e,l=t.useRef();return function(e){const{ref:n,onChangePropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-radio-button-changed",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:l,onChangePropRef:A(a)}),d.jsx("cometchat-radio-button",{ref:l,name:n,labelText:o,...r?{checked:r}:{},...s?{disabled:s}:{},...(c=i,C="radioButtonStyle",c?{[C]:JSON.stringify(c)}:{})});var c,C}const R=t.createContext({theme:new n.CometChatTheme({})});class P{constructor(e){const{searchText:t,usersRequestBuilder:n,searchRequestBuilder:o,usersSearchText:r}=e;let s=n||this.getDefaultRequestBuilder();t&&o?(s=o,s.setSearchKeyword(t)):t&&!o&&n?(s=n,s.setSearchKeyword(t)):!t&&n&&o?(s=n,s.setSearchKeyword(r.current)):t||!n||o?t||n||!o?s.setSearchKeyword(t):(s=this.getDefaultRequestBuilder(),s.setSearchKeyword(r.current)):(s=n,s.setSearchKeyword(r.current)),this.usersRequest=s.build()}getDefaultRequestBuilder(){return(new s.CometChat.UsersRequestBuilder).setLimit(P.defaultLimit)}fetchNext(){return this.usersRequest.fetchNext()}getCurrentPage(){return this.usersRequest.pagination.current_page}static atttachListeners(e){const t="UsersList_"+String(Date.now()),n=new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e});return s.CometChat.addUserListener(t,n),()=>s.CometChat.removeUserListener(t)}static attachConnestionListener(e){const t="UsersList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}}P.defaultLimit=30;var O="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",j="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function V(e,t){let o=e;const{type:r}=t;switch(r){case"setSearchText":o={...e,searchText:t.searchText};break;case"appendUsers":let r=[];t.removeOldUsers?(e.disableLoadingState||(e.userList=[]),r=t.users,e.disableLoadingState||(o={...e,userList:r})):t.usersManager&&[0].includes(t.usersManager?.getCurrentPage())&&!t.users.length?!t.users.length&&t.onEmpty&&(setTimeout((()=>{t.onEmpty()})),o={...e,fetchState:n.States.empty}):0!==t.users.length&&(o={...e,userList:1==t.usersManager?.getCurrentPage()?[...t.users]:[...e.userList,...t.users]});break;case"setUserList":o={...e,userList:t.userList};break;case"setFetchState":o={...e,fetchState:t.fetchState};break;case"updateUser":{const{userList:n}=e,{user:r}=t,s=r.getUid(),i=n.findIndex((e=>e.getUid()===s));i>-1&&(o={...e,userList:n.map(((e,t)=>t===i?r:e))});break}case"setIsFirstReload":o={...e,isFirstReload:t.isFirstReload}}return o}function G(e){const{title:o=n.localize("USERS"),tileAlignment:r=n.TitleAlignment.left,hideSearch:i=!1,searchIconURL:a=O,searchPlaceholderText:l=n.localize("SEARCH"),listItemView:c=null,showSectionHeader:C=!0,sectionHeaderKey:A="getName",loadingStateView:x,loadingIconURL:w=j,hideError:f=!1,errorStateView:D,errorStateText:E=n.localize("SOMETHING_WRONG"),emptyStateView:v,emptyStateText:I=n.localize("NO_USERS_FOUND"),subtitleView:S=null,disableUsersPresence:F=!1,menus:k=null,options:M=null,hideSeparator:G=!1,selectionMode:H=n.SelectionMode.none,onSelect:Q,usersRequestBuilder:N=null,searchRequestBuilder:K=null,onItemClick:z,onError:J,statusIndicatorStyle:Y=null,avatarStyle:_=null,usersStyle:W=null,listItemStyle:Z=null,activeUser:X=null,searchKeyword:q="",onEmpty:$,fetchingUsers:ee=!1,fetchTimeOut:te,userPresencePlacement:ne=n.UserPresencePlacement.bottom,disableLoadingState:oe=!1}=e,[re,se]=t.useReducer(V,{searchText:"",userList:[],fetchState:n.States.loading,isFirstReload:!1,fetchingUsers:ee,fetchTimeOut:te,disableLoadingState:oe}),ie=b(J),ae=t.useRef(null),le=t.useRef(""),{theme:ce}=t.useContext(R),Ce=t.useRef(!1),de=t.useRef(!1),ge=t.useRef("");let ue=t.useRef(!0);re.searchText&&re.searchText!==ge.current&&(ge.current=re.searchText),re.isFirstReload&&(Ce.current=!0,re.isFirstReload=!1);const pe=t.useCallback((async e=>{const t=ae.current;if(!t)return;let o=de.current||oe&&!ue?n.States.loaded:n.States.loading;se({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(e!==le.current)return;let r=!!de.current;se({type:"appendUsers",users:o,removeOldUsers:r,usersManager:t,onEmpty:$}),Ce.current&&(P.attachConnestionListener((()=>{const e=null===N?(new s.CometChat.UsersRequestBuilder).setLimit(30):N;ae.current=new P({searchText:ge.current,usersRequestBuilder:e,searchRequestBuilder:K,usersSearchText:ge}),de.current=!0})),Ce.current=!1),de.current?de.current=!1:se({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===le.current&&re.userList?.length<=0&&se({type:"setFetchState",fetchState:n.States.error}),ie(t)}ue.current=!1}),[ie,se]),he=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(ge.current="",se({type:"setSearchText",searchText:e}))}),[se]),me=t.useCallback((e=>{se({type:"updateUser",user:e})}),[se]);function Ae(e){if(H!==n.SelectionMode.single&&H!==n.SelectionMode.multiple)return null;let t;return t=H===n.SelectionMode.single?d.jsx(U,{onChange:t=>Q?.(e,t.detail.checked)}):d.jsx(y,{onChange:t=>Q?.(e,t.detail.checked)}),d.jsx("div",{style:{paddingRight:"8px"},children:t})}function xe(e){let t;return(t=M?.(e))?.length?d.jsx(L,{data:t,onOptionClick:e=>e.detail.data.onClick?.()}):null}function be(e){return F||e.getStatus()===n.CometChatUIKitConstants.userStatusType.offline?null:W?.onlineStatusColor||ce.palette.getSuccess()||null}return function(e){const{usersManagerRef:o,fetchNextAndAppendUsers:r,searchText:s,usersRequestBuilder:i,searchRequestBuilder:a,dispatch:l,updateUser:c,fetchNextIdRef:C,searchKeyword:d,disableLoadingState:g,usersSearchText:u}=e;t.useEffect((()=>(i?.searchKeyword?u.current=i?.searchKeyword:a?.searchKeyword&&(u.current=a?.searchKeyword),()=>{i?.setSearchKeyword("")})),[]),t.useEffect((()=>{l({type:"setIsFirstReload",isFirstReload:!0}),o.current=new P({searchText:s,usersRequestBuilder:i,searchRequestBuilder:a,usersSearchText:u}),g||l({type:"setUserList",userList:[]}),r(C.current="initialFetch_"+String(Date.now()))}),[s,i,a,r,l,C,o]),t.useEffect((()=>P.atttachListeners(c)),[c]),t.useEffect((()=>{const e=n.CometChatUserEvents.ccUserBlocked.subscribe(c),t=n.CometChatUserEvents.ccUserUnblocked.subscribe(c);return()=>{e.unsubscribe(),t.unsubscribe()}}),[c]),t.useEffect((()=>{l({type:"setSearchText",searchText:d})}),[d,l])}({usersManagerRef:ae,fetchNextAndAppendUsers:pe,searchText:re.searchText,usersRequestBuilder:N,searchRequestBuilder:K,dispatch:se,updateUser:me,fetchNextIdRef:le,searchKeyword:q,disableLoadingState:oe,usersSearchText:ge}),d.jsxs("div",{className:"cc-users",style:u(W,ce),children:[k?d.jsx("div",{className:"cc-users__menus",style:{position:"absolute",top:"12px",right:"12px"},children:k}):null,d.jsx(T,{title:o,titleAlignment:r,hideSearch:re.fetchState===n.States.error||i,searchIconURL:a,searchPlaceholderText:l,searchText:re.searchText,onSearch:he,list:re.userList,listItem:c||function(e){return d.jsx(B,{id:e.getUid(),avatarURL:e.getAvatar(),avatarName:e.getName(),title:e.getName(),isActive:H===n.SelectionMode.none&&e.getUid()===X?.getUid(),hideSeparator:G,statusIndicatorColor:be(e),statusIndicatorStyle:m(Y),avatarStyle:h(_,ce),listItemStyle:p(Z,W,ce),subtitleView:S?.(e),subtitleViewClassName:"cc-users__subtitle-view",tailView:Ae(e),tailViewClassName:"cc-users__tail-view",menuView:xe(e),menuViewClassName:"cc-users__options-view",onClick:t=>z?.(e),userPresencePlacement:ne})},onScrolledToBottom:()=>pe(le.current="onScrolledToBottom_"+String(Date.now())),showSectionHeader:C,sectionHeaderKey:A,listItemKey:"getUid",state:re.fetchState!==n.States.loaded||0!==re.userList.length||$?re.fetchState:n.States.empty,loadingView:x,loadingIconURL:w,hideError:f,errorStateView:D,errorStateText:E,emptyStateView:v,emptyStateText:I,listStyle:g(W,ce)})]})}function H(e,t){return{position:"relative",overflowX:"hidden",width:e?.width||"100%",height:e?.height||"100%",boxSizing:"border-box",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),padding:e?.padding||"0",boxShadow:e?.boxShadow||"0"}}function Q(e,t){return new r.ListStyle({width:"100%",height:"100%",border:"none",borderRadius:"inherit",background:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent()})}function N(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent"}}function K(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent"}}function z(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"28px",height:e?.height||"28px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function J(e){return{...null!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Y(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function _(e,t){return new o.LabelStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle1),textColor:e?.textColor||t.palette.getAccent600(),background:"inherit"})}function W(e,t){return new o.MenuListStyle({border:"none",borderRadius:"8px",background:"transparent",moreIconTint:t.palette.getPrimary(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${t.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e?.background||t.palette.getBackground()})}function Z(e,t){return new o.ChangeScopeStyle({height:e?.height||"212px",width:e?.width||"360px",border:e?.border||`1px solid ${t.palette.getAccent200()}`,borderRadius:e?.borderRadius||"12px",background:e?.background||t.palette.getBackground(),titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),activeTextFont:e?.activeTextFont||n.fontHelper(t.typography.subtitle1),activeTextColor:e?.activeTextColor||t.palette.getAccent(),activeTextBackground:e?.activeTextBackground||t.palette.getAccent200(),arrowIconTint:e?.arrowIconTint||t.palette.getAccent900(),textFont:e?.textFont||n.fontHelper(t.typography.subtitle1),textColor:e?.textColor||t.palette.getAccent600(),optionBackground:e?.optionBackground||t.palette.getBackground(),optionBorder:e?.optionBorder||"none",optionBorderRadius:e?.optionBorderRadius||"0",hoverTextFont:e?.hoverTextFont||n.fontHelper(t.typography.subtitle1),hoverTextColor:e?.hoverTextColor||t.palette.getAccent900(),hoverTextBackground:e?.hoverTextBackground||t.palette.getAccent100(),buttonTextFont:e?.buttonTextFont||n.fontHelper(t.typography.title2),buttonTextColor:e?.buttonTextColor||t.palette.getAccent("dark"),buttonBackground:e?.buttonBackground||t.palette.getPrimary(),closeIconTint:e?.closeIconTint||t.palette.getPrimary()})}const X=e=>({height:e?.height,width:e?.width,position:"absolute"});function q(e){const{text:n,hoverText:o,iconURL:r,disabled:s,buttonStyle:i,onClick:a,childRefCallback:l}=e,c=t.useRef();return function(e){const{ref:n,onClickPropRef:o,childRefCallback:r}=e;t.useEffect((()=>{const e=n.current;r&&r(n.current);const t="cc-button-clicked",s=e=>o.current?.(e);return e.addEventListener(t,s),()=>{e.removeEventListener(t,s)}}),[n,o])}({ref:c,onClickPropRef:A(a),childRefCallback:l}),d.jsx("cometchat-button",{ref:c,text:n,hoverText:o,iconURL:r,...s?{disabled:s}:{},...(C=i,g="buttonStyle",C?{[g]:JSON.stringify(C)}:{})});var C,g}var $="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20%5Ci-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%5Ci%20%20%5Cihttp%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%5Ci%3E%3Csvg%20enable-background%3D%22new%200%200%2032%2032%22%20%20id%3D%22%D0%A1%D0%BB%D0%BE%D0%B9_1%22%20version%3D%221.1%22%20viewBox%3D%220%200%2032%2032%22%20%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20d%3D%22M24.285%2C11.284L16%2C19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429%2C0%20%20c-0.394%2C0.395-0.394%2C1.035%2C0%2C1.43l8.999%2C9.002l0%2C0l0%2C0c0.394%2C0.395%2C1.034%2C0.395%2C1.428%2C0l8.999-9.002%20%20c0.394-0.395%2C0.394-1.036%2C0-1.431C25.319%2C10.889%2C24.679%2C10.889%2C24.285%2C11.284z%22%20fill%3D%22%23121313%22%20id%3D%22Expand_More%22%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3C%2Fsvg%3E";class ee{constructor(e){const{searchText:t,groupMemberRequestBuilder:n,searchRequestBuilder:o,groupGuid:r,groupMembersSearchText:i}=e;let a=n||new s.CometChat.GroupMembersRequestBuilder(r).setLimit(30);t&&o?(a=o,a.setSearchKeyword(t)):t&&!o&&n?(a=n,a.setSearchKeyword(t)):!t&&n&&o?(a=n,a.setSearchKeyword(i.current)):t||!n||o?t||n||!o?a.setSearchKeyword(t):a.setSearchKeyword(i.current):(a=n,a.setSearchKeyword(i.current)),this.groupMembersRequest=a.build()}fetchNext(){return this.groupMembersRequest.fetchNext()}getCurrentPage(){return this.groupMembersRequest.pagination.current_page}static attachUserListener(e){const t="GroupMembers_User_"+String(Date.now());return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e})),()=>s.CometChat.removeUserListener(t)}static createParticipantGroupMember(e,t){const o=new s.CometChat.GroupMember(e.getUid(),n.CometChatUIKitConstants.groupMemberScope.participant);return o.setName(e.getName()),o.setGuid(t.getGuid()),o.setUid(e.getUid()),o}static attachGroupListener(e,t){const n="GroupMembers_Group_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(n,o,r,s,i)=>{i.getGuid()===e&&t({type:"updateGroupMemberScopeIfPresent",groupMemberUid:o.getUid(),newScope:r})},onGroupMemberKicked:(n,o,r,s)=>{s.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onGroupMemberBanned:(n,o,r,s)=>{s.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onMemberAddedToGroup:(n,o,r,s)=>{s.getGuid()===e&&t({type:"appendGroupMember",groupMember:ee.createParticipantGroupMember(o,s)})},onGroupMemberLeft:(n,o,r)=>{r.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onGroupMemberJoined:(n,o,r)=>{r.getGuid()===e&&t({type:"appendGroupMember",groupMember:ee.createParticipantGroupMember(o,r)})}})),()=>s.CometChat.removeGroupListener(n)}}var te="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fmoreicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.5%2C10%20C5.88071187%2C10%207%2C11.1192881%207%2C12.5%20C7%2C13.8807119%205.88071187%2C15%204.5%2C15%20C3.11928813%2C15%202%2C13.8807119%202%2C12.5%20C2%2C11.1192881%203.11928813%2C10%204.5%2C10%20Z%20M12%2C10%20C13.3807119%2C10%2014.5%2C11.1192881%2014.5%2C12.5%20C14.5%2C13.8807119%2013.3807119%2C15%2012%2C15%20C10.6192881%2C15%209.5%2C13.8807119%209.5%2C12.5%20C9.5%2C11.1192881%2010.6192881%2C10%2012%2C10%20Z%20M19.5%2C10%20C20.8807119%2C10%2022%2C11.1192881%2022%2C12.5%20C22%2C13.8807119%2020.8807119%2C15%2019.5%2C15%20C18.1192881%2C15%2017%2C13.8807119%2017%2C12.5%20C17%2C11.1192881%2018.1192881%2C10%2019.5%2C10%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ne="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",oe="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",re="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function se(e,t){let o=e;const{type:r}=t;switch(r){case"appendGroupMembers":{const{groupMembers:r,groupMembersManager:s,onEmpty:i}=t;s&&[0].includes(s?.getCurrentPage())&&!r.length?!r.length&&i&&(setTimeout((()=>{i()})),o={...e,fetchState:n.States.empty}):0!==r.length&&(o={...e,groupMemberList:1==s?.getCurrentPage()?[...r]:[...e.groupMemberList,...r]});break}case"setSearchText":o={...e,searchText:t.searchText};break;case"setFetchState":o={...e,fetchState:t.fetchState};break;case"setGroupMemberList":o={...e,groupMemberList:t.groupMemberList};break;case"removeGroupMemberIfPresent":{const n=t.groupMemberUid,r=e.groupMemberList.findIndex((e=>e.getUid()===n));r>-1&&(o={...e,groupMemberList:e.groupMemberList.filter(((e,t)=>t!==r))});break}case"setGroupMemberToChangeScopeOf":o={...e,groupMemberToChangeScopeOf:t.groupMember};break;case"replaceGroupMemberIfPresent":{const{updatedGroupMember:n}=t,r=n.getUid(),s=e.groupMemberList.findIndex((e=>e.getUid()===r));s>-1&&(o={...e,groupMemberList:e.groupMemberList.map(((e,t)=>t!==s?e:n))});break}case"updateGroupMemberStatusIfPresent":{const{user:n}=t,{groupMemberList:r}=e,s=n.getUid(),i=r.findIndex((e=>e.getUid()===s));i>-1&&(o={...e,groupMemberList:r.map(((e,t)=>(t===i&&e.setStatus(n.getStatus()),e)))});break}case"updateGroupMemberScopeIfPresent":{const{groupMemberUid:n,newScope:r}=t,{groupMemberList:s}=e,i=s.findIndex((e=>e.getUid()===n));i>-1&&(o={...e,groupMemberList:s.map(((e,t)=>(t===i&&e.setScope(r),e)))});break}case"appendGroupMember":o={...e,groupMemberList:[...e.groupMemberList,t.groupMember]}}return o}function ie(e){const{backButtonIconURL:o=oe,showBackButton:i=!1,onBack:a,menus:l=null,title:c=n.localize("MEMBERS"),titleAlignment:C=n.TitleAlignment.center,searchPlaceholder:g=n.localize("SEARCH"),searchIconURL:u=ne,hideSearch:p=!1,groupMemberRequestBuilder:h=null,searchRequestBuilder:m=null,group:w,onError:f,emptyStateText:D=n.localize("NO_USERS_FOUND"),errorStateText:E=n.localize("SOMETHING_WRONG"),loadingIconURL:v=re,loadingStateView:I,errorStateView:S,errorSateView:F,emptyStateView:k,hideError:M=!1,hideSeparator:P=!0,disableUsersPresence:O=!1,subtitleView:j=null,listItemView:V=null,options:G=null,dropDownIconURL:ie=$,tailView:ae=null,selectionMode:le=n.SelectionMode.none,onItemClick:ce=null,onSelect:Ce=null,closeButtonIconURL:de="",onClose:ge,avatarStyle:ue=null,statusIndicatorStyle:pe=null,listItemStyle:he=null,groupScopeStyle:me=null,groupMembersStyle:Ae=null,searchKeyword:xe="",onEmpty:be,fetchTimeOut:ye,userPresencePlacement:we=n.UserPresencePlacement.bottom,disableLoadingState:fe=!1}=e,[De,Ee]=t.useReducer(se,{groupMemberList:[],fetchState:n.States.loading,searchText:"",groupMemberToChangeScopeOf:null,fetchTimeOut:ye,disableLoadingState:fe}),ve=t.useRef(null),Ie=t.useRef(null),Se=t.useRef(""),[Fe,ke]=x(null),Te=A(w),Me=b(f),{theme:Be}=t.useContext(R),Le=t.useRef(""),Ue=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(Le.current="",Ee({type:"setSearchText",searchText:e}))}),[Ee]),Re=t.useCallback((async e=>{const t=ve.current;if(t){fe||Ee({type:"setFetchState",fetchState:n.States.loading});try{const o=await t.fetchNext();if(e!==Se.current)return;Ee({type:"appendGroupMembers",groupMembers:o,groupMembersManager:t,onEmpty:be}),Ee({type:"setFetchState",fetchState:n.States.loaded})}catch(e){Ee({type:"setFetchState",fetchState:n.States.error}),Me(e)}}}),[Ee,Me]),Pe=t.useCallback(((e,t,o,i)=>{const a=new s.CometChat.Action(o.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return a.setAction(t),a.setActionBy(r.CometChatUIKitUtility.clone(i)),a.setSender(r.CometChatUIKitUtility.clone(i)),a.setMessage(`${i.getUid()} ${t} ${e.getUid()}`),a.setActionFor(r.CometChatUIKitUtility.clone(o)),a.setActionOn(r.CometChatUIKitUtility.clone(e)),a.setReceiver(r.CometChatUIKitUtility.clone(o)),a.setConversationId("group_"+o.getGuid()),a.setMuid(r.CometChatUIKitUtility.ID()),a.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),a.setReceiverType(n.CometChatUIKitConstants.MessageReceiverType.group),a.setRawData({extras:{scope:{new:e.getScope()}}}),a}),[]),Oe=async e=>{const t=Ie.current;if(t)try{const o=Te.current;await s.CometChat.banGroupMember(o.getGuid(),e.getUid()),Ee({type:"removeGroupMemberIfPresent",groupMemberUid:e.getUid()});const i=r.CometChatUIKitUtility.clone(o);i.setMembersCount(i.getMembersCount()-1),n.CometChatGroupEvents.ccGroupMemberBanned.next({kickedBy:r.CometChatUIKitUtility.clone(t),kickedFrom:i,kickedUser:r.CometChatUIKitUtility.clone(e),message:Pe(e,n.CometChatUIKitConstants.groupMemberAction.BANNED,i,t)})}catch(e){Me(e)}},je=async e=>{const t=Ie.current;if(t)try{const o=Te.current;await s.CometChat.kickGroupMember(o.getGuid(),e.getUid()),Ee({type:"removeGroupMemberIfPresent",groupMemberUid:e.getUid()});const i=r.CometChatUIKitUtility.clone(o);i.setMembersCount(i.getMembersCount()-1),n.CometChatGroupEvents.ccGroupMemberKicked.next({kickedBy:r.CometChatUIKitUtility.clone(t),kickedFrom:r.CometChatUIKitUtility.clone(i),kickedUser:r.CometChatUIKitUtility.clone(e),message:Pe(e,n.CometChatUIKitConstants.groupMemberAction.KICKED,i,t)})}catch(e){Me(e)}},{groupMemberToChangeScopeOf:Ve}=De,Ge=t.useCallback((async e=>{const t=Ie.current;if(Ve&&t)try{const o=e,i=Te.current;await s.CometChat.updateGroupMemberScope(i.getGuid(),Ve.getUid(),o);const a=r.CometChatUIKitUtility.clone(Ve);a.setScope(o),Ee({type:"replaceGroupMemberIfPresent",updatedGroupMember:a}),n.CometChatGroupEvents.ccGroupMemberScopeChanged.next({scopeChangedFrom:Ve.getScope(),scopeChangedTo:a.getScope(),message:Pe(a,n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE,i,t),group:r.CometChatUIKitUtility.clone(i),updatedUser:r.CometChatUIKitUtility.clone(a)})}catch(e){Me(e)}finally{Ee({type:"setGroupMemberToChangeScopeOf",groupMember:null})}}),[Me,Ee,Pe,Ve,Te]);function He(e,t){return e===n.CometChatUIKitConstants.GroupMemberOptions.ban?Oe(t):e===n.CometChatUIKitConstants.GroupMemberOptions.kick?je(t):e===n.CometChatUIKitConstants.GroupMemberOptions.changeScope?Ee({type:"setGroupMemberToChangeScopeOf",groupMember:t}):void 0}function Qe(e){let t;return null===ae&&(t=G?.(w,e))?.length?d.jsx(L,{data:t,menuListStyle:W(Ae,Be),onOptionClick:t=>{const{id:n,onClick:o}=t.detail.data;o?o():"string"==typeof n&&He(n,e)}}):null}function Ne(e){return le===n.SelectionMode.single?d.jsx(U,{onChange:t=>Ce?.(e,t.detail.checked)}):le===n.SelectionMode.multiple?d.jsx(y,{onChange:t=>Ce?.(e,t.detail.checked)}):null}function Ke(e,t){return"string"==typeof e?d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(_(Ae,Be))}):d.jsx(L,{topMenuSize:0,data:e,moreIconURL:te,menuListStyle:W(Ae,Be),onOptionClick:e=>{const{id:n}=e.detail.data;"string"==typeof n&&He(n,t)}})}function ze(e){return null!==ae?null:d.jsx("div",{className:"cc-group-members__tail-view-content",children:Ke(r.GroupMemberUtils.getViewMemberOptions(e,w,Ie.current?.getUid(),Be),e)})}function Je(e){return d.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",columnGap:"8px"},children:[ae?.(e),Ne(e),ze(e)]})}function Ye(e){return O||e.getStatus()===n.CometChatUIKitConstants.userStatusType.offline?null:Ae?.onlineStatusColor||Be.palette.getSuccess()||null}function _e(e){return d.jsx(B,{id:e.getUid(),title:e.getName(),avatarURL:e.getAvatar(),avatarName:e.getName(),hideSeparator:P,isActive:De.groupMemberToChangeScopeOf?.getUid()===e.getUid(),avatarStyle:z(ue,Be),statusIndicatorColor:Ye(e),statusIndicatorStyle:J(pe),listItemStyle:Y(he,Ae,Be),subtitleViewClassName:"cc-group-members__subtitle-view",subtitleView:j?.(e),tailViewClassName:"cc-group-members__tail-view",tailView:Je(e),menuViewClassName:"cc-group-members__options-view",menuView:Qe(e),onClick:t=>ce?.(e),userPresencePlacement:we})}return function(e){const{groupMemberRequestBuilder:o,searchRequestBuilder:r,searchText:i,groupMembersManagerRef:a,groupGuid:l,fetchNextAndAppendGroupMembers:c,fetchNextIdRef:C,dispatch:d,loggedInUserRef:g,errorHandler:u,changeScopeElement:p,updateGroupMemberScope:h,searchKeyword:m,disableLoadingState:A,groupMembersSearchText:x}=e;t.useEffect((()=>(o?.searchKeyword?x.current=o?.searchKeyword:r?.searchKeyword&&(x.current=r?.searchKeyword),()=>{o?.setSearchKeyword("")})),[]),t.useEffect((()=>{(async()=>{try{g.current=await s.CometChat.getLoggedinUser()}catch(e){u(e)}})()}),[u,g]),t.useEffect((()=>{a.current=new ee({searchText:i,groupMemberRequestBuilder:o,searchRequestBuilder:r,groupGuid:l,groupMembersSearchText:x}),A||d({type:"setGroupMemberList",groupMemberList:[]}),c(C.current="initialFetchNext_"+String(Date.now()))}),[o,r,i,l,c,d,C,a]),t.useEffect((()=>{if(!p)return;const e="cc-changescope-close-clicked",t="cc-changescope-changed";function n(){d({type:"setGroupMemberToChangeScopeOf",groupMember:null})}function o(e){const t=e.detail?.value;t&&h(t)}return p.addEventListener(e,n),p.addEventListener(t,o),()=>{p.removeEventListener(e,n),p.removeEventListener(t,o)}}),[p,h,d]),t.useEffect((()=>ee.attachUserListener((e=>d({type:"updateGroupMemberStatusIfPresent",user:e})))),[d]),t.useEffect((()=>ee.attachGroupListener(l,d)),[l,d]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{const{kickedUser:t}=e;d({type:"removeGroupMemberIfPresent",groupMemberUid:t.getUid()})})),t=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{const{kickedUser:t}=e;d({type:"removeGroupMemberIfPresent",groupMemberUid:t.getUid()})})),o=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{const{updatedUser:t,scopeChangedTo:n}=e;d({type:"updateGroupMemberScopeIfPresent",groupMemberUid:t.getUid(),newScope:n})})),r=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{const{usersAdded:t,userAddedIn:n}=e;let o=a.current;d({type:"appendGroupMembers",groupMembersManager:o,groupMembers:t.map((e=>ee.createParticipantGroupMember(e,n)))})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),r.unsubscribe()}}),[d]),t.useEffect((()=>{d({type:"setSearchText",searchText:m})}),[m,d])}({groupMemberRequestBuilder:h,searchRequestBuilder:m,searchText:De.searchText,groupMembersManagerRef:ve,groupGuid:w.getGuid(),fetchNextAndAppendGroupMembers:Re,fetchNextIdRef:Se,dispatch:Ee,loggedInUserRef:Ie,errorHandler:Me,changeScopeElement:Fe,updateGroupMemberScope:Ge,searchKeyword:xe,disableLoadingState:fe,groupMembersSearchText:Le}),d.jsxs("div",{className:"cc-group-members",style:H(Ae,Be),children:[d.jsxs("div",{className:"cc-group-members__list-wrapper",style:{position:"relative",height:"100%"},children:[null===l?null:d.jsx("div",{className:"cc-group-members__menus",style:{position:"absolute",right:"12px",top:"8px",cursor:"pointer"},children:l}),d.jsx(T,{title:c,titleAlignment:C,searchPlaceholderText:g,searchIconURL:u,searchText:De.searchText,onSearch:Ue,hideSearch:p,list:De.groupMemberList,listItemKey:"getUid",listItem:null!==V?V:_e,showSectionHeader:!1,onScrolledToBottom:()=>Re(Se.current="onScrolledToBottom_"+String(Date.now())),state:De.fetchState===n.States.loaded&&0===De.groupMemberList.length?n.States.empty:De.fetchState,loadingIconURL:v,emptyStateText:D,errorStateText:E,loadingView:I,emptyStateView:k,errorStateView:S||F,hideError:M,listStyle:Q(Ae,Be)})]}),i?d.jsx("div",{className:"cc-group-members__back-btns-wrapper",style:{position:"absolute",left:"16px",top:"19px",width:"fit-content",height:"fit-content"},children:d.jsx(q,{iconURL:o,buttonStyle:N(Ae,Be),onClick:a})}):null,de?d.jsx("div",{className:"cc-group-members__close-btns-wrapper",style:{position:"absolute",right:"16px",top:"19px",width:"fit-content",height:"fit-content"},children:d.jsx(q,{iconURL:de,buttonStyle:K(Ae,Be),onClick:ge})}):null,function(){let e;const{groupMemberToChangeScopeOf:t}=De;return null!==t&&(e=r.GroupMemberUtils.allowScopeChange(w,t)).length>0?d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(X(Ae)),children:d.jsx("cometchat-change-scope",{ref:ke,options:JSON.stringify(e),arrowIconURL:ie,changeScopeStyle:JSON.stringify(Z(me,Be))})}):null}()]})}function ae(e){const{userMemberListType:o=n.UserMemberListType.users,onItemClick:r,listItemView:s,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,group:c,subtitleView:C,usersRequestBuilder:g,userPresencePlacement:u=n.UserPresencePlacement.bottom,loadingStateView:p,onEmpty:h,groupMemberRequestBuilder:m,loadingIconUrl:A,disableLoadingState:x=!1,hideSeparator:b=!1,onError:y,disableUsersPresence:w}=e,{theme:f}=t.useContext(R);return d.jsxs(d.Fragment,{children:[o===n.UserMemberListType.users&&d.jsx(G,{title:"",hideSearch:!0,hideSeparator:b,showSectionHeader:!1,onItemClick:r,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,listItemView:s,usersRequestBuilder:g,subtitleView:C,closeButtonIconURL:"",loadingStateView:p,onEmpty:h,loadingIconURL:A,userPresencePlacement:u,disableLoadingState:x,disableUsersPresence:w,onError:y,usersStyle:{border:"1px solid "+f.palette.getAccent300(),background:f.palette.getBackground(),minHeight:"45px",borderRadius:"12px 12px 12px 12px"}}),o===n.UserMemberListType.groupmembers&&c&&d.jsx(ie,{group:c,title:"",hideSearch:!0,showBackButton:!1,hideSeparator:b,groupMemberRequestBuilder:m,onItemClick:r,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,listItemView:s,subtitleView:C,closeButtonIconURL:"",userPresencePlacement:u,onEmpty:h,loadingIconURL:A,tailView:e=>d.jsx(d.Fragment,{}),disableLoadingState:x,disableUsersPresence:w,onError:y,groupMembersStyle:{border:"1px solid "+f.palette.getAccent300(),padding:"0px",background:f.palette.getBackground(),borderRadius:"12px 12px 12px 12px"}})]})} + */"production"===process.env.NODE_ENV?a.exports=function(){if(e)return l;e=1;var n=t,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,l={},c=null,C=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(C=t.ref),t)s.call(t,r)&&!a.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:C,props:l,_owner:i.current}}return l.Fragment=r,l.jsx=c,l.jsxs=c,l}():a.exports=(c||(c=1,"production"!==process.env.NODE_ENV&&function(){var e=t,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,A="@@iterator",x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=1&&C>=0&&a[c]!==l[C];)C--;for(;c>=1&&C>=0;c--,C--)if(a[c]!==l[C]){if(1!==c||1!==C)do{if(c--,--C<0||a[c]!==l[C]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&H.set(e,d),d}}while(c>=1&&C>=0);break}}}finally{Q=!1,V.current=r,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},e,{value:F}),info:R({},e,{value:k}),warn:R({},e,{value:T}),error:R({},e,{value:M}),group:R({},e,{value:B}),groupCollapsed:R({},e,{value:L}),groupEnd:R({},e,{value:U})})}P<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=s}var g=e?e.displayName||e.name:"",u=g?G(g):"";return"function"==typeof e&&H.set(e,u),u}function z(e,t,n){if(null==e)return"";if("function"==typeof e)return K(e,!(!(o=e.prototype)||!o.isReactComponent));var o;if("string"==typeof e)return G(e);switch(e){case d:return G("Suspense");case g:return G("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return K(e.render,!1);case u:return z(e.type,t,n);case p:var r=e,s=r._payload,i=r._init;try{return z(i(s),t,n)}catch(e){}}return""}H=new N;var J=Object.prototype.hasOwnProperty,Y={},_=x.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);_.setExtraStackFrame(n)}else _.setExtraStackFrame(null)}var Z=Array.isArray;function X(e){return Z(e)}function q(e){return""+e}function $(e){if(function(e){try{return q(e),!1}catch(e){return!0}}(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),q(e)}var ee,te,ne,oe=x.ReactCurrentOwner,re={key:!0,ref:!0,__self:!0,__source:!0};ne={};var se=function(e,t,o,r,s,i,a){var l={$$typeof:n,type:e,key:t,ref:o,props:a,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function ie(e,t,n,o,r){var s,i={},a=null,l=null;for(s in void 0!==n&&($(n),a=""+n),function(e){if(J.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&($(t.key),a=""+t.key),function(e){if(J.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(l=t.ref,function(e,t){if("string"==typeof e.ref&&oe.current&&t&&oe.current.stateNode!==t){var n=S(oe.current.type);ne[n]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(oe.current.type),e.ref),ne[n]=!0)}}(t,r)),t)J.call(t,s)&&!re.hasOwnProperty(s)&&(i[s]=t[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)void 0===i[s]&&(i[s]=c[s])}if(a||l){var C="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){ee||(ee=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,C),l&&function(e,t){var n=function(){te||(te=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,C)}return se(e,a,l,r,o,oe.current,i)}var ae,le=x.ReactCurrentOwner,ce=x.ReactDebugCurrentFrame;function Ce(e){if(e){var t=e._owner,n=z(e.type,e._source,t?t.type:null);ce.setExtraStackFrame(n)}else ce.setExtraStackFrame(null)}function de(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function ge(){if(le.current){var e=S(le.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ae=!1;var ue={};function pe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ge();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ue[n]){ue[n]=!0;var o="";e&&e._owner&&e._owner!==le.current&&(o=" It was passed a child from "+S(e._owner.type)+"."),Ce(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),Ce(null)}}}function he(e,t){if("object"==typeof e)if(X(e))for(var n=0;n",I=" Did you accidentally export a JSX literal instead of a component?"):F=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,I)}var T=ie(e,t,o,m,A);if(null==T)return T;if(x){var M=t.children;if(void 0!==M)if(C)if(X(M)){for(var B=0;B{o(e)}),[])]}function b(e){const n=A(e),o=t.useCallback((function e(t){if("object"==typeof t&&t)if(t instanceof s.CometChat.CometChatException){const e=n.current;if(e)return e(t)}else if(t instanceof Error)return e(new s.CometChat.CometChatException({code:"ERROR",name:t.name,message:t.message}));console.log(t)}),[n]);return o}function y(e){const{name:n,labelText:o,checked:r,disabled:s,checkboxStyle:i,onChange:a}=e,l=t.useRef();return function(e){const{ref:n,onChangePropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-checkbox-changed",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:l,onChangePropRef:A(a)}),d.jsx("cometchat-checkbox",{ref:l,name:n,labelText:o,...r?{checked:r}:{},...s?{disabled:s}:{},...(c=i,C="checkboxStyle",c?{[C]:JSON.stringify(c)}:{})});var c,C}function w(e){return{boxSizing:"border-box",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",boxShadow:e?.boxShadow,display:"flex",flexDirection:"column",overflow:"hidden"}}function f(e){return{flexShrink:"0",padding:e?"0px 12px":"19px 16px",display:"flex",flexDirection:"column",boxSizing:"border-box"}}function D(e,t,o){return{textAlign:t===n.TitleAlignment.left?"left":"center",font:e?.titleTextFont||"700 22px Inter, sans-serif",color:e?.titleTextColor||"rgb(20, 20, 20)",boxSizing:"border-box"}}function E(e){return{border:e?.searchBorder||"none",borderRadius:e?.searchBorderRadius||"8px",width:"100%",height:"32px",background:e?.searchBackground||"rgb(20, 20, 20, 0.04)",searchTextFont:e?.searchTextFont||"400 15px Inter, sans-serif",searchTextColor:e?.searchTextColor||"rgb(20, 20, 20)",placeholderTextFont:e?.searchPlaceholderTextFont||"400 15px Inter, sans-serif",placeholderTextColor:e?.searchPlaceholderTextColor||"rgb(20, 20, 20, 0.46)",searchIconTint:e?.searchIconTint||"rgb(20, 20, 20, 0.46)"}}function v(e){return{iconTint:e?.loadingIconTint||"rgb(20, 20, 20, 0.58)"}}function I(e){return{font:e?.sectionHeaderTextFont||"500 12px Inter, sans-serif",color:e?.sectionHeaderTextColor||"rbg(20, 20, 20, 0.46)",textAlign:"left",padding:"8px 0"}}function S(e){return{textFont:e?.errorStateTextFont||"700 22px Inter, sans-serif",textColor:e?.errorStateTextColor||"rgb(20, 20, 20, 0.33)"}}function F(e){return{textFont:e?.emptyStateTextFont||"700 22px Inter, sans-serif",textColor:e?.emptyStateTextColor||"rgb(20, 20, 20, 0.33)"}}function k(e,t){let n;const o=t[e];if("function"==typeof o){const e=o.call(t);n=String(void 0===e&&t?.id?t?.id:e)}else n=String(o);return n}const T=(0,t.memo)((function(e){const{title:o="",titleAlignment:r=n.TitleAlignment.left,hideSearch:i=!1,searchText:a="",onSearch:l,searchPlaceholderText:c="Search",searchIconURL:C,list:g,listItem:u,showSectionHeader:p=!0,sectionHeaderKey:h,listItemKey:m,onScrolledToBottom:y,onScrolledToTop:T,state:M,loadingView:B,loadingIconURL:L,hideError:U=!1,errorStateView:R,errorStateText:P="Error",emptyStateView:O,emptyStateText:j,scrollToBottom:V=!1,onError:G,listStyle:H=null,scrolledUpCallback:Q}=e,[N,K]=x(null),z=t.useRef(null),J=t.useRef(null),Y=t.useRef(null),_=t.useRef(!1),W=t.useRef(null),Z=t.useRef([0,0]),X=t.useRef(!1),q=A(T),$=A(y),ee=A(l),te=b(G);!function(e){const{onSearchRef:n,searchInputElement:o,intersectionObserverRootRef:r,intersectionObserverBottomTargetRef:s,intersectionObserverTopTargetRef:i,onScrolledToBottomRef:a,onScrolledToTopRef:l,timeoutIdRef:c,scrollToBottom:C,didComponentScrollToBottomRef:d,scrollHeightTupleRef:g,didTopObserverCallbackRunRef:u,errorHandler:p,scrolledUpCallback:h}=e;t.useEffect((()=>{if(!o)return;function e(e){const t=e.detail.searchText;null!==c.current&&window.clearTimeout(c.current),c.current=window.setTimeout((()=>{n.current?.(t),c.current=null}),500)}const t="cc-search-changed";return o.addEventListener(t,e),()=>{o.removeEventListener(t,e)}}),[o,n,c]),t.useEffect((()=>{if(!r.current||!s.current)return;let e=!1;const t=r.current,n=s.current,o=new IntersectionObserver((async function(n){const o=n[0];if(o&&h&&h(o.isIntersecting),d.current&&o.isIntersecting)d.current=!1;else if(!(!o.isIntersecting||e||t.scrollHeight<=t.clientHeight)){e=!0;try{await Promise.all([a.current?.()])}catch(e){p(e)}e=!1}}),{root:t,threshold:.1});return o.observe(n),()=>{o.unobserve(n)}}),[p,d,s,r,a,h]),t.useEffect((()=>{if(!r.current||!i.current)return;let e=!1;const t=r.current,n=i.current,o=new IntersectionObserver((async function(n){if(!(!n[0].isIntersecting||e||t.scrollHeight<=t.clientHeight)){e=!0;try{await Promise.all([l.current?.()])}catch(e){p(e)}e=!1,u.current=!0}}),{root:t,threshold:.1});return o.observe(n),()=>{o.unobserve(n)}}),[p,u,r,i,l]),t.useEffect((()=>{r.current&&(r.current.scrollHeight>r.current.clientHeight?0!==Math.round(r.current.scrollHeight-g.current[1])&&(g.current[0]=g.current[1],g.current[1]=r.current.scrollHeight,!C&&u.current&&0!==g.current[0]&&(r.current.scrollTop=Math.max(g.current[1]-g.current[0],0))):(g.current[0]=0,g.current[1]=0),u.current&&(u.current=!1))})),t.useEffect((()=>{setTimeout((()=>{const e=r.current;C&&(e?.scrollHeight??0)>(e?.clientHeight??0)&&null!==s.current&&(d.current=!0,s.current.scrollIntoView(!1))}))}))}({onSearchRef:ee,searchInputElement:N,intersectionObserverRootRef:z,intersectionObserverBottomTargetRef:Y,onScrolledToBottomRef:$,onScrolledToTopRef:q,intersectionObserverTopTargetRef:J,timeoutIdRef:W,scrollToBottom:V,didComponentScrollToBottomRef:_,scrollHeightTupleRef:Z,didTopObserverCallbackRunRef:X,errorHandler:te,scrolledUpCallback:Q});const ne=""===o;return d.jsxs("div",{className:"cc-list",style:w(H),children:[d.jsxs("div",{className:"cc-list__header",style:f(ne),children:[d.jsx("div",{className:"cc-list__title",style:D(H,r),children:o}),i?null:d.jsx("cometchat-search-input",{ref:K,searchText:a,placeholderText:c,searchIconURL:C,searchInputStyle:JSON.stringify(E(H)),style:{paddingTop:"16px"}})]}),d.jsxs("div",{ref:z,className:"cc-list__content",style:{overflow:"hidden auto",overflowX:"hidden",display:"flex",flexDirection:"column",width:"100%",height:"100%",boxSizing:"border-box",padding:"0 16px"},children:[d.jsx("div",{ref:J}),function(){if(M===n.States.loading&&0===g.length||M===n.States.empty||M===n.States.error)return null;let e="";return g.map(((t,n)=>{let o=null;if(p){let r;void 0===h?(te(new s.CometChat.CometChatException({code:"ERROR",name:"Error",message:"'sectionHeaderKey' prop must be provided when 'showSectionHeader' prop is set to true. 'showSectionHeader' is set to be true by default"})),r=" "):r=(k(h,t)||" ")[0].toUpperCase();let i=null;0===n?(i=d.jsx("div",{className:"cc-list__section-header",style:I(H),children:r}),e=r):e!==r?(i=d.jsx("div",{className:"cc-list__section-separator",children:d.jsx("div",{className:"cc-list__section-header",style:I(H),children:r})}),e=r):i=d.jsx("div",{className:"cc-list__section-separator"}),o=d.jsx("div",{className:"cc-list__section",children:i})}return d.jsxs("div",{className:"cc-list__item",children:[o,u(t,n)]},m?k(m,t):n)}))}(),function(){let e=null;switch(M){case n.States.loading:0===g.length&&(e=function(){let e;return e=B?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__loading-view cc-list__loading-view--custom",children:B}):d.jsx("div",{className:"cc-list__loading-view cc-list__loading-view--default",style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},children:d.jsx("cometchat-loader",{iconURL:L,loaderStyle:JSON.stringify(v(H))})}),d.jsx("div",{className:"cc-list__loading-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}());break;case n.States.error:e=function(){if(U)return null;let e;return e=R?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__error-view cc-list__error-view--custom",children:R}):d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},className:"cc-list__error-view cc-list__error-view--default",children:d.jsx("cometchat-label",{text:P,labelStyle:JSON.stringify(S(H))})}),d.jsx("div",{className:"cc-list__error-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}();break;case n.States.empty:e=function(){let e;return e=!O&&j?d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"},className:"cc-list__empty-view cc-list__empty-view--default",children:d.jsx("cometchat-label",{text:j,labelStyle:JSON.stringify(F(H))})}):d.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},className:"cc-list__empty-view cc-list__empty-view--custom",children:O}),d.jsx("div",{className:"cc-list__empty-view-wrapper",style:{height:"calc(100% - 1px)",overflow:"auto"},children:e})}();case n.States.loaded:}return e}(),d.jsx("div",{ref:Y,style:{height:"1px",border:"1px solid transparent"}})]})]})}));var M="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function B(e){const{id:o,avatarURL:r,avatarName:s,statusIndicatorColor:i,statusIndicatorIcon:a,title:l,isActive:c,subtitleView:C,tailView:g,menuView:u,hideSeparator:p,avatarStyle:h,statusIndicatorStyle:m,listItemStyle:x,onClick:b,subtitleViewClassName:y,tailViewClassName:w,menuViewClassName:f,loadingIconURL:D=M,userPresencePlacement:E=n.UserPresencePlacement.bottom}=e,v=t.useRef();function I(e){return void 0!==e?{className:e}:{}}function S(e,t){return e?{[t]:JSON.stringify(e)}:{}}return function(e){const{ref:n,onListItemClickPropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-listitem-clicked",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:v,onListItemClickPropRef:A(b)}),d.jsxs("cometchat-list-item",{ref:v,id:o,avatarURL:r,avatarName:s,title:l,statusIndicatorColor:i,statusIndicatorIcon:a,loadingIconURL:D,userPresencePlacement:E,...c?{isActive:c}:{},...p?{hideSeparator:p}:{},...S(h,"avatarStyle"),...S(m,"statusIndicatorStyle"),...S(x,"listItemStyle"),children:[C?d.jsx("div",{slot:"subtitleView",...I(y),children:C}):null,g?d.jsx("div",{slot:"tailView",...I(w),children:g}):null,u?d.jsx("div",{slot:"menuView",...I(f),children:u}):null]})}function L(e){const{data:n,moreIconURL:o,topMenuSize:s,menuListStyle:i,onOptionClick:a}=e,l=t.useRef(),c=A(a);return function(e){const{data:n,idToOnClickMapRef:o,ref:s,onOptionClickPropRef:i}=e;t.useEffect((()=>{const e=new Map;o.current=e;for(let t=0;t{const e=s.current,t="cc-menu-clicked",n=e=>{const t=r.CometChatUIKitUtility.clone(e.detail.data);t.onClick=o.current?.get(t.id),e.detail.data=t,i.current?.(e)};return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}),[s,o,i])}({data:n,idToOnClickMapRef:t.useRef(null),ref:l,onOptionClickPropRef:c}),d.jsx("cometchat-menu-list",{ref:l,moreIconURL:o,topMenuSize:s,...(C=i,g="menuListStyle",C?{[g]:JSON.stringify(C)}:{}),data:JSON.stringify(n)});var C,g}function U(e){const{name:n,labelText:o,checked:r,disabled:s,radioButtonStyle:i,onChange:a}=e,l=t.useRef();return function(e){const{ref:n,onChangePropRef:o}=e;t.useEffect((()=>{const e=n.current,t="cc-radio-button-changed",r=e=>o.current?.(e);return e.addEventListener(t,r),()=>{e.removeEventListener(t,r)}}),[n,o])}({ref:l,onChangePropRef:A(a)}),d.jsx("cometchat-radio-button",{ref:l,name:n,labelText:o,...r?{checked:r}:{},...s?{disabled:s}:{},...(c=i,C="radioButtonStyle",c?{[C]:JSON.stringify(c)}:{})});var c,C}const R=t.createContext({theme:new n.CometChatTheme({})});class P{constructor(e){const{searchText:t,usersRequestBuilder:n,searchRequestBuilder:o,usersSearchText:r}=e;let s=n||this.getDefaultRequestBuilder();t&&o?(s=o,s.setSearchKeyword(t)):t&&!o&&n?(s=n,s.setSearchKeyword(t)):!t&&n&&o?(s=n,s.setSearchKeyword(r.current)):t||!n||o?t||n||!o?s.setSearchKeyword(t):(s=this.getDefaultRequestBuilder(),s.setSearchKeyword(r.current)):(s=n,s.setSearchKeyword(r.current)),this.usersRequest=s.build()}getDefaultRequestBuilder(){return(new s.CometChat.UsersRequestBuilder).setLimit(P.defaultLimit)}fetchNext(){return this.usersRequest.fetchNext()}getCurrentPage(){return this.usersRequest.pagination.current_page}static atttachListeners(e){const t="UsersList_"+String(Date.now()),n=new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e});return s.CometChat.addUserListener(t,n),()=>s.CometChat.removeUserListener(t)}static attachConnestionListener(e){const t="UsersList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}}P.defaultLimit=30;var O="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",j="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoA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%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const V=(e,t)=>({flex:"1 1 0",display:"flex",flexDirection:"column",borderRadius:"inherit",justifyContent:e===t.left?"flex-start":"flex-end",alignItems:e===t.left?"flex-start":"flex-end",position:"relative",width:"100%"}),G=(e,t)=>({display:"flex",justifyContent:e===t.left?"flex-start":"flex-end",alignItems:"flex-start"}),H=(e,t,n,o)=>({justifyContent:e===t.left?"flex-start":"flex-end",top:n?"-17px":"-36px",right:e===t.right?"unset":"0",left:e===t.left?"0":"unset",position:"absolute",background:o.palette.getBackground(),borderRadius:"8px",width:"fit-content",zIndex:"2"}),Q=e=>({border:`1px solid ${e.palette.getAccent200()}`,borderRadius:"8px",background:e.palette.getBackground(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${e.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground(),moreIconTint:e.palette.getAccent600()}),N=(e,t)=>({listStyleType:"none",display:e?"flex":"none",position:"absolute",right:"24px",top:"0",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",border:"1px solid #e8e8e8",width:"100%",zIndex:"3",background:t.palette.getBackground(),marginTop:"35px",padding:"0",borderRadius:"8px"}),K=e=>({background:"transparent",border:"none",borderRadius:"0",buttonIconTint:e?.moreIconTint||""}),z=(e,t)=>({background:t?.backgroundColor||"transparent",border:"none",borderRadius:"0",buttonIconTint:t?.iconTint,buttonTextFont:t?.titleFont,buttonTextColor:t?.titleColor}),J={width:"300px",height:"300px"};function Y(e){const{text:n,hoverText:o,iconURL:r,disabled:s,buttonStyle:i,onClick:a,childRefCallback:l}=e,c=t.useRef();return function(e){const{ref:n,onClickPropRef:o,childRefCallback:r}=e;t.useEffect((()=>{const e=n.current;r&&r(n.current);const t="cc-button-clicked",s=e=>o.current?.(e);return e.addEventListener(t,s),()=>{e.removeEventListener(t,s)}}),[n,o])}({ref:c,onClickPropRef:A(a),childRefCallback:l}),d.jsx("cometchat-button",{ref:c,text:n,hoverText:o,iconURL:r,...s?{disabled:s}:{},...(C=i,g="buttonStyle",C?{[g]:JSON.stringify(C)}:{})});var C,g}const _=e=>{const{theme:o}=t.useContext(R),[r,s]=t.useState(!1),i=t.useRef(null),a=t.useRef([]),{data:l,topMenuSize:c,moreIconURL:C,moreIconHoverText:g,ContextMenuStyle:u,onOptionClicked:p,placement:h}=e,m=t.useCallback((()=>s((e=>!e))),[]),A=t.useCallback((()=>d.jsx("li",{style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item cc-context-menu__menu-item--more",children:d.jsx("cometchat-button",{ref:i,buttonStyle:JSON.stringify(K(u)),hoverText:g,iconURL:C,onClick:m})})),[u,g,C,m]),x=t.useCallback(((e,o)=>e?.map(((r,s)=>{let i,c=null;return i=r instanceof n.CometChatActionsView&&r?.customView?d.jsx("li",{id:r.id,style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item",children:d.jsxs("cometchat-popover",{ref:e=>{a.current[r.id]=e},popoverStyle:JSON.stringify(J),placement:h,children:[d.jsx("div",{slot:"children",children:d.jsx("cometchat-button",{buttonStyle:JSON.stringify(z(0,r)),text:o?r?.title:"",hoverText:r?.title,iconURL:r?.iconURL})}),d.jsx("div",{slot:"content",children:r?.customView(w(r.id))})]})}):d.jsx("li",{id:r.id,style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item",children:d.jsx(Y,{buttonStyle:z(0,r),text:o?r?.title:"",hoverText:r?.title,iconURL:r?.iconURL,onClick:()=>{p(r)}})}),!o&&l?.length>e?.length&&s===e?.length-1&&(c=A()),d.jsxs(t.Fragment,{children:[i,c]},r.title)}))),[h,l,p,A]),b=t.useCallback((()=>x(l.slice(0,c-1),!1)),[x,c,l]),y=t.useCallback((()=>x(l.slice(c-1),!0)),[x,c,l]),w=t.useCallback((e=>()=>{a.current[e]?.closeContentView&&a.current[e]?.closeContentView()}),[]);return d.jsxs("div",{className:"cc-context-menu",style:{display:"flex",position:"relative"},children:[d.jsx("ul",{className:"cc-context-menu__top-menu",style:{listStyleType:"none",display:"flex",flexDirection:"row",justifyContent:"flex-end",margin:"0",padding:"0",border:"1px solid #e8e8e8",zIndex:"2",borderRadius:"8px"},children:b()}),d.jsx("ul",{className:"cc-context-menu__sub-menu",style:N(r,o),children:y()})]})};var W="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMore%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C6.66666667%20C3.26666667%2C6.66666667%202.66666667%2C7.26666667%202.66666667%2C8%20C2.66666667%2C8.73333333%203.26666667%2C9.33333333%204%2C9.33333333%20C4.73333333%2C9.33333333%205.33333333%2C8.73333333%205.33333333%2C8%20C5.33333333%2C7.26666667%204.73333333%2C6.66666667%204%2C6.66666667%20Z%20M12%2C6.66666667%20C11.2666667%2C6.66666667%2010.6666667%2C7.26666667%2010.6666667%2C8%20C10.6666667%2C8.73333333%2011.2666667%2C9.33333333%2012%2C9.33333333%20C12.7333333%2C9.33333333%2013.3333333%2C8.73333333%2013.3333333%2C8%20C13.3333333%2C7.26666667%2012.7333333%2C6.66666667%2012%2C6.66666667%20Z%20M8%2C6.66666667%20C7.26666667%2C6.66666667%206.66666667%2C7.26666667%206.66666667%2C8%20C6.66666667%2C8.73333333%207.26666667%2C9.33333333%208%2C9.33333333%20C8.73333333%2C9.33333333%209.33333333%2C8.73333333%209.33333333%2C8%20C9.33333333%2C7.26666667%208.73333333%2C6.66666667%208%2C6.66666667%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const Z=e=>{const{id:o,leadingView:s=null,headerView:i=null,replyView:a=null,contentView:l=null,bottomView:c=null,threadView:C=null,footerView:g=null,statusInfoView:u=null,options:p=[],alignment:h=n.MessageBubbleAlignment.right,messageBubbleStyle:m=new r.BaseStyle({width:"100%",height:"auto",background:"",borderRadius:"12px",border:"none"}),moreIconURL:A=W,topMenuSize:x=5,setRef:b}=e,y={borderRadius:"8px"},{theme:w}=t.useContext(R),f=t.useRef(null);t.useEffect((()=>{f&&f.current&&b&&b(f)}),[f,b]);const[D,E]=t.useState(!1);t.useEffect((()=>()=>{v&&clearTimeout(v)}),[]);let v=null;const I=e=>{p.forEach((t=>{t instanceof n.CometChatActionsIcon&&t.id===e?.id&&o&&t.onClick?.(parseInt(o))}))},S=()=>F()?k():e.alignment===n.MessageBubbleAlignment.left?n.Placement.right:n.Placement.left,F=()=>window.innerWidth<=768,k=()=>{const e=f.current;if(e){const t=e.getBoundingClientRect(),o=t.topwindow.innerHeight/2;return o?n.Placement.bottom:r?n.Placement.top:n.Placement.bottom}return n.Placement.bottom};return d.jsxs("div",{className:"cc-message-bubble__wrapper",ref:f,style:{display:"flex",position:"relative",maxWidth:"65%",width:"fit-content",gap:"4px"},onMouseEnter:()=>{v&&clearTimeout(v),E(!0)},onMouseLeave:()=>{v=setTimeout((()=>{E(!1)}),150)},children:[(()=>{if(s&&h===n.MessageBubbleAlignment.left)return d.jsx("div",{className:"cc-message-bubble__avatar",style:{position:"relative",borderRadius:"inherit",display:"flex",width:"fit-content",alignSelf:"flex-start",marginTop:"5px",padding:"8px 4px"},children:s})})(),d.jsxs("div",{className:"cc-message-bubble",style:V(h,n.MessageBubbleAlignment),children:[(()=>{if(p&&p.length>0&&D)return d.jsx("div",{className:"cc-message-options",style:H(h,n.MessageBubbleAlignment,i,w),children:d.jsx(_,{moreIconURL:A,topMenuSize:x,ContextMenuStyle:Q(w),data:p,moreIconHoverText:"",onOptionClicked:I,placement:S()})})})(),(()=>{if(i)return d.jsx("div",{className:"cc-message-bubble__header",style:G(h,n.MessageBubbleAlignment),children:i})})(),d.jsxs("div",{className:"cc-message-bubble__content",style:{height:m.height,width:m.width},children:[d.jsxs("div",{style:{...m,...y},children:[a||null,l||null,u||null]}),c||null,g||null,C||null]})]})]})};class X{messageBubbleStyle(e,t,o,r){return e.getDeletedAt()?{background:"transparent",border:`1px dashed ${t.palette.getAccent400()}`,borderRadius:"12px"}:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.text||e.getSender()&&r?.getUid()!==e.getSender().getUid()?e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.audio?e.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember?{background:"transparent",borderRadius:"12px",border:`1px solid ${t.palette.getAccent100()}`}:(e.getSender()&&(e.getSender().getUid(),r?.getUid()),{background:t.palette.getAccent100(),borderRadius:"12px"}):{borderRadius:"",background:t.palette.getAccent100()}:{background:o===n.MessageBubbleAlignment.left?t.palette.getAccent100():t.palette.getPrimary(),borderRadius:"12px"}}getContentView(e,t){let o;const r={};return r[`${t.category}_${t.type}`]=t,r[`${e?.getCategory()}_${e?.getType()}`]&&r[`${e?.getCategory()}_${e?.getType()}`]?.contentView?(o=r[`${e?.getCategory()}_${e?.getType()}`]?.contentView(e,n.MessageBubbleAlignment.right),"string"==typeof o?{html:o}:o):null}getBubbleWrapper(e,t){let n;const o={};return o[`${t.category}_${t.type}`]=t,o&&o[`${e?.getCategory()}_${e?.getType()}`]&&o[`${e?.getCategory()}_${e?.getType()}`].bubbleView?(n=o[`${e?.getCategory()}_${e?.getType()}`].bubbleView(e),n):(n=null,n)}getMessageBubble(e,t,n,o){return this.getBubbleWrapper(e,t)?this.getBubbleWrapper(e,t):d.jsx(Z,{bottomView:null,headerView:null,options:[],footerView:null,leadingView:null,statusInfoView:null,contentView:this.getContentView(e,t),replyView:null,threadView:null,alignment:o,messageBubbleStyle:n,id:e?.getId()||e?.getMuid()})}getUserStatusVisible(e){let t=!1;return e instanceof(s.CometChat.User||s.CometChat.GroupMember)&&(e.getBlockedByMe()||e.getHasBlockedMe()||e.getStatus()===n.CometChatUIKitConstants.userStatusType.offline)&&(t=!0),t}}function q(e,t){let o=e;const{type:r}=t;switch(r){case"setSearchText":o={...e,searchText:t.searchText};break;case"appendUsers":let r=[];t.removeOldUsers?(e.disableLoadingState||(e.userList=[]),r=t.users,e.disableLoadingState||(o={...e,userList:r})):t.usersManager&&[0].includes(t.usersManager?.getCurrentPage())&&!t.users.length?!t.users.length&&t.onEmpty&&(setTimeout((()=>{t.onEmpty()})),o={...e,fetchState:n.States.empty}):0!==t.users.length&&(o={...e,userList:1==t.usersManager?.getCurrentPage()?[...t.users]:[...e.userList,...t.users]});break;case"setUserList":o={...e,userList:t.userList};break;case"setFetchState":o={...e,fetchState:t.fetchState};break;case"updateUser":{const{userList:n}=e,{user:r}=t,s=r.getUid(),i=n.findIndex((e=>e.getUid()===s));i>-1&&(o={...e,userList:n.map(((e,t)=>t===i?r:e))});break}case"setIsFirstReload":o={...e,isFirstReload:t.isFirstReload}}return o}function $(e){const{title:o=n.localize("USERS"),tileAlignment:r=n.TitleAlignment.left,hideSearch:i=!1,searchIconURL:a=O,searchPlaceholderText:l=n.localize("SEARCH"),listItemView:c=null,showSectionHeader:C=!0,sectionHeaderKey:A="getName",loadingStateView:x,loadingIconURL:w=j,hideError:f=!1,errorStateView:D,errorStateText:E=n.localize("SOMETHING_WRONG"),emptyStateView:v,emptyStateText:I=n.localize("NO_USERS_FOUND"),subtitleView:S=null,disableUsersPresence:F=!1,menus:k=null,options:M=null,hideSeparator:V=!1,selectionMode:G=n.SelectionMode.none,onSelect:H,usersRequestBuilder:Q=null,searchRequestBuilder:N=null,onItemClick:K,onError:z,statusIndicatorStyle:J=null,avatarStyle:Y=null,usersStyle:_=null,listItemStyle:W=null,activeUser:Z=null,searchKeyword:$="",onEmpty:ee,fetchingUsers:te=!1,fetchTimeOut:ne,userPresencePlacement:oe=n.UserPresencePlacement.bottom,disableLoadingState:re=!1}=e,[se,ie]=t.useReducer(q,{searchText:"",userList:[],fetchState:n.States.loading,isFirstReload:!1,fetchingUsers:te,fetchTimeOut:ne,disableLoadingState:re}),ae=b(z),le=t.useRef(null),ce=t.useRef(""),{theme:Ce}=t.useContext(R),de=t.useRef(!1),ge=t.useRef(!1),ue=t.useRef("");let pe=t.useRef(!0);se.searchText&&se.searchText!==ue.current&&(ue.current=se.searchText),se.isFirstReload&&(de.current=!0,se.isFirstReload=!1);const he=t.useCallback((async e=>{const t=le.current;if(!t)return;let o=ge.current||re&&!pe?n.States.loaded:n.States.loading;ie({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(e!==ce.current)return;let r=!!ge.current;ie({type:"appendUsers",users:o,removeOldUsers:r,usersManager:t,onEmpty:ee}),de.current&&(P.attachConnestionListener((()=>{const e=null===Q?(new s.CometChat.UsersRequestBuilder).setLimit(30):Q;le.current=new P({searchText:ue.current,usersRequestBuilder:e,searchRequestBuilder:N,usersSearchText:ue}),ge.current=!0})),de.current=!1),ge.current?ge.current=!1:ie({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===ce.current&&se.userList?.length<=0&&ie({type:"setFetchState",fetchState:n.States.error}),ae(t)}pe.current=!1}),[ae,ie]),me=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(ue.current="",ie({type:"setSearchText",searchText:e}))}),[ie]),Ae=t.useCallback((e=>{ie({type:"updateUser",user:e})}),[ie]);function xe(e){if(G!==n.SelectionMode.single&&G!==n.SelectionMode.multiple)return null;let t;return t=G===n.SelectionMode.single?d.jsx(U,{onChange:t=>H?.(e,t.detail.checked)}):d.jsx(y,{onChange:t=>H?.(e,t.detail.checked)}),d.jsx("div",{style:{paddingRight:"8px"},children:t})}function be(e){let t;return(t=M?.(e))?.length?d.jsx(L,{data:t,onOptionClick:e=>e.detail.data.onClick?.()}):null}function ye(e){let t=(new X).getUserStatusVisible(e);return F||t?null:_?.onlineStatusColor||Ce.palette.getSuccess()||null}return function(e){const{usersManagerRef:o,fetchNextAndAppendUsers:r,searchText:s,usersRequestBuilder:i,searchRequestBuilder:a,dispatch:l,updateUser:c,fetchNextIdRef:C,searchKeyword:d,disableLoadingState:g,usersSearchText:u}=e;t.useEffect((()=>(i?.searchKeyword?u.current=i?.searchKeyword:a?.searchKeyword&&(u.current=a?.searchKeyword),()=>{i?.setSearchKeyword("")})),[]),t.useEffect((()=>{l({type:"setIsFirstReload",isFirstReload:!0}),o.current=new P({searchText:s,usersRequestBuilder:i,searchRequestBuilder:a,usersSearchText:u}),g||l({type:"setUserList",userList:[]}),r(C.current="initialFetch_"+String(Date.now()))}),[s,i,a,r,l,C,o]),t.useEffect((()=>P.atttachListeners(c)),[c]),t.useEffect((()=>{const e=n.CometChatUserEvents.ccUserBlocked.subscribe(c),t=n.CometChatUserEvents.ccUserUnblocked.subscribe(c);return()=>{e.unsubscribe(),t.unsubscribe()}}),[c]),t.useEffect((()=>{l({type:"setSearchText",searchText:d})}),[d,l])}({usersManagerRef:le,fetchNextAndAppendUsers:he,searchText:se.searchText,usersRequestBuilder:Q,searchRequestBuilder:N,dispatch:ie,updateUser:Ae,fetchNextIdRef:ce,searchKeyword:$,disableLoadingState:re,usersSearchText:ue}),d.jsxs("div",{className:"cc-users",style:u(_,Ce),children:[k?d.jsx("div",{className:"cc-users__menus",style:{position:"absolute",top:"12px",right:"12px"},children:k}):null,d.jsx(T,{title:o,titleAlignment:r,hideSearch:se.fetchState===n.States.error||i,searchIconURL:a,searchPlaceholderText:l,searchText:se.searchText,onSearch:me,list:se.userList,listItem:c||function(e){return d.jsx(B,{id:e.getUid(),avatarURL:e.getAvatar(),avatarName:e.getName(),title:e.getName(),isActive:G===n.SelectionMode.none&&e.getUid()===Z?.getUid(),hideSeparator:V,statusIndicatorColor:ye(e),statusIndicatorStyle:m(J),avatarStyle:h(Y,Ce),listItemStyle:p(W,_,Ce),subtitleView:S?.(e),subtitleViewClassName:"cc-users__subtitle-view",tailView:xe(e),tailViewClassName:"cc-users__tail-view",menuView:be(e),menuViewClassName:"cc-users__options-view",onClick:t=>K?.(e),userPresencePlacement:oe})},onScrolledToBottom:()=>he(ce.current="onScrolledToBottom_"+String(Date.now())),showSectionHeader:C,sectionHeaderKey:A,listItemKey:"getUid",state:se.fetchState!==n.States.loaded||0!==se.userList.length||ee?se.fetchState:n.States.empty,loadingView:x,loadingIconURL:w,hideError:f,errorStateView:D,errorStateText:E,emptyStateView:v,emptyStateText:I,listStyle:g(_,Ce)})]})}function ee(e,t){return{position:"relative",overflowX:"hidden",width:e?.width||"100%",height:e?.height||"100%",boxSizing:"border-box",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),padding:e?.padding||"0",boxShadow:e?.boxShadow||"0"}}function te(e,t){return new r.ListStyle({width:"100%",height:"100%",border:"none",borderRadius:"inherit",background:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent()})}function ne(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent"}}function oe(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent"}}function re(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"28px",height:e?.height||"28px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function se(e){return{...null!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function ie(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function ae(e,t){return new o.LabelStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle1),textColor:e?.textColor||t.palette.getAccent600(),background:"inherit"})}function le(e,t){return new o.MenuListStyle({border:"none",borderRadius:"8px",background:"transparent",moreIconTint:t.palette.getPrimary(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${t.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e?.background||t.palette.getBackground()})}function ce(e,t){return new o.ChangeScopeStyle({height:e?.height||"212px",width:e?.width||"360px",border:e?.border||`1px solid ${t.palette.getAccent200()}`,borderRadius:e?.borderRadius||"12px",background:e?.background||t.palette.getBackground(),titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),activeTextFont:e?.activeTextFont||n.fontHelper(t.typography.subtitle1),activeTextColor:e?.activeTextColor||t.palette.getAccent(),activeTextBackground:e?.activeTextBackground||t.palette.getAccent200(),arrowIconTint:e?.arrowIconTint||t.palette.getAccent900(),textFont:e?.textFont||n.fontHelper(t.typography.subtitle1),textColor:e?.textColor||t.palette.getAccent600(),optionBackground:e?.optionBackground||t.palette.getBackground(),optionBorder:e?.optionBorder||"none",optionBorderRadius:e?.optionBorderRadius||"0",hoverTextFont:e?.hoverTextFont||n.fontHelper(t.typography.subtitle1),hoverTextColor:e?.hoverTextColor||t.palette.getAccent900(),hoverTextBackground:e?.hoverTextBackground||t.palette.getAccent100(),buttonTextFont:e?.buttonTextFont||n.fontHelper(t.typography.title2),buttonTextColor:e?.buttonTextColor||t.palette.getAccent("dark"),buttonBackground:e?.buttonBackground||t.palette.getPrimary(),closeIconTint:e?.closeIconTint||t.palette.getPrimary()})}const Ce=e=>({height:e?.height,width:e?.width,position:"absolute"});var de="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20%5Ci-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%5Ci%20%20%5Cihttp%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%5Ci%3E%3Csvg%20enable-background%3D%22new%200%200%2032%2032%22%20%20id%3D%22%D0%A1%D0%BB%D0%BE%D0%B9_1%22%20version%3D%221.1%22%20viewBox%3D%220%200%2032%2032%22%20%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20d%3D%22M24.285%2C11.284L16%2C19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429%2C0%20%20c-0.394%2C0.395-0.394%2C1.035%2C0%2C1.43l8.999%2C9.002l0%2C0l0%2C0c0.394%2C0.395%2C1.034%2C0.395%2C1.428%2C0l8.999-9.002%20%20c0.394-0.395%2C0.394-1.036%2C0-1.431C25.319%2C10.889%2C24.679%2C10.889%2C24.285%2C11.284z%22%20fill%3D%22%23121313%22%20id%3D%22Expand_More%22%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3C%2Fsvg%3E";class ge{constructor(e){const{searchText:t,groupMemberRequestBuilder:n,searchRequestBuilder:o,groupGuid:r,groupMembersSearchText:i}=e;let a=n||new s.CometChat.GroupMembersRequestBuilder(r).setLimit(30);t&&o?(a=o,a.setSearchKeyword(t)):t&&!o&&n?(a=n,a.setSearchKeyword(t)):!t&&n&&o?(a=n,a.setSearchKeyword(i.current)):t||!n||o?t||n||!o?a.setSearchKeyword(t):a.setSearchKeyword(i.current):(a=n,a.setSearchKeyword(i.current)),this.groupMembersRequest=a.build()}fetchNext(){return this.groupMembersRequest.fetchNext()}getCurrentPage(){return this.groupMembersRequest.pagination.current_page}static attachUserListener(e){const t="GroupMembers_User_"+String(Date.now());return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e})),()=>s.CometChat.removeUserListener(t)}static createParticipantGroupMember(e,t){const o=new s.CometChat.GroupMember(e.getUid(),n.CometChatUIKitConstants.groupMemberScope.participant);return o.setName(e.getName()),o.setGuid(t.getGuid()),o.setUid(e.getUid()),o}static attachGroupListener(e,t){const n="GroupMembers_Group_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(n,o,r,s,i)=>{i.getGuid()===e&&t({type:"updateGroupMemberScopeIfPresent",groupMemberUid:o.getUid(),newScope:r})},onGroupMemberKicked:(n,o,r,s)=>{s.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onGroupMemberBanned:(n,o,r,s)=>{s.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onMemberAddedToGroup:(n,o,r,s)=>{s.getGuid()===e&&t({type:"appendGroupMember",groupMember:ge.createParticipantGroupMember(o,s)})},onGroupMemberLeft:(n,o,r)=>{r.getGuid()===e&&t({type:"removeGroupMemberIfPresent",groupMemberUid:o.getUid()})},onGroupMemberJoined:(n,o,r)=>{r.getGuid()===e&&t({type:"appendGroupMember",groupMember:ge.createParticipantGroupMember(o,r)})}})),()=>s.CometChat.removeGroupListener(n)}}var ue="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fmoreicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.5%2C10%20C5.88071187%2C10%207%2C11.1192881%207%2C12.5%20C7%2C13.8807119%205.88071187%2C15%204.5%2C15%20C3.11928813%2C15%202%2C13.8807119%202%2C12.5%20C2%2C11.1192881%203.11928813%2C10%204.5%2C10%20Z%20M12%2C10%20C13.3807119%2C10%2014.5%2C11.1192881%2014.5%2C12.5%20C14.5%2C13.8807119%2013.3807119%2C15%2012%2C15%20C10.6192881%2C15%209.5%2C13.8807119%209.5%2C12.5%20C9.5%2C11.1192881%2010.6192881%2C10%2012%2C10%20Z%20M19.5%2C10%20C20.8807119%2C10%2022%2C11.1192881%2022%2C12.5%20C22%2C13.8807119%2020.8807119%2C15%2019.5%2C15%20C18.1192881%2C15%2017%2C13.8807119%2017%2C12.5%20C17%2C11.1192881%2018.1192881%2C10%2019.5%2C10%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",pe="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",he="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",me="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Ae(e,t){let o=e;const{type:r}=t;switch(r){case"appendGroupMembers":{const{groupMembers:r,groupMembersManager:s,onEmpty:i}=t;s&&[0].includes(s?.getCurrentPage())&&!r.length?!r.length&&i&&(setTimeout((()=>{i()})),o={...e,fetchState:n.States.empty}):0!==r.length&&(o={...e,groupMemberList:1==s?.getCurrentPage()?[...r]:[...e.groupMemberList,...r]});break}case"setSearchText":o={...e,searchText:t.searchText};break;case"setFetchState":o={...e,fetchState:t.fetchState};break;case"setGroupMemberList":o={...e,groupMemberList:t.groupMemberList};break;case"removeGroupMemberIfPresent":{const n=t.groupMemberUid,r=e.groupMemberList.findIndex((e=>e.getUid()===n));r>-1&&(o={...e,groupMemberList:e.groupMemberList.filter(((e,t)=>t!==r))});break}case"setGroupMemberToChangeScopeOf":o={...e,groupMemberToChangeScopeOf:t.groupMember};break;case"replaceGroupMemberIfPresent":{const{updatedGroupMember:n}=t,r=n.getUid(),s=e.groupMemberList.findIndex((e=>e.getUid()===r));s>-1&&(o={...e,groupMemberList:e.groupMemberList.map(((e,t)=>t!==s?e:n))});break}case"updateGroupMemberStatusIfPresent":{const{user:n}=t,{groupMemberList:r}=e,s=n.getUid(),i=r.findIndex((e=>e.getUid()===s));i>-1&&(o={...e,groupMemberList:r.map(((e,t)=>(t===i&&e.setStatus(n.getStatus()),e)))});break}case"updateGroupMemberScopeIfPresent":{const{groupMemberUid:n,newScope:r}=t,{groupMemberList:s}=e,i=s.findIndex((e=>e.getUid()===n));i>-1&&(o={...e,groupMemberList:s.map(((e,t)=>(t===i&&e.setScope(r),e)))});break}case"appendGroupMember":o={...e,groupMemberList:[...e.groupMemberList,t.groupMember]}}return o}function xe(e){const{backButtonIconURL:o=he,showBackButton:i=!1,onBack:a,menus:l=null,title:c=n.localize("MEMBERS"),titleAlignment:C=n.TitleAlignment.center,searchPlaceholder:g=n.localize("SEARCH"),searchIconURL:u=pe,hideSearch:p=!1,groupMemberRequestBuilder:h=null,searchRequestBuilder:m=null,group:w,onError:f,emptyStateText:D=n.localize("NO_USERS_FOUND"),errorStateText:E=n.localize("SOMETHING_WRONG"),loadingIconURL:v=me,loadingStateView:I,errorStateView:S,errorSateView:F,emptyStateView:k,hideError:M=!1,hideSeparator:P=!0,disableUsersPresence:O=!1,subtitleView:j=null,listItemView:V=null,options:G=null,dropDownIconURL:H=de,tailView:Q=null,selectionMode:N=n.SelectionMode.none,onItemClick:K=null,onSelect:z=null,closeButtonIconURL:J="",onClose:_,avatarStyle:W=null,statusIndicatorStyle:Z=null,listItemStyle:q=null,groupScopeStyle:$=null,groupMembersStyle:xe=null,searchKeyword:be="",onEmpty:ye,fetchTimeOut:we,userPresencePlacement:fe=n.UserPresencePlacement.bottom,disableLoadingState:De=!1}=e,[Ee,ve]=t.useReducer(Ae,{groupMemberList:[],fetchState:n.States.loading,searchText:"",groupMemberToChangeScopeOf:null,fetchTimeOut:we,disableLoadingState:De}),Ie=t.useRef(null),Se=t.useRef(null),Fe=t.useRef(""),[ke,Te]=x(null),Me=A(w),Be=b(f),{theme:Le}=t.useContext(R),Ue=t.useRef(""),Re=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(Ue.current="",ve({type:"setSearchText",searchText:e}))}),[ve]),Pe=t.useCallback((async e=>{const t=Ie.current;if(t){De||ve({type:"setFetchState",fetchState:n.States.loading});try{const o=await t.fetchNext();if(e!==Fe.current)return;ve({type:"appendGroupMembers",groupMembers:o,groupMembersManager:t,onEmpty:ye}),ve({type:"setFetchState",fetchState:n.States.loaded})}catch(e){ve({type:"setFetchState",fetchState:n.States.error}),Be(e)}}}),[ve,Be]),Oe=t.useCallback(((e,t,o,i)=>{const a=new s.CometChat.Action(o.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return a.setAction(t),a.setActionBy(r.CometChatUIKitUtility.clone(i)),a.setSender(r.CometChatUIKitUtility.clone(i)),a.setMessage(`${i.getUid()} ${t} ${e.getUid()}`),a.setActionFor(r.CometChatUIKitUtility.clone(o)),a.setActionOn(r.CometChatUIKitUtility.clone(e)),a.setReceiver(r.CometChatUIKitUtility.clone(o)),a.setConversationId("group_"+o.getGuid()),a.setMuid(r.CometChatUIKitUtility.ID()),a.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),a.setReceiverType(n.CometChatUIKitConstants.MessageReceiverType.group),a.setRawData({extras:{scope:{new:e.getScope()}}}),a}),[]),je=async e=>{const t=Se.current;if(t)try{const o=Me.current;await s.CometChat.banGroupMember(o.getGuid(),e.getUid()),ve({type:"removeGroupMemberIfPresent",groupMemberUid:e.getUid()});const i=r.CometChatUIKitUtility.clone(o);i.setMembersCount(i.getMembersCount()-1),n.CometChatGroupEvents.ccGroupMemberBanned.next({kickedBy:r.CometChatUIKitUtility.clone(t),kickedFrom:i,kickedUser:r.CometChatUIKitUtility.clone(e),message:Oe(e,n.CometChatUIKitConstants.groupMemberAction.BANNED,i,t)})}catch(e){Be(e)}},Ve=async e=>{const t=Se.current;if(t)try{const o=Me.current;await s.CometChat.kickGroupMember(o.getGuid(),e.getUid()),ve({type:"removeGroupMemberIfPresent",groupMemberUid:e.getUid()});const i=r.CometChatUIKitUtility.clone(o);i.setMembersCount(i.getMembersCount()-1),n.CometChatGroupEvents.ccGroupMemberKicked.next({kickedBy:r.CometChatUIKitUtility.clone(t),kickedFrom:r.CometChatUIKitUtility.clone(i),kickedUser:r.CometChatUIKitUtility.clone(e),message:Oe(e,n.CometChatUIKitConstants.groupMemberAction.KICKED,i,t)})}catch(e){Be(e)}},{groupMemberToChangeScopeOf:Ge}=Ee,He=t.useCallback((async e=>{const t=Se.current;if(Ge&&t)try{const o=e,i=Me.current;await s.CometChat.updateGroupMemberScope(i.getGuid(),Ge.getUid(),o);const a=r.CometChatUIKitUtility.clone(Ge);a.setScope(o),ve({type:"replaceGroupMemberIfPresent",updatedGroupMember:a}),n.CometChatGroupEvents.ccGroupMemberScopeChanged.next({scopeChangedFrom:Ge.getScope(),scopeChangedTo:a.getScope(),message:Oe(a,n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE,i,t),group:r.CometChatUIKitUtility.clone(i),updatedUser:r.CometChatUIKitUtility.clone(a)})}catch(e){Be(e)}finally{ve({type:"setGroupMemberToChangeScopeOf",groupMember:null})}}),[Be,ve,Oe,Ge,Me]);function Qe(e,t){return e===n.CometChatUIKitConstants.GroupMemberOptions.ban?je(t):e===n.CometChatUIKitConstants.GroupMemberOptions.kick?Ve(t):e===n.CometChatUIKitConstants.GroupMemberOptions.changeScope?ve({type:"setGroupMemberToChangeScopeOf",groupMember:t}):void 0}function Ne(e){let t;return null===Q&&(t=G?.(w,e))?.length?d.jsx(L,{data:t,menuListStyle:le(xe,Le),onOptionClick:t=>{const{id:n,onClick:o}=t.detail.data;o?o():"string"==typeof n&&Qe(n,e)}}):null}function Ke(e){return N===n.SelectionMode.single?d.jsx(U,{onChange:t=>z?.(e,t.detail.checked)}):N===n.SelectionMode.multiple?d.jsx(y,{onChange:t=>z?.(e,t.detail.checked)}):null}function ze(e,t){return"string"==typeof e?d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(ae(xe,Le))}):d.jsx(L,{topMenuSize:0,data:e,moreIconURL:ue,menuListStyle:le(xe,Le),onOptionClick:e=>{const{id:n}=e.detail.data;"string"==typeof n&&Qe(n,t)}})}function Je(e){return null!==Q?null:d.jsx("div",{className:"cc-group-members__tail-view-content",children:ze(r.GroupMemberUtils.getViewMemberOptions(e,w,Se.current?.getUid(),Le),e)})}function Ye(e){return d.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",columnGap:"8px"},children:[Q?.(e),Ke(e),Je(e)]})}function _e(e){let t=(new X).getUserStatusVisible(e);return O||t?null:xe?.onlineStatusColor||Le.palette.getSuccess()||null}function We(e){return d.jsx(B,{id:e.getUid(),title:e.getName(),avatarURL:e.getAvatar(),avatarName:e.getName(),hideSeparator:P,isActive:Ee.groupMemberToChangeScopeOf?.getUid()===e.getUid(),avatarStyle:re(W,Le),statusIndicatorColor:_e(e),statusIndicatorStyle:se(Z),listItemStyle:ie(q,xe,Le),subtitleViewClassName:"cc-group-members__subtitle-view",subtitleView:j?.(e),tailViewClassName:"cc-group-members__tail-view",tailView:Ye(e),menuViewClassName:"cc-group-members__options-view",menuView:Ne(e),onClick:t=>K?.(e),userPresencePlacement:fe})}return function(e){const{groupMemberRequestBuilder:o,searchRequestBuilder:r,searchText:i,groupMembersManagerRef:a,groupGuid:l,fetchNextAndAppendGroupMembers:c,fetchNextIdRef:C,dispatch:d,loggedInUserRef:g,errorHandler:u,changeScopeElement:p,updateGroupMemberScope:h,searchKeyword:m,disableLoadingState:A,groupMembersSearchText:x}=e;t.useEffect((()=>(o?.searchKeyword?x.current=o?.searchKeyword:r?.searchKeyword&&(x.current=r?.searchKeyword),()=>{o?.setSearchKeyword("")})),[]),t.useEffect((()=>{(async()=>{try{g.current=await s.CometChat.getLoggedinUser()}catch(e){u(e)}})()}),[u,g]),t.useEffect((()=>{a.current=new ge({searchText:i,groupMemberRequestBuilder:o,searchRequestBuilder:r,groupGuid:l,groupMembersSearchText:x}),A||d({type:"setGroupMemberList",groupMemberList:[]}),c(C.current="initialFetchNext_"+String(Date.now()))}),[o,r,i,l,c,d,C,a]),t.useEffect((()=>{if(!p)return;const e="cc-changescope-close-clicked",t="cc-changescope-changed";function n(){d({type:"setGroupMemberToChangeScopeOf",groupMember:null})}function o(e){const t=e.detail?.value;t&&h(t)}return p.addEventListener(e,n),p.addEventListener(t,o),()=>{p.removeEventListener(e,n),p.removeEventListener(t,o)}}),[p,h,d]),t.useEffect((()=>ge.attachUserListener((e=>d({type:"updateGroupMemberStatusIfPresent",user:e})))),[d]),t.useEffect((()=>ge.attachGroupListener(l,d)),[l,d]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{const{kickedUser:t}=e;d({type:"removeGroupMemberIfPresent",groupMemberUid:t.getUid()})})),t=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{const{kickedUser:t}=e;d({type:"removeGroupMemberIfPresent",groupMemberUid:t.getUid()})})),o=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{const{updatedUser:t,scopeChangedTo:n}=e;d({type:"updateGroupMemberScopeIfPresent",groupMemberUid:t.getUid(),newScope:n})})),r=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{const{usersAdded:t,userAddedIn:n}=e;let o=a.current;d({type:"appendGroupMembers",groupMembersManager:o,groupMembers:t.map((e=>ge.createParticipantGroupMember(e,n)))})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),r.unsubscribe()}}),[d]),t.useEffect((()=>{d({type:"setSearchText",searchText:m})}),[m,d])}({groupMemberRequestBuilder:h,searchRequestBuilder:m,searchText:Ee.searchText,groupMembersManagerRef:Ie,groupGuid:w.getGuid(),fetchNextAndAppendGroupMembers:Pe,fetchNextIdRef:Fe,dispatch:ve,loggedInUserRef:Se,errorHandler:Be,changeScopeElement:ke,updateGroupMemberScope:He,searchKeyword:be,disableLoadingState:De,groupMembersSearchText:Ue}),d.jsxs("div",{className:"cc-group-members",style:ee(xe,Le),children:[d.jsxs("div",{className:"cc-group-members__list-wrapper",style:{position:"relative",height:"100%"},children:[null===l?null:d.jsx("div",{className:"cc-group-members__menus",style:{position:"absolute",right:"12px",top:"8px",cursor:"pointer"},children:l}),d.jsx(T,{title:c,titleAlignment:C,searchPlaceholderText:g,searchIconURL:u,searchText:Ee.searchText,onSearch:Re,hideSearch:p,list:Ee.groupMemberList,listItemKey:"getUid",listItem:null!==V?V:We,showSectionHeader:!1,onScrolledToBottom:()=>Pe(Fe.current="onScrolledToBottom_"+String(Date.now())),state:Ee.fetchState===n.States.loaded&&0===Ee.groupMemberList.length?n.States.empty:Ee.fetchState,loadingIconURL:v,emptyStateText:D,errorStateText:E,loadingView:I,emptyStateView:k,errorStateView:S||F,hideError:M,listStyle:te(xe,Le)})]}),i?d.jsx("div",{className:"cc-group-members__back-btns-wrapper",style:{position:"absolute",left:"16px",top:"19px",width:"fit-content",height:"fit-content"},children:d.jsx(Y,{iconURL:o,buttonStyle:ne(xe,Le),onClick:a})}):null,J?d.jsx("div",{className:"cc-group-members__close-btns-wrapper",style:{position:"absolute",right:"16px",top:"19px",width:"fit-content",height:"fit-content"},children:d.jsx(Y,{iconURL:J,buttonStyle:oe(xe,Le),onClick:_})}):null,function(){let e;const{groupMemberToChangeScopeOf:t}=Ee;return null!==t&&(e=r.GroupMemberUtils.allowScopeChange(w,t)).length>0?d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(Ce(xe)),children:d.jsx("cometchat-change-scope",{ref:Te,options:JSON.stringify(e),arrowIconURL:H,changeScopeStyle:JSON.stringify(ce($,Le))})}):null}()]})}function be(e){const{userMemberListType:o=n.UserMemberListType.users,onItemClick:r,listItemView:s,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,group:c,subtitleView:C,usersRequestBuilder:g,userPresencePlacement:u=n.UserPresencePlacement.bottom,loadingStateView:p,onEmpty:h,groupMemberRequestBuilder:m,loadingIconUrl:A,disableLoadingState:x=!1,hideSeparator:b=!1,onError:y,disableUsersPresence:w}=e,{theme:f}=t.useContext(R);return d.jsxs(d.Fragment,{children:[o===n.UserMemberListType.users&&d.jsx($,{title:"",hideSearch:!0,hideSeparator:b,showSectionHeader:!1,onItemClick:r,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,listItemView:s,usersRequestBuilder:g,subtitleView:C,closeButtonIconURL:"",loadingStateView:p,onEmpty:h,loadingIconURL:A,userPresencePlacement:u,disableLoadingState:x,disableUsersPresence:w,onError:y,usersStyle:{border:"1px solid "+f.palette.getAccent300(),background:f.palette.getBackground(),minHeight:"45px",borderRadius:"12px 12px 12px 12px"}}),o===n.UserMemberListType.groupmembers&&c&&d.jsx(xe,{group:c,title:"",hideSearch:!0,showBackButton:!1,hideSeparator:b,groupMemberRequestBuilder:m,onItemClick:r,avatarStyle:i,statusIndicatorStyle:a,searchKeyword:l,listItemView:s,subtitleView:C,closeButtonIconURL:"",userPresencePlacement:u,onEmpty:h,loadingIconURL:A,tailView:e=>d.jsx(d.Fragment,{}),disableLoadingState:x,disableUsersPresence:w,onError:y,groupMembersStyle:{border:"1px solid "+f.palette.getAccent300(),padding:"0px",background:f.palette.getBackground(),borderRadius:"12px 12px 12px 12px"}})]})} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const le=new Set(["children","localName","ref","style","className"]),ce=new WeakMap,Ce=(e,t,n,o,r)=>{const s=null==r?void 0:r[t];void 0===s||n===o?null==n&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=n:((e,t,n)=>{let o=ce.get(e);void 0===o&&ce.set(e,o=new Map);let r=o.get(t);void 0!==n?void 0===r?(o.set(t,r={handleEvent:n}),e.addEventListener(t,r)):r.handleEvent=n:void 0!==r&&(o.delete(t),e.removeEventListener(t,r))})(e,s,n)};function de(e=window.React,t,n,o,r){let s,i,a;if(void 0===t){const t=e;({tagName:i,elementClass:a,events:o,displayName:r}=t),s=t.react}else s=e,a=n,i=t;const l=s.Component,c=s.createElement,C=new Set(Object.keys(null!=o?o:{}));class d extends l{constructor(){super(...arguments),this.o=null}t(e){if(null!==this.o)for(const t in this.i)Ce(this.o,t,this.props[t],e?e[t]:void 0,o)}componentDidMount(){var e;this.t(),null===(e=this.o)||void 0===e||e.removeAttribute("defer-hydration")}componentDidUpdate(e){this.t(e)}render(){const{_$Gl:e,...t}=this.props;this.h!==e&&(this.u=t=>{null!==e&&((e,t)=>{"function"==typeof e?e(t):e.current=t})(e,t),this.o=t,this.h=e}),this.i={};const n={ref:this.u};for(const[e,o]of Object.entries(t))le.has(e)?n["className"===e?"class":e]=o:C.has(e)||e in a.prototype?this.i[e]=o:n[e]=o;return n.suppressHydrationWarning=!0,c(i,n)}}d.displayName=null!=r?r:a.name;const g=s.forwardRef(((e,t)=>c(d,{...e,_$Gl:t},null==e?void 0:e.children)));return g.displayName=d.displayName,g}const ge=de({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t}),ue=de({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t,events:{ccImageClicked:"cc-image-clicked"}}),pe=de({tagName:"cometchat-audio-bubble",elementClass:o.CometChatAudioBubble,react:t}),he=de({tagName:"cometchat-video-bubble",elementClass:o.CometChatVideoBubble,react:t}),me=de({tagName:"cometchat-file-bubble",elementClass:o.CometChatFileBubble,react:t}),Ae=de({tagName:"cometchat-form-bubble",elementClass:r.CometChatFormBubble,react:t,events:{ccSubmitClicked:"cc-submit-clicked"}}),xe=de({tagName:"cometchat-scheduler-bubble",elementClass:r.CometChatSchedulerBubble,react:t}),be=de({tagName:"cometchat-card-bubble",elementClass:r.CometChatCardBubble,react:t}),ye=de({tagName:"cometchat-full-screen-viewer",elementClass:o.CometChatFullScreenViewer,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),we=new n.CometChatTheme({});class fe{constructor(){this.getSchedulerBubbleStyle=e=>{let t=new o.AvatarStyle({borderRadius:"50%",width:"48px",height:"48px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),s=new o.ListItemStyle({height:"auto",width:"100%",background:"inherit",activeBackground:"transparent",borderRadius:"0",titleFont:n.fontHelper(e.typography.text1),titleColor:e.palette.getAccent(),border:"none",separatorColor:"",hoverBackground:"transparent"}),i=new r.CalendarStyle({height:"100%",width:"100%",border:"none",borderRadius:"0",background:"transparent",dateTextFont:n.fontHelper(e.typography.subtitle2),dateTextColor:e.palette.getAccent(),dayTextFont:n.fontHelper(e.typography.text2),dayTextColor:e.palette.getAccent(),monthYearTextFont:n.fontHelper(e.typography.text2),monthYearTextColor:e.palette.getAccent(),defaultDateTextBackground:"transparent",disabledDateTextColor:e.palette.getAccent400(),disabledDateTextFont:n.fontHelper(e.typography.subtitle2),disabledDateTextBackground:"transparent",titleTextFont:n.fontHelper(e.typography.text1),titleTextColor:e.palette.getAccent(),timezoneTextFont:n.fontHelper(e.typography.caption2),timezoneTextColor:e.palette.getAccent(),arrowButtonTextColor:e.palette.getAccent(),arrowButtonTextFont:n.fontHelper(e.typography.title2)}),a=new r.TimeSlotStyle({background:"transparent",height:"fit-content",width:"100%",border:"none",borderRadius:"0",calendarIconTint:e.palette.getAccent(),timezoneIconTint:e.palette.getAccent(),emptySlotIconTint:e.palette.getAccent500(),emptySlotTextColor:e.palette.getAccent500(),emptySlotTextFont:n.fontHelper(e.typography.subtitle1),dateTextColor:e.palette.getAccent(),dateTextFont:n.fontHelper(e.typography.subtitle1),seperatorTint:e.palette.getAccent100(),slotBackground:e.palette.getAccent900(),slotBorder:"none",slotBorderRadius:"8px",slotTextColor:e.palette.getAccent(),slotTextFont:n.fontHelper(e.typography.caption2),timezoneTextColor:e.palette.getAccent(),timezoneTextFont:n.fontHelper(e.typography.caption2),titleTextColor:e.palette.getAccent(),titleTextFont:n.fontHelper(e.typography.text1)}),l=new o.QuickViewStyle({background:e.palette.getAccent50(),height:"fit-content",width:"100%",titleFont:n.fontHelper(e.typography.subtitle2),titleColor:e.palette.getAccent(),subtitleFont:n.fontHelper(e.typography.subtitle2),subtitleColor:e.palette.getAccent600(),leadingBarTint:e.palette.getPrimary(),leadingBarWidth:"4px",borderRadius:"8px"});return new r.SchedulerBubbleStyle({avatarStyle:t,listItemStyle:s,quickViewStyle:l,dateSelectorStyle:i,timeSlotSelectorStyle:a,backButtonIconTint:e.palette.getPrimary(),background:"transparent",height:"100%",width:"100%",border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"8px",loadingIconTint:e.palette.getAccent600(),suggestedTimeBackground:e.palette.getAccent900(),suggestedTimeBorder:`1px solid ${e.palette.getPrimary()}`,suggestedTimeBorderRadius:"8px",suggestedTimeDisabledBackground:e.palette.getAccent50(),suggestedTimeDisabledBorder:`1px solid ${e.palette.getAccent200()}`,suggestedTimeDisabledBorderRadius:"8px",suggestedTimeDisabledTextColor:e.palette.getAccent700(),suggestedTimeDisabledTextFont:n.fontHelper(e.typography.text3),suggestedTimeTextColor:e.palette.getPrimary(),suggestedTimeTextFont:n.fontHelper(e.typography.text3),moreButtonDisabledTextBackground:"transparent",moreButtonDisabledTextBorder:"none",moreButtonDisabledTextBorderRadius:"0",moreButtonDisabledTextColor:e.palette.getAccent600(),moreButtonDisabledTextFont:n.fontHelper(e.typography.caption2),moreButtonTextBackground:"transparent",moreButtonTextBorder:"none",moreButtonTextBorderRadius:"0",moreButtonTextColor:e.palette.getPrimary(),moreButtonTextFont:n.fontHelper(e.typography.caption2),goalCompletionTextColor:e.palette.getAccent(),goalCompletionTextFont:n.fontHelper(e.typography.text3),errorTextColor:e.palette.getError(),errorTextFont:n.fontHelper(e.typography.text3),scheduleButtonStyle:{iconHeight:"16px",iconWidth:"16px",buttonIconTint:e.palette.getAccent(),buttonTextFont:n.fontHelper(e.typography.name),buttonTextColor:e.palette.getAccent("dark"),border:"none",borderRadius:"8px",background:e.palette.getPrimary(),width:"100%",display:"flex",justifyContent:"center",padding:"8px"},seperatorTint:e.palette.getAccent200(),subtitleTextColor:e.palette.getAccent400(),subtitleTextFont:n.fontHelper(e.typography.name),summaryTextColor:e.palette.getAccent(),summaryTextFont:n.fontHelper(e.typography.subtitle1),timezoneTextColor:e.palette.getAccent600(),timezoneTextFont:n.fontHelper(e.typography.caption2),titleTextColor:e.palette.getAccent(),titleTextFont:n.fontHelper(e.typography.title1),timezoneIconTint:e.palette.getAccent(),calendarIconTint:e.palette.getAccent(),clockIconTint:e.palette.getAccent()})}}getEditOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.editMessage,title:n.localize("EDIT"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fediticon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FEdit%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.8666667%2C0.883555287%20C17.2934403%2C0.312679329%2016.5158214%2C-0.00540815756%2015.7068357%2C0%20C14.8978501%2C0.00554734575%2014.1246099%2C0.334135909%2013.5591667%2C0.912721954%20L1.47583333%2C12.9960553%20L0%2C18.750222%20L5.75416667%2C17.2743886%20L17.8375%2C5.19105529%20C18.416086%2C4.6256121%2018.7446746%2C3.8523719%2018.750222%2C3.04338623%20C18.7556301%2C2.23440057%2018.4375426%2C1.45678164%2017.8666667%2C0.883555287%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2213.2133333%22%20y1%3D%221.25855529%22%20x2%3D%2217.4916667%22%20y2%3D%225.53688862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211.4683333%22%20y1%3D%223.00355529%22%20x2%3D%2215.7466667%22%20y2%3D%227.28188862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%221.47583333%22%20y1%3D%2212.9960553%22%20x2%3D%225.75833333%22%20y2%3D%2217.270222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getDeleteOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.deleteMessage,title:n.localize("DELETE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fdeleteicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getReactionOption(e){return new n.CometChatActionsView({id:n.CometChatUIKitConstants.MessageOption.reactToMessage,title:n.localize("REACT"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FReactions%20Add%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FReactions-Add%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C1.25%20C13.2547515%2C1.25%2014.4810955%2C1.46534515%2015.6383943%2C1.88154366%20C16.0281686%2C2.02171794%2016.2305095%2C2.45132619%2016.0903352%2C2.84110054%20C15.9501609%2C3.2308749%2015.5205527%2C3.43321574%2015.1307783%2C3.29304146%20C14.1357379%2C2.9351958%2013.0810879%2C2.75%2012%2C2.75%20C6.89136606%2C2.75%202.75%2C6.89136606%202.75%2C12%20C2.75%2C17.1086339%206.89136606%2C21.25%2012%2C21.25%20C17.1086339%2C21.25%2021.25%2C17.1086339%2021.25%2C12%20C21.25%2C11.2729266%2021.1662576%2C10.5573695%2021.0020875%2C9.8629795%20C20.906785%2C9.45987863%2021.1563049%2C9.05584287%2021.5594058%2C8.96054036%20C21.9625066%2C8.86523784%2022.3665424%2C9.11475771%2022.4618449%2C9.51785857%20C22.6527043%2C10.3251362%2022.75%2C11.1565032%2022.75%2C12%20C22.75%2C17.9370611%2017.9370611%2C22.75%2012%2C22.75%20C6.06293894%2C22.75%201.25%2C17.9370611%201.25%2C12%20C1.25%2C6.06293894%206.06293894%2C1.25%2012%2C1.25%20Z%20M17.6586667%2C13.25%20C18.1185754%2C13.25%2018.5498402%2C13.4733153%2018.8153335%2C13.8488361%20C19.0808092%2C14.2243322%2019.1475058%2C14.7053253%2018.9944111%2C15.1383417%20C17.9483179%2C18.1044405%2015.1451634%2C20.0881971%2012%2C20.0881971%20C8.85483662%2C20.0881971%206.05168206%2C18.1044405%205.00578211%2C15.1388889%20C4.85249421%2C14.7053253%204.91919084%2C14.2243322%205.18466653%2C13.8488361%20C5.45015977%2C13.4733153%205.88142461%2C13.25%206.34133333%2C13.25%20L6.34133333%2C13.25%20Z%20M17.558%2C14.695%20L17.538%2C14.749%20L6.461%2C14.749%20L6.50827179%2C14.8734156%20C7.3732069%2C17.0322917%209.42640021%2C18.4853104%2011.750045%2C18.5829516%20L11.750045%2C18.5829516%20L12%2C18.5881971%20C14.5090629%2C18.5881971%2016.7452873%2C17.0056497%2017.5800043%2C14.6388889%20L17.558%2C14.695%20Z%20M8.11422222%2C8.58288148%20C9.2798673%2C8.58288148%2010.3188817%2C9.31776232%2010.7071667%2C10.4168361%20C10.8451443%2C10.8073935%2010.6403879%2C11.2358557%2010.2498306%2C11.3738333%20C9.89181964%2C11.5003128%209.50195808%2C11.3388005%209.33318946%2C11.0101749%20L9.29283333%2C10.9164972%20C9.11634015%2C10.4169182%208.6440609%2C10.0828815%208.11422222%2C10.0828815%20C7.62853677%2C10.0828815%207.19121722%2C10.3635651%206.98575875%2C10.7951488%20L6.93561111%2C10.9164972%20C6.79763351%2C11.3070546%206.36917126%2C11.5118109%205.97861389%2C11.3738333%20C5.58805653%2C11.2358557%205.38330017%2C10.8073935%205.52127778%2C10.4168361%20C5.90956279%2C9.31776232%206.94857714%2C8.58288148%208.11422222%2C8.58288148%20Z%20M15.8857778%2C8.58288148%20C17.0514229%2C8.58288148%2018.0904372%2C9.31776232%2018.4787222%2C10.4168361%20C18.6166998%2C10.8073935%2018.4119435%2C11.2358557%2018.0213861%2C11.3738333%20C17.6633752%2C11.5003128%2017.2735136%2C11.3388005%2017.104745%2C11.0101749%20L17.0643889%2C10.9164972%20C16.8878957%2C10.4169182%2016.4156165%2C10.0828815%2015.8857778%2C10.0828815%20C15.4000923%2C10.0828815%2014.9627728%2C10.3635651%2014.7573143%2C10.7951488%20L14.7071667%2C10.9164972%20C14.5691891%2C11.3070546%2014.1407268%2C11.5118109%2013.7501694%2C11.3738333%20C13.3596121%2C11.2358557%2013.1548557%2C10.8073935%2013.2928333%2C10.4168361%20C13.6811183%2C9.31776232%2014.7201327%2C8.58288148%2015.8857778%2C8.58288148%20Z%20M19.5%2C0.25%20C19.8796958%2C0.25%2020.193491%2C0.532153882%2020.2431534%2C0.898229443%20L20.25%2C1%20L20.25%2C4.25%20L23%2C4.25%20C23.4142136%2C4.25%2023.75%2C4.58578644%2023.75%2C5%20C23.75%2C5.37969577%2023.4678461%2C5.69349096%2023.1017706%2C5.74315338%20L23%2C5.75%20L20.25%2C5.75%20L20.25%2C9%20C20.25%2C9.41421356%2019.9142136%2C9.75%2019.5%2C9.75%20C19.1203042%2C9.75%2018.806509%2C9.46784612%2018.7568466%2C9.10177056%20L18.75%2C9%20L18.75%2C5.75%20L16%2C5.75%20C15.5857864%2C5.75%2015.25%2C5.41421356%2015.25%2C5%20C15.25%2C4.62030423%2015.5321539%2C4.30650904%2015.8982294%2C4.25684662%20L16%2C4.25%20L18.75%2C4.25%20L18.75%2C1%20C18.75%2C0.585786438%2019.0857864%2C0.25%2019.5%2C0.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",customView:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getReplyInThreadOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.replyInThread,title:n.localize("REPLY"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fthreadicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FThread%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.6578236%2C0%20C7.2733682%2C-0.00487001799%204.15271669%2C1.82840041%202.50707282%2C4.78828665%20C0.861428952%2C7.74817289%200.949909343%2C11.3686229%202.73817252%2C14.2444485%20L0%2C20%20L5.74989584%2C17.2595575%20C9.11259725%2C19.3520226%2013.4289699%2C19.0910325%2016.5155083%2C16.6086132%20C19.6020468%2C14.1261939%2020.7857069%2C9.9636565%2019.4677154%2C6.22668649%20C18.1497239%2C2.48971647%2014.6174794%2C-0.00681020874%2010.6578236%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%226.66667597%22%20x2%3D%2214.6527312%22%20y2%3D%226.66667597%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%225.3271355%22%20y1%3D%229.33334078%22%20x2%3D%2215.9849591%22%20y2%3D%229.33334078%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%2212.0000056%22%20x2%3D%2214.6527312%22%20y2%3D%2212.0000056%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getSendMessagePrivatelyOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.sendMessagePrivately,title:n.localize("MESSAGE_PRIVATELY"),iconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.8%2015.0099H21V21H13.8V15.0099Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.4%2011.4158C16.7635%2011.4158%2016.153%2011.6682%2015.7029%2012.1176C15.2529%2012.5669%2015%2013.1764%2015%2013.8118V15.0099H19.8V13.8118C19.8%2013.1764%2019.5471%2012.5669%2019.0971%2012.1176C18.647%2011.6682%2018.0365%2011.4158%2017.4%2011.4158Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.3995%2017.7286C17.3402%2017.7286%2017.2823%2017.7461%2017.2331%2017.7791C17.1838%2017.812%2017.1454%2017.8587%2017.1228%2017.9135C17.1001%2017.9682%2017.0942%2018.0284%2017.1057%2018.0865C17.1173%2018.1446%2017.1458%2018.198%2017.1877%2018.2399C17.2296%2018.2818%2017.283%2018.3103%2017.3411%2018.3218C17.3992%2018.3334%2017.4594%2018.3275%2017.5141%2018.3048C17.5688%2018.2821%2017.6156%2018.2437%2017.6485%2018.1945C17.6814%2018.1452%2017.699%2018.0873%2017.699%2018.0281C17.699%2017.9486%2017.6674%2017.8725%2017.6113%2017.8163C17.5551%2017.7601%2017.4789%2017.7286%2017.3995%2017.7286%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%2010.8503C20.9168%209.57663%2020.5439%208.33868%2019.9096%207.23051C19.2753%206.12235%2018.3962%205.17314%2017.3393%204.45503C16.2824%203.73692%2015.0754%203.26882%2013.8101%203.0863C12.5448%202.90378%2011.2545%203.01164%2010.0372%203.4017C8.81989%203.79176%207.70769%204.45374%206.78512%205.33732C5.86254%206.22091%205.15388%207.30285%204.71298%208.5009C4.27209%209.69895%204.11057%2010.9816%204.24071%2012.2513C4.37084%2013.521%204.78921%2014.7444%205.464%2015.8285L3%2021L8.1768%2018.5368C9.14753%2019.1412%2010.2319%2019.5408%2011.3632%2019.7109%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getCopyOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.copyMessage,title:n.localize("COPY"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCopy%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCopy%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6%2C6.00000118%20L15.6%2C3.60000142%20C15.6%2C2.93725978%2015.0627417%2C2.40000154%2014.4%2C2.40000154%20L11.2%2C2.40000154%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.4%2C2.40000154%20L1.2%2C2.40000154%20C0.5372583%2C2.40000154%200%2C2.93725978%200%2C3.60000142%20L0%2C16.8000001%20C0%2C17.4627418%200.5372583%2C18%201.2%2C18%20L6%2C18%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9368%2C3.18960146%20C10.8549236%2C3.43464248%2010.625558%2C3.59990166%2010.3672%2C3.60000142%20L5.2328%2C3.60000142%20C4.97444201%2C3.59990166%204.74507642%2C3.43464248%204.6632%2C3.18960146%20L3.8632%2C0.789601696%20C3.80186075%2C0.606570139%203.8324564%2C0.405197059%203.94539051%2C0.248643741%20C4.05832463%2C0.0920904237%204.23976415%2C-0.000467229348%204.4328%2C0%20L11.1672%2C0%20C11.3602359%2C-0.000467229348%2011.5416754%2C0.0920904237%2011.6546095%2C0.248643741%20C11.7675436%2C0.405197059%2011.7981392%2C0.606570139%2011.7368%2C0.789601696%20L10.9368%2C3.18960146%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolygon%20id%3D%22Path%22%20points%3D%228.4%208.40000095%2018%208.40000095%2018%2018%208.4%2018%22%3E%3C%2Fpolygon%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2210.8000007%22%20x2%3D%2215.6%22%20y2%3D%2210.8000007%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2213.2000005%22%20x2%3D%2215.6%22%20y2%3D%2213.2000005%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2215.6000002%22%20x2%3D%2212.6%22%20y2%3D%2215.6000002%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getMessageInfoOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.messageInformation,title:n.localize("INFO"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}isSentByMe(e,t){return!t.getSender()||e.getUid()===t.getSender().getUid()}getTextMessageOptions(e,t,o,r){let s=this.isSentByMe(e,t),i=!1;r?.getScope()===n.CometChatUIKitConstants.groupMemberScope.participant&&(i=!0);let a=[];return a.push(this.getReactionOption(o)),t.getParentMessageId()||a.push(this.getReplyInThreadOption(o)),a.push(this.getCopyOption(o)),(s||!i&&r)&&a.push(this.getEditOption(o)),s&&a.push(this.getMessageInfoOption(o)),(s||!i&&r)&&a.push(this.getDeleteOption(o)),r&&!s&&a.push(this.getSendMessagePrivatelyOption(o)),a}getImageMessageOptions(e,t,n,o){let r=[];return r=De.getDataSource().getCommonOptions(e,t,n,o),r}getVideoMessageOptions(e,t,n,o){let r=[];return r=De.getDataSource().getCommonOptions(e,t,n,o),r}getAudioMessageOptions(e,t,n,o){let r=[];return r=De.getDataSource().getCommonOptions(e,t,n,o),r}getFileMessageOptions(e,t,n,o){let r=[];return r=De.getDataSource().getCommonOptions(e,t,n,o),r}getBottomView(e,t){return null}getTextMessageTemplate(e,t){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.text,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(n,o)=>{let r=n;return null!=r.getDeletedAt()?this.getDeleteMessageBubble(r,e):De.getDataSource().getTextMessageContentView(r,o,e,t)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getAudioMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.audio,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getAudioMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getVideoMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.video,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getVideoMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getImageMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.image,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getImageMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getGroupActionTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.groupMember,category:n.CometChatUIKitConstants.MessageCategory.action,contentView:(t,n)=>this.getGroupActionBubble(t,e)})}getFileMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.file,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getFileMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getFormMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.form,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getFormMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getSchedulerMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.scheduler,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getSchedulerMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getCardMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.card,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):De.getDataSource().getCardMessageContentView(o,n,e)},options:De.getDataSource().getMessageOptions,bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getAllMessageTemplates(e,t){let n=e??we;return t||(t={disableMentions:!1}),[De.getDataSource().getTextMessageTemplate(n,t),De.getDataSource().getImageMessageTemplate(n),De.getDataSource().getVideoMessageTemplate(n),De.getDataSource().getAudioMessageTemplate(n),De.getDataSource().getFileMessageTemplate(n),De.getDataSource().getGroupActionTemplate(n),De.getDataSource().getFormMessageTemplate(n),De.getDataSource().getSchedulerMessageTemplate(n),De.getDataSource().getCardMessageTemplate(n)]}getMessageTemplate(e,t,o,r){let s=o??we;r||(r={disableMentions:!1});let i=null;if(t!==n.CometChatUIKitConstants.MessageCategory.call)switch(e){case n.CometChatUIKitConstants.MessageTypes.text:i=De.getDataSource().getTextMessageTemplate(s,r);break;case n.CometChatUIKitConstants.MessageTypes.image:i=De.getDataSource().getImageMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.video:i=De.getDataSource().getVideoMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.groupMember:i=De.getDataSource().getGroupActionTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.file:i=De.getDataSource().getFileMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.audio:i=De.getDataSource().getAudioMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.form:i=De.getDataSource().getFormMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.scheduler:i=De.getDataSource().getSchedulerMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.card:i=De.getDataSource().getCardMessageTemplate(s)}return i}getMessageOptions(e,t,o,r){let s=[];if(t.getCategory()===n.CometChatUIKitConstants.MessageCategory.message)switch(t.getType()){case n.CometChatUIKitConstants.MessageTypes.text:s=De.getDataSource().getTextMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.image:s=De.getDataSource().getImageMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.video:s=De.getDataSource().getVideoMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.groupMember:s=[];break;case n.CometChatUIKitConstants.MessageTypes.file:s=De.getDataSource().getFileMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.audio:s=De.getDataSource().getAudioMessageOptions(e,t,o,r);break;default:s=De.getDataSource().getCommonOptions(e,t,o,r)}return s}getCommonOptions(e,t,o,r){let s=this.isSentByMe(e,t),i=!1;r?.getScope()===n.CometChatUIKitConstants.groupMemberScope.participant&&(i=!0);let a=[];return a.push(this.getReactionOption(o)),t?.getParentMessageId()||a.push(this.getReplyInThreadOption(o)),s&&a.push(this.getMessageInfoOption(o)),(s||!i&&r)&&a.push(this.getDeleteOption(o)),r?.getGuid()&&!s&&a.push(this.getSendMessagePrivatelyOption(o)),a}getAllMessageTypes(){return[n.CometChatUIKitConstants.MessageTypes.text,n.CometChatUIKitConstants.MessageTypes.image,n.CometChatUIKitConstants.MessageTypes.audio,n.CometChatUIKitConstants.MessageTypes.video,n.CometChatUIKitConstants.MessageTypes.file,n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageTypes.form,n.CometChatUIKitConstants.MessageTypes.scheduler,n.CometChatUIKitConstants.MessageTypes.card]}addList(){return""}getAllMessageCategories(){return[n.CometChatUIKitConstants.MessageCategory.message,n.CometChatUIKitConstants.MessageCategory.action,n.CometChatUIKitConstants.MessageCategory.interactive]}getAuxiliaryOptions(e,t,n,o){return[]}getId(){return"messageUtils"}getTextMessageContentView(e,t,n,o){return De.getDataSource().getTextMessageBubble(e.getText(),e,t,n,void 0,o)}getAudioMessageContentView(e,t,n){return De.getDataSource().getAudioMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n,e?.getAttachments()[0]?.getName())}getFileMessageContentView(e,t,n){return De.getDataSource().getFileMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n,e?.getAttachments()[0]?.getName())}getFormMessageContentView(e,t,n){return De.getDataSource().getFormMessageBubble(e,n)}getSchedulerMessageContentView(e,t,n){return De.getDataSource().getSchedulerMessageBubble(e,n)}getCardMessageContentView(e,t,n){return De.getDataSource().getCardMessageBubble(e,n)}getImageMessageContentView(e,t,n){let o=e?.getAttachments()[0]?.getUrl()||"";return De.getDataSource().getImageMessageBubble(o,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQ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EA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=",e,n)}getVideoMessageContentView(e,t,n){return De.getDataSource().getVideoMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n)}getActionMessage(e){let t="";if(!1===e.hasOwnProperty("actionBy")||!1===e.hasOwnProperty("actionOn"))return t;if(e.action!==n.CometChatUIKitConstants.groupMemberAction.JOINED&&e.action!==n.CometChatUIKitConstants.groupMemberAction.LEFT&&(!1===e.actionBy.hasOwnProperty("name")||!1===e.actionOn.hasOwnProperty("name")))return t;if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE){if(!e.hasOwnProperty("data")||!e.data.hasOwnProperty("extras"))return t;if(!e.data.extras.hasOwnProperty("scope"))return t;if(!1===e.data.extras.scope.hasOwnProperty("new"))return t}if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE&&!1===e.data.extras.hasOwnProperty("scope"))return t;if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE&&!1===e.data.extras.scope.hasOwnProperty("new"))return t;const o=e.actionBy,r=e.actionOn,s=o.name,i=e.action!==n.CometChatUIKitConstants.groupMemberAction.JOINED&&e.action!==n.CometChatUIKitConstants.groupMemberAction.LEFT?r.name:"";switch(e.action){case n.CometChatUIKitConstants.groupMemberAction.ADDED:t=`${s} ${n.localize("ADDED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.JOINED:t=`${s} ${n.localize("JOINED")}`;break;case n.CometChatUIKitConstants.groupMemberAction.LEFT:t=`${s} ${n.localize("LEFT")}`;break;case n.CometChatUIKitConstants.groupMemberAction.KICKED:t=`${s} ${n.localize("KICKED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.BANNED:t=`${s} ${n.localize("BANNED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.UNBANNED:t=`${s} ${n.localize("UNBANNED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE:{const o=e.data.extras.scope.new;t=`${s} ${n.localize("MADE")} ${i} ${o}`;break}}return t}getDeleteMessageBubble(e,t,o){let r=o,s=n.localize("MESSAGE_IS_DELETED");return r||(r={textFont:n.fontHelper(t.typography.text2),textColor:t.palette.getAccent400()||"",border:`1px dashed ${t.palette.getAccent400()}`,borderRadius:"12px"}),d.jsx(ge,{text:s,textStyle:r})}getGroupActionBubble(e,t,o){let r=o,s=this.getActionMessage(e);return r||(r={textFont:n.fontHelper(t.typography.subtitle2),textColor:t.palette.getAccent600()||""}),d.jsx(ge,{text:s,textStyle:r})}getTextMessageBubbleStyle(e,t){return e!==n.MessageBubbleAlignment.left?{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent900("light")||""}:{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent()||""}}getFormMessageBubbleStyle(e){const t=new o.InputStyle({width:"100%",height:"30px",border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"6px",padding:"0px 0px 0px 5px",placeholderTextColor:e.palette.getAccent400(),placeholderTextFont:n.fontHelper(e.typography.subtitle2),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),background:e.palette.getBackground()}),s=new o.LabelStyle({textFont:n.fontHelper(e.typography.subtitle1),textColor:e.palette.getAccent(),background:"transparent"}),i=new o.RadioButtonStyle({height:"16px",width:"16px",border:"none",labelTextFont:n.fontHelper(e.typography.subtitle2),labelTextColor:e.palette.getAccent600(),borderRadius:"4px",background:""}),a=new o.CheckboxStyle({height:"16px",width:"16px",border:"none",borderRadius:"4px",background:"",labelTextFont:n.fontHelper(e.typography.subtitle2),labelTextColor:e.palette.getAccent()}),l=new o.DropdownStyle({height:"35px",width:"100%",background:e.palette.getBackground(),border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"6px",activeTextFont:n.fontHelper(e.typography.subtitle2),activeTextColor:e.palette.getAccent(),arrowIconTint:e.palette.getAccent700(),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),optionBackground:e.palette.getBackground(),optionBorder:`1px solid ${e.palette.getAccent100()}`,optionHoverBorder:`1px solid ${e.palette.getAccent100()}`,hoverTextFont:n.fontHelper(e.typography.subtitle2),hoverTextColor:e.palette.getAccent(),hoverTextBackground:e.palette.getAccent100()}),c={height:"40px",width:"100%",background:e.palette.getPrimary(),border:"none",borderRadius:"6px",buttonTextFont:n.fontHelper(e.typography.subtitle2),buttonTextColor:e.palette.getBackground(),justifyContent:"center"},C=new o.SingleSelectStyle({height:"100%",width:"100%",background:e.palette.getBackground(),border:"none",borderRadius:"12px",activeTextFont:n.fontHelper(e.typography.subtitle2),activeTextColor:e.palette.getAccent(),activeTextBackground:e.palette.getAccent100(),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),optionBackground:e.palette.getBackground(),optionBorder:`1px solid ${e.palette.getAccent100()}`,optionBorderRadius:"3px",hoverTextFont:n.fontHelper(e.typography.subtitle2),hoverTextColor:e.palette.getAccent(),hoverTextBackground:e.palette.getAccent100()}),d=new o.QuickViewStyle({background:"transparent",height:"fit-content",width:"100%",titleFont:n.fontHelper(e.typography.subtitle2),titleColor:e.palette.getPrimary(),subtitleFont:n.fontHelper(e.typography.subtitle2),subtitleColor:e.palette.getAccent600(),leadingBarTint:e.palette.getPrimary(),leadingBarWidth:"4px",borderRadius:"8px"});return new r.FormBubbleStyle({width:"300px",height:"fit-content",border:"none",background:"transparent",wrapperBackground:e.palette.getBackground(),borderRadius:"8px",wrapperBorderRadius:"8px",textInputStyle:t,labelStyle:s,radioButtonStyle:i,checkboxStyle:a,dropdownStyle:l,buttonStyle:c,singleSelectStyle:C,quickViewStyle:d,titleColor:e.palette.getAccent(),titleFont:n.fontHelper(e.typography.title1),goalCompletionTextColor:e.palette.getAccent(),goalCompletionTextFont:n.fontHelper(e.typography.subtitle1),wrapperPadding:"2px",datePickerBorder:`1px solid ${e.palette.getAccent100()}`,datePickerBorderRadius:"6px",datePickerFont:n.fontHelper(e.typography.subtitle2),datePickerFontColor:e.palette.getAccent()})}getCardMessageBubbleStyle(e){const t={height:"40px",width:"100%",background:"transparent",border:"none",borderRadius:"0px",buttonTextFont:n.fontHelper(e.typography.subtitle2),buttonTextColor:`${e.palette.getPrimary()}`,justifyContent:"center"};return new r.CardBubbleStyle({background:"transparent",borderRadius:"8px",height:"fit-content",width:"300px",imageHeight:"auto",imageWidth:"100%",imageRadius:"8px",imageBackgroundColor:"transparent",descriptionFontColor:e.palette.getAccent(),descriptionFont:n.fontHelper(e.typography.subtitle2),buttonStyle:t,dividerTintColor:e.palette.getAccent100(),wrapperBackground:e.palette.getBackground(),wrapperBorderRadius:"8px",wrapperPadding:"2px",disabledButtonColor:e.palette.getAccent600()})}getTextMessageBubble(e,t,n,o,s,i){let a,l={...i,textFormatters:i?.textFormatters&&i?.textFormatters.length?[...i.textFormatters]:this.getAllTextFormatters({theme:o,alignment:n,disableMentions:i.disableMentions})},c=l.textFormatters;if(l&&!l.disableMentions){let e;for(let n=0;n{o&&o(e.detail)},hasCustomCallback:s})}getSchedulerMessageBubble(e,t,n,o){let r=n;return r||(r=this.getSchedulerBubbleStyle(t)),d.jsx(xe,{style:this.getSchedulerWrapperStyle(),schedulerMessage:e,schedulerBubbleStyle:r,onScheduleClick:o||void 0})}getSchedulerWrapperStyle(){return{height:"inherit",width:"inherit",display:"block"}}getCardMessageBubble(e,t,n){let o=n;return o||(o=this.getCardMessageBubbleStyle(t)),d.jsx(be,{message:e,cardBubbleStyle:o})}getImageMessageBubble(e,t,r,s,i,a){a||(a=new o.ImageBubbleStyle({height:"auto",maxHeight:"500px",maxWidth:"400px",border:"none",borderRadius:"8px",background:"transparent"}));const l=d.jsx(ye,{URL:r?.getAttachments()[0]?.getUrl()??e,closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",fullScreenViewerStyle:{closeIconTint:"blue"},ccCloseClicked:()=>{n.CometChatUIEvents.ccHideDialog.next()}});return d.jsx(ue,{src:e,placeholderImage:t,imageStyle:a,ccImageClicked:()=>{n.CometChatUIEvents.ccShowDialog.next({child:l,confirmCallback:null})}})}getVideoMessageBubble(e,t,n,r,s,i){return i||(i=new o.BaseStyle({height:"130px",width:"100%",border:"none",borderRadius:"8px 8px",background:"transparent"})),d.jsx(he,{src:e,poster:r,videoStyle:i})}imageAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.image,title:n.localize("ATTACH_IMAGE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPhoto%20Library%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPhoto-Library%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C2.25%20C9.0543618%2C2.25%209.91816512%2C3.06587779%209.99451426%2C4.10073766%20L10%2C4.25%20L10%2C4.749%20L19.25%2C4.75%20C20.3043618%2C4.75%2021.1681651%2C5.56587779%2021.2445143%2C6.60073766%20L21.25%2C6.75%20L21.25%2C8.647%20L21.3090595%2C8.67075883%20C21.560776%2C8.78204037%2021.7890445%2C8.94502905%2021.9776884%2C9.15176047%20L22.0859904%2C9.28098473%20C22.4268417%2C9.7243264%2022.5648157%2C10.2875838%2022.4792305%2C10.8049438%20L20.599742%2C19.7646666%20C20.3801645%2C20.5892111%2019.6644249%2C21.1776759%2018.8253479%2C21.243794%20L18.6666667%2C21.25%20L4.41416667%2C21.25%20C4.34513107%2C21.25%204.27827401%2C21.2406726%204.21478696%2C21.2232093%20L4.198%2C21.217%20L4.13447967%2C21.2119882%20C3.12077897%2C21.0788944%202.34585208%2C20.2581085%202.25808253%2C19.244849%20L2.25%2C19.0833333%20L2.25%2C4.25%20C2.25%2C3.1956382%203.06587779%2C2.33183488%204.10073766%2C2.25548574%20L4.25%2C2.25%20L8%2C2.25%20Z%20M20.5%2C9.9999998%20L8.94041369%2C9.9999998%20C8.7494078%2C9.99989301%208.57810253%2C10.1081415%208.50251018%2C10.2403227%20L8.47304199%2C10.3080169%20L6.50183631%2C19.6519318%20L6.47%2C19.749%20L18.6669246%2C19.7500001%20C18.8652457%2C19.7500001%2019.0419017%2C19.6334019%2019.1157978%2C19.483767%20L19.1409396%2C19.4178635%20L20.9835913%2C10.6286666%20C21.0235655%2C10.4785581%2020.991501%2C10.3183966%2020.8968201%2C10.1952461%20C20.8210754%2C10.0967258%2020.71214%2C10.0308462%2020.5919295%2C10.0084626%20L20.5%2C9.9999998%20Z%20M8%2C3.75%20L4.25%2C3.75%20C4.00454011%2C3.75%203.80039163%2C3.92687516%203.75805567%2C4.16012437%20L3.7499284%2C4.25%20L3.7499284%2C19.0729701%20C3.75450399%2C19.4040804%204.00142215%2C19.6816449%204.32974627%2C19.7247522%20C4.62158992%2C19.7630698%204.89911328%2C19.6058121%205.0118617%2C19.3809093%20L5.04612468%2C19.2936497%20L7.01858631%2C9.94533345%20C7.25034003%2C9.14246197%207.95397669%2C8.57422367%208.77513888%2C8.50674095%20L8.94083333%2C8.5%20L19.75%2C8.5%20L19.75%2C6.75%20C19.75%2C6.50454011%2019.5731248%2C6.30039163%2019.3398756%2C6.25805567%20L19.25%2C6.25%20L9.25%2C6.25%20C8.87030423%2C6.25%208.55650904%2C5.96784612%208.50684662%2C5.60177056%20L8.5%2C5.5%20L8.5%2C4.25%20C8.5%2C4.00454011%208.32312484%2C3.80039163%208.08987563%2C3.75805567%20L8%2C3.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.5%2C11.3125%20L10.6157711%2C11.3187346%20C11.1481147%2C11.3764201%2011.5625%2C11.8273176%2011.5625%2C12.375%20C11.5625%2C12.9618025%2011.0868025%2C13.4375%2010.5%2C13.4375%20C9.91319745%2C13.4375%209.4375%2C12.9618025%209.4375%2C12.375%20C9.4375%2C11.8273176%209.85188534%2C11.3764201%2010.3842289%2C11.3187346%20L10.5%2C11.3125%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.7615505%2C13.3341733%20C15.1650281%2C13.339062%2015.5432492%2C13.5206846%2015.7989971%2C13.8261321%20L15.8889717%2C13.9463759%20L18.3148051%2C17.5838759%20C18.5446241%2C17.928486%2018.4515675%2C18.3941527%2018.1069574%2C18.6239717%20C17.7936756%2C18.8328981%2017.3803468%2C18.7749852%2017.1351188%2C18.5038182%20L17.0668616%2C18.4161241%20L14.742%2C14.93%20L13.1806552%2C17.1565514%20C12.9524338%2C17.481881%2012.5156848%2C17.5682521%2012.1842442%2C17.371143%20L12.096698%2C17.3103241%20L11.179%2C16.572%20L9.94871059%2C18.4165154%20C9.73958776%2C18.7296662%209.33567986%2C18.8347993%209.00516806%2C18.6784976%20L8.90848458%2C18.6237106%20C8.59533381%2C18.4145878%208.49020073%2C18.0106799%208.64650244%2C17.6801681%20L8.70128941%2C17.5834846%20L10.0076608%2C15.6272604%20C10.2213273%2C15.3068138%2010.5595979%2C15.0906712%2010.9401624%2C15.0314258%20C11.2731564%2C14.9795861%2011.6118179%2C15.0520295%2011.8942272%2C15.2330124%20L12.0116353%2C15.3171759%20L12.412%2C15.639%20L13.6194632%2C13.9191131%20C13.8512845%2C13.5888451%2014.2147222%2C13.3792001%2014.6114213%2C13.3405523%20L14.7615505%2C13.3341733%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}videoAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.video,title:n.localize("ATTACH_VIDEO"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}audioAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.audio,title:n.localize("ATTACH_AUDIO"),iconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M1%205C1%203.89543%201.89543%203%203%203H21.5C22.6046%203%2023.5%203.89543%2023.5%205V19C23.5%2020.1046%2022.6046%2021%2021.5%2021H3C1.89543%2021%201%2020.1046%201%2019V5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%2015.5C9%2015.8978%209.15803%2016.2794%209.43934%2016.5607C9.72064%2016.842%2010.1022%2017%2010.5%2017C10.8978%2017%2011.2794%2016.842%2011.5607%2016.5607C11.842%2016.2794%2012%2015.8978%2012%2015.5C12%2015.1022%2011.842%2014.7206%2011.5607%2014.4393C11.2794%2014.158%2010.8978%2014%2010.5%2014C10.1022%2014%209.72064%2014.158%209.43934%2014.4393C9.15803%2014.7206%209%2015.1022%209%2015.5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%2015V7L14.7141%209.27566C15.3657%209.82133%2015.7957%2010.5251%2015.9433%2011.2871C16.0909%2012.0491%2015.9486%2012.8307%2015.5365%2013.5211%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}fileAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.file,title:n.localize("ATTACH_FILE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FAttachment%20File%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FAttachment-File%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.33333333%2C14.6666667%20C9.33333333%2C17.6121853%2011.721148%2C20%2014.6666667%2C20%20C17.6121853%2C20%2020%2C17.6121853%2020%2C14.6666667%20C20%2C11.721148%2017.6121853%2C9.33333333%2014.6666667%2C9.33333333%20C11.721148%2C9.33333333%209.33333333%2C11.721148%209.33333333%2C14.6666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2214.6666667%22%20y1%3D%2212%22%20x2%3D%2214.6666667%22%20y2%3D%2217.3333333%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212%22%20y1%3D%2214.6666667%22%20x2%3D%2217.3333333%22%20y2%3D%2214.6666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6%2C17.3333333%20L1.33333333%2C17.3333333%20C0.596953667%2C17.3333333%200%2C16.7363797%200%2C16%20L0%2C1.33333333%20C0%2C0.596953667%200.596953667%2C0%201.33333333%2C0%20L10.7813333%2C0%20C11.1347086%2C0%2011.4736014%2C0.140428224%2011.7235556%2C0.390222222%20L14.2764444%2C2.94311111%20C14.5262384%2C3.19306523%2014.6666667%2C3.53195804%2014.6666667%2C3.88533333%20L14.6666667%2C6%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}getAttachmentOptions(e,t){return[this.imageAttachmentOption(e),this.videoAttachmentOption(e),this.audioAttachmentOption(e),this.fileAttachmentOption(e)]}getLastConversationMessage(e,t,o){let i={...o,textFormatters:o?.textFormatters&&o?.textFormatters.length?[...o.textFormatters]:[this.getMentionsTextFormatter({theme:o.theme,disableMentions:o.disableMentions})]},a=r.ConversationUtils.getLastConversationMessage(e,t,i),l=e.getLastMessage();if(l){let e=i.textFormatters;if(i&&!i.disableMentions){let t;for(let n=0;n/g;let s=e.getText(),i=t,a=r.exec(s),l=[],c=e.getMentionedUsers();for(;null!==a;){let e;for(let t=0;te===t.getId()))||(this.dataSource=t,this.names.push(this.dataSource.getId()))}static getDataSource(){return this.dataSource}}De.names=["message utils"];class Ee{enable(){s.CometChat.isAIFeatureEnabled(this.getExtensionId()).then((e=>{e&&this.addExtension()}))}}class ve{constructor(e){this.dataSource=e}getTextMessageOptions(e,t,n,o){return(this.dataSource??new fe).getTextMessageOptions(e,t,n,o)}getImageMessageOptions(e,t,n,o){return(this.dataSource??new fe).getImageMessageOptions(e,t,n,o)}getVideoMessageOptions(e,t,n,o){return(this.dataSource??new fe).getVideoMessageOptions(e,t,n,o)}getAudioMessageOptions(e,t,n,o){return(this.dataSource??new fe).getAudioMessageOptions(e,t,n,o)}getFileMessageOptions(e,t,n,o){return(this.dataSource??new fe).getFileMessageOptions(e,t,n,o)}getBottomView(e,t){return(this.dataSource??new fe).getBottomView(e,t)}getTextMessageContentView(e,t,n,o){return(this.dataSource??new fe).getTextMessageContentView(e,t,n,o)}getImageMessageContentView(e,t,n){return(this.dataSource??new fe).getImageMessageContentView(e,t,n)}getVideoMessageContentView(e,t,n){return(this.dataSource??new fe).getVideoMessageContentView(e,t,n)}getAudioMessageContentView(e,t,n){return(this.dataSource??new fe).getAudioMessageContentView(e,t,n)}getFileMessageContentView(e,t,n){return(this.dataSource??new fe).getFileMessageContentView(e,t,n)}getFormMessageContentView(e,t,n){return(this.dataSource??new fe).getFormMessageContentView(e,t,n)}getSchedulerMessageContentView(e,t,n){return(this.dataSource??new fe).getSchedulerMessageContentView(e,t,n)}getCardMessageContentView(e,t,n){return(this.dataSource??new fe).getCardMessageContentView(e,t,n)}getTextMessageTemplate(e,t){return(this.dataSource??new fe).getTextMessageTemplate(e,t)}getImageMessageTemplate(e){return(this.dataSource??new fe).getImageMessageTemplate(e)}getVideoMessageTemplate(e){return(this.dataSource??new fe).getVideoMessageTemplate(e)}getAudioMessageTemplate(e){return(this.dataSource??new fe).getAudioMessageTemplate(e)}getFileMessageTemplate(e){return(this.dataSource??new fe).getFileMessageTemplate(e)}getGroupActionTemplate(e){return(this.dataSource??new fe).getGroupActionTemplate(e)}getFormMessageTemplate(e){return(this.dataSource??new fe).getFormMessageTemplate(e)}getSchedulerMessageTemplate(e){return(this.dataSource??new fe).getSchedulerMessageTemplate(e)}getCardMessageTemplate(e){return(this.dataSource??new fe).getCardMessageTemplate(e)}getAllMessageTemplates(e,t){return(this.dataSource??new fe).getAllMessageTemplates(e,t)}getMessageTemplate(e,t,n){return(this.dataSource??new fe).getMessageTemplate(e,t,n)}getMessageOptions(e,t,n,o){return(this.dataSource??new fe).getMessageOptions(e,t,n,o)}getCommonOptions(e,t,n,o){return(this.dataSource??new fe).getCommonOptions(e,t,n,o)}getAttachmentOptions(e,t){return(this.dataSource??new fe).getAttachmentOptions(e,t)}getAllMessageTypes(){return(this.dataSource??new fe).getAllMessageTypes()}getAllMessageCategories(){return(this.dataSource??new fe).getAllMessageCategories()}getAuxiliaryOptions(e,t,n,o){return(this.dataSource??new fe).getAuxiliaryOptions(e,t,n,o)}getId(){return(this.dataSource??new fe).getId()}getDeleteMessageBubble(e,t,n){return(this.dataSource??new fe).getDeleteMessageBubble(e,t,n)}getGroupActionBubble(e,t,n){return(this.dataSource??new fe).getGroupActionBubble(e,t,n)}getTextMessageBubble(e,t,n,o,r,s){return(this.dataSource??new fe).getTextMessageBubble(e,t,n,o,r,s)}getVideoMessageBubble(e,t,n,o,r,s){return(this.dataSource??new fe).getVideoMessageBubble(e,t,n,o,r,s)}getImageMessageBubble(e,t,n,o,r,s){return(this.dataSource??new fe).getImageMessageBubble(e,t,n,o,r,s)}getAudioMessageBubble(e,t,n,o,r){return(this.dataSource??new fe).getAudioMessageBubble(e,t,n,o,r)}getFileMessageBubble(e,t,n,o,r){return(this.dataSource??new fe).getFileMessageBubble(e,t,n,o,r)}getFormMessageBubble(e,t,n,o){return(this.dataSource??new fe).getFormMessageBubble(e,t,n,o)}getSchedulerMessageBubble(e,t,n,o){return(this.dataSource??new fe).getSchedulerMessageBubble(e,t,n,o)}getCardMessageBubble(e,t,n){return(this.dataSource??new fe).getCardMessageBubble(e,t,n)}getLastConversationMessage(e,t,n){return(this.dataSource??new fe).getLastConversationMessage(e,t,n)}getDefaultDetailsTemplate(e,t,n,o){return(this.dataSource??new fe).getDefaultDetailsTemplate(e,t,n,o)}getAuxiliaryHeaderMenu(e,t){return(this.dataSource??new fe).getAuxiliaryHeaderMenu(e,t)}getAIOptions(e,t,n,o,r){return(this.dataSource??new fe).getAIOptions(e,t,n,o,r)}getAllTextFormatters(e){let t=[];const n=e.disableMentions?null:(this.dataSource??new fe).getMentionsTextFormatter(e),o=(this.dataSource??new fe).getUrlTextFormatter(e);return n&&t.push(n),o&&t.push(o),t}getMentionsTextFormatter(e={}){return(this.dataSource??new fe).getMentionsTextFormatter(e)}getUrlTextFormatter(e={}){return(this.dataSource??new fe).getUrlTextFormatter(e)}getMentionsFormattedText(e,t,n){return(this.dataSource??new fe).getMentionsFormattedText(e,t,n)}}const Ie=de({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t}),Se=(e,t)=>e.sender.getUid()===t.getUid()?n.MessageBubbleAlignment.right:n.MessageBubbleAlignment.left,Fe=(e,t,o,r)=>{let s={};s=o===n.MessageBubbleAlignment.right?r?.senderMessageBubbleStyle||{}:r?.botMessageBubbleStyle||{};const i={textFont:s?.textFont||n.fontHelper(t.typography.text3)};return o===n.MessageBubbleAlignment.right?i.textColor=s?.textColor||t.palette.getAccent900():i.textColor=s?.textColor||t.palette.getAccent(),d.jsx(Ie,{text:e.getText(),textStyle:i})},ke=(e,t,o)=>{let r,s=!1;return"send"!==e.getStatus()&&"wait"!==e.getStatus()&&"error"!==e.getStatus()||("wait"===e.getStatus()?r=n.Receipts.wait:"sent"===e.getStatus()?r=n.Receipts.sent:"error"===e.getStatus()&&(r=n.Receipts.error),s=!0),d.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[d.jsx("div",{style:{display:"inline-block"},children:d.jsx("cometchat-date",{timestamp:e.getSentAt(),dateStyle:JSON.stringify(Ne(o)),pattern:n.DatePatterns.time})}),s?d.jsx("div",{style:{position:"relative",height:"20px",width:"20px"},children:d.jsx("cometchat-receipt",{receipt:r,waitIcon:t?.loadingIconURL,errorIcon:t?.errorIconURL,receiptStyle:JSON.stringify(Ke(t?.assistBotStyle,o))})}):null]})},Te=(e,t)=>({display:"flex",width:e?.width||"100%",height:e?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px",background:e?.background||t?.palette?.getBackground(),borderRadius:e?.borderRadius||"8px"}),Me=(e,t)=>({display:"flex",justifyContent:"space-between",alignItems:"center",font:e?.optionTitleFont||t&&n.fontHelper(t?.typography?.text2),color:e?.optionTitleColor||t?.palette?.getAccent()}),Be=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.backIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),Le=(e,t)=>new o.ActionSheetStyle({ActionSheetSeparatorTint:t?.palette?.getAccent400(),background:e?.buttonBackground||t?.palette?.getBackground(),titleColor:e?.buttonTextColor||t?.palette?.getAccent(),titleFont:e?.buttonTextFont||t&&n.fontHelper(t?.typography?.text2),listItemBackground:"transparent",height:"100%",width:"100%",border:"none"}),Ue=e=>({display:"flex",justifyContent:"flex-end",height:"100%",width:"100%",background:e?.palette?.getAccent600()}),Re=(e,t)=>({display:"flex",flexDirection:"column",width:"40%",minWidth:"350px",maxWidth:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",background:e?.background||t?.palette.getBackground()}),Pe=e=>({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:"40px",padding:"10px",boxSizing:"border-box",background:e?.palette.getAccent200(),marginBottom:"10px"}),Oe=(e={},t)=>({font:e.titleFont||n.fontHelper(t.typography.subtitle1),color:e.titleColor||t.palette.getAccent()}),je=(e={},t)=>({font:e.subtitleFont||n.fontHelper(t.typography.caption2),color:e.subtitleColor||t.palette.getAccent500()}),Ve=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.closeIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),Ge=(e,t,n,o)=>{if(e.sender.getUid()===n.getUid()){const e=o?.senderMessageBubbleStyle||{};return{background:e.background||t.palette.getPrimary(),borderRadius:e.borderRadius||"12px",border:e.border||"none"}}{const e=o?.botMessageBubbleStyle||{};return{background:e.background||t.palette.getAccent100(),borderRadius:e.borderRadius||"12px",border:e.border||"none"}}},He=(e,t)=>e||new o.MessageInputStyle({height:"40px",width:"100%",maxHeight:"40px",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"12px",background:t.palette.getAccent50(),textFont:n.fontHelper(t.typography.text2),textColor:t.palette.getAccent(),dividerColor:t.palette.getAccent100(),inputBorder:"none",inputBorderRadius:"0px",inputBackground:"transparent"}),Qe=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.sendIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),Ne=e=>({textColor:e?.palette?.getAccent600(),textFont:n.fontHelper(e?.typography?.caption2),padding:"0px"}),Ke=(e,t)=>new o.ReceiptStyle({waitIconTint:e?.loadingIconTint||t?.palette?.getAccent700(),errorIconTint:e?.errorIconTint||t?.palette?.getError()}),ze=(e,t)=>{const o=Se(e,t);return{flex:"1 1 0",display:"flex",flexDirection:"column",borderRadius:"inherit",justifyContent:o===n.MessageBubbleAlignment.left?"flex-start":"flex-end",alignItems:o===n.MessageBubbleAlignment.left?"flex-start":"flex-end",position:"relative"}};var Je="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const Ye={title:void 0,bots:void 0,closeCallback:void 0,backCallback:void 0,configuration:void 0},_e=de({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t,events:{onClick:"cc-actionsheet-clicked"}}),We=e=>{const{theme:n}=t.useContext(R);return d.jsx("div",{className:"slideable-container",style:Te(e.configuration?.assistBotStyle,n),children:d.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",padding:"10px",boxSizing:"border-box"},children:[d.jsxs("div",{style:Me(e.configuration?.assistBotStyle,n),children:[d.jsx("div",{children:d.jsx("cometchat-button",{iconURL:e.configuration?.backIconURL||Je,onClick:()=>e.backCallback?e.backCallback():null,buttonStyle:JSON.stringify(Be(e.configuration?.assistBotStyle,n))})}),d.jsx("div",{children:e.title}),d.jsx("div",{style:{flex:.2}})]}),d.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",boxSizing:"border-box"},children:d.jsx(_e,{actions:e.bots,hideLayoutMode:!0,actionSheetStyle:Le(e.configuration?.assistBotStyle,n),onClick:t=>{const n=t?.detail?.action;n.onClick&&n.onClick(),e.closeCallback&&e.closeCallback()}})})]})})};We.defaultProps=Ye;var Ze="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const Xe=(e,t)=>({flex:"1 1 0",display:"flex",flexDirection:"column",borderRadius:"inherit",justifyContent:e===t.left?"flex-start":"flex-end",alignItems:e===t.left?"flex-start":"flex-end",position:"relative",width:"100%"}),qe=(e,t)=>({display:"flex",justifyContent:e===t.left?"flex-start":"flex-end",alignItems:"flex-start"}),$e=(e,t,n,o)=>({justifyContent:e===t.left?"flex-start":"flex-end",top:n?"-17px":"-36px",right:e===t.right?"unset":"0",left:e===t.left?"0":"unset",position:"absolute",background:o.palette.getBackground(),borderRadius:"8px",width:"fit-content",zIndex:"2"}),et=e=>({border:`1px solid ${e.palette.getAccent200()}`,borderRadius:"8px",background:e.palette.getBackground(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${e.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground(),moreIconTint:e.palette.getAccent600()}),tt=(e,t)=>({listStyleType:"none",display:e?"flex":"none",position:"absolute",right:"24px",top:"0",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",border:"1px solid #e8e8e8",width:"100%",zIndex:"3",background:t.palette.getBackground(),marginTop:"35px",padding:"0",borderRadius:"8px"}),nt=e=>({background:"transparent",border:"none",borderRadius:"0",buttonIconTint:e?.moreIconTint||""}),ot=(e,t)=>({background:t?.backgroundColor||"transparent",border:"none",borderRadius:"0",buttonIconTint:t?.iconTint,buttonTextFont:t?.titleFont,buttonTextColor:t?.titleColor}),rt={width:"300px",height:"300px"},st=e=>{const{theme:o}=t.useContext(R),[r,s]=t.useState(!1),i=t.useRef(null),a=t.useRef([]),{data:l,topMenuSize:c,moreIconURL:C,moreIconHoverText:g,ContextMenuStyle:u,onOptionClicked:p,placement:h}=e,m=t.useCallback((()=>s((e=>!e))),[]),A=t.useCallback((()=>d.jsx("li",{style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item cc-context-menu__menu-item--more",children:d.jsx("cometchat-button",{ref:i,buttonStyle:JSON.stringify(nt(u)),hoverText:g,iconURL:C,onClick:m})})),[u,g,C,m]),x=t.useCallback(((e,o)=>e?.map(((r,s)=>{let i,c=null;return i=r instanceof n.CometChatActionsView&&r?.customView?d.jsx("li",{id:r.id,style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item",children:d.jsxs("cometchat-popover",{ref:e=>{a.current[r.id]=e},popoverStyle:JSON.stringify(rt),placement:h,children:[d.jsx("div",{slot:"children",children:d.jsx("cometchat-button",{buttonStyle:JSON.stringify(ot(0,r)),text:o?r?.title:"",hoverText:r?.title,iconURL:r?.iconURL})}),d.jsx("div",{slot:"content",children:r?.customView(w(r.id))})]})}):d.jsx("li",{id:r.id,style:{background:"transparent",padding:"4px 4px"},className:"cc-context-menu__menu-item",children:d.jsx(q,{buttonStyle:ot(0,r),text:o?r?.title:"",hoverText:r?.title,iconURL:r?.iconURL,onClick:()=>{p(r)}})}),!o&&l?.length>e?.length&&s===e?.length-1&&(c=A()),d.jsxs(t.Fragment,{children:[i,c]},r.title)}))),[h,l,p,A]),b=t.useCallback((()=>x(l.slice(0,c-1),!1)),[x,c,l]),y=t.useCallback((()=>x(l.slice(c-1),!0)),[x,c,l]),w=t.useCallback((e=>()=>{a.current[e]?.closeContentView&&a.current[e]?.closeContentView()}),[]);return d.jsxs("div",{className:"cc-context-menu",style:{display:"flex",position:"relative"},children:[d.jsx("ul",{className:"cc-context-menu__top-menu",style:{listStyleType:"none",display:"flex",flexDirection:"row",justifyContent:"flex-end",margin:"0",padding:"0",border:"1px solid #e8e8e8",zIndex:"2",borderRadius:"8px"},children:b()}),d.jsx("ul",{className:"cc-context-menu__sub-menu",style:tt(r,o),children:y()})]})};var it="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMore%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C6.66666667%20C3.26666667%2C6.66666667%202.66666667%2C7.26666667%202.66666667%2C8%20C2.66666667%2C8.73333333%203.26666667%2C9.33333333%204%2C9.33333333%20C4.73333333%2C9.33333333%205.33333333%2C8.73333333%205.33333333%2C8%20C5.33333333%2C7.26666667%204.73333333%2C6.66666667%204%2C6.66666667%20Z%20M12%2C6.66666667%20C11.2666667%2C6.66666667%2010.6666667%2C7.26666667%2010.6666667%2C8%20C10.6666667%2C8.73333333%2011.2666667%2C9.33333333%2012%2C9.33333333%20C12.7333333%2C9.33333333%2013.3333333%2C8.73333333%2013.3333333%2C8%20C13.3333333%2C7.26666667%2012.7333333%2C6.66666667%2012%2C6.66666667%20Z%20M8%2C6.66666667%20C7.26666667%2C6.66666667%206.66666667%2C7.26666667%206.66666667%2C8%20C6.66666667%2C8.73333333%207.26666667%2C9.33333333%208%2C9.33333333%20C8.73333333%2C9.33333333%209.33333333%2C8.73333333%209.33333333%2C8%20C9.33333333%2C7.26666667%208.73333333%2C6.66666667%208%2C6.66666667%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const at=e=>{const{id:o,leadingView:s=null,headerView:i=null,replyView:a=null,contentView:l=null,bottomView:c=null,threadView:C=null,footerView:g=null,statusInfoView:u=null,options:p=[],alignment:h=n.MessageBubbleAlignment.right,messageBubbleStyle:m=new r.BaseStyle({width:"100%",height:"auto",background:"",borderRadius:"12px",border:"none"}),moreIconURL:A=it,topMenuSize:x=5,setRef:b}=e,y={borderRadius:"8px"},{theme:w}=t.useContext(R),f=t.useRef(null);t.useEffect((()=>{f&&f.current&&b&&b(f)}),[f,b]);const[D,E]=t.useState(!1);t.useEffect((()=>()=>{v&&clearTimeout(v)}),[]);let v=null;const I=e=>{p.forEach((t=>{t instanceof n.CometChatActionsIcon&&t.id===e?.id&&o&&t.onClick?.(parseInt(o))}))},S=()=>F()?k():e.alignment===n.MessageBubbleAlignment.left?n.Placement.right:n.Placement.left,F=()=>window.innerWidth<=768,k=()=>{const e=f.current;if(e){const t=e.getBoundingClientRect(),o=t.topwindow.innerHeight/2;return o?n.Placement.bottom:r?n.Placement.top:n.Placement.bottom}return n.Placement.bottom};return d.jsxs("div",{className:"cc-message-bubble__wrapper",ref:f,style:{display:"flex",position:"relative",maxWidth:"65%",width:"fit-content",gap:"4px"},onMouseEnter:()=>{v&&clearTimeout(v),E(!0)},onMouseLeave:()=>{v=setTimeout((()=>{E(!1)}),150)},children:[(()=>{if(s&&h===n.MessageBubbleAlignment.left)return d.jsx("div",{className:"cc-message-bubble__avatar",style:{position:"relative",borderRadius:"inherit",display:"flex",width:"fit-content",alignSelf:"flex-start",marginTop:"5px",padding:"8px 4px"},children:s})})(),d.jsxs("div",{className:"cc-message-bubble",style:Xe(h,n.MessageBubbleAlignment),children:[(()=>{if(p&&p.length>0&&D)return d.jsx("div",{className:"cc-message-options",style:$e(h,n.MessageBubbleAlignment,i,w),children:d.jsx(st,{moreIconURL:A,topMenuSize:x,ContextMenuStyle:et(w),data:p,moreIconHoverText:"",onOptionClicked:I,placement:S()})})})(),(()=>{if(i)return d.jsx("div",{className:"cc-message-bubble__header",style:qe(h,n.MessageBubbleAlignment),children:i})})(),d.jsxs("div",{className:"cc-message-bubble__content",style:{height:m.height,width:m.width},children:[d.jsxs("div",{style:{...m,...y},children:[a||null,l||null,u||null]}),c||null,g||null,C||null]})]})]})};const lt={bot:void 0,sender:void 0,messageSendCallBack:void 0,closeCallback:void 0,configuration:void 0},ct=de({tagName:"cometchat-text-input",elementClass:o.CometChatTextInput,react:t,events:{ccTextInputChanged:"cc-text-input-changed",ccTextInputEntered:"cc-text-input-entered"}}),Ct=e=>{const i=t.useRef(!0),a=n.localize("COMETCHAT_ASK_BOT_SUBTITLE"),l=t.useRef(n.localize("COMETCHAT_BOT_FIRST_MESSAGE")),c=t.useRef(null),C=t.useRef(""),[g,u]=t.useState([]),{theme:p}=t.useContext(R),h=e.sender,m=e.bot;t.useEffect((()=>{A()}),[]);const A=t.useCallback((()=>{e.configuration?.botFirstMessageText&&(l.current=e.configuration.botFirstMessageText(m));const t=new s.CometChat.TextMessage(h.getUid(),l.current,n.CometChatUIKitConstants.MessageReceiverType.user);t.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t.setMuid(r.CometChatUIKitUtility.ID()),t.setSender(m),u([t])}),[g,u]),x=t.useCallback((e=>{C.current=e}),[C]),b=t.useCallback((t=>{e.messageSendCallBack&&e.messageSendCallBack(C.current,m).then((e=>{const o=new s.CometChat.TextMessage(h.getUid(),e,n.CometChatUIKitConstants.MessageReceiverType.user);o.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),o.setMuid(r.CometChatUIKitUtility.ID()),o.setSender(m),o.setStatus("sent"),u((e=>{const n=e.map((e=>(e.getMuid()===t&&e.setStatus("sent"),e)));return n.push(o),n}))})).catch((e=>{u((e=>e.map((e=>(e.getMuid()===t&&e.setStatus("error"),e)))))}))}),[g,u,C]),y=t.useCallback((()=>{if(!C.current)return;const e=r.CometChatUIKitUtility.ID(),t=new s.CometChat.TextMessage(m.getUid(),C.current,n.CometChatUIKitConstants.MessageReceiverType.user);t.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t.setMuid(e),t.setSender(h),t.setStatus("wait"),u((e=>[...e,t])),c?.current?.emptyInputField(),b(e)}),[g,u,b,C]),w=t.useMemo((()=>function(t,n){return d.jsx("div",{style:ze(t,h),children:d.jsx(at,{id:t?.id,messageBubbleStyle:Ge(t,p,h,e.configuration),alignment:Se(t,h),contentView:Fe(t,p,Se(t,h),e.configuration),footerView:ke(t,e.configuration,p),leadingView:void 0,headerView:void 0,replyView:void 0,bottomView:void 0,threadView:void 0,statusInfoView:void 0,options:[]})})}),[Ge,Se,Fe,ke]);return d.jsx("div",{style:Ue(p),children:d.jsxs("div",{style:Re(e.configuration?.assistBotStyle,p),children:[d.jsxs("div",{style:Pe(p),children:[d.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[d.jsx("cometchat-avatar",{name:m?.getName(),avatarStyle:JSON.stringify((f=e.configuration?.avatarStyle,f||new o.AvatarStyle({borderRadius:"16px",width:"28px",height:"28px"}))),image:m?.getAvatar()}),d.jsxs("div",{children:[d.jsx("div",{style:Oe(e.configuration?.assistBotStyle,p),children:m?.getName()}),d.jsx("div",{style:je(e.configuration?.assistBotStyle,p),children:a})]})]}),d.jsx("div",{children:d.jsx("cometchat-button",{iconURL:e.configuration?.closeIconURL||Ze,onClick:()=>{e.closeCallback&&e.closeCallback()},buttonStyle:JSON.stringify(Ve(e.configuration?.assistBotStyle,p))})})]}),d.jsx(T,{listStyle:{height:"calc(100% - 90px)"},list:g,listItem:w,listItemKey:"getMuid",state:n.States.loaded,hideSearch:!0,showSectionHeader:!1,title:"",scrollToBottom:i?.current}),d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"40px",padding:"5px",boxSizing:"border-box"},children:[d.jsx(ct,{style:{flex:.99},ref:c,textInputStyle:He(e.configuration?.textInputStyle,p),ccTextInputChanged:e=>x(e?.detail?.value),ccTextInputEntered:()=>y()}),d.jsx("cometchat-button",{iconURL:e.configuration?.sendIconURL||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:()=>y(),buttonStyle:JSON.stringify(Qe(e.configuration?.assistBotStyle,p))})]})]})});var f};Ct.defaultProps=lt;class dt extends ve{constructor(e,t){super(e),this.bots=[],this.theme=new n.CometChatTheme({}),this.onMessageSent=async(e,t)=>new Promise((async(o,r)=>{try{let r,i=this.user?this.user?.getUid():this.group?.getGuid(),a=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(r=await(this.configuration?.apiConfiguration(t,this.user,this.group)));return o(await s.CometChat.askBot(i,a,t.getUid(),e,r||{}))}catch(e){r(e)}})),this.closeChat=()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messages)},this.onOptionClick=e=>{n.CometChatUIEvents.ccShowPanel.next({child:d.jsx(Ct,{bot:e,sender:this.loggedInUser,configuration:this.configuration,messageSendCallBack:this.onMessageSent,closeCallback:this.closeChat}),position:n.PanelAlignment.messages})},this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener(),this.getAllBots()}),1e3)}getId(){return"aiassistbot"}getAIOptions(e,t,o,r,s){this.user=e,this.group=t;const i=n.localize("COMETCHAT_ASK_AI_BOT"),a=n.localize("COMETCHAT_ASK_BOT"),l=this.bots?.length,c=l>1?i:`${a} ${this.bots[0]?.getName()}`;if(r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.assistBotStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.assistBotStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.assistBotStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);if(1===l){const e=new n.CometChatMessageComposerAction({title:c,onClick:()=>{this.onOptionClick(this.bots[0])},id:"ai-assist-bot",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});a.push(e)}else if(l>1){const e=this.bots.map((e=>new n.CometChatMessageComposerAction({title:e.getName(),onClick:()=>{this.onOptionClick(e)},id:e.getUid()}))),t=new n.CometChatActionsView({title:c,customView:t=>d.jsx(We,{title:c,configuration:this.configuration,backCallback:t?.backAction,closeCallback:t?.closePopover,bots:e}),id:"ai-assist-bot",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});a.push(t)}return a}}getAllBots(){(new s.CometChat.UsersRequestBuilder).setLimit(30).setTags(["aibot"]).build().fetchNext().then((e=>{this.bots=e}))}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((()=>{this.closeChat()}))}}class gt extends Ee{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new dt(e,this.configuration)))}getExtensionId(){return"bots"}}const ut={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"hidden"},pt=(e,t)=>({replyTextFont:t?.textFont||n.fontHelper(e.typography.caption1),replyTextColor:t?.textColor||e?.palette.getAccent(),replyBackground:t?.textBackground||"inherit",boxShadow:`0px 0px 1px ${e?.palette.getAccent600()}`,background:t?.background||"inherit",width:t?.width||"100%",height:t?.height||"100%",border:t?.textBorder||"none",borderRadius:t?.textBorderRadius||"8px",display:"flex",justifyContent:"flex-start"});var ht="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%2020010904%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2F2001%2FREC-SVG-20010904%2FDTD%2Fsvg10.dtd%22%3E%3Csvg%20version%3D%221.0%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100.000000pt%22%20height%3D%22100.000000pt%22%20viewBox%3D%220%200%20100.000000%20100.000000%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cg%20transform%3D%22translate%280.000000%2C100.000000%29%20scale%280.100000%2C-0.100000%29%22fill%3D%22%23000000%22%20stroke%3D%22none%22%3E%3Cpath%20d%3D%22M375%20847%20c-221%20-73%20-326%20-269%20-254%20-472%20l22%20-62%20-25%20-74%20c-14%20-41-23%20-80%20-21%20-86%206%20-17%2042%20-15%20138%206%2077%2017%2082%2017%20138%20-1%2072%20-22%20199%20-25%20216%20-46%207%209%2021%205%2030%20-5%2013%20-21%2016%20-79%2016%20-44%200%20-98%208%20-136%2019%20-58%2018%20-67%2019%20-123%206-89%20-21%20-88%20-23%20-65%2042%20l20%2058%20-26%2056%20c-52%20116%20-25%20240%2069%20327%2077%2071%20123%2087246%2087%20123%200%20169%20-16%20245%20-86%2064%20-59%2088%20-108%2094%20-199%205%20-68%208%20-75%2028%20-78%2036-5%2048%2038%2033%20118%20-22%20125%20-94%20215%20-218%20273%20-59%2028%20-79%2032%20-167%2034%20-63%202%20-115-2%20-140%20-10z%22%2F%3E%3Cpath%20d%3D%22M687%20313%20c-16%20-15%20-4%20-42%2038%20-83%20l45%20-44%20-45%20-46%20c-47%20-48%20-56%20-74-28%20-84%2011%20-5%2031%208%2064%2040%20l48%2047%2050%20-46%20c54%20-50%2061%20-53%2079%20-35%2018%2018%2015%2025-35%2079%20l-46%2050%2048%2049%20c41%2042%2046%2051%2035%2065%20-19%2023%20-30%2019%20-80%20-30%20l-46%20-45%20-4445%20c-41%2042%20-68%2054%20-83%2038z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",mt="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABqxJREFUeF7tnY2x5DQMgHUdcBUAFXBUAFQAVABXAVABUAFQAVDBQQVABRwVABUAFcB8MzEsef6RbHmjl9gzO%2B%2FmNnFkfZIs%2F6zzRFYJpYEnoaRZwsgCEswIFpAFJJgGgomzPGQBCaaBYOIsD1lAgmkgmDjLQxaQYBoIJs7ykAUkmAaCifMYPeQVEXlt%2B%2FDvXPlt%2B8%2BXIvJnMJ1XxYkOBMW%2FJyJviMizBoRSQwECID4%2FiciPIgKokCUaECz%2BbRF5dwNR8oBRZQIJMN9vf5NHjdY7fH8UIED4YDKEmrK%2BE5FvRYS%2Fh5YjgWD9hCNAACRCwVM%2B38Ac0vccBeRDEflCRGaFpFG4gPlKRL4crch6%2F72B4Alfb52zVdZ0PZb7101HnauHZADYrw5CTx7zTa%2Bw1vvuBQTlYG2EJ2shMyIrStmRtQPm2WRoGAOft6wCiAhACGXWZ5sfdQ8gVq%2FAA8h%2B6GCBMCOWIxNhk2xOGzaR45MNjlnR2htmA%2FlURD5TCoMnAAFrnAGhJAZg%2BGg9B08HzJQyCwhW90KZPQECaHjDkQWvQQ4NGELo%2BzN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Gobi8%2BeaYUEUlrSPXv%2FQZgKCeSq4SokkCuHq5BArhyuQgK5crgKB%2BTq4SocEI9wBVQm5viJA289oPCDH%2FZ4uU3StUbEA9%2BHyrKs4Sq97SC9biLNkOb0wXwQYNie6jJRN6D02q1hgLTCFUrE6pPlo%2FzWyZ6lhtPo28OUPXWLfBygjGwcWa7eM7UJEQZI7dCABMNTcamu9K6PX27WHrQehNLTi2A4jzfnoSiYny1rz4IMM7lYClczIGjqTG%2FO2SsyeaXFOy1LBrkFOrcZCu1sb%2BsoP40CI19j%2FVnF7Uy3et%2BuRgFaIGxuSGecaA%2BvLz0fi%2F795m0H6e06GnlnXdOz%2BxI98HHNDLVAkpuiTCuQW%2BWzXYgG5MIMYNjKn1LhWcrf18urjugfQxQtkNrJabcNQdG3b0LreW1dejMbXqk5GL9HkUlGDKT7BNGeB7fu0QKhnn1nhvJT5pNeuOLqvpvwaRCZMiY8SOulKTwi3%2B1Hm1G19Of%2BvQUID09KQfHa1NNd6K3C9FqjPZxkFDOMY1Zb%2Fq3XCmS6QFd%2FwALSbwFhNsr1N%2BEcd4bcKHcO1fa1IuRGub6mnOOuMHNZ51DneCtKc3qm42BLYqxO3Q4oN0hWHSyjedQCotHSw2vS79AZA6V3L%2FbVtLtrAXFRo18lC4ifLl1qWkBc1OhXyQLip0uXmhYQFzX6VfIP%2BqZ1dOfAgekAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E",At="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Icons%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20viewBox%3D%220%200%2032%2032%22%20style%3D%22enable-background%3Anew%200%200%2032%2032%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%20.st0%7Bfill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A10%3B%7D%3C%2Fstyle%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%223%22%20x2%3D%2216%22%20y2%3D%228%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%226.8%22%20x2%3D%2210.3%22%20y2%3D%2210.3%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%223%22%20y1%3D%2216%22%20x2%3D%228%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%2225.2%22%20x2%3D%2210.3%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%2229%22%20x2%3D%2216%22%20y2%3D%2224%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%2225.2%22%20x2%3D%2221.7%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2229%22%20y1%3D%2216%22%20x2%3D%2224%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%226.8%22%20x2%3D%2221.7%22%20y2%3D%2210.3%22%2F%3E%3C%2Fsvg%3E";const xt={getConversationStarterCallback:void 0,editReplyCallback:void 0,configuration:void 0},bt=de({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}}),yt=de({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),wt=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_ICEBREAKERS");return t.useEffect((()=>{r(n.States.loading),e&&e.getConversationStarterCallback&&e.getConversationStarterCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=d.jsx(bt,{smartReplyStyle:pt(a,e.configuration?.conversationStarterStyle),replies:t,ccReplyClicked:t=>{e&&e.editReplyCallback&&e.editReplyCallback(t?.detail?.reply)},closeIconURL:""},"conversation-starter");return n(o)}e.configuration?.customView(t).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:{...(g=e.configuration?.conversationStarterStyle,{display:"flex",overflow:"hidden",width:g?.width||"100%",height:g?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px"}),minHeight:"50px",width:"100%"},children:d.jsx("div",{style:ut,children:d.jsx("div",{style:{height:"100%",width:"100%",marginTop:"12px",overflow:"hidden auto"},children:o===n.States.loaded?s:function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(yt,{state:n.States.loading,style:e.configuration?.conversationStarterStyle,loadingIconURL:e.configuration?.loadingIconURL||At,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(yt,{state:n.States.error,style:e.configuration?.conversationStarterStyle,errorIconURL:e.configuration?.errorIconURL||mt,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(yt,{state:n.States.empty,style:e.configuration?.conversationStarterStyle,emptyIconURL:e.configuration?.emptyIconURL||ht,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}()})})});var g};wt.defaultProps=xt;class ft extends ve{constructor(e,t){super(e),this.currentMessage=null,this.theme=new n.CometChatTheme({}),this.getConversationStarter=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getConversationStarter(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aiconversationstarter"}editReply(e){n.CometChatUIEvents.ccComposeMessage.next(e),n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)}closeIfMessageReceived(e){e?.getReceiverId()!==this.loggedInUser?.getUid()||this.currentMessage||n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)}loadConversationStarter(){n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:d.jsx(wt,{configuration:this.configuration,getConversationStarterCallback:this.getConversationStarter,editReplyCallback:this.editReply}),position:n.PanelAlignment.messageListFooter})}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.user=e.user,this.group=e.group,this.currentMessage||this.loadConversationStarter()})),n.CometChatMessageEvents.ccMessageSent.subscribe((()=>{this.currentMessage||(n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null)}))}}class Dt extends Ee{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new ft(e,this.configuration)))}getExtensionId(){return"conversation-starter"}}const Et={width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"hidden"},vt=(e,t)=>new o.PanelStyle({width:"100%",height:"fit-content",border:`1px solid ${e.palette.getPrimary()}`,borderRadius:"8px",background:e.palette.getBackground(),textColor:t?.textColor||e.palette.getAccent600(),titleColor:t?.titleTextColor||e.palette.getAccent(),textFont:t?.textFont||n.fontHelper(e.typography.text2),titleFont:t?.titleTextFont||n.fontHelper(e.typography.text1)}),It={getConversationSummaryCallback:void 0,editReplyCallback:void 0,closeCallback:void 0,configuration:void 0};de({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}});const St=de({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),Ft=de({tagName:"cometchat-panel",elementClass:o.CometChatPanel,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),kt=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_SUMMARY"),g=n.localize("CONVERSATION_SUMMARY");return t.useEffect((()=>{r(n.States.loading),e&&e.getConversationSummaryCallback&&e.getConversationSummaryCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=d.jsx(Ft,{panelStyle:vt(a,e.configuration?.conversationSummaryStyle),title:g,text:t,closeIconUrl:e.configuration?.closeIconURL||Ze,ccCloseClicked:()=>e.closeCallback()});return n(o)}e.configuration?.customView(t,e?.closeCallback).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:{...(u=e.configuration?.conversationSummaryStyle,{display:"flex",overflow:"hidden",width:u?.width||"100%",height:u?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px"}),minHeight:"50px",width:"100%"},children:d.jsx("div",{style:Et,children:d.jsx("div",{style:{height:"100%",width:"95%",marginTop:"12px",overflow:"hidden auto"},children:o===n.States.loaded?s:function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(St,{state:n.States.loading,style:e.configuration?.conversationSummaryStyle,loadingIconURL:e.configuration?.loadingIconURL||At,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(St,{state:n.States.error,style:e.configuration?.conversationSummaryStyle,errorIconURL:e.configuration?.errorIconURL||mt,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(St,{state:n.States.empty,style:e.configuration?.conversationSummaryStyle,emptyIconURL:e.configuration?.emptyIconURL||ht,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}()})})});var u};kt.defaultProps=It;class Tt extends ve{constructor(e,t){super(e),this.currentMessage=null,this.unreadMessageCount=0,this.theme=new n.CometChatTheme({}),this.LISTENER_ID="aiconversationsummary__listener",this.closePanel=()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)},this.getConversationSummary=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getConversationSummary(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aiconversationsummary"}loadConversationSummary(){n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:d.jsx(kt,{configuration:this.configuration,getConversationSummaryCallback:this.getConversationSummary,closeCallback:this.closePanel}),position:n.PanelAlignment.messageListFooter})}getAIOptions(e,t,o,r,s){if(this.user=e,this.group=t,r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.conversationSummaryStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.conversationSummaryStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.conversationSummaryStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);let l=new n.CometChatMessageComposerAction({title:n.localize("CONVERSATION_SUMMARY"),onClick:()=>{this.loadConversationSummary()},id:"ai-conversation-summary",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});return a.push(l),a}}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.user=e.user,this.group=e.group,this.unreadMessageCount=e.unreadMessageCount??0,this.unreadMessageCount>(this.configuration?.unreadMessageThreshold??30)&&this.loadConversationSummary()}))}}class Mt extends Ee{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new Tt(e,this.configuration)))}getExtensionId(){return"conversation-summary"}}const Bt=(e,t)=>({display:"flex",width:e?.width||"100%",height:e?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px",background:e?.background||t?.palette.getBackground(),borderRadius:e?.borderRadius||"8px"}),Lt={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"auto",height:"100%"},Ut=(e,t)=>({replyTextFont:t?.textFont||n.fontHelper(e.typography.caption1),replyTextColor:t?.textColor||e?.palette.getAccent(),replyBackground:t?.textBackground||"inherit",boxShadow:`0px 0px 1px ${e?.palette.getAccent600()}`,background:t?.background||"inherit",border:t?.textBorder||"none",borderRadius:t?.textBorderRadius||"8px",display:"flex",justifyContent:"flex-start"});function Rt(e,t){return{height:"24px",width:"24px",buttonIconTint:e?.backIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}}function Pt(e,t){return{display:"flex",justifyContent:"space-between",alignItems:"center",font:e?.titleFont||n.fontHelper(t.typography.text2),color:e?.titleColor||t?.palette.getAccent()}}const Ot={title:n.localize("SUGGEST_A_REPLY"),getSmartRepliesCallback:void 0,editReplyCallback:void 0,closeCallback:void 0,backCallback:void 0,configuration:void 0},jt=de({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}}),Vt=de({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),Gt=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_REPLIES");return t.useEffect((()=>{r(n.States.loading),e&&e.getSmartRepliesCallback&&e.getSmartRepliesCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=[];Object.keys(t).forEach((e=>{t[e]&&""!==t[e]&&o.push(t[e])}));let r=d.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:"10px",boxSizing:"border-box"},children:[d.jsxs("div",{style:Pt(e.configuration?.smartRepliesStyle,a),children:[d.jsx("div",{children:d.jsx(q,{iconURL:Je,onClick:()=>e.backCallback?e.backCallback():null,buttonStyle:Rt(e.configuration?.smartRepliesStyle,a)})}),d.jsx("div",{children:e.title}),d.jsx("div",{style:{flex:.2}})]}),d.jsx(jt,{smartReplyStyle:Ut(a,e.configuration?.smartRepliesStyle),replies:o,ccReplyClicked:t=>{e&&e.editReplyCallback&&e.editReplyCallback(t?.detail?.reply),e&&e.closeCallback&&e.closeCallback()},closeIconURL:""},"smart-replies")]});return n(r)}e.configuration?.customView(t,e?.closeCallback,e?.backCallback).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:Bt(e?.configuration?.smartRepliesStyle,a),children:d.jsxs("div",{style:Lt,children:[o===n.States.loaded?d.jsx("div",{style:{height:"100%"},children:s}):null,o!==n.States.loaded?function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(Vt,{state:n.States.loading,style:e.configuration?.smartRepliesStyle,loadingIconURL:e.configuration?.loadingIconURL||At,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(Vt,{state:n.States.error,style:e.configuration?.smartRepliesStyle,errorIconURL:e.configuration?.errorIconURL||mt,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(Vt,{state:n.States.empty,style:e.configuration?.smartRepliesStyle,emptyIconURL:e.configuration?.emptyIconURL||ht,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}():null]})})};Gt.defaultProps=Ot;class Ht extends ve{constructor(e,t){super(e),this.theme=new n.CometChatTheme({}),this.isModalClosed=!0,this.childRefCallback=e=>{this.buttonRef=e},this.getSmartReplies=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getSmartReplies(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aismartreplies"}editReply(e){n.CometChatUIEvents.ccComposeMessage.next(e)}closeIfMessageReceived(e){e?.getReceiverId()===this.loggedInUser?.getUid()&&this.closeCallback&&(this.isModalClosed||(this.closeCallback(),this.isModalClosed=!0))}getAIOptions(e,t,o,r,s){if(this.user=e,this.group=t,r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.smartRepliesStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.smartRepliesStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.smartRepliesStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);let l=new n.CometChatActionsView({title:n.localize("SUGGEST_A_REPLY"),customView:e=>(this.isModalClosed=!1,this.closeCallback=e?.closePopover,d.jsx(Gt,{title:n.localize("SUGGEST_A_REPLY"),configuration:this.configuration,getSmartRepliesCallback:this.getSmartReplies,editReplyCallback:this.editReply,closeCallback:e.closePopover,backCallback:e.backAction})),id:"ai-smart-replies",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});return a.push(l),a}}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)}))}}class Qt extends Ee{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new Ht(e,this.configuration)))}getExtensionId(){return"smart-replies"}}const Nt={resizeIconHoverText:n.localize("RESIZE"),sessionID:"",minimizeIconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2019.2V13.8H4.80005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.8%204.8V10.2H19.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",maximizeIconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%208.4V3H15.6%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3%2015.6V21H8.4%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",callSettingsBuilder:void 0,ongoingCallStyle:{maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"grey",minHeight:"400px",minWidth:"400px",minimizeIconTint:"white",maximizeIconTint:"white"},onError:e=>{console.log(e)},callWorkflow:n.CallWorkflow.defaultCalling},Kt=e=>{const[o,i]=t.useState(null),a=t.useRef(null),{resizeIconHoverText:l,sessionID:c,minimizeIconURL:C,maximizeIconURL:g,ongoingCallStyle:u,callSettingsBuilder:p,onError:h,callWorkflow:m}=e,A=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)h?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);h?.(n)}}),[h]),x=t.useCallback((()=>{if(p)return p;{let e=!1;return(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{m===n.CallWorkflow.defaultCalling&&(r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null))},onCallEndButtonPressed:()=>{m===n.CallWorkflow.defaultCalling?s.CometChat.endCall(c).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e)})).catch((e=>{A(e)})):(n.CometChatCallEvents.ccCallEnded.next(null),r.CometChatUIKitCalls.endSession())},onError:e=>{A(e)}})).build()}}),[p,m,A,c]),b=t.useCallback((()=>{if(o){const e=o.getAuthToken();r.CometChatUIKitCalls.generateToken(c,e).then((e=>{r.CometChatUIKitCalls.startSession(e?.token,x(),a.current)}),(e=>{A(e)}))}else s.CometChat.getLoggedinUser().then((e=>{const t=e.getAuthToken();r.CometChatUIKitCalls.generateToken(c,t).then((e=>{r.CometChatUIKitCalls.startSession(e?.token,x(),a.current)}),(e=>{A(e)}))}))}),[c,x,o,A]);return function(e,n,o){t.useEffect((()=>{Zn.getLoggedinUser().then((t=>{t&&e(t)}))}),[e]),t.useEffect((()=>{""!==n&&o()}),[n,o])}(i,c,b),""!==c?d.jsx("cometchat-callscreen-wrapper",{callscreenStyle:JSON.stringify(u),resizeIconHoverText:l,minimizeIconURL:C,maximizeIconURL:g,sessionID:c,children:d.jsx("div",{id:"cc-callscreen_ref",style:{width:"100%",height:"100%",inset:"0"},className:"cc-callscreen__view",ref:a})}):d.jsx(d.Fragment,{})};Kt.defaultProps=Nt;const zt=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius,display:"flex",justifyContent:"center"}),Jt={width:"360px",height:"581px",titleTextFont:"700 22px Inter",titleTextColor:"RGB(20, 20, 20)",subtitleTextFont:"400 15px Inter",subtitleTextColor:"RGBA(20, 20, 20, 0.58)",borderRadius:"8px"},Yt={height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},_t=e=>new r.CallButtonsStyle({width:"100%",height:"100%",background:"transparent",border:"none",borderRadius:"0",voiceCallIconTint:e.palette.getPrimary(),videoCallIconTint:e.palette.getPrimary(),voiceCallIconTextFont:n.fontHelper(e.typography.caption1),videoCallIconTextFont:n.fontHelper(e.typography.caption1),voiceCallIconTextColor:e.palette.getPrimary(),videoCallIconTextColor:e.palette.getPrimary(),buttonPadding:"8px 32px",buttonBackground:e.palette.getAccent100(),buttonBorder:"0",buttonBorderRadius:"8px"}),Wt=e=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:e.palette.getAccent900(),maximizeIconTint:e.palette.getAccent900()});const Zt=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius}),Xt=e=>({textFont:e?.subtitleTextFont,textColor:e?.subtitleTextColor}),qt={height:"fit-content",width:"fit-content",buttonTextFont:"400 12px Inter",buttonTextColor:"RGBA(20, 20, 20, 0.58)",borderRadius:"8px",border:"none",buttonIconTint:"white",background:"",iconBackground:"red"},$t={height:"100%",width:"100%",border:"inherite",borderRadius:"inherite",background:"transparent",titleFont:"700 22px Inter",titleColor:"black"},en=e=>new o.AvatarStyle({borderRadius:"50%",width:"180px",height:"180px",border:`1px solid ${e.palette.getAccent100()}`,backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),tn=e=>new r.OutgoingCallStyle({width:"100%",height:"100%",background:e.palette.getBackground(),border:"none",borderRadius:"0",titleTextFont:n.fontHelper(e.typography.title1),titleTextColor:e.palette.getAccent(),subtitleTextFont:n.fontHelper(e.typography.subtitle1),subtitleTextColor:e.palette.getAccent600(),declineButtonTextFont:n.fontHelper(e.typography.caption1),declineButtonTextColor:e.palette.getAccent600(),declineButtonIconTint:e.palette.getAccent("dark"),declineButtonIconBackground:e.palette.getError()});var nn="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const on=e=>{const{call:i,disableSoundForCalls:a=!1,customSoundForCalls:l="",declineButtonText:c=n.localize("CANCEL"),declineButtonIconURL:C=nn,customView:g=null,onError:u=(e=>{console.log(e)}),avatarStyle:p=new o.AvatarStyle({borderRadius:"50%",width:"180px",height:"180px"}),outgoingCallStyle:h=new r.OutgoingCallStyle({width:"100%",height:"100%",titleTextFont:"700 22px Inter",titleTextColor:"RGB(20, 20, 20)",subtitleTextFont:"400 15px Inter",subtitleTextColor:"RGBA(20, 20, 20, 0.58)",declineButtonTextFont:"400 12px Inter",declineButtonTextColor:"RGBA(20, 20, 20, 0.58)",declineButtonIconTint:"white",declineButtonIconBackground:"red"}),onCloseClicked:m=(()=>{})}=e,{theme:A}=t.useContext(R),x=n.IconButtonAlignment.top,b=t.useRef(p),y=t.useRef(h),w=t.useRef(qt),f=t.useRef(null),D=t.useRef(null);f.current=i,b.current={...en(A),...b?.current},y.current={...tn(A),...y?.current},w.current=(e=>({height:"fit-content",width:"fit-content",buttonTextFont:e?.declineButtonTextFont,buttonTextColor:e?.declineButtonTextColor,borderRadius:"8px",border:"none",buttonIconTint:e?.declineButtonIconTint,background:"",iconBackground:e?.declineButtonIconBackground}))(y?.current),$t.titleColor=y?.current?.titleTextColor,$t.titleFont=y?.current?.titleTextFont;let E=n.localize("CALLING");const v=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)u(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);u(n)}}),[u]),I=t.useCallback((()=>{try{r.CometChatSoundManager.pause(),m&&m()}catch(e){v(e)}}),[m,v]),S=t.useCallback((()=>{try{a||(l?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall,l):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall))}catch(e){v(e)}}),[a,l,v]);return function(e,n,o,s){t.useEffect((()=>()=>{r.CometChatSoundManager.pause()}),[]),t.useEffect((()=>(setTimeout((()=>{e()})),()=>{r.CometChatSoundManager.pause()})),[n,e]),t.useEffect((()=>{const e=s.current;if(e)return e.addEventListener("cc-button-clicked",o),()=>{e.removeEventListener("cc-button-clicked",o)}}),[o,s])}(S,i,I,D),d.jsx(d.Fragment,{children:d.jsx("div",{className:"cc-outgoingcall__wrapper",style:Zt(y?.current),children:g?d.jsx("div",{className:"cc-outgoingcall__custom-view",children:g}):f.current?d.jsxs("cometchat-card",{title:f.current?.getReceiver()?.getName(),cardStyle:JSON.stringify($t),avatarName:f.current?.getReceiver()?.getName(),avatarURL:f.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user?f.current?.getReceiver()?.getAvatar():f.current?.getReceiver()?.getIcon(),avatarStyle:JSON.stringify(b?.current),children:[d.jsx("cometchat-label",{slot:"subtitleView",labelStyle:JSON.stringify(Xt(y?.current)),text:E,children:" "}),d.jsx("div",{slot:"bottomView",children:d.jsx("cometchat-icon-button",{ref:D,text:c,iconURL:C,alignment:x,buttonStyle:JSON.stringify(w?.current)})})]}):null})})};const rn={voiceCallIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",voiceCallIconText:n.localize("VOICE_CALL"),voiceCallIconHoverText:n.localize("VOICE_CALL"),videoCallIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",videoCallIconText:n.localize("VIDEO_CALL"),videoCallIconHoverText:n.localize("VIDEO_CALL"),callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent"},onVoiceCallClick:void 0,onVideoCallClick:void 0,onError:e=>{console.log(e)}},sn=e=>{const{user:o,group:i,voiceCallIconURL:a,voiceCallIconText:l,voiceCallIconHoverText:c,videoCallIconURL:C,videoCallIconText:g,videoCallIconHoverText:u,callButtonsStyle:p,onVoiceCallClick:h,onVideoCallClick:m,onError:x}=e,{theme:b}=t.useContext(R),[y,w]=t.useState(null),f=t.useRef(null);f.current={..._t(b),...p};const D=t.useRef(null);var E;D.current=(E=f?.current,{buttonIconTint:E?.voiceCallIconTint??"RGB(51, 153, 255)",buttonTextFont:E?.voiceCallIconTextFont??"400 12px Inter",buttonTextColor:E?.voiceCallIconTextColor??"RGB(51, 153, 255)",padding:E?.buttonPadding??"8px 32px",background:E?.buttonBackground??"transparent",border:E?.border??"none",borderRadius:E?.buttonBorderRadius??"0",...Yt});const v=t.useRef(null);v.current=(e=>({buttonIconTint:e?.videoCallIconTint??"RGB(51, 153, 255)",buttonTextFont:e?.videoCallIconTextFont??"400 12px Inter",buttonTextColor:e?.videoCallIconTextColor??"RGB(51, 153, 255)",padding:e?.buttonPadding??"8px 32px",background:e?.buttonBackground??"transparent",border:e?.border??"none",borderRadius:e?.buttonBorderRadius??"0",...Yt}))(f?.current);const[I,S]=t.useState(o),[F,k]=t.useState(i),[T,M]=t.useState(!1),[B,L]=t.useState(!1),[U,P]=t.useState(!1),O=t.useRef(null),j=t.useRef(null),V=t.useRef(null),G=t.useRef(""),H=A(h),Q=A(m);let N="callbuttons_"+(new Date).getTime();const K=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)x?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);x?.(n)}}),[x]),z=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallRejected.subscribe((()=>{P(!1)})),t=n.CometChatCallEvents.ccOutgoingCall.subscribe((()=>{P(!0)})),o=n.CometChatCallEvents.ccCallEnded.subscribe((()=>{P(!1),V.current=null,G.current="",M(!1),L(!1)}));return()=>{try{o?.unsubscribe(),e?.unsubscribe(),t?.unsubscribe()}catch(e){K(e)}}}catch(e){K(e)}}),[K]),J=t.useCallback((()=>{try{s.CometChat.addCallListener(N,new s.CometChat.CallListener({onIncomingCallReceived:()=>{P(!0)},onIncomingCallCancelled:()=>{P(!1)},onOutgoingCallRejected:()=>{L(!1),P(!1),V.current=null,G.current=""},onOutgoingCallAccepted:e=>{if(e.getSender()?.getUid()===y?.getUid()||e.getSessionId()!==V.current?.getSessionId())return L(!1),P(!1),V.current=null,void(G.current="");L(!1),M(!0),P(!0),V.current=e,G.current=e.getSessionId()}}))}catch(e){K(e)}}),[K,N]),Y=t.useCallback((()=>{try{s.CometChat.removeCallListener(N)}catch(e){K(e)}}),[K,N]),_=()=>{P(!1),V.current=null,G.current="",M(!1),L(!1)};const W=t.useCallback((e=>{try{const t=I?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,o=I?I?.getUid():F?.getGuid(),r=new s.CometChat.Call(o,e,t);s.CometChat.initiateCall(r).then((e=>{V.current=e,L(!0),n.CometChatCallEvents.ccOutgoingCall.next(e)}),(e=>{K(e)}))}catch(e){K(e)}}),[I,F,K]),Z=t.useCallback((()=>{try{I&&W(n.CometChatUIKitConstants.MessageTypes.audio)}catch(e){K(e)}}),[I,W,K]),X=t.useCallback((()=>{try{const e=I?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,t=I?I?.getUid():F?.getGuid(),o=G.current,i={sessionID:o,sessionId:o,callType:n.CometChatUIKitConstants.MessageTypes.video},a=n.CometChatUIKitConstants.calls.meeting,l=`group_${o}`,c=new s.CometChat.CustomMessage(t,e,a,i);c.setMetadata({incrementUnreadCount:!0}),c.shouldUpdateConversation(!0),c.setSender(y),c.setConversationId(l),c.sentAt=r.CometChatUIKitUtility.getUnixTimestamp(),c.muid=r.CometChatUIKitUtility.ID(),n.CometChatMessageEvents.ccMessageSent.next({message:c,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(c).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(e=>{K(e)}))}catch(e){K(e)}}),[I,F,y,K]),q=t.useCallback((()=>{try{I&&W(n.CometChatUIKitConstants.MessageTypes.video),F&&(G.current=F?.getGuid(),X(),M(!0))}catch(e){K(e)}}),[I,F,X,K,W]),$=t.useCallback((()=>{const e=V.current;if(e)try{r.CometChatSoundManager.pause(),s.CometChat.rejectCall(e.getSessionId(),n.CometChatUIKitConstants.calls.cancelled).then((e=>{P(!1),L(!1),n.CometChatCallEvents.ccCallRejected.next(e),V.current=null}),(e=>{K(e)})),L(!1)}catch(e){K(e)}}),[K]),ee=t.useCallback((()=>{if(D.current)return D.current.buttonIconTint=((e,t,n)=>e?n.palette.getAccent600():t?.voiceCallIconTint)(U,f.current??void 0,b),D.current}),[U,b]),te=t.useCallback((()=>{if(v.current)return v.current.buttonIconTint=((e,t,n)=>e?n.palette.getAccent600():t?.videoCallIconTint)(U,f.current??void 0,b),v.current}),[U,b]);!function(e,n,o,r,i,a,l,c,C,d,g,u,p,h,m,A,x){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}),(e=>{a(e)}))}),[n,a]),t.useEffect((()=>{let t;return e&&(t=i(),l()),()=>{t?.(),c()}}),[e,l,c,i]),t.useEffect((()=>{o&&(C(o),d(null))}),[o,C,d]),t.useEffect((()=>{r&&(C(null),d(r))}),[r,C,d]),t.useEffect((()=>{const e=g.current,t=u.current;if(!e&&!t)return;const n=()=>{const e=A.current;e?e():p()},o=()=>{const e=x.current;e?e():h()};return m?(e?.removeEventListener("cc-button-clicked",n),t?.removeEventListener("cc-button-clicked",o)):(e?.addEventListener("cc-button-clicked",n),t?.addEventListener("cc-button-clicked",o)),()=>{e?.removeEventListener("cc-button-clicked",n),t?.removeEventListener("cc-button-clicked",o)}}),[m,p,h,A,x,g,u])}(y,w,o,i,z,K,J,Y,S,k,O,j,Z,q,U,H,Q);const ne=U?{disabled:!0}:{};return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"cc-call-buttons__wrapper",style:zt(f.current),children:d.jsxs("div",{className:"cc-call-buttons",style:{display:"flex",gap:"16px"},children:[I?d.jsx("cometchat-button",{...ne,buttonStyle:JSON.stringify(ee()),text:l,hoverText:c,iconURL:a,ref:O}):null,I||F?d.jsx("cometchat-button",{...ne,buttonStyle:JSON.stringify(te()),text:g,hoverText:u,iconURL:C,ref:j}):null]})}),T&&null!=G.current?d.jsx(Kt,{ongoingCallStyle:Wt(b),sessionID:G.current,callSettingsBuilder:function(){let e=V.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio;const t=G.current;return(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{V.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&(r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null),_())},onCallEndButtonPressed:()=>{V.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user?s.CometChat.endCall(t).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e),_()})).catch((e=>{K(e)})):_()},onError:e=>{K(e)}})).build()}()}):null,B&&V.current?d.jsx("cometchat-backdrop",{children:d.jsx(on,{onCloseClicked:$,outgoingCallStyle:Jt,call:V.current})}):null]})};sn.defaultProps=rn;const an=Object.freeze({meeting:"meeting",ongoing:"ongoing",ended:"ended",initiated:"initiated",cancelled:"cancelled",rejected:"rejected",unanswered:"unanswered"}),ln=de({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t});class cn extends ve{constructor(e){super(e),this.loggedInUser=null,this.addLoginListener(),this.getLoggedInUser()}addLoginListener(){s.CometChat.addLoginListener("login_listener",new s.CometChat.LoginListener({logoutSuccess:()=>{try{let e=s.CometChat.getActiveCall();e&&s.CometChat.endCall(e.getSessionId())}catch(e){console.log("error in endCall on logout",e)}}}))}async getLoggedInUser(){this.loggedInUser=await s.CometChat.getLoggedinUser()}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(an.meeting)||e.push(an.meeting),e.includes(n.CometChatUIKitConstants.MessageTypes.audio)||e.push(n.CometChatUIKitConstants.MessageTypes.audio),e.includes(n.CometChatUIKitConstants.MessageTypes.video)||e.push(n.CometChatUIKitConstants.MessageTypes.video),e}getId(){return"calling"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.call)||e.push(n.CometChatUIKitConstants.MessageCategory.call),e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateTypeExist(e,t){return e.some((e=>e.type===t))}checkIfTemplateCategoryExist(e,t){return e.some((e=>e.category===t))}getAllMessageTemplates(e,t){this.theme=e;const o=super.getAllMessageTemplates(e,t);return this.checkIfTemplateTypeExist(o,an.meeting)||o.push(this.getDirectCallTemplate(this.theme)),this.checkIfTemplateCategoryExist(o,n.CometChatUIKitConstants.MessageCategory.call)||o.push(...this.getDefaultCallTemplate(this.theme)),o}getDirectCallTemplate(e){return new n.CometChatMessageTemplate({type:an.meeting,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>t.getDeletedAt()?super.getDeleteMessageBubble(t,this.theme):this.getDirectCallMessageBubble(t,n,e),options:(e,t,n,o)=>De.getDataSource().getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getDefaultCallTemplate(e){return[new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.audio,category:n.CometChatUIKitConstants.MessageCategory.call,contentView:(t,n)=>this.getDefaultAudioCallMessageBubble(t,n,e),bottomView:(e,t)=>super.getBottomView(e,t)}),new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.video,category:n.CometChatUIKitConstants.MessageCategory.call,contentView:(t,n)=>this.getDefaultVideoCallMessageBubble(t,n,e),bottomView:(e,t)=>super.getBottomView(e,t)})]}getCallBubbleStyle(e,t){return e===n.MessageBubbleAlignment.left?{titleFont:n.fontHelper(t.typography.text2),titleColor:t.palette.getAccent(),iconTint:t.palette.getPrimary(),buttonTextFont:n.fontHelper(t.typography.text2),buttonTextColor:t.palette.getAccent("dark"),buttonBackground:t.palette.getPrimary(),width:"240px",borderRadius:"12px"}:{titleFont:n.fontHelper(t.typography.text2),titleColor:t.palette.getAccent("dark"),iconTint:t.palette.getAccent("dark"),buttonTextFont:n.fontHelper(t.typography.text2),buttonTextColor:t.palette.getPrimary(),buttonBackground:t.palette.getAccent("dark"),width:"240px",background:t.palette.getPrimary(),borderRadius:"12px"}}getSessionId(e){let t=e.getData();return t?.customData?.sessionID}getCallBubbleTitle(e){return e.getSender()&&e.getSender().getUid()!==this.loggedInUser?.getUid()?`${e.getSender().getName()} ${n.localize("INITIATED_GROUP_CALL")}`:n.localize("YOU_INITIATED_GROUP_CALL")}getDirectCallMessageBubble(e,r,s){let i=n.DocumentIconAlignment.left,a=this.getCallBubbleStyle(r,s),l=this.getSessionId(e),c=this.getCallBubbleTitle(e),C=n.localize("JOIN");const g=de({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});return d.jsx(g,{hideSeparator:!0,iconAlignment:i,documentStyle:a,URL:l,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",title:c,buttonText:C,ccClicked:()=>{this.startDirectCall(l,this.theme||s)}})}startDirectCall(e,t){const r=new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:t.palette.getAccent900(),maximizeIconTint:t.palette.getAccent900()}),s=d.jsx(Kt,{ongoingCallStyle:r,sessionID:e,callWorkflow:n.CallWorkflow.directCalling});n.CometChatUIEvents.ccShowOngoingCall.next({child:s})}callStatusStyle(e,t){return this.loggedInUser?{buttonTextFont:n.fontHelper(t.typography.subtitle2),buttonTextColor:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?t.palette.getError():t.palette.getAccent600(),borderRadius:"10px",border:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?"1px solid RGBA(255, 59, 48, 0.2)":`1px solid ${t.palette.getAccent100()}`,buttonIconTint:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?t.palette.getError():t.palette.getAccent600(),background:"transparent",iconBackground:"transparent",padding:"2px 12px 2px 0",gap:"0",height:"25px",justifyContent:"center"}:{}}getCallActionMessage(e){return r.CallingDetailsUtils.getCallStatus(e,this.loggedInUser)}getDefaultAudioCallMessageBubble(e,t,n){const o=this.callStatusStyle(e,n),r=this.getCallActionMessage(e);return d.jsx(ln,{disabled:!0,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:o,text:r})}getDefaultVideoCallMessageBubble(e,t,n){const o=this.callStatusStyle(e,n),r=this.getCallActionMessage(e);return d.jsx(ln,{disabled:!0,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:o,text:r})}getLastConversationMessage(e,t,o){let i="";if(e.getLastMessage()&&e.getLastMessage().category==n.CometChatUIKitConstants.MessageCategory.call){let n=e.getLastMessage();i=r.CallingDetailsUtils.getCallStatus(n,t)}else if(e?.getLastMessage()&&e.getLastMessage().type==n.CometChatUIKitConstants.calls.meeting){let r=e.getLastMessage();i=r.getSender()&&r?.getSender()?.getUid()!=t.getUid()?`${r.getSender().getName()} ${n.localize("INITIATED_GROUP_CALL")}`:n.localize("YOU_INITIATED_GROUP_CALL");let a=e.getLastMessage();a&&a.getMentionedUsers().length&&a instanceof s.CometChat.TextMessage&&o&&!o.disableMentions&&(i=this.getMentionsFormattedText(a,i,o))}else i=super.getLastConversationMessage(e,t,o);return i}getAuxiliaryHeaderMenu(e,t){let n=[],o=d.jsx(sn,{user:e,group:t,callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent",buttonPadding:"0",buttonBackground:"transparent",buttonBorder:"0 4px",buttonBorderRadius:"8px"},voiceCallIconText:"",videoCallIconText:""},"callbuttons");return n.push(o),n}}class Cn{enable(){s.CometChat.isExtensionEnabled(this.getExtensionId()).then((e=>{e&&this.addExtension()}),(e=>{}))}}class dn extends Cn{enable(){De.enable((e=>new cn(e)))}addExtension(){De.enable((e=>new cn(e)))}getExtensionId(){return"calling"}}var gn="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Document%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Document%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.019664%2C11.0497498%20C20.2968766%2C11.0497498%2019.6037718%2C11.3372517%2019.0931699%2C11.8488579%20L11.9722287%2C18.9696649%20C11.8675218%2C19.07437%2011.7961523%2C19.207727%2011.7671152%2C19.3529288%20L11.0671938%2C22.8529288%20C10.9622469%2C23.3777219%2011.4249469%2C23.8404018%2011.9497354%2C23.7354323%20L15.4493424%2C23.0354323%20C15.5945931%2C23.0063789%2015.7279879%2C22.9349647%2015.8327036%2C22.830196%20L22.9504376%2C15.7088627%20C24.0147495%2C14.6469387%2024.0170552%2C12.9221237%2022.9548584%2C11.8566265%20L22.9136114%2C11.8181375%20C22.4355563%2C11.3372517%2021.7424514%2C11.0497498%2021.019664%2C11.0497498%20Z%20M21.019664%2C12.5497498%20C21.2977603%2C12.5497498%2021.5660731%2C12.6445675%2021.7814054%2C12.816289%20L21.9254022%2C12.9466625%20L22.00838%2C13.0404351%20C22.3677898%2C13.4966868%2022.3370963%2C14.2018865%2021.890239%2C14.6477416%20L14.931%2C21.609%20L12.758%2C22.043%20L13.193%2C19.869%20L20.1543459%2C12.9090017%20C20.3840891%2C12.6788071%2020.6952184%2C12.5497498%2021.019664%2C12.5497498%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.3982707%2C1.25%20C18.5339913%2C1.25%2019.463993%2C2.13072139%2019.5427157%2C3.24645803%20L19.5481135%2C3.4%20L19.5481135%2C9.7%20C19.5481135%2C10.1142136%2019.2123271%2C10.45%2018.7981135%2C10.45%20C18.4184177%2C10.45%2018.1046226%2C10.1678461%2018.0549601%2C9.80177056%20L18.0481135%2C9.7%20L18.0481135%2C3.4%20C18.0481135%2C3.07363278%2017.8076479%2C2.80347042%2017.4942955%2C2.75704724%20L17.3982707%2C2.75%20L3.39984279%2C2.75%20C3.07358878%2C2.75%202.80346372%2C2.99049261%202.75704639%2C3.30394351%20L2.75%2C3.4%20L2.75%2C18.8%20C2.75%2C19.1263672%202.99046561%2C19.3965296%203.30381804%2C19.4429528%20L3.39984279%2C19.45%20L8.99921396%2C19.45%20C9.41342753%2C19.45%209.74921396%2C19.7857864%209.74921396%2C20.2%20C9.74921396%2C20.5796958%209.46706008%2C20.893491%209.10098452%2C20.9431534%20L8.99921396%2C20.95%20L3.39984279%2C20.95%20C2.26412221%2C20.95%201.33412057%2C20.0692786%201.25539778%2C18.953542%20L1.25%2C18.8%20L1.25%2C3.4%20C1.25%2C2.26423244%202.13062249%2C1.33412985%203.24630755%2C1.25539838%20L3.39984279%2C1.25%20L17.3982707%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C5.45%20C15.0127987%2C5.45%2015.3485851%2C5.78578644%2015.3485851%2C6.2%20C15.3485851%2C6.57969577%2015.0664313%2C6.89349096%2014.7003557%2C6.94315338%20L14.5985851%2C6.95%20L8.99921396%2C6.95%20C8.5850004%2C6.95%208.24921396%2C6.61421356%208.24921396%2C6.2%20C8.24921396%2C5.82030423%208.53136785%2C5.50650904%208.89744341%2C5.45684662%20L8.99921396%2C5.45%20L14.5985851%2C5.45%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C9.65%20C15.0127987%2C9.65%2015.3485851%2C9.98578644%2015.3485851%2C10.4%20C15.3485851%2C10.7796958%2015.0664313%2C11.093491%2014.7003557%2C11.1431534%20L14.5985851%2C11.15%20L6.19952838%2C11.15%20C5.78531482%2C11.15%205.44952838%2C10.8142136%205.44952838%2C10.4%20C5.44952838%2C10.0203042%205.73168226%2C9.70650904%206.09775782%2C9.65684662%20L6.19952838%2C9.65%20L14.5985851%2C9.65%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.1987423%2C13.85%20C13.6129559%2C13.85%2013.9487423%2C14.1857864%2013.9487423%2C14.6%20C13.9487423%2C14.9796958%2013.6665885%2C15.293491%2013.3005129%2C15.3431534%20L13.1987423%2C15.35%20L6.19952838%2C15.35%20C5.78531482%2C15.35%205.44952838%2C15.0142136%205.44952838%2C14.6%20C5.44952838%2C14.2203042%205.73168226%2C13.906509%206.09775782%2C13.8568466%20L6.19952838%2C13.85%20L13.1987423%2C13.85%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const un=de({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});class pn extends ve{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(r.CollaborativeDocumentConstants.extension_document)||e.push(r.CollaborativeDocumentConstants.extension_document),e}getId(){return"collaborativedocument"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.CollaborativeDocumentConstants.extension_document)||n.push(this.getDocumentTemplate(this.theme)),n}getDocumentTemplate(e){return new n.CometChatMessageTemplate({type:r.CollaborativeDocumentConstants.extension_document,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getDocumentContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getDocumentContentView(e,t){let o=n.DocumentIconAlignment.right,r=this.configuration?.getDocumentBubbleStyle(),s={titleFont:r?.titleFont||n.fontHelper(this.theme.typography.text2),titleColor:r?.titleColor||this.theme.palette.getAccent(),subtitleFont:r?.subtitleFont||n.fontHelper(this.theme.typography.subtitle2),subtitleColor:r?.subtitleColor||this.theme.palette.getAccent600(),iconTint:r?.iconTint||this.theme.palette.getAccent700(),buttonTextFont:r?.buttonTextFont||n.fontHelper(this.theme.typography.text2),buttonTextColor:r?.buttonTextColor||this.theme.palette.getPrimary(),buttonBackground:r?.buttonBackground||"transparent",separatorColor:r?.separatorColor||this.theme.palette.getAccent200()};const i=this.getDocumentURL(e),a=n.localize("COLLABORATIVE_DOCUMENT"),l=n.localize("OPEN_DOCUMENT"),c=n.localize("DRAW_DOCUMENT_TOGETHER");return d.jsx(un,{iconURL:this.configuration?.getIconURL()?this.configuration?.getIconURL():gn,title:a,URL:i,subtitle:c,buttonText:l,documentStyle:s,hideSeparator:!1,iconAlignment:o,ccClicked:this.launchCollaborativeDocument})}launchCollaborativeDocument(e){window.open(e,"","fullscreen=yes, scrollbars=auto")}getDocumentURL(e){try{if(e?.getData()){const t=e.getData();if(t?.metadata){const e=t?.metadata;if(r.CometChatUIKitUtility.checkHasOwnProperty(e,"@injected")){const t=e["@injected"];if(t?.extensions){const e=t.extensions;return e[r.CollaborativeDocumentConstants.document]?e[r.CollaborativeDocumentConstants.document].document_url:e[r.CollaborativeDocumentConstants.document].board_url}}}}}catch(e){console.log("error in fetching document url",e)}}getAttachmentOptions(e,t){if(t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle(),i=!!t?.user,a=i?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,l=i?t.user:t.group;const c=super.getAttachmentOptions(e,t);let C=new n.CometChatMessageComposerAction({id:r.CollaborativeDocumentConstants.document,title:n.localize("COLLABORATIVE_DOCUMENT"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():gn,iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:()=>{s.CometChat.callExtension(r.CollaborativeDocumentConstants.document,r.CollaborativeDocumentConstants.post,r.CollaborativeDocumentConstants.v1_create,{receiver:l,receiverType:a}).then((e=>{}),(e=>{}))}});return c.push(C),c}}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.CollaborativeDocumentConstants.extension_document&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_DOCUMENT"):super.getLastConversationMessage(e,t,o)}}class hn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new pn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.document}}var mn="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Whiteboard%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Whiteboard%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C1.25%20C4.2473527%2C1.25%202.65%2C2.77128829%202.65%2C4.66666667%20C2.65%2C6.56204505%204.2473527%2C8.08333333%206.2%2C8.08333333%20C8.1526473%2C8.08333333%209.75%2C6.56204505%209.75%2C4.66666667%20C9.75%2C2.77128829%208.1526473%2C1.25%206.2%2C1.25%20Z%20M6.2%2C2.75%20C7.3401473%2C2.75%208.25%2C3.61652638%208.25%2C4.66666667%20C8.25%2C5.71680695%207.3401473%2C6.58333333%206.2%2C6.58333333%20C5.0598527%2C6.58333333%204.15%2C5.71680695%204.15%2C4.66666667%20C4.15%2C3.61652638%205.0598527%2C2.75%206.2%2C2.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666667%20C6.57969577%2C7.91666667%206.89349096%2C8.19882055%206.94315338%2C8.56489611%20L6.95%2C8.66666667%20L6.95%2C14%20C6.95%2C14.4142136%206.61421356%2C14.75%206.2%2C14.75%20C5.82030423%2C14.75%205.50650904%2C14.4678461%205.45684662%2C14.1017706%20L5.45%2C14%20L5.45%2C8.66666667%20C5.45%2C8.2524531%205.78578644%2C7.91666667%206.2%2C7.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666673%20C3.47415406%2C7.91666673%201.25%2C10.0349087%201.25%2C12.6666667%20L1.25%2C15.3333333%20L1.25684662%2C15.4351039%20C1.30650904%2C15.8011795%201.62030423%2C16.0833333%202%2C16.0833333%20L2.725%2C16.083%20L3.3541005%2C22.0783194%20C3.39418895%2C22.4601142%203.71610639%2C22.75%204.1%2C22.75%20L8.3%2C22.75%20L8.40299648%2C22.7429615%20C8.74009489%2C22.6965339%209.00945546%2C22.4254056%209.0458995%2C22.0783194%20L9.674%2C16.083%20L10.4%2C16.0833333%20C10.8142136%2C16.0833333%2011.15%2C15.7475469%2011.15%2C15.3333333%20L11.15%2C12.6666667%20C11.15%2C10.0349087%208.92584594%2C7.91666673%206.2%2C7.91666673%20Z%20M6.39003599%2C9.42150275%20C8.21408216%2C9.514591%209.65%2C10.9396974%209.65%2C12.6666667%20L9.649%2C14.583%20L9%2C14.5833333%20L8.89700352%2C14.5903718%20C8.55990511%2C14.6367994%208.29054454%2C14.9079278%208.2541005%2C15.2550139%20L7.624%2C21.25%20L4.775%2C21.25%20L4.1458995%2C15.2550139%20L4.12814397%2C15.1533155%20C4.04676841%2C14.8229084%203.74899419%2C14.5833333%203.4%2C14.5833333%20L2.75%2C14.583%20L2.75%2C12.6666667%20C2.75%2C10.8801468%204.28665405%2C9.41666673%206.2%2C9.41666673%20L6.39003599%2C9.42150275%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.6%2C1.25%20C22.7281683%2C1.25%2023.6652093%2C2.09570502%2023.7445585%2C3.18354707%20L23.75%2C3.33333333%20L23.75%2C14.6666667%20C23.75%2C15.7752741%2022.8620097%2C16.6691795%2021.7525939%2C16.7448147%20L21.6%2C16.75%20L13.2%2C16.75%20C12.7857864%2C16.75%2012.45%2C16.4142136%2012.45%2C16%20C12.45%2C15.6203042%2012.7321539%2C15.306509%2013.0982294%2C15.2568466%20L13.2%2C15.25%20L21.6%2C15.25%20C21.9335897%2C15.25%2022.1978428%2C15.0272126%2022.2431318%2C14.7509728%20L22.25%2C14.6666667%20L22.25%2C3.33333333%20C22.25%2C3.04809641%2022.0160733%2C2.79937841%2021.6978472%2C2.75651429%20L21.6%2C2.75%20L11.8%2C2.75%20C11.3857864%2C2.75%2011.05%2C2.41421356%2011.05%2C2%20C11.05%2C1.62030423%2011.3321539%2C1.30650904%2011.6982294%2C1.25684662%20L11.8%2C1.25%20L21.6%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const An=de({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});class xn extends ve{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getAllMessageTypes(){let e=super.getAllMessageTypes();return e.some((e=>e===r.CollaborativeWhiteboardConstants.extension_whiteboard))||e.push(r.CollaborativeWhiteboardConstants.extension_whiteboard),e}getId(){return"collaborativewhiteboard"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.CollaborativeWhiteboardConstants.extension_whiteboard)||n.push(this.getWhiteBoardTemplate(this.theme)),n}getWhiteBoardTemplate(e){return new n.CometChatMessageTemplate({type:r.CollaborativeWhiteboardConstants.extension_whiteboard,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getWhiteboardContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getWhiteboardContentView(e,t){let o=n.DocumentIconAlignment.right,r=this.configuration?.getWhiteboardBubbleStyle(),s={titleFont:r?.titleFont||n.fontHelper(this.theme.typography.text2),titleColor:r?.titleColor||this.theme.palette.getAccent(),subtitleFont:r?.subtitleFont||n.fontHelper(this.theme.typography.subtitle2),subtitleColor:r?.subtitleColor||this.theme.palette.getAccent600(),iconTint:r?.iconTint||this.theme.palette.getAccent700(),buttonTextFont:r?.buttonTextFont||n.fontHelper(this.theme.typography.text2),buttonTextColor:r?.buttonTextColor||this.theme.palette.getPrimary(),buttonBackground:r?.buttonBackground||"transparent",separatorColor:r?.separatorColor||this.theme.palette.getAccent200()};const i=this.getWhiteboardDocument(e),a=n.localize("COLLABORATIVE_WHITEBOARD"),l=n.localize("OPEN_WHITEBOARD"),c=n.localize("DRAW_WHITEBOARD_TOGETHER");return d.jsx(An,{hideSeparator:!1,iconAlignment:o,iconURL:this.configuration?.getIconURL()?this.configuration?.getIconURL():mn,title:a,URL:i,subtitle:c,buttonText:l,documentStyle:s,ccClicked:this.launchCollaborativeWhiteboardDocument})}launchCollaborativeWhiteboardDocument(e){window.open(e,"","fullscreen=yes, scrollbars=auto")}getWhiteboardDocument(e){try{if(e?.getData()){const t=e.getData();if(t?.metadata){const e=t?.metadata;if(r.CometChatUIKitUtility.checkHasOwnProperty(e,"@injected")){const t=e["@injected"];if(t?.extensions){const e=t.extensions;return e[r.CollaborativeWhiteboardConstants.whiteboard]?e[r.CollaborativeWhiteboardConstants.whiteboard].board_url:e[r.CollaborativeWhiteboardConstants.whiteboard].document_url}}}}}catch(e){console.log("error in getting whiteboard details",e)}}getAttachmentOptions(e,t){if(t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle(),i=!!t?.user,a=i?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,l=i?t.user:t.group;const c=super.getAttachmentOptions(e,t);let C=new n.CometChatMessageComposerAction({id:r.CollaborativeWhiteboardConstants.whiteboard,title:n.localize("COLLABORATIVE_WHITEBOARD"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():mn,iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:()=>{s.CometChat.callExtension(r.CollaborativeWhiteboardConstants.whiteboard,r.CollaborativeWhiteboardConstants.post,r.CollaborativeWhiteboardConstants.v1_create,{receiver:l,receiverType:a}).then((e=>{}),(e=>{console.log("error in sending whiteboard",e)}))}});return c.push(C),c}}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.CollaborativeWhiteboardConstants.extension_whiteboard&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_WHITEBOARD"):super.getLastConversationMessage(e,t,o)}}class bn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new xn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.whiteboard}}const yn=de({tagName:"image-moderation",elementClass:r.ImageModeration,react:t,events:{CCShowDialog:"cc-show-dialog"}}),wn=de({tagName:"cometchat-backdrop",elementClass:o.CometChatBackdrop,react:t}),fn=de({tagName:"cometchat-confirm-dialog",elementClass:o.CometChatConfirmDialog,react:t,events:{ccCancelClicked:"cc-cancel-clicked",ccConfirmClicked:"cc-confirm-clicked"}}),Dn=de({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t,events:{ccImageClicked:"cc-image-clicked"}}),En=de({tagName:"cometchat-full-screen-viewer",elementClass:o.CometChatFullScreenViewer,react:t,events:{ccCloseClicked:"cc-close-clicked"}});class vn extends ve{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t,s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})).catch((e=>{console.error(e)}))}getId(){return"imagemoderation"}getImageMessageContentView(e,t,o){if(void 0!==this.loggedInUser?.getUid()&&this.loggedInUser?.getUid()===e?.getSender()?.getUid())return super.getImageMessageContentView(e,t,o);this.theme=o;let r=e.getMetadata();const s=this.getImageModerationStyle(o);let i=e.getAttachments()[0]?.getUrl()||"";De.names.includes("thumbnailgeneration")&&r&&"object"==typeof r&&r.hasOwnProperty("@injected")&&r["@injected"].hasOwnProperty("extensions")&&r["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&r["@injected"].extensions["thumbnail-generation"].url_small&&(i=e.getMetadata()["@injected"].extensions["thumbnail-generation"].url_small);const a=d.jsx(En,{URL:i,closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",fullScreenViewerStyle:{closeIconTint:"blue"},ccCloseClicked:()=>{n.CometChatUIEvents.ccHideDialog.next()}});return d.jsx(yn,{message:e,imageModerationStyle:s,CCShowDialog:e=>{this.showDialog(e)},children:d.jsx(Dn,{src:i,placeholderImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAA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QCQ7mExyQEBzQxPnQCQ7mExyQEBzQxPnQCQ7mExyQEBzQxPnQvcF3xDdQF99wMB7BAU2cD7Co+IaD8QgOaOJ8gEXFNxyMR3BAE+cDLCq+4WA8ggOaOB9gUfENB+MRHNDE+QCLim84GI/ggCbOB1hUfMPBeAQHNHE+wKLiGw7GIzigifMBFhXfcDAewQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=",ccImageClicked:()=>{n.CometChatUIEvents.ccShowDialog.next({child:a,confirmCallback:null})}})})}showDialog(e){const t=this.getConfirmationModal(e);n.CometChatUIEvents.ccShowDialog.next({confirmCallback:e?.detail?.onConfirm,child:t})}getConfirmationModal(e){let t=this.configuration?.getBackDropStyle(),o=this.configuration?.getConfirmDialogSyle(),r={height:t?.height||"100%",width:t?.width||"100%",background:t?.background||"rgba(0, 0, 0, 0.5)",border:t?.border,borderRadius:t?.borderRadius},s=n.localize("SHOW_UNSAFE_CONTENT"),i=n.localize("YES"),a=n.localize("NO"),l={confirmButtonBackground:o?.confirmButtonBackground||this.theme.palette.getError(),cancelButtonBackground:o?.cancelButtonBackground||this.theme.palette.getSecondary(),confirmButtonTextColor:o?.confirmButtonTextColor||this.theme.palette.getAccent900("light"),confirmButtonTextFont:o?.confirmButtonTextFont||n.fontHelper(this.theme.typography.text2),cancelButtonTextColor:o?.cancelButtonTextColor||this.theme.palette.getAccent900("dark"),cancelButtonTextFont:o?.cancelButtonTextFont||n.fontHelper(this.theme.typography.text2),titleFont:o?.titleFont||n.fontHelper(this.theme.typography.title1),titleColor:o?.titleColor||this.theme.palette.getAccent(),messageTextFont:o?.messageTextFont||n.fontHelper(this.theme.typography.subtitle2),messageTextColor:o?.messageTextColor||this.theme.palette.getAccent600(),background:o?.background||this.theme.palette.getBackground(),height:o?.height||"100%",width:o?.width||"100%",border:o?.border||`1px solid ${this.theme.palette.getAccent100()}`,borderRadius:o?.borderRadius||"8px"};return d.jsx(wn,{backdropStyle:r,children:d.jsx(fn,{title:"",messageText:s,cancelButtonText:a,confirmButtonText:i,confirmDialogStyle:l,ccCancelClicked:this.onCancelClicked,ccConfirmClicked:()=>{this.onConfirmClicked(e)}})})}onConfirmClicked(e){e?.detail?.onConfirm&&e?.detail?.onConfirm(),n.CometChatUIEvents.ccHideDialog.next()}onCancelClicked(){n.CometChatUIEvents.ccHideDialog.next()}getImageModerationStyle(e){let t=this.configuration?.getImageModerationStyle();return{filterColor:t?.filterColor||e.palette.getPrimary(),height:t?.height||"100%",width:t?.width||"100%",border:t?.border||"none",borderRadius:t?.borderRadius||"8px",warningTextColor:t?.warningTextColor||e.palette.getAccent("dark"),warningTextFont:t?.warningTextFont||n.fontHelper(e.typography.title2)}}}class In extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new vn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.imageModeration}}const Sn=de({tagName:"link-preview",elementClass:r.LinkPreview,react:t,events:{ccLinkClicked:"cc-link-clicked"}}),Fn=de({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t});class kn extends ve{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getId(){return"linkpreview"}getTextMessageContentView(e,t,o,s){const i=this.getLinkPreview(e);if(i&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember){let n,a={...s,textFormatters:s?.textFormatters&&s?.textFormatters.length?[...s.textFormatters]:this.getAllTextFormatters({theme:o,alignment:t,disableMentions:s.disableMentions})},l=a.textFormatters;if(a&&!a.disableMentions){let s;for(let t=0;t0?e[t]:""}}class Tn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new kn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.linkPreview}}const Mn=de({tagName:"message-translation-bubble",elementClass:r.MessageTranslationBubble,react:t}),Bn=de({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t});class Ln extends ve{constructor(e,t){super(e),this.getTranslationStyle=(e,t)=>{let o=this.configuration?.getMessageTranslationStyle();return e!==n.MessageBubbleAlignment.left?new r.MessageTranslationStyle({translatedTextFont:o?.translatedTextFont||n.fontHelper(t.typography.text3),translatedTextColor:o?.translatedTextColor||t.palette.getAccent("dark"),helpTextColor:o?.helpTextColor||t.palette.getAccent700("dark"),helpTextFont:o?.helpTextFont||n.fontHelper(t.typography.caption2),background:o?.background||"transparent"}):new r.MessageTranslationStyle({translatedTextFont:o?.translatedTextFont||n.fontHelper(t.typography.text3),translatedTextColor:o?.translatedTextColor||t.palette.getAccent(),helpTextColor:o?.helpTextColor||t.palette.getAccent700(),helpTextFont:o?.helpTextFont||n.fontHelper(t.typography.caption2),background:o?.background||"transparent"})},this.newDataSource=e,this.configuration=t}getTextMessageOptions(e,t,o,r){let i=this.configuration?.getOptionStyle(),a=super.getTextMessageOptions(e,t,o,r);if(!this.checkIfOptionExist(a,n.CometChatUIKitConstants.MessageOption.translateMessage)){let e=new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.translateMessage,title:n.localize("TRANSLATE"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FMessage%20Translation%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FMessage-Translation%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.66666667%2C4.91666667%20C7.7672341%2C4.91666667%208.66848034%2C5.77006215%208.74476911%2C6.85121684%20L8.75%2C7%20L8.75%2C9.66666667%20C8.75%2C10.0808802%208.41421356%2C10.4166667%208%2C10.4166667%20C7.62030423%2C10.4166667%207.30650904%2C10.1345128%207.25684662%2C9.76843722%20L7.25%2C9.66666667%20L7.25%2C7%20C7.25%2C6.6778339%206.98883277%2C6.41666667%206.66666667%2C6.41666667%20C6.37671717%2C6.41666667%206.13617677%2C6.62821212%206.09096818%2C6.9053803%20L6.08333333%2C7%20L6.08333333%2C9.66666667%20C6.08333333%2C10.0808802%205.7475469%2C10.4166667%205.33333333%2C10.4166667%20C4.95363757%2C10.4166667%204.63984237%2C10.1345128%204.59017995%2C9.76843722%20L4.58333333%2C9.66666667%20L4.58333333%2C7%20C4.58333333%2C5.84940677%205.51607344%2C4.91666667%206.66666667%2C4.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C7.58333333%20C8.41421356%2C7.58333333%208.75%2C7.91911977%208.75%2C8.33333333%20C8.75%2C8.7130291%208.46784612%2C9.02682429%208.10177056%2C9.07648672%20L8%2C9.08333333%20L5.33333333%2C9.08333333%20C4.91911977%2C9.08333333%204.58333333%2C8.7475469%204.58333333%2C8.33333333%20C4.58333333%2C7.95363757%204.86548721%2C7.63984237%205.23156278%2C7.59017995%20L5.33333333%2C7.58333333%20L8%2C7.58333333%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C10.9166667%20C16.3796958%2C10.9166667%2016.693491%2C11.1988205%2016.7431534%2C11.5648961%20L16.75%2C11.6666667%20L16.75%2C13%20C16.75%2C13.4142136%2016.4142136%2C13.75%2016%2C13.75%20C15.6203042%2C13.75%2015.306509%2C13.4678461%2015.2568466%2C13.1017706%20L15.25%2C13%20L15.25%2C11.6666667%20C15.25%2C11.2524531%2015.5857864%2C10.9166667%2016%2C10.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M18.6666667%2C12.25%20C19.0808802%2C12.25%2019.4166667%2C12.5857864%2019.4166667%2C13%20C19.4166667%2C13.3796958%2019.1345128%2C13.693491%2018.7684372%2C13.7431534%20L18.6666667%2C13.75%20L13.3333333%2C13.75%20C12.9191198%2C13.75%2012.5833333%2C13.4142136%2012.5833333%2C13%20C12.5833333%2C12.6203042%2012.8654872%2C12.306509%2013.2315628%2C12.2568466%20L13.3333333%2C12.25%20L18.6666667%2C12.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.6218209%2C12.7628292%20C16.7528067%2C12.3698717%2017.1775467%2C12.1575017%2017.5705042%2C12.2884875%20C17.9634616%2C12.4194734%2018.1758316%2C12.8442133%2018.0448458%2C13.2371708%20L17.9816285%2C13.4141354%20L17.8896351%2C13.6471999%20L17.768692%2C13.9296038%20C17.5442054%2C14.4346986%2017.2746722%2C14.9400735%2016.9573711%2C15.4160251%20C15.999232%2C16.8532338%2014.8035437%2C17.75%2013.3333333%2C17.75%20C12.9191198%2C17.75%2012.5833333%2C17.4142136%2012.5833333%2C17%20C12.5833333%2C16.6203042%2012.8654872%2C16.306509%2013.2315628%2C16.2568466%20L13.3333333%2C16.25%20C14.1964563%2C16.25%2015.000768%2C15.6467662%2015.7092956%2C14.5839749%20C15.9753278%2C14.1849265%2016.2057946%2C13.7528014%2016.3979747%2C13.3203962%20L16.4992538%2C13.0842816%20L16.6012322%2C12.8221175%20C16.6092157%2C12.7998646%2016.6160798%2C12.7800523%2016.6218209%2C12.7628292%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.5822706%2C14.8366574%20C15.9262877%2C14.6059518%2016.3921926%2C14.697809%2016.6228982%2C15.0418261%20C17.0961654%2C15.7475396%2017.8695647%2C16.1943066%2018.717337%2C16.2517136%20C19.1306041%2C16.279698%2019.4429375%2C16.6374031%2019.4149531%2C17.0506703%20C19.3869686%2C17.4639375%2019.0292635%2C17.7762708%2018.6159964%2C17.7482864%20C17.3049794%2C17.6595107%2016.1089745%2C16.9686186%2015.3771018%2C15.877285%20C15.1463962%2C15.5332678%2015.2382534%2C15.067363%2015.5822706%2C14.8366574%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20.6666667%2C8.91666667%20L11.3333333%2C8.91666667%20C10.1827401%2C8.91666667%209.25%2C9.84940677%209.25%2C11%20L9.25%2C17.6666667%20L9.25523089%2C17.8154498%20C9.33151966%2C18.8966045%2010.2327659%2C19.75%2011.3333333%2C19.75%20L15.022%2C19.749%20L18.8030032%2C23.5303301%20L18.8802248%2C23.598293%20C19.3582766%2C23.9666561%2020.0833333%2C23.6330113%2020.0833333%2C23%20L20.083%2C19.749%20L20.6666667%2C19.75%20C21.8172599%2C19.75%2022.75%2C18.8172599%2022.75%2C17.6666667%20L22.75%2C11%20C22.75%2C9.84940677%2021.8172599%2C8.91666667%2020.6666667%2C8.91666667%20Z%20M11.3333333%2C10.4166667%20L20.6666667%2C10.4166667%20C20.9888328%2C10.4166667%2021.25%2C10.6778339%2021.25%2C11%20L21.25%2C17.6666667%20C21.25%2C17.9888328%2020.9888328%2C18.25%2020.6666667%2C18.25%20L19.3333333%2C18.25%20L19.2315628%2C18.2568466%20C18.8654872%2C18.306509%2018.5833333%2C18.6203042%2018.5833333%2C19%20L18.583%2C21.189%20L15.8636634%2C18.4696699%20C15.7230111%2C18.3290176%2015.5322457%2C18.25%2015.3333333%2C18.25%20L11.3333333%2C18.25%20C11.0111672%2C18.25%2010.75%2C17.9888328%2010.75%2C17.6666667%20L10.75%2C11%20C10.75%2C10.6778339%2011.0111672%2C10.4166667%2011.3333333%2C10.4166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.6666667%2C2.25%20C13.7672341%2C2.25%2014.6684803%2C3.10339548%2014.7447691%2C4.18455017%20L14.75%2C4.33333333%20L14.75%2C7%20C14.75%2C7.41421356%2014.4142136%2C7.75%2014%2C7.75%20C13.6203042%2C7.75%2013.306509%2C7.46784612%2013.2568466%2C7.10177056%20L13.25%2C7%20L13.25%2C4.33333333%20C13.25%2C4.04338384%2013.0384545%2C3.80284343%2012.7612864%2C3.75763485%20L12.6666667%2C3.75%20L3.33333333%2C3.75%20C3.04338384%2C3.75%202.80284343%2C3.96154546%202.75763485%2C4.23871364%20L2.75%2C4.33333333%20L2.75%2C11%20C2.75%2C11.2899495%202.96154546%2C11.5304899%203.23871364%2C11.5756985%20L3.33333333%2C11.5833333%20L4.66666667%2C11.5833333%20C5.04636243%2C11.5833333%205.36015763%2C11.8654872%205.40982005%2C12.2315628%20L5.41666667%2C12.3333333%20L5.416%2C14.523%20L6.80300325%2C13.1363366%20C7.06926981%2C12.87007%207.48593349%2C12.845864%207.77954499%2C13.0637184%20L7.86366342%2C13.1363366%20C8.12992998%2C13.4026031%208.15413603%2C13.8192668%207.93628157%2C14.1128783%20L7.86366342%2C14.1969968%20L5.19699675%2C16.8636634%20C4.74939014%2C17.31127%204.00077515%2C17.0344999%203.92321348%2C16.4359943%20L3.91666667%2C16.3333333%20L3.916%2C13.083%20L3.33333333%2C13.0833333%20C2.2327659%2C13.0833333%201.33151966%2C12.2299379%201.25523089%2C11.1487832%20L1.25%2C11%20L1.25%2C4.33333333%20C1.25%2C3.2327659%202.10339548%2C2.33151966%203.18455017%2C2.25523089%20L3.33333333%2C2.25%20L12.6666667%2C2.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:function(){s.CometChat.callExtension("message-translation","POST","v2/translate",{msgId:t.getId(),text:t.getText(),languages:navigator.languages}).then((e=>{if(e&&e.hasOwnProperty("translations")){let o=e.translations?.[0]?.message_translated;if(o&&o.trim()){let e=t.getMetadata()||{};e.translated_message=o,t.setMetadata(e),n.CometChatMessageEvents.ccMessageTranslated.next({message:t,status:n.MessageStatus.success})}}})).catch((e=>{console.log("error",e)}))},iconTint:i?.iconTint||o.palette.getAccent600(),titleColor:i?.titleColor||o.palette.getAccent600(),titleFont:i?.titleFont||n.fontHelper(o.typography.subtitle1),backgroundColor:i?.background||"transparent"});a.push(e)}return a}getTextMessageStyle(e,t){return e!==n.MessageBubbleAlignment.left?{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent900("light")||""}:{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent()||""}}getTextMessageContentView(e,t,o,s){const i=e.getMetadata();if(i&&Object.prototype.hasOwnProperty.call(i,"translated_message")&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember){const n=i.translated_message;let a,l={...s,textFormatters:s?.textFormatters&&s?.textFormatters.length?[...s.textFormatters]:this.getAllTextFormatters({theme:o,alignment:t,disableMentions:s.disableMentions})},c=l.textFormatters;if(l&&!l.disableMentions){let n;for(let t=0;te.id===t))}getId(){return"messagetranslation"}}class Un extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new Ln(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.messageTranslation}}const Rn=de({tagName:"polls-bubble",elementClass:r.PollsBubble,react:t}),Pn=de({tagName:"create-poll",elementClass:r.CreatePoll,react:t,events:{ccCloseClicked:"cc-close-clicked"}});class On extends ve{constructor(e,t){super(e),this.loggedInUser=null,this.getLoggedInUser(),this.newDataSource=e,this.configuration=t}async getLoggedInUser(){this.loggedInUser=await s.CometChat.getLoggedinUser()}getId(){return"polls"}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(r.PollsConstants.extension_poll)||e.push(r.PollsConstants.extension_poll),e}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.PollsConstants.extension_poll)||n.push(this.getPollsTemplate(this.theme)),n}getPollsTemplate(e){return new n.CometChatMessageTemplate({type:r.PollsConstants.extension_poll,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getPollsContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}getPollsContentView(e,t){let o=this.configuration?.getPollsBubbleStyle(),r={borderRadius:o?.borderRadius||"8px",background:o?.background||"transparent",votePercentTextFont:o?.votePercentTextFont||n.fontHelper(t.typography.subtitle2),votePercentTextColor:o?.votePercentTextColor||t.palette.getAccent600(),pollQuestionTextFont:o?.pollQuestionTextFont||n.fontHelper(t.typography.subtitle1),pollQuestionTextColor:o?.pollQuestionTextColor||t.palette.getAccent(),pollOptionTextFont:o?.pollOptionTextFont||n.fontHelper(t.typography.text2),pollOptionTextColor:o?.pollOptionTextColor||t.palette.getAccent(),pollOptionBackground:o?.pollOptionBackground||"transparent",optionsIconTint:o?.optionsIconTint||t.palette.getAccent600(),totalVoteCountTextFont:o?.totalVoteCountTextFont||n.fontHelper(t.typography.subtitle2),totalVoteCountTextColor:o?.totalVoteCountTextColor||t.palette.getAccent600(),selectedPollOptionBackground:o?.selectedPollOptionBackground||t.palette.getAccent200(),userSelectedOptionBackground:o?.userSelectedOptionBackground||t.palette.getPrimary(),pollOptionBorder:o?.pollOptionBorder||`1px solid ${t.palette.getAccent100()}`,pollOptionBorderRadius:o?.pollOptionBorderRadius||"8px"};return d.jsx(Rn,{pollStyle:r,pollQuestion:this.getPollBubbleData(e,"question"),pollId:this.getPollBubbleData(e,"id"),senderUid:this.getPollBubbleData(e),loggedInUser:this.loggedInUser??void 0,metadata:e?.getMetadata()})}getPollBubbleData(e,t){let n=e.getCustomData();return t?"options"===t?Object.values(n[t]):n[t]:e.getSender().getUid()}getAttachmentOptions(e,t){if(this.theme=e,t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle();const s=super.getAttachmentOptions(e,t);let i=new n.CometChatMessageComposerAction({id:r.PollsConstants.extension_poll,title:n.localize("POLLS"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPolls%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPolls%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.779983%2C1.25%20C14.2709124%2C1.25043259%2014.7438187%2C1.42418565%2015.1167078%2C1.73706699%20L15.2516928%2C1.86085235%20L20.4715927%2C7.08218001%20C20.8991636%2C7.51561025%2021.1196388%2C8.11205589%2021.0768145%2C8.71941733%20C21.0476811%2C9.13260508%2020.689109%2C9.44394267%2020.2759212%2C9.41480928%20C19.8971658%2C9.38810367%2019.6039928%2C9.08457801%2019.580201%2C8.71591608%20L19.5805293%2C8.613916%20C19.5905393%2C8.47194719%2019.5513165%2C8.33202895%2019.4730888%2C8.21873863%20L19.4072645%2C8.13914765%20L14.1905599%2C2.92103945%20C14.1031809%2C2.83352807%2013.9908865%2C2.77665655%2013.8706878%2C2.75733888%20L13.7793226%2C2.75%20L4.33297476%2C2.75%20C4.04324415%2C2.75%203.80281908%2C2.96150888%203.75763137%2C3.23870267%20L3.75%2C3.33333333%20L3.75%2C20.6666667%20C3.75%2C20.9566568%203.961452%2C21.1971647%204.2384242%2C21.2423664%20L4.33297476%2C21.25%20L9.6648738%2C21.25%20C10.0790874%2C21.25%2010.4148738%2C21.5857864%2010.4148738%2C22%20C10.4148738%2C22.3796958%2010.1327199%2C22.693491%209.76664435%2C22.7431534%20L9.6648738%2C22.75%20L4.33297476%2C22.75%20C3.23255355%2C22.75%202.33150187%2C21.8965632%202.25522974%2C20.8154444%20L2.25%2C20.6666667%20L2.25%2C3.33333333%20C2.25%2C2.23280908%203.10320728%2C1.33152341%204.18421182%2C1.25523113%20L4.33297476%2C1.25%20L13.779983%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.6637981%2C1.25%20C14.0434938%2C1.25%2014.357289%2C1.53215388%2014.4069515%2C1.89822944%20L14.4137981%2C2%20L14.4137981%2C7.33333333%20C14.4137981%2C7.62332346%2014.6252501%2C7.86383136%2014.9022223%2C7.90903304%20L14.9967728%2C7.91666667%20L20.3286719%2C7.91666667%20C20.7428854%2C7.91666667%2021.0786719%2C8.2524531%2021.0786719%2C8.66666667%20C21.0786719%2C9.04636243%2020.796518%2C9.36015763%2020.4304424%2C9.40982005%20L20.3286719%2C9.41666667%20L14.9967728%2C9.41666667%20C13.8963516%2C9.41666667%2012.9952999%2C8.56322987%2012.9190278%2C7.4821111%20L12.9137981%2C7.33333333%20L12.9137981%2C2%20C12.9137981%2C1.58578644%2013.2495845%2C1.25%2013.6637981%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C9.420279%20C9.24921801%2C9.09111393%209.71989329%2C9.02810717%2010.0490584%2C9.27954946%20C10.3482993%2C9.50813337%2010.4275748%2C9.91790155%2010.2506031%2C10.2378223%20L10.1897879%2C10.3308321%20L8.25879925%2C12.8586842%20C8.01208284%2C13.1778547%207.64305532%2C13.3791966%207.21567496%2C13.4156509%20C6.86419538%2C13.4339623%206.52012946%2C13.3223779%206.23838713%2C13.0959918%20L6.12161623%2C12.9919845%20L5.12632841%2C11.9608734%20C4.838658%2C11.6628489%204.84705165%2C11.1880493%205.14507615%2C10.9003789%20C5.41600752%2C10.6388603%205.83303397%2C10.6220228%206.1227489%2C10.845033%20L6.20557062%2C10.9191266%20L7.125%2C11.871%20L8.99777572%2C9.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C15.420279%20C9.24921801%2C15.0911139%209.71989329%2C15.0281072%2010.0490584%2C15.2795495%20C10.3482993%2C15.5081334%2010.4275748%2C15.9179016%2010.2506031%2C16.2378223%20L10.1897879%2C16.3308321%20L8.25879925%2C18.8586842%20C8.01208284%2C19.1778547%207.64305532%2C19.3791966%207.21567496%2C19.4156509%20C6.86419538%2C19.4339623%206.52012946%2C19.3223779%206.23838713%2C19.0959918%20L6.12161623%2C18.9919845%20L5.12632841%2C17.9608734%20C4.838658%2C17.6628489%204.84705165%2C17.1880493%205.14507615%2C16.9003789%20C5.41600752%2C16.6388603%205.83303397%2C16.6220228%206.1227489%2C16.845033%20L6.20557062%2C16.9191266%20L7.125%2C17.871%20L8.99777572%2C15.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6632602%2C11.9166667%20C16.0774738%2C11.9166667%2016.4132602%2C12.2524531%2016.4132602%2C12.6666667%20C16.4132602%2C13.0463624%2016.1311063%2C13.3601576%2015.7650308%2C13.4098201%20L15.6632602%2C13.4166667%20L12.3308233%2C13.4166667%20C11.9166098%2C13.4166667%2011.5808233%2C13.0808802%2011.5808233%2C12.6666667%20C11.5808233%2C12.2869709%2011.8629772%2C11.9731757%2012.2290528%2C11.9235133%20L12.3308233%2C11.9166667%20L15.6632602%2C11.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.1106837%2C10.5779533%20C20.4095395%2C10.5779533%2019.7375424%2C10.8584991%2019.2444627%2C11.3570467%20L12.4669093%2C18.1364079%20C12.3622379%2C18.2411074%2012.2908946%2C18.3744435%2012.2618676%2C18.5196176%20L11.5953802%2C21.8529509%20C11.4904492%2C22.3777472%2011.953163%2C22.8404132%2012.4779485%2C22.7354279%20L15.8103854%2C22.0687612%20C15.9555979%2C22.0397109%2016.0889603%2C21.9683215%2016.1936616%2C21.8635921%20L22.9740599%2C15.0813699%20C23.4695748%2C14.5910412%2023.75%2C13.9189715%2023.75%2C13.2177778%20C23.75%2C12.516584%2023.4695748%2C11.8445143%2022.9711997%2C11.35134%20L22.8310414%2C11.2210775%20C22.3327458%2C10.7984458%2021.7321255%2C10.5779533%2021.1106837%2C10.5779533%20Z%20M21.1106837%2C12.0779533%20C21.3769595%2C12.0779533%2021.6343527%2C12.1724444%2021.8371937%2C12.3440921%20L21.9342889%2C12.4349375%20C22.129767%2C12.628969%2022.25%2C12.9171205%2022.25%2C13.2177778%20L22.242717%2C13.345678%20C22.2137413%2C13.5991981%2022.0992456%2C13.8367894%2021.9161173%2C14.0180067%20L15.293%2C20.642%20L13.287%2C21.043%20L13.688%2C19.035%20L20.3081104%2C12.4147032%20C20.5222805%2C12.1981735%2020.8102464%2C12.0779533%2021.1106837%2C12.0779533%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:(...t)=>{this.onPollsButtonClicked(e,...t)}});return s.push(i),s}}onPollsButtonClicked(e,...t){const[o]=t;let r=o[0],s=o[1],i=this.configuration?.getCreatePollStyle(),a={placeholderTextFont:i?.placeholderTextFont||n.fontHelper(e.typography.subtitle1),placeholderTextColor:i?.placeholderTextColor||e.palette.getAccent600(),deleteIconTint:i?.deleteIconTint||e.palette.getAccent600(),titleFont:i?.titleFont||n.fontHelper(e.typography.title1),titleColor:i?.titleColor||e.palette.getAccent(),closeIconTint:i?.closeIconTint||e.palette.getPrimary(),questionInputBackground:i?.questionInputBackground||e.palette.getAccent100(),optionInputBackground:i?.optionInputBackground||e.palette.getAccent100(),answerHelpTextFont:i?.answerHelpTextFont||n.fontHelper(e.typography.caption1),answerHelpTextColor:i?.answerHelpTextColor||e.palette.getAccent400(),addAnswerIconTint:i?.addAnswerIconTint||e.palette.getPrimary(),createPollButtonTextFont:i?.createPollButtonTextFont||n.fontHelper(e.typography.text2),createPollButtonTextColor:i?.createPollButtonTextColor||e.palette.getAccent("dark"),createPollButtonBackground:i?.createPollButtonBackground||e.palette.getPrimary(),addAnswerTextFont:i?.addAnswerTextFont||n.fontHelper(e.typography.text2),addAnswerTextColor:i?.addAnswerTextColor||e.palette.getPrimary(),errorTextFont:i?.errorTextFont||n.fontHelper(e.typography.subtitle1),errorTextColor:i?.errorTextColor||e.palette.getError(),optionPlaceholderTextFont:i?.optionPlaceholderTextFont||n.fontHelper(e.typography.subtitle1),optionPlaceholderTextColor:i?.optionPlaceholderTextColor||e.palette.getAccent600(),questionInputTextFont:i?.questionInputTextFont||n.fontHelper(e.typography.subtitle2),questionInputTextColor:i?.questionInputTextColor||e.palette.getAccent600(),optionInputTextFont:i?.optionInputTextFont||n.fontHelper(e.typography.subtitle2),optionInputTextColor:i?.optionInputTextColor||e.palette.getAccent600(),width:i?.width||"360px",height:i?.height||"440px",border:i?.border||"",borderRadius:i?.borderRadius||"8px",background:i?.background||e.palette.getAccent900(),position:"absolute",zIndex:1};n.CometChatUIEvents.ccShowModal.next({child:this.getPollView(r,s,a)})}getPollView(e,t,n){return d.jsx("cometchat-backdrop",{children:d.jsx(Pn,{user:e,group:t,ccCloseClicked:this.triggerCloseEvent,createPollStyle:n,deleteIconURL:this.configuration?.getDeleteIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDelete%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",closeIconURL:this.configuration?.getCloseIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",addAnswerIconURL:this.configuration?.getAddAnswerIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"})})}triggerCloseEvent(){n.CometChatUIEvents.ccHideModal.next()}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.PollsConstants.extension_poll&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_POLL"):super.getLastConversationMessage(e,t,o)}}class jn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new On(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.polls}}const Vn=de({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}});class Gn extends ve{constructor(e,t,o){super(e),this.LISTENER_ID="smartreply__listener",this.currentMessage=null,this.configuration=t,this.theme=o||new n.CometChatTheme({}),this.addMessageListener()}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{null!=e&&this.loggedInUser&&this.loggedInUser?.getUid()!=e.getSender().getUid()&&(this.currentMessage=e,e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&null!=this.activeUser?null!==e.getSender()&&null!==e.getSender().getUid()&&this.activeUser.getUid()===e.getSender().getUid()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:e,child:this.getSmartReplyView(e),position:n.PanelAlignment.messageListFooter}):e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&null!=this.activeGroup&&null!==this.activeGroup.getGuid()&&this.activeGroup.getGuid()===e.getReceiverId()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:e,child:this.getSmartReplyView(e),position:n.PanelAlignment.messageListFooter}))})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.activeUser=e.user,this.activeGroup=e.group,this.currentMessage instanceof s.CometChat.TextMessage&&null!==this.currentMessage&&null!==this.currentMessage.getSender()&&null!==this.loggedInUser&&null!==this.currentMessage.getSender().getUid()&&this.currentMessage.getSender().getUid()!==this.loggedInUser.getUid()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:this.getSmartReplyView(this.currentMessage)})})),n.CometChatMessageEvents.ccMessageSent.subscribe((()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null}))}getReplies(e){let t=e;const n=t?.metadata?.[r.SmartRepliesConstants.injected]?.extensions?.[r.SmartRepliesConstants.smart_reply];if(n?.reply_positive&&n?.reply_neutral&&n?.reply_negative){const{reply_positive:e,reply_neutral:t,reply_negative:o}=n;return[e,t,o]}return null}getSmartReplyStyle(){const e=this.configuration?.getSmartRepliesStyle();return{replyTextFont:e?.replyTextFont||n.fontHelper(this.theme.typography.caption1),replyTextColor:e?.replyTextColor||this.theme?.palette.getAccent(),replyBackground:e?.replyBackground||"inherit",boxShadow:e?.boxShadow||`0px 0px 1px ${this.theme?.palette.getAccent600()}`,closeIconTint:e?.closeIconTint||this.theme?.palette.getAccent600(),background:e?.background||"inherit",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",display:"flex",justifyContent:"flex-start"}}sendSmartReply(e){let t=this.activeUser?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,o=e?.detail?.reply,i=this.currentMessage;if(o&&o.trim().length>0&&i){let e;if(i.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user)e=new s.CometChat.TextMessage(i.getSender().getUid(),o.trim(),t),e.setReceiver(this.activeUser);else{const n=i.getReceiver();e=new s.CometChat.TextMessage(n.getGuid(),o.trim(),t),e.setReceiver(this.activeGroup)}i.getParentMessageId()>0&&e.setParentMessageId(i.getParentMessageId()),e.setCategory(n.CometChatUIKitConstants.MessageCategory.message),e.setSender(this.loggedInUser),e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMessage(e).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(t=>{e.setMetadata({error:!0}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}}closeSmartReply(){n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null}getSmartReplyButtonStyle(){return{background:"inherit"}}getSmartReplyView(e){return this.getReplies(e)?d.jsx("div",{className:"cc-messagelist__smartreplies",style:{width:"100%",display:"flex",justifyContent:"flex-start",alignItems:"flex-end"},children:d.jsx(Vn,{smartReplyStyle:this.getSmartReplyStyle(),replies:this.getReplies(e)??void 0,ccReplyClicked:t=>{t.msg=e,this.sendSmartReply(t)},ccCloseClicked:this.closeSmartReply})}):null}getId(){return"smartreply"}}class Hn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new Gn(e,this.configuration,this.theme)))}getExtensionId(){return r.ExtensionsId.smartReply}}const Qn=de({tagName:"stickers-keyboard",elementClass:r.StickersKeyboard,react:t,events:{ccStickerClicked:"cc-sticker-clicked"}}),Nn=de({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t});class Kn extends ve{constructor(e,t){super(e),this.showStickerKeyboard=!1,this.newDataSource=e,this.configuration=t}getDataSource(){return this.newDataSource}getAllMessageTemplates(e,t){this.theme=e;let n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.StickersConstants.sticker)||n.push(this.getStickerTemplate(this.theme)),n}getAuxiliaryOptions(e,t,n,o){this.id=e,this.user=n,this.group=o;let r=super.getAuxiliaryOptions(e,t,n,o);return r.push(this.getStickerAuxiliaryButton(e,t,n,o)),r}getStickerAuxiliaryButton(e,t,r,s){let i=this.configuration?.getStickersStyle(),a={height:i?.sticketButtonHeight||"24px",width:i?.stickerButtonWidth||"24px",border:"none",borderRadius:"0",buttonIconTint:i?.stickerButtonIconTint||t.palette.getAccent500(),background:"transparent"},l=new o.PopoverStyle({width:i?.width||"300px",height:i?.height||"400px",background:t?.palette?.getBackground(),borderRadius:"12px",boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"}),c={width:i?.width||"300px",height:i?.height||"400px",border:i?.border||"none",emptyStateTextFont:i?.emptyStateTextFont||n.fontHelper(t.typography.title1),emptyStateTextColor:i?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:i?.errorStateTextFont||n.fontHelper(t.typography.title1),errorStateTextColor:i?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:i?.loadingIconTint||t.palette.getAccent600(),background:i?.background||t.palette.getBackground(),borderRadius:i?.borderRadius||"12px"},C=this.configuration?.getStickerIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FStickers%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FStickers%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.67349142%2C7.33338221%20C5.86012572%2C7.33338221%206.01142272%2C7.48460989%206.01142272%2C7.67115869%20C6.01142272%2C7.85770748%205.86012572%2C8.00893516%205.67349142%2C8.00893516%20C5.48685711%2C8.00893516%205.33556012%2C7.85770748%205.33556012%2C7.67115869%20C5.33556012%2C7.58157479%205.37116349%2C7.49566003%205.4345379%2C7.43231465%20C5.49791231%2C7.36896927%205.58386646%2C7.33338221%205.67349142%2C7.33338221%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.23283692%2C13.0400269%20C5.36112225%2C15.1816508%207.58282264%2C16.5229567%2010.0043478%2C16.5244579%20C10.2778756%2C16.5227578%2010.5510655%2C16.5049493%2010.8224973%2C16.4711247%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20%2C9.57337357%20C19.7666207%2C4.11103074%2015.187631%2C-0.151378825%209.72001617%2C0.00412271646%20C4.25240139%2C0.159624258%20-0.0767041446%2C4.67538425%200.00103066029%2C10.1421537%20C0.0787654651%2C15.6089231%204.5345202%2C20%2010.0043478%2C20%20L10.4489943%2C20%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.1831154%2C7.92004661%20C12.559175%2C7.32283168%2013.215699%2C6.96047481%2013.921683%2C6.96047481%20C14.6276671%2C6.96047481%2015.2841911%2C7.32283168%2015.6602507%2C7.92004661%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2220%22%20y1%3D%229.57337357%22%20x2%3D%2210.4489943%22%20y2%3D%2219.9911111%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.4489943%2C19.9911111%20L10.4489943%2C19.1022257%20C10.4588042%2C13.8367116%2014.7320632%2C9.57337357%2020%2C9.57337357%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",g=this.configuration?.getCloseIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";return d.jsxs("cometchat-popover",{placement:n.Placement.top,popoverStyle:JSON.stringify(l),children:[d.jsx("div",{slot:"children",children:d.jsx("cometchat-button",{hoverText:n.localize("STICKER"),iconURL:this.showStickerKeyboard?g:C,buttonStyle:JSON.stringify(a)})}),d.jsx("div",{slot:"content",children:d.jsx(Qn,{stickerStyle:c,ccStickerClicked:e=>this.sendSticker(e)})})]},"stickers-extension-popover")}sendSticker(e){try{let t=e?.detail,o={name:t?.stickerName,URL:t?.stickerURL};const i=this.user?.getUid()||this.group?.getGuid(),a=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,{parentMessageId:l}=this.id,c={sticker_url:o.URL,sticker_name:o.name},C=r.StickersConstants.sticker,d=new s.CometChat.CustomMessage(i,a,C,c);l&&d.setParentMessageId(l),d.setMetadata({incrementUnreadCount:!0}),d.shouldUpdateConversation(!0),d.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),d.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:d,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(d).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(e=>{d.setMetadata({error:!0}),n.CometChatMessageEvents.ccMessageSent.next({message:d,status:n.MessageStatus.error})}))}catch(e){console.log("error in sending sticker",e)}}getSticker(e){let t;return r.CometChatUIKitUtility.checkHasOwnProperty(e,r.StickersConstants.data)&&r.CometChatUIKitUtility.checkHasOwnProperty(e.getData(),r.StickersConstants.custom_data)?(t=e.getCustomData(),r.CometChatUIKitUtility.checkHasOwnProperty(t,r.StickersConstants.sticker_url)?t?.sticker_url:""):""}getStickerMessageContentView(e,t){return d.jsx(Nn,{src:this.getSticker(e),imageStyle:{height:"128px",width:"128px",border:"none",borderRadius:"0",background:"transparent"}})}getStickerTemplate(e){return new n.CometChatMessageTemplate({type:r.StickersConstants.sticker,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getStickerMessageContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>De.getDataSource().getBottomView(e,t)})}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageCategories(){let e=super.getAllMessageCategories();return e.some((e=>e===n.CometChatUIKitConstants.MessageCategory.custom))||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}getAllMessageTypes(){let e=super.getAllMessageTypes();return e.some((e=>e===r.StickersConstants.sticker))||e.push(r.StickersConstants.sticker),e}getId(){return"stickers"}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.StickersConstants.sticker&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_STICKER"):super.getLastConversationMessage(e,t,o)}}class zn extends Cn{constructor(e){super(),this.configuration=e}addExtension(){De.enable((e=>new Kn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.stickers}}class Jn extends ve{getId(){return"textmoderator"}getModeratedtext(e){let t=r.CometChatUIKitUtility.getExtensionData(e);return t?.trim()?.length>0?t:e.getText()}getLastConversationMessage(e,t,o){const i=e.getLastMessage();if(i&&!i.getDeletedAt()&&i.getType()===n.CometChatUIKitConstants.MessageTypes.text&&i.getCategory()===n.CometChatUIKitConstants.MessageCategory.message){let t=this.getModeratedtext(i),a=e.getLastMessage(),l={...o,textFormatters:o?.textFormatters&&o?.textFormatters.length?[...o.textFormatters]:[this.getMentionsTextFormatter({theme:o.theme,disableMentions:o.disableMentions})]},c=l.textFormatters;if(l&&!l.disableMentions){let e;for(let t=0;tnew Jn(e)))}getExtensionId(){return r.ExtensionsId.profanityFilter}enable(){const e=s.CometChat.isExtensionEnabled(r.ExtensionsId.profanityFilter),t=s.CometChat.isExtensionEnabled(r.ExtensionsId.dataMasking);Promise.all([e,t]).then((e=>{e.includes(!0)&&this.addExtension()})).catch((e=>{}))}}class _n extends ve{getId(){return"thumbnailgeneration"}getImageMessageBubble(e,t,n,o,r,s){if(De.names.includes("imagemoderation"))return super.getImageMessageBubble(e,t,n,o);{let e=n.getAttachments()[0].getUrl(),t=n.getMetadata();return t&&t.hasOwnProperty("@injected")&&t["@injected"].hasOwnProperty("extensions")&&t["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&t["@injected"].extensions["thumbnail-generation"].url_small&&(e=t["@injected"].extensions["thumbnail-generation"].url_small),super.getImageMessageBubble(e,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAuYAAAOBCAYAAAC9H2UFAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAAzdEVYdENyZWF0aW9uIFRpbWUAVGh1cnNkYXkgMjkgRGVjZW1iZXIgMjAyMiAxMjowOTowNyBBTdfo3bUAACAASURBVHic7N13lN/1fef790gyGNk4FBcwZu3cOLH3nHVs7NhJNjY2JomdbJzdzSab3b33nrjhhgkdGwxISEJCBWGKwCAQ1SDRexFdGFOEkQChAio0IUZtRprRjDTl971/4HCTUNRmfp/37zePxzHngDT6/V545qCnvvMtLZ/69AFVAAAARQ0rPQAAABDmAACQgjAHAIAE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AYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgIlsjTWURiJ80AAAAASUVORK5CYII=",n,o)}}getVideoMessageBubble(e,t,n,o,r,s){let i=t.getMetadata(),a=o;return i&&i.hasOwnProperty("@injected")&&i["@injected"].hasOwnProperty("extensions")&&i["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&i["@injected"].extensions["thumbnail-generation"].url_small&&(a=i["@injected"].extensions["thumbnail-generation"].url_small),super.getVideoMessageBubble(e,t,n,a)}}class Wn extends Cn{addExtension(){De.enable((e=>new _n(e)))}getExtensionId(){return r.ExtensionsId.thumbnailGeneration}}class Zn{static init(e){if(Zn.uiKitSettings=e,!Zn.checkAuthSettings())return;const t=new s.CometChat.AppSettingsBuilder;e.getRoles()?t.subscribePresenceForRoles(e.getRoles()):"ALL_USERS"===e.getSubscriptionType()?t.subscribePresenceForAllUsers():"FRIENDS"===e.getSubscriptionType()&&t.subscribePresenceForFriends(),t.autoEstablishSocketConnection(e.isAutoEstablishSocketConnection()),t.setRegion(e.getRegion()),t.overrideAdminHost(e.getAdminHost()),t.overrideClientHost(e.getClientHost());const n=t.build();return s.CometChat.setSource&&s.CometChat.setSource("uikit-v4","web","reactjs"),r.CometChatUIKitSharedSettings.uikitSettings=Zn.uiKitSettings,new Promise(((t,o)=>{window.CometChatUiKit={name:"@cometchat/chat-uikit-react",version:"4.3.16"},s.CometChat.init(e?.appId,n).then((()=>{s.CometChat.getLoggedinUser().then((e=>(e&&(r.CometChatUIKitLoginListener.setLoggedInUser(e),De.init(),this.initiateAfterLogin()),t(e)))).catch((e=>(console.log(e),o(e))))})).catch((e=>o(e)))}))}static enableCalling(){try{if(r.CometChatUIKitCalls){const e=(new r.CometChatUIKitCalls.CallAppSettingsBuilder).setAppId(Zn.uiKitSettings?.appId).setRegion(Zn.uiKitSettings?.region).build();r.CometChatUIKitCalls.init(e).then((()=>{(new dn).enable()}),(e=>{console.log("CometChatCalls initialization failed with error:",e)}))}}catch(e){console.log(e)}}static initiateAfterLogin(){if(null!=Zn.uiKitSettings){s.CometChat.getConversationUpdateSettings().then((e=>{this.conversationUpdateSettings=e}));let e=this.uiKitSettings?.extensions||this.defaultExtensions;n.ChatSdkEventInitializer.attachListeners(),r.CometChatUIKitLoginListener.attachListener();let t=this.uiKitSettings?.aiFeatures||this.defaultAIFeatures;e.length>0&&e.forEach((e=>{e?.enable()})),t.length>0&&t.forEach((e=>{e.enable()})),this.enableCalling()}}static login(e){return new Promise(((t,n)=>{if(!Zn.checkAuthSettings())return n("uiKitSettings not available");Zn.getLoggedinUser()?.then((o=>{if(o)return r.CometChatUIKitLoginListener.setLoggedInUser(o),this.initiateAfterLogin(),t(o);s.CometChat.login(e,Zn.uiKitSettings.authKey).then((e=>(r.CometChatUIKitLoginListener.setLoggedInUser(e),De.init(),r.CometChatUIKitLoginListener.setLoggedInUser(e),this.initiateAfterLogin(),t(e)))).catch((e=>n(e)))}))}))}static loginWithAuthToken(e){return new Promise(((t,n)=>{if(!Zn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.login(e).then((e=>(r.CometChatUIKitLoginListener.setLoggedInUser(e),De.init(),this.initiateAfterLogin(),t(e)))).catch((e=>n(e)))}))}static getLoggedinUser(){return new Promise(((e,t)=>{if(!Zn.checkAuthSettings())return t("uiKitSettings not available");s.CometChat.getLoggedinUser().then((t=>(t&&r.CometChatUIKitLoginListener.setLoggedInUser(t),e(t)))).catch((e=>t(e)))}))}static createUser(e){return new Promise(((t,n)=>{if(!Zn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.createUser(e,Zn.uiKitSettings.authKey).then((e=>t(e))).catch((e=>n(e)))}))}static updateUser(e){return new Promise(((t,n)=>{if(!Zn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.updateUser(e,Zn.uiKitSettings.authKey).then((e=>t(e))).catch((e=>n(e)))}))}static logout(){return new Promise(((e,t)=>{if(!Zn.checkAuthSettings()){return t({code:"ERROR_UIKIT_NOT_INITIALISED",message:"UIKItSettings not available"})}s.CometChat.logout().then((t=>(r.CometChatUIKitLoginListener.removeLoggedInUser(),e(t)))).catch((e=>t(e)))}))}static checkAuthSettings(){return null!=Zn.uiKitSettings&&null!=Zn.uiKitSettings.appId}static sendFormMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCardMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCustomInteractiveMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCustomMessage(e){return new Promise(((t,o)=>{e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendTextMessage(e){return new Promise(((t,o)=>{e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendMediaMessage(e){return e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),new Promise(((t,o)=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMediaMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendSchedulerMessage(e,t=!1){return new Promise(((o,i)=>{e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let s=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:s,status:n.MessageStatus.success}),o(e)})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),i(o)}))}))}static getDataSource(){return De.getDataSource()}}Zn.SoundManager=r.CometChatSoundManager,Zn.Localize=n.CometChatLocalize,Zn.defaultExtensions=[new zn,new Hn,new bn,new hn,new Un,new Yn,new Wn,new Tn,new jn,new In],Zn.defaultAIFeatures=[new Qt,new Dt,new Mt,new gt];const Xn=(e,t)=>{let o;return o=t===n.TabAlignment.top||t===n.TabAlignment.left?{top:"0",left:"0"}:t===n.TabAlignment.bottom?{bottom:"2px",left:"2px"}:{top:"0",right:"0"},{...o,position:"absolute",zIndex:"2",height:e?.tabListHeight||"100%",width:e?.tabListWidth||"100%",border:e?.tabListBorder||"0 none",borderRadius:e?.tabListBorderRadius||"0",background:e?.tabListBackground||"transparent",boxShadow:e?.tabListBoxShadow||"0",padding:e?.tabListPadding||"0",boxSizing:"border-box"}};function qn(e){return{height:e?.tabPaneHeight||"100%",width:e?.tabPaneWidth||"100%",display:"flex",position:"absolute",bottom:"0"}}const $n=(e,t,o,r,s)=>{let i=o?.id===t?.id,a=t?.style,l=e===n.TabAlignment.top||e===n.TabAlignment.bottom?"row":"column",c=a?.borderRadius,C="first"===r?`${c} 0 0 ${c}`:"last"===r?`0 ${c} ${c} 0`:"0";i&&a.activeBorderRadius&&(C=a.activeBorderRadius);let d="0";return i&&a?.boxShadow&&(d=a.boxShadow),{display:"flex",flexDirection:l,justifyContent:"center",width:a?.width,height:a?.height,backgroundColor:i?a?.activeBackground??a?.background:a?.background,borderRadius:C,boxShadow:d}},eo=e=>{let{borderRadius:t}=e??{};return{height:"100%",width:"100%",borderRadius:t}};function to(e,t){return e.id!==t?.id?{display:"none"}:{display:"flex",height:"100%",width:"100%"}}const no={tabAlignment:n.TabAlignment.bottom,tabsStyle:{},tabs:[],keepAlive:!1,tabIconAlignment:n.IconButtonAlignment.top},oo=de({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t,events:{ccButtonClicked:"cc-button-clicked"}}),ro=e=>{const{tabAlignment:n,tabIconAlignment:o,tabsStyle:r,tabs:s,keepAlive:i}=e,[a,l]=t.useState(null),[c,C]=t.useState(""),g=t.useRef(null),u=t.useCallback((e=>{if(s&&s.length>0){g.current=null;let t=s.findIndex((t=>t.id===e.id));t>-1&&(l(e),C(e.id),g.current=s[t].childView)}}),[g,s]);t.useEffect((()=>{if(c){const e=s?.find((e=>e.id===c));e&&u(e)}else{const e=s?.find((e=>e.isActive));e&&u(e)}}),[c,u,s]);const p=t.useCallback((e=>{const{style:t,iconURL:n}=e||{},{id:o}=a||{};return((e,t,n)=>({background:"inherit",buttonTextFont:t?e?.activeTitleTextFont??e?.titleTextFont:e?.titleTextFont,buttonTextColor:t?e?.activeTitleTextColor??e?.titleTextColor:e?.titleTextColor,buttonIconTint:t?e?.activeIconTint??e?.iconTint:e?.iconTint,height:"100%",width:"100%",border:e?.border,borderRadius:e?.borderRadius,gap:"8px",padding:"0",justifyContent:n?"":"center"}))(t,o===e?.id,n)}),[a]),h=t.useCallback((()=>s?.map(((e,t)=>{const r=0===t?"first":t===s.length-1?"last":"";let i=`${e.id}-${Math.floor(10*Math.random()+1)}`;return d.jsx("div",{className:"cc-tab-item",style:$n(n,e,a,r),children:d.jsx(oo,{alignment:o,iconURL:e.iconURL,text:e.title,buttonStyle:p(e),ccButtonClicked:t=>u(e)})},i)}))),[a]),m=t.useCallback((()=>i?s.map((e=>d.jsx("div",{className:"cc-tab-pane-content",style:to(e,a),children:e?.childView?d.jsx("div",{className:"cc-tab-pane-content-view",style:eo(r),children:e?.childView}):null},e.id))):g?.current?d.jsx("div",{className:"cc-tab-pane-content",style:eo(r),children:g?.current}):null),[a]);return d.jsxs("div",{className:"cc-tabs",style:(A=r,{height:A?.height||"100%",width:A?.width||"100%",borderRadius:A?.borderRadius||"0",border:A?.border||"0 none",background:A?.background||"transparent",display:"flex",flexDirection:"row",justifyContent:"flex-start",position:"relative"}),children:[d.jsx("div",{className:"cc-tab-list",style:Xn(r,n),children:d.jsx("div",{className:"cc-tab-item__wrapper",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:h()})}),d.jsx("div",{className:"cc-tab-pane",style:qn(r),children:m()})]});var A};ro.defaultProps=no;class so{constructor(e){let{style:t,createPollStyle:n,createPollIconURL:o,deleteIconURL:r,closeIconURL:s,optionIconURL:i,addAnswerIconURL:a,optionStyle:l}=e;this.style=t,this.createPollStyle=n,this.createPollIconURL=o,this.deleteIconURL=r,this.closeIconURL=s,this.optionIconURL=i,this.addAnswerIconURL=a,this.optionStyle=l}getPollsBubbleStyle(){return this.style}getCreatePollStyle(){return this.createPollStyle}getCreatePollIconURL(){return this.createPollIconURL}getDeleteIconURL(){return this.deleteIconURL}getCloseIconURL(){return this.closeIconURL}getOptionIconURL(){return this.optionIconURL}getAddAnswerIconURL(){return this.addAnswerIconURL}getOptionStyle(){return this.optionStyle}}const io=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius,padding:"8px",position:"absolute",left:"8px",top:"8px",minHeight:"95px",minWidth:"230px",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"8px",alignItems:"flex-start"}),ao={display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"6px"},lo=e=>({textFont:e?.subtitleTextFont,textColor:e?.subtitleTextColor}),co={width:"100%",marginLeft:"-4px"},Co={position:"relative"},go={display:"flex",gap:"8px",paddingLeft:"8px",paddingRight:"8px"},uo={height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"8px 28px"},po=e=>new o.AvatarStyle({borderRadius:"16px",width:"38px",height:"38px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),ho=e=>new r.IncomingCallStyle({width:"fit-content",height:"fit-content",background:e.palette.getAccent800(),border:"none",borderRadius:"8px",titleTextFont:n.fontHelper(e.typography.title2),titleTextColor:e.palette.getAccent("dark"),subtitleTextFont:n.fontHelper(e.typography.subtitle2),subtitleTextColor:e.palette.getAccent("dark"),acceptButtonTextFont:n.fontHelper(e.typography.text2),acceptButtonTextColor:e.palette.getAccent("dark"),acceptButtonBackground:e.palette.getPrimary(),acceptButtonBorderRadius:"8px",acceptButtonBorder:"none",declineButtonTextFont:n.fontHelper(e.typography.text2),declineButtonTextColor:e.palette.getAccent("dark"),declineButtonBackground:e.palette.getError(),declineButtonBorderRadius:"8px",declineButtonBorder:"none"}),mo=(e,t)=>new o.ListItemStyle({height:"100%",width:"100%",background:"transparent",activeBackground:"transparent",borderRadius:"0",titleFont:e?.titleTextFont,titleColor:e?.titleTextColor,border:"none",separatorColor:t.palette.getAccent200(),hoverBackground:"transparent"}),Ao=e=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:e.palette.getAccent900(),maximizeIconTint:e.palette.getAccent900()});function xo(e,t){const n=e.getInitiator()?.getUid();return!n||n===t?.getUid()}function bo(e,t){const o=e.getStatus(),r=xo(e,t);if(r&&o===n.CometChatUIKitConstants.calls.unanswered)return!1;const s=[n.CometChatUIKitConstants.calls.unanswered,n.CometChatUIKitConstants.calls.cancelled,n.CometChatUIKitConstants.calls.busy,n.CometChatUIKitConstants.calls.rejected];return!r&&s.includes(o)}function yo(e,t){return e.getInitiator().getUid()===t.getUid()?e.getReceiver():e.getInitiator()}function wo(e,t,o=!1){if(!e||!t)return"";let r="";const s=e.getStatus(),i=xo(e,t),a="_";if(bo(e,t))r=`MISSED${a}CALL`;else switch(s){case n.CometChatUIKitConstants.calls.initiated:r=i?`OUTGOING${a}CALL`:`INCOMING${a}CALL`;break;case n.CometChatUIKitConstants.calls.ongoing:r=`ONGOING${a}CALL`;break;case n.CometChatUIKitConstants.calls.ended:r=i?`OUTGOING${a}CALL`:`INCOMING${a}CALL`;break;case n.CometChatUIKitConstants.calls.unanswered:r=i?`UNANSWERED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.cancelled:r=i?`CANCELLED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.rejected:r=i?`REJECTED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.busy:r=i?`UNANSWERED${a}CALL`:`MISSED${a}CALL`;break;default:r=`INCOMING${a}CALL`}return n.localize(r)}function fo(e){const t=Math.floor(e/60),n=Math.floor(e%60),o=Math.floor(60*(e-Math.floor(e)));let r="",s="",i="";return t>0&&(r=`${t}h`),n>0&&(s=`${n}m`),o>=0&&(i=`${o}s`),`${r} ${s} ${i}`}function Do(e,t){return{display:"flex",color:t?.callStatusTextColor||e.palette.getAccent600(),font:t?.callStatusTextFont||n.fontHelper(e.typography.caption1),alignItems:"center",gap:"4px"}}function Eo(e,t){return new o.AvatarStyle({borderRadius:t?.borderRadius||"24px",width:t?.width||"36px",height:t?.height||"36px",border:t?.border||"none",backgroundColor:t?.backgroundColor||e.palette.getAccent700(),nameTextColor:t?.nameTextColor||e.palette.getAccent900(),backgroundSize:t?.backgroundSize||"cover",nameTextFont:t?.nameTextFont||n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:t?.outerViewBorderWidth||"",outerViewBorderSpacing:t?.outerViewBorderSpacing||"",outerViewBorderColor:t?.outerViewBorderColor||"",outerViewBorderRadius:t?.outerViewBorderRadius||""})}function vo(e,t,r,s){const i=bo(e,s)?t.palette.getError():t.palette.getAccent();return new o.ListItemStyle({height:r?.height||"50px",width:r?.width||"100%",background:r?.background||t.palette.getBackground(),activeBackground:r?.activeBackground||t.palette.getAccent100(),borderRadius:r?.borderRadius||"0",titleFont:r?.titleFont||n.fontHelper(t.typography.title2),titleColor:r?.titleColor||i,border:r?.border||"none",separatorColor:r?.separatorColor||t.palette.getAccent200(),hoverBackground:r?.hoverBackground||t.palette.getAccent50(),padding:r?.padding||"0"})}function Io(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function So(e,t){return new r.ListStyle({height:"100%",titleTextFont:t.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t.titleColor||e.palette.getAccent(),emptyStateTextColor:t.emptyStateTextColor||e.palette.getAccent600(),emptyStateTextFont:t.emptyStateTextFont||n.fontHelper(e.typography.caption1),errorStateTextColor:t.errorStateTextColor||e.palette.getAccent600(),errorStateTextFont:t.errorStateTextFont||n.fontHelper(e.typography.caption1),loadingIconTint:t.loadingIconTint||e.palette.getAccent600()})}function Fo(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),background:"transparent"}}function ko(e,t,n,o){let r;return r=bo(e,o)?n?.missedCallIconTint||t.palette.getAccent600():e.getInitiator().getUid()===o.getUid()?n?.outgoingCallIconTint||t.palette.getAccent600():n?.incomingCallIconTint||t.palette.getAccent600(),{height:"18px",width:"18px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:r}}function To(e,t){return{height:"20px",width:"20px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.infoIconTint||e.palette.getPrimary()}}function Mo(e,t){return{textFont:t?.dateSeparatorTextFont||n.fontHelper(e.typography.text2),textColor:t?.dateSeparatorTextColor||e.palette.getAccent700(),background:"transparent",padding:"0"}}const Bo={title:n.localize("CALLS"),titleAlignment:n.TitleAlignment.left,listItemView:null,subtitleView:null,tailView:null,emptyStateView:null,errorStateView:null,loadingStateView:null,emptyStateText:n.localize("NO_CALLS_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",incomingAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34856%209.89458C4.64141%2010.1873%205.03856%2010.3518%205.45265%2010.3518C5.86675%2010.3518%206.2639%2010.1873%206.55675%209.89458L7.38496%209.06639C7.45752%208.99388%207.51508%208.90778%207.55435%208.81301C7.59362%208.71825%207.61383%208.61667%207.61383%208.51409C7.61383%208.41151%207.59362%208.30993%207.55435%208.21517C7.51508%208.1204%207.45752%208.0343%207.38496%207.96179L5.77488%206.35123C5.69603%206.27169%205.601%206.21005%205.49623%206.17048C5.39146%206.13091%205.27941%206.11434%205.16767%206.1219C5.05593%206.12945%204.94713%206.16095%204.84864%206.21426C4.75015%206.26757%204.66428%206.34145%204.59686%206.43087C2.90974%208.72127%203.93211%2011.1335%206.00548%2013.2073C8.07886%2015.2812%2010.4927%2016.3025%2012.7847%2014.6154C12.8739%2014.5477%2012.9475%2014.4617%2013.0005%2014.3631C13.0536%2014.2645%2013.0848%2014.1556%2013.092%2014.0439C13.0993%2013.9322%2013.0824%2013.8202%2013.0426%2013.7155C13.0028%2013.6109%2012.9409%2013.516%2012.8612%2013.4374L11.2506%2011.8268C11.1781%2011.7543%2011.092%2011.6967%2010.9972%2011.6574C10.9025%2011.6182%2010.8009%2011.598%2010.6983%2011.598C10.5957%2011.598%2010.4941%2011.6182%2010.3994%2011.6574C10.3046%2011.6967%2010.2185%2011.7543%2010.146%2011.8268L9.31778%2012.655C9.17274%2012.8%209.05768%2012.9722%208.97918%2013.1617C8.90068%2013.3512%208.86028%2013.5543%208.86028%2013.7594C8.86028%2013.9645%208.90068%2014.1676%208.97918%2014.357C9.05768%2014.5465%209.17274%2014.7187%209.31778%2014.8637L9.89039%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3872%208.82531L15.4626%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.5105%208.82517H10.3872V5.7019%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",incomingVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.41384%2012.5186H5.1875V9.29224%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3776%207.31396L5.28149%2012.41%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",outgoingAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4623%203.75L10.387%208.82531%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.3391%203.75H15.4624V6.87327%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",outgoingVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M7.15111%207.31395H10.3774V10.5403%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M5.18738%2012.5186L10.2834%207.42248%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",missedAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4622%204.53082L12.3389%207.65409L8.43481%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.43481%206.09245V3.75H10.7773%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",missedVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.1573%2011.9539C13.907%2011.8167%2013.7515%2011.5541%2013.7515%2011.2687V8.73221C13.7515%208.44682%2013.907%208.18413%2014.1573%208.04701L16.9757%206.50318C17.4963%206.21798%2018.1322%206.59473%2018.1322%207.18836V12.8125C18.1322%2013.4061%2017.4963%2013.7829%2016.9757%2013.4977L14.1573%2011.9539Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M11.3834%209.1351L8.17601%2012.3425L4.16675%208.33325%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.16675%2010.7388V8.33325H6.5723%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.22925%2015.883C2.3663%2015.883%201.66675%2015.1834%201.66675%2014.3205V5.729C1.66675%204.86606%202.3663%204.1665%203.22925%204.1665H11.9874C12.8503%204.1665%2013.5499%204.86606%2013.5499%205.729V14.3205C13.5499%2015.1834%2012.8503%2015.883%2011.9874%2015.883H3.22925Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",infoIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",callLogRequestBuilder:void 0,onItemClick:void 0,onInfoClick:void 0,onError:e=>{console.log(e)},hideSeparator:!0,activeCall:void 0,datePattern:n.DatePatterns.time,dateSeparatorPattern:n.DatePatterns.DayDate,callLogsStyle:{},avatarStyle:{},listItemStyle:{},outgoingCallConfiguration:{}},Lo=e=>{const{title:i,titleAlignment:a,listItemView:l,subtitleView:c,tailView:C,errorStateView:g,emptyStateView:u,loadingStateView:p,emptyStateText:h,errorStateText:m,loadingIconURL:A,incomingAudioCallIconUrl:x,incomingVideoCallIconUrl:b,outgoingAudioCallIconUrl:y,outgoingVideoCallIconUrl:w,missedAudioCallIconUrl:f,missedVideoCallIconUrl:D,infoIconUrl:E,activeCall:v,callLogRequestBuilder:I,onItemClick:S,onInfoClick:F,onError:k,hideSeparator:M,datePattern:L,dateSeparatorPattern:U,callLogsStyle:P,avatarStyle:O,listItemStyle:j,outgoingCallConfiguration:V}=e,{theme:G}=t.useContext(R),[H,Q]=t.useState([]),[N,K]=t.useState(null),[z,J]=t.useState(n.States.loading),[Y,_]=t.useState(!1),[W,Z]=t.useState(void 0),[X,$]=t.useState(void 0),[ee,te]=t.useState(null),[ne,oe]=t.useState(!1),re="callLogsScreen_"+(new Date).getTime(),se=t.useRef(null),ie=t.useRef(void 0);ie.current=W;const ae=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)k?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);k?.(n)}}),[k]),le=t.useCallback((()=>{try{if(I)return I.build();{const e=N.getAuthToken();return(new r.CometChatUIKitCalls.CallLogRequestBuilder).setLimit(30).setCallCategory("call").setAuthToken(e).build()}}catch(e){ae(e)}}),[I,N,ae]),ce=t.useCallback((async()=>{try{return await(se?.current?.fetchNext())}catch(e){throw ae(e),e}}),[se,ae]),Ce=t.useCallback((async()=>{try{const e=await ce();e&&e.length?(Q((t=>[...t,...e])),J(n.States.loaded)):0===H.length&&J(n.States.empty)}catch(e){0===H.length&&J(n.States.error),ae(e)}}),[ce,H,Q,J,ae]),de=t.useCallback((()=>{s.CometChat.rejectCall(X?.getSessionId(),n.CometChatUIKitConstants.calls.cancelled).then((()=>{$(void 0),_(!1),n.CometChatMessageEvents.ccMessageSent.next({message:X,status:n.MessageStatus.success})})).catch((e=>{_(!1),ae(e)}))}),[X,$,_,ae]),ge=t.useCallback(((e,t)=>{const o=n.CometChatUIKitConstants.MessageReceiverType.user,r=t;let i="";i=e===s.CometChat.CALL_TYPE.AUDIO?s.CometChat.CALL_TYPE.AUDIO:s.CometChat.CALL_TYPE.VIDEO;const a=new s.CometChat.Call(r,i,o);s.CometChat.initiateCall(a).then((e=>{Z(e),$(e),_(!0),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress})})).catch((e=>{ae(e)}))}),[$,_,ae,Z]),ue=t.useCallback((e=>{try{if(S)S(e);else{const t=yo(e,N);t.uid&&ge(e?.type,t.uid)}}catch(e){ae(e)}}),[S,N,ge,ae]),pe=t.useCallback((e=>{try{F&&F(e)}catch(e){ae(e)}}),[F,ae]),he=t.useCallback((e=>{try{return!(!v||v.getSessionID()!==e.getSessionID())}catch(e){return ae(e),!1}}),[v,ae]),me=t.useCallback((e=>{try{const t=bo(e,N);let n,o=e.getType();return o=e.getType()===s.CometChat.CALL_TYPE.AUDIO?s.CometChat.CALL_TYPE.AUDIO:s.CometChat.CALL_TYPE.VIDEO,n=t?o===s.CometChat.CALL_TYPE.AUDIO?f:D:xo(e,N)?o===s.CometChat.CALL_TYPE.AUDIO?y:w:o===s.CometChat.CALL_TYPE.AUDIO?x:b,n}catch(e){ae(e)}}),[N,f,D,y,w,x,b,ae]),Ae=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){ae(e)}}),[ae]),xe=t.useCallback(((e,t)=>{try{return 0===t||Ae(H[t-1]?.getInitiatedAt(),e.getInitiatedAt())?d.jsx("div",{style:{margin:"5px 0",display:"flex"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:U,dateStyle:JSON.stringify(Mo(G,P))})}):null}catch(e){return ae(e),null}}),[U,P,Ae,H,G,ae]),be=t.useCallback((()=>new r.OutgoingCallStyle({background:V?.outgoingCallStyle?.background||G.palette.getBackground(),border:V?.outgoingCallStyle?.border||"none",borderRadius:V?.outgoingCallStyle?.borderRadius||"8px",declineButtonIconBackground:V?.outgoingCallStyle?.declineButtonIconBackground||G.palette.getError(),declineButtonIconTint:V?.outgoingCallStyle?.declineButtonIconTint||G.palette.getBackground(),declineButtonTextColor:V?.outgoingCallStyle?.declineButtonTextColor||G.palette.getAccent600(),declineButtonTextFont:V?.outgoingCallStyle?.declineButtonTextFont||n.fontHelper(G.typography.caption2),height:V?.outgoingCallStyle?.height||"580px",width:V?.outgoingCallStyle?.width||"320px",subtitleTextColor:V?.outgoingCallStyle?.subtitleTextColor||G.palette.getAccent600(),subtitleTextFont:V?.outgoingCallStyle?.subtitleTextFont||n.fontHelper(G.typography.subtitle1),titleTextColor:V?.outgoingCallStyle?.titleTextColor||G.palette.getAccent(),titleTextFont:V?.outgoingCallStyle?.titleTextFont||n.fontHelper(G.typography.heading)})),[V,G]),ye=t.useCallback((()=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:G.palette.getAccent900(),maximizeIconTint:G.palette.getAccent900()})),[G]),we=t.useCallback((e=>{_(!1),$(e),te(e?.getSessionId()),oe(!0)}),[_,$,te,oe]),fe=t.useCallback((()=>{try{s.CometChat.addCallListener(re,new s.CometChat.CallListener({onOutgoingCallRejected:e=>{ie.current&&e.getSessionId()==ie.current.getSessionId()&&($(void 0),_(!1),oe(!1),Z(void 0))},onOutgoingCallAccepted:e=>{ie.current&&e.getSessionId()==ie.current.getSessionId()&&($(void 0),we(e),_(!1),Z(void 0))}}))}catch(e){ae(e)}}),[re,we,ae]),De=t.useCallback((()=>{oe(!1),te(null),$(void 0)}),[oe,te,$]),Ee=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallEnded.subscribe((()=>{De()}));return()=>{try{e?.unsubscribe()}catch(e){ae(e)}}}catch(e){ae(e)}}),[De,ae]),ve=t.useCallback((()=>{try{s.CometChat.removeCallListener(re)}catch(e){ae(e)}}),[re,ae]),Ie=t.useCallback((e=>null!==c?d.jsx(d.Fragment,{children:c(e)}):d.jsx(d.Fragment,{children:d.jsxs("div",{style:Do(G,P),children:[d.jsx("cometchat-icon",{URL:me(e),buttonStyle:JSON.stringify(ko(e,G,P,N))}),wo(e,N)]})})),[c,P,N,G,me]),Se=t.useCallback((e=>null!==C?d.jsx(d.Fragment,{children:C(e)}):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex",alignItems:"center",marginRight:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(Fo(G,P)),pattern:L,timestamp:e?.getInitiatedAt()}),F?d.jsx(q,{iconURL:E,buttonStyle:To(G,P),onClick:()=>pe(e)}):null]})})),[C,G,P,L,F,E,pe]),Fe=t.useMemo((()=>function(e,t){return l?l(e):d.jsxs(d.Fragment,{children:[xe(e,t)?xe(e,t):null,d.jsx(B,{title:yo(e,N)?.getName(),avatarURL:yo(e,N)?.avatar||yo(e,N)?.icon,avatarName:yo(e,N)?.getName(),listItemStyle:vo(e,G,j,N),avatarStyle:Eo(G,O),hideSeparator:M,loadingIconURL:A,isActive:he(e),onClick:t=>ue?.(e),subtitleView:Ie(e),tailView:Se(e)})]})}),[l,xe,N,G,j,O,M,A,he,Ie,Se,ue]);return function(e,n,o,r,s,i,a,l,c){t.useEffect((()=>{Zn.getLoggedinUser().then((e=>{n(e)}),(e=>{c(e)}))}),[n,c]),t.useEffect((()=>{let t;return e&&(t=a?.(),o.current=r(),s?.(),i?.(),a?.()),()=>{l?.(),t?.()}}),[e])}(N,K,se,le,Ce,fe,Ee,ve,ae),d.jsxs("div",{style:Io(G,P),children:[Y?d.jsx("cometchat-backdrop",{children:d.jsx(on,{onCloseClicked:V?.onDeclineButtonClicked||de,outgoingCallStyle:be(),call:X,avatarStyle:V?.avatarStyle,customSoundForCalls:V?.customSoundForCalls,customView:V?.customView,declineButtonIconURL:V?.declineButtonIconURL,disableSoundForCalls:V?.disableSoundForCalls,onError:V?.onError})}):null,ne&&!v?d.jsx(Kt,{sessionID:ee,callWorkflow:n.CallWorkflow.defaultCalling,ongoingCallStyle:ye()}):null,d.jsx(T,{hideSearch:!0,list:H,onScrolledToBottom:Ce,listItemKey:"getSessionID",listItem:Fe,title:i,titleAlignment:a,loadingIconURL:A,emptyStateText:h,errorStateText:m,emptyStateView:u,errorStateView:g,loadingView:p,listStyle:So(G,P),state:z,showSectionHeader:!1})]})};function Uo(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function Ro(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none",position:"relative"}}function Po(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}function Oo(e,t){const{backgroundColor:r,titleColor:s,titleFont:i}=t;return new o.ListItemStyle({background:r||"transparent",activeBackground:r||"transparent",border:"none",hoverBackground:r||"transparent",titleColor:s||e.palette.getAccent(),borderRadius:"0",titleFont:i||n.fontHelper(e.typography.text1),separatorColor:e.palette.getAccent200()})}Lo.defaultProps=Bo;class jo{static getDefaultCallTemplate(e,t,n){return[this.getPrimaryDetailsTemplate(e,t,n),this.getSecondaryDetailsTemplate(e,t,n)]}static getCallButtons(e,t){return d.jsx(sn,{user:e,group:t,callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent",buttonPadding:"8px 32px",buttonBackground:"RGBA(20, 20, 20, 0.04)",buttonBorder:"0 4px",buttonBorderRadius:"10px"},voiceCallIconText:n.localize("AUDIO_CALL"),videoCallIconText:n.localize("VIDEO_CALL")},"callbuttons")}static getPrimaryDetailsTemplate(e,t,o){return new n.CometChatCallDetailsTemplate({id:"callControls",hideSectionSeparator:!0,options:(n,r)=>this.getPrimaryOptions(n??void 0,r??void 0,e??void 0,t??void 0,o??void 0)})}static getSecondaryDetailsTemplate(e,t,o){return new n.CometChatCallDetailsTemplate({id:"callOptions",hideSectionSeparator:!0,options:()=>this.getSecondaryOptions(e??void 0,o??void 0)})}static getPrimaryOptions(e,t,o,r,s){let i=[];return e&&i.push(new n.CometChatCallDetailsOption({id:"callControls",customView:this.getCallButtons(e,t)})),i.push(new n.CometChatCallDetailsOption({id:"callStatus",customView:this.generateCallDetailsHTML(o,o?.getInitiatedAt(),r,s)})),i}static getSecondaryOptions(e,t){const o=[];if(e?.participants&&e?.participants.length>0){const r=(e?.participants||[])?.length;o.push(new n.CometChatCallDetailsOption({id:"participants",customView:this.generateCallOptionsHTML("Participants",r,t)}))}if(e?.hasRecording){const r=(e?.getRecordings()||[])?.length;o.push(new n.CometChatCallDetailsOption({id:"recordings",customView:this.generateCallOptionsHTML("Recordings",r,t)}))}return o.push(new n.CometChatCallDetailsOption({id:"callHistory",customView:this.generateCallOptionsHTML("History",0,t)})),o}static generateCallDetailsHTML(e,t,r,s){const i=new o.ListItemStyle({height:"auto",width:"100%",background:s?.palette?.getAccent100(),hoverBackground:s?.palette?.getAccent100(),borderRadius:"8px",border:"none",padding:"10px"}),a=new o.DateStyle({textColor:s?.palette?.getAccent600(),textFont:n.fontHelper(s?.typography?.text3),padding:"0px",background:"transparent"}),l=new o.DateStyle({textColor:s?.palette?.getAccent600(),textFont:n.fontHelper(s?.typography?.subtitle2),padding:"0px",background:"transparent"}),c=wo(e,r,!0),C=d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(a),pattern:n.DatePatterns.DayDate,timestamp:t}),d.jsxs("div",{style:{display:"flex",gap:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(l),pattern:n.DatePatterns.time,timestamp:t}),d.jsx("div",{style:{font:n.fontHelper(s?.typography?.text2),color:s.palette.getAccent()},children:c})]})]}),g=d.jsx("div",{style:{font:n.fontHelper(s?.typography?.text3),color:s?.palette?.getAccent600(),marginRight:"15px",marginTop:"15px"},children:fo(e?.getTotalDurationInMinutes())});return d.jsx("div",{style:{marginTop:"25px",marginBottom:"25px",width:"100%",paddingLeft:"10px",paddingRight:"10px",boxSizing:"border-box"},children:d.jsx(B,{hideSeparator:!0,listItemStyle:i,subtitleView:C,tailView:g},t)})}static generateCallOptionsHTML(e,t,o){const r={iconHeight:"18px",iconWidth:"18px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:o.palette.getAccent600()},s={margin:"10px",marginBottom:"5px",padding:"10px",boxSizing:"border-box",background:o?.palette?.getAccent100(),borderRadius:"8px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",width:"100%"},i={font:n.fontHelper(o?.typography?.text2),color:o?.palette?.getAccent()},a={display:"flex",alignItems:"center",gap:"5px",font:n.fontHelper(o?.typography?.text3),color:o?.palette?.getAccent600()};return d.jsxs("div",{style:s,children:[d.jsx("span",{style:i,children:e}),d.jsxs("span",{style:a,children:[t>0?t:"",d.jsx(q,{iconURL:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%28-1%200%200%20-1%2024%2024%29%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%280%201%20-1%200%2024%20-0%29%22%3E%3Ctitle%3EIcons%2F24%2FClose%20Chat%3C%2Ftitle%3E%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20id%3D%22Icons%2F24%2FClose-Chat%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.700000%2C%208.000000%29%22%3E%3Cpath%20d%3D%22M20.625%2C0%20L10.7983333%2C9.82575%20C10.669546%2C9.9547209%2010.4947627%2C10.0271915%2010.3125%2C10.0271915%20C10.1302373%2C10.0271915%209.95545401%2C9.9547209%209.82666667%2C9.82575%20L0%2C0%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:r})]})]})}}function Vo(e,t){return{background:"transparent",textColor:t?.dateTextColor||e.palette.getAccent600(),textFont:t?.dateTextFont||n.fontHelper(e.typography.subtitle2)}}function Go(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function Ho(e,t){return{font:t?.callStatusTextFont||n.fontHelper(e.typography.text2),color:t?.callStatusTextColor||e.palette.getAccent()}}function Qo(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function No(e,t){return new r.ListStyle({height:"90%",emptyStateTextColor:t?.emptyStateTextColor||e.palette.getAccent600(),emptyStateTextFont:t?.emptyStateTextFont||n.fontHelper(e.typography.caption1),errorStateTextColor:t?.errorStateTextColor||e.palette.getAccent600(),errorStateTextFont:t?.errorStateTextFont||n.fontHelper(e.typography.caption1),loadingIconTint:t?.loadingIconTint||e.palette.getAccent600()})}function Ko(e,t){return{font:t?.callDurationTextColor||n.fontHelper(e.typography.caption1),color:t?.callDurationTextColor||e.palette.getAccent500()}}function zo(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function Jo(e,t){return{textFont:t?.dateSeparatorTextFont||n.fontHelper(e.typography.text3),textColor:t?.dateSeparatorTextColor||e.palette.getAccent700(),background:"transparent"}}function Yo(e,t){return{height:"1px",width:"100%",background:t?.dividerColor||e.palette.getAccent200()}}function _o(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}const Wo={title:n.localize("CALL_HISTORY"),emptyStateText:n.localize("NO_CALLS_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",emptyStateView:null,loadingStateView:null,errorStateView:null,subtitleView:null,tailView:null,callLogRequestBuilder:void 0,callUser:void 0,callGroup:void 0,onItemClick:void 0,onBackClick:void 0,onError:()=>{},datePattern:n.DatePatterns.time,dateSeparatorPattern:n.DatePatterns.DayDate,listItemStyle:{},callLogHistoryStyle:{}},Zo=e=>{const{title:o,emptyStateText:i,errorStateText:a,backIconUrl:l,loadingIconURL:c,emptyStateView:C,errorStateView:g,loadingStateView:u,subtitleView:p,tailView:h,callLogRequestBuilder:m,callUser:A,callGroup:x,onItemClick:b,onBackClick:y,onError:w,datePattern:f,dateSeparatorPattern:D,listItemStyle:E,callLogHistoryStyle:v}=e,{theme:I}=t.useContext(R),[S,F]=t.useState([]),[k,M]=t.useState(null),[L,U]=t.useState(n.States.loading),P=t.useRef(null),O=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)w?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);w?.(n)}}),[w]),j=t.useCallback((()=>{try{let e;if(m)e=m;else{const t=k.getAuthToken()||"";e=(new r.CometChatUIKitCalls.CallLogRequestBuilder).setLimit(30).setCallCategory("call").setAuthToken(t)}return x?e=e.setGuid(x?.getGuid()):A&&(e=e.setUid(A?.getUid())),e.build()}catch(e){O(e)}}),[m,x,A,k,O]),V=t.useCallback((async()=>{try{return await(P?.current?.fetchNext())}catch(e){throw O(e),new Error("Error while fetching call list")}}),[P,O]),G=t.useCallback((async()=>{try{const e=await V();e&&e.length>0?(F((t=>[...t,...e])),U(n.States.loaded)):0===S.length&&U(n.States.empty)}catch(e){0===S.length&&U(n.States.error),O(e)}}),[V,F,U,S,O]),H=t.useCallback((e=>{try{b&&b(e)}catch(e){O(e)}}),[b,O]),Q=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){return O(e),!1}}),[O]),N=t.useCallback(((e,t)=>{try{return 0===t?d.jsx("div",{style:{margin:"4px 0 0 8px"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:D,dateStyle:JSON.stringify(Jo(I,v))})}):Q(S[t-1]?.getInitiatedAt(),e.getInitiatedAt())?d.jsxs(d.Fragment,{children:[d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(Yo(I,v))}),d.jsx("div",{style:{margin:"4px 0 0 8px"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:D,dateStyle:JSON.stringify(Jo(I,v))})})]}):null}catch(e){return O(e),null}}),[D,I,v,Q,S,O]),K=t.useCallback((e=>{try{return!!e?.getTotalDurationInMinutes()&&fo(e?.getTotalDurationInMinutes())}catch(e){return O(e),!1}}),[O]),z=t.useCallback((e=>p?p(e):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(Vo(I,v)),pattern:f,timestamp:e?.getInitiatedAt()}),d.jsx("div",{style:Ho(I,v),children:wo(e,k,!0)})]})})),[p,I,v,f,k]),J=t.useCallback((e=>h?h(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:Ko(I,v),children:K(e)?K(e):"00:00"})})),[h,I,v,K]),Y=t.useMemo((()=>function(e,t){return d.jsxs(d.Fragment,{children:[N(e,t)?d.jsx("div",{children:N(e,t)}):null,d.jsx(B,{loadingIconURL:c,listItemStyle:Go(I,E),onClick:t=>H?.(e),subtitleView:z(e),tailView:J(e),hideSeparator:!0})]})}),[N,c,I,E,z,J,H]);return function(e,n,o,r,s,i){t.useEffect((()=>{Zn.getLoggedinUser().then((e=>{n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{e&&(o.current=r(),s?.())}),[e])}(k,M,P,j,G,O),d.jsx(d.Fragment,{children:d.jsxs("div",{style:Qo(I,v),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 30px",alignItems:"center",marginBottom:"10px"},children:[y?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(q,{iconURL:l,buttonStyle:zo(I,v),onClick:y?.()})}):null,d.jsx("div",{style:_o(I,v),children:o})]}),d.jsx(T,{hideSearch:!0,list:S,onScrolledToBottom:G,listItemKey:"getSessionID",listItem:Y,loadingIconURL:c,emptyStateText:i,errorStateText:a,loadingView:u,emptyStateView:C,errorStateView:g,listStyle:No(I,v),state:L,showSectionHeader:!1})]})})};Zo.defaultProps=Wo;function Xo(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function qo(e,t){return new r.ListStyle({height:"90%",titleTextFont:t?.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t?.titleColor||e.palette.getAccent()})}function $o(e,t){return new o.AvatarStyle({borderRadius:t?.borderRadius||"24px",width:t?.width||"36px",height:t?.height||"36px",border:t?.border||"none",backgroundColor:t?.backgroundColor||e.palette.getAccent700(),nameTextColor:t?.nameTextColor||e.palette.getAccent900(),backgroundSize:t?.backgroundSize||"cover",nameTextFont:t?.nameTextFont||n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:t?.outerViewBorderWidth||"",outerViewBorderSpacing:t?.outerViewBorderSpacing||"",outerViewBorderColor:t?.outerViewBorderColor||"",outerViewBorderRadius:t?.outerViewBorderRadius||""})}function er(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",titleFont:t?.titleFont||n.fontHelper(e.typography.title2),titleColor:t?.titleColor||e.palette.getAccent(),border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function tr(e,t){return{display:"flex",color:t?.callStatusColor||e.palette.getAccent600(),font:t?.callStatusFont||n.fontHelper(e.typography.caption1)}}function nr(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),font:t?.dateTextFont||n.fontHelper(e.typography.caption1),color:t?.dateTextColor||e.palette.getAccent500(),background:"transparent",padding:"3px 10px"}}function or(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function rr(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}const sr={title:n.localize("PARTICIPANTS"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",call:void 0,datePattern:n.DatePatterns.time,avatarStyle:{},listItemStyle:{},callLogParticipantsStyle:{},listItemView:null,subtitleView:null,tailView:null,onBackClick:void 0,onItemClick:void 0},ir=e=>{const{title:o,backIconUrl:r,call:s,datePattern:i,avatarStyle:a,listItemStyle:l,callLogParticipantsStyle:c,listItemView:C,subtitleView:g,tailView:u,onBackClick:p,onItemClick:h}=e,{theme:m}=t.useContext(R),A=t.useCallback((e=>{h&&h(e)}),[h]),x=t.useCallback((()=>s?.getParticipants()),[s]),b=t.useCallback((()=>s?.getInitiatedAt()),[s]),y=e=>e?.getHasJoined()||e?.getJoinedAt()?fo(e?.getTotalDurationInMinutes()):fo(0),w=t.useCallback((e=>g?g(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:tr(m,c),children:y(e)})})),[g,m,c]),f=t.useCallback((e=>u?u(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:d.jsx("cometchat-date",{dateStyle:JSON.stringify(nr(m,c)),pattern:i,timestamp:b()})})})),[u,m,c,i,b]),D=t.useMemo((()=>function(e,t){return C?C(e):d.jsx(d.Fragment,{children:d.jsx(B,{title:e?.getName(),avatarURL:e?.getAvatar(),avatarName:e?.getName(),listItemStyle:er(m,l),avatarStyle:$o(m,a),hideSeparator:!0,onClick:t=>A?.(e),subtitleView:w(e),tailView:f(e)})})}),[C,m,l,a,w,f,A]);return d.jsx(d.Fragment,{children:d.jsxs("div",{style:or(m,c),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 20px",alignItems:"center",marginBottom:"10px"},children:[p?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(q,{iconURL:r,buttonStyle:Xo(m,c),onClick:p?.()})}):null,d.jsx("div",{style:rr(m,c),children:o})]}),d.jsx(T,{hideSearch:!0,list:x()||[],listItem:D,listItemKey:"getUid",listStyle:qo(m,c),state:n.States.loaded,showSectionHeader:!1})]})})};function ar(e,t){return new r.ListStyle({height:"90%",titleTextFont:t?.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t?.titleColor||e.palette.getAccent()})}function lr(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",titleFont:t?.titleFont||n.fontHelper(e.typography.title2),titleColor:t?.titleColor||e.palette.getAccent(),border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function cr(e,t){return{display:"flex",color:t?.recordingDurationColor||e.palette.getAccent600(),font:t?.recordingDurationFont||n.fontHelper(e.typography.caption1)}}function Cr(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),background:"transparent"}}function dr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function gr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.downloadIconTint||e.palette.getPrimary()}}function ur(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function pr(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}ir.defaultProps=sr;const hr={title:n.localize("RECORDING"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",downloadIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",hideDownloadButton:!1,call:void 0,datePattern:n.DatePatterns.time,listItemStyle:{},callLogRecordingsStyle:{},onBackClick:void 0,onItemClick:void 0,onDownloadClick:void 0,listItemView:null,subtitleView:null,tailView:null},mr=e=>{const{title:o,backIconUrl:r,downloadIconUrl:s,hideDownloadButton:i,call:a,datePattern:l,listItemStyle:c,callLogRecordingsStyle:C,onBackClick:g,onItemClick:u,onDownloadClick:p,listItemView:h,subtitleView:m,tailView:A}=e,{theme:x}=t.useContext(R),b=t.useCallback((e=>{u&&u(e)}),[u]),y=t.useCallback((e=>{var t;p?p(e):(t=e?.getRecordingURL(),fetch(t).then((e=>e.blob())).then((e=>{const t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download="recording.mp4",document.body.appendChild(n),n.click()})).catch((e=>console.error(e))))}),[p]),w=t.useCallback((()=>{try{return a?.getRecordings()}catch(e){console.log(e)}}),[a]),f=e=>{try{return e?.getStartTime()}catch(e){console.log(e)}},D=e=>{try{return function(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.floor(e%3600%60);let r="",s="",i="";return t>0&&(r=`${t}h`),n>0&&(s=`${n}m`),o>=0&&(i=`${o}s`),`${r} ${s} ${i}`}(e?.getDuration())}catch(e){console.log(e)}},E=t.useCallback((e=>m?m(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:cr(x,C),children:D(e)})})),[m,x,C]),v=t.useCallback((e=>A?A(e):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(Cr(x,C)),pattern:l,timestamp:f(e)}),i?null:d.jsx(q,{iconURL:s,buttonStyle:gr(x,C),onClick:()=>y(e)})]})})),[A,x,C,l,i,s,y]),I=t.useMemo((()=>function(e,t){return h?h(e):d.jsx(d.Fragment,{children:d.jsx(B,{title:e?.getRid(),listItemStyle:lr(x,c),hideSeparator:!0,onClick:t=>b?.(e),subtitleView:E(e),tailView:v(e)})})}),[h,x,c,E,v,b]);return d.jsx(d.Fragment,{children:d.jsxs("div",{style:ur(x,C),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 20px",alignItems:"center",marginBottom:"10px"},children:[g?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(q,{iconURL:r,buttonStyle:dr(x,C),onClick:g?.()})}):null,d.jsx("div",{style:pr(x,C),children:o})]}),d.jsx(T,{hideSearch:!0,list:w()||[],listItem:I,listItemKey:"getRid",listStyle:ar(x,C),state:n.States.loaded,showSectionHeader:!1})]})})};mr.defaultProps=hr;const Ar={title:n.localize("CALL_DETAIL"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onBackClick:void 0,avatarStyle:{},data:(e,t,n)=>[],callLogHistoryConfiguration:{},callLogParticipantsConfiguration:{},callLogRecordingsConfiguration:{},callLogDetailsStyle:{}},xr=e=>{const{title:r,backIconUrl:s,call:i,onBackClick:a,avatarStyle:l,data:c,callLogHistoryConfiguration:C,callLogParticipantsConfiguration:g,callLogRecordingsConfiguration:u,callLogDetailsStyle:p}=e,{theme:h}=t.useContext(R),[m,A]=t.useState(null),[x,b]=t.useState([]),[y,w]=t.useState(!1),[f,D]=t.useState(!1),[E,v]=t.useState(!1),I=t.useCallback((()=>({...new o.AvatarStyle(S(h)),...l})),[l,h]),S=e=>({borderRadius:"24px",width:"50px",height:"50px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorder:"",outerViewBorderSpacing:""}),F=t.useCallback((()=>{let e=c?.(i,m,h);e&&e.length||(e=jo.getDefaultCallTemplate(i,m,h)),b([...e])}),[b,i,m,h]),k=t.useCallback((e=>{const{options:t,id:n}=e;let o=[];if(t&&void 0!==n){const e=yo(i,m);o=e?.getUid?t(e,null,n):t(null,e,n)}return o}),[i,m]),T=t.useCallback((e=>{if(e?.onClick)e.onClick(i);else switch(e.id){case"participants":w(!0);break;case"recordings":D(!0);break;case"callHistory":v(!0)}}),[i,w,D,v]),M=t.useCallback((()=>m&&!y&&!f&&!E),[m,y,f,E]),L=t.useCallback((()=>m&&y&&!f&&!E),[m,y,f,E]),U=t.useCallback((()=>m&&!y&&f&&!E),[m,y,f,E]),P=t.useCallback((()=>m&&!y&&!f&&E),[m,y,f,E]),O=t.useCallback((()=>{w(!1),D(!1),v(!1)}),[w,D,v]),j=t.useCallback((()=>{const e=yo(i,m);return e?.getUid?e:void 0}),[i,m]),V=t.useCallback((()=>{const e=yo(i,m);return e?.getGuid?e:void 0}),[i,m]),G=t.useCallback((()=>d.jsx(d.Fragment,{children:x.map((e=>d.jsxs("div",{children:[k(e).map((t=>{const n={backgroundColor:t.backgroundColor,titleColor:t.titleColor,titleFont:t.titleFont};return d.jsx("div",{children:d.jsx("div",{style:{width:"100%"},className:"cc-call-details__options",children:t.customView?d.jsx("div",{className:"cc-call-details__option-content",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},onClick:()=>T(t),children:t.customView}):d.jsx(B,{title:t.title,avatarURL:t.iconURL,onClick:()=>T(t),listItemStyle:Oo(h,n),hideSeparator:e.hideItemSeparator,avatarStyle:new o.AvatarStyle({backgroundColor:t.iconTint}),id:t.id,tailView:t.tail},t.id)},t?.id)})})),e.title]})))})),[x,k,T]);return function(e,n,o,r){t.useEffect((()=>{Zn.getLoggedinUser().then((e=>{n(e)}))}),[n]),t.useEffect((()=>{e&&r?.()}),[e,o])}(m,A,i,F),d.jsx(d.Fragment,{children:d.jsxs("div",{style:Ro(h,p),children:[M()?d.jsxs("div",{children:[a?d.jsxs("div",{style:{position:"absolute",top:"15px",left:"15px",display:"flex",gap:"8px",justifyContent:"center"},children:[d.jsx(q,{iconURL:s,buttonStyle:Uo(h,p),onClick:a?.()}),d.jsx("div",{style:Po(h,p),children:r})]}):null,d.jsxs("div",{style:{height:"auto",width:"100%",minHeight:"150px",padding:"16px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",boxSizing:"border-box",gap:"8px"},children:[d.jsx("cometchat-avatar",{avatarStyle:JSON.stringify(I()),image:yo(i,m).avatar,name:yo(i,m).name}),d.jsx("span",{style:((e,t)=>({color:t?.nameTextColor||e.palette.getAccent(),font:t?.nameTextFont||n.fontHelper(e.typography.title1)}))(h,p),children:yo(i,m).name})]}),G()]}):null,L()?d.jsx(ir,{call:i,title:n.localize("PARTICIPANTS"),backIconUrl:g?.backIconUrl||s,avatarStyle:g?.avatarStyle||l,onBackClick:()=>g?.onBackClick||O,onItemClick:g?.onItemClick||void 0,datePattern:g?.datePattern||void 0,listItemStyle:g?.listItemStyle||void 0,callLogParticipantsStyle:g?.callLogParticipantsStyle||void 0,listItemView:g?.listItemView||null,subtitleView:g?.subtitleView||null,tailView:g?.tailView||null}):null,U()?d.jsx(mr,{call:i,title:n.localize("RECORDING"),backIconUrl:u?.backIconUrl||s,onBackClick:()=>u?.onBackClick||O,onItemClick:u?.onItemClick||void 0,datePattern:u?.datePattern||void 0,listItemStyle:u?.listItemStyle||void 0,callLogRecordingsStyle:u?.callLogRecordingsStyle||void 0,downloadIconUrl:u?.downloadIconUrl||void 0,hideDownloadButton:u?.hideDownloadButton||void 0,onDownloadClick:u?.onDownloadClick||void 0,listItemView:u?.listItemView||null,subtitleView:u?.subtitleView||null,tailView:u?.tailView||null}):null,P()?d.jsx(Zo,{callUser:j(),callGroup:V(),title:n.localize("CALL_HISTORY"),backIconUrl:C?.backIconUrl||s,listItemStyle:C?.listItemStyle||void 0,emptyStateView:C?.emptyStateView||null,errorStateView:C?.errorStateView||null,loadingIconURL:C?.loadingIconURL||void 0,loadingStateView:C?.loadingStateView||null,subtitleView:C?.subtitleView||void 0,tailView:C?.tailView||null,callLogRequestBuilder:C?.callLogRequestBuilder||null,onItemClick:C?.onItemClick||void 0,onBackClick:()=>C?.onBackClick||O,datePattern:C?.datePattern||void 0,dateSeparatorPattern:C?.dateSeparatorPattern||void 0,callLogHistoryStyle:C?.callLogHistoryStyle||void 0,onError:C?.onError||void 0}):null]})})};function br(e,t){return{height:t?.height||"100%",width:t?.width||"100%",border:t?.border||"none",borderRadius:t?.borderRadius||"0px",background:t?.background||e.palette.getBackground(),display:"flex",boxSizing:"border-box",position:"relative"}}function yr(e,t){return new o.LabelStyle({background:"transparent",textFont:t?.messageTextFont||n.fontHelper(e.typography.heading),textColor:t?.messageTextColor||e.palette.getAccent700()})}xr.defaultProps=Ar;const wr={isMobileView:!1,messageText:n.localize("NO_CALLS_SELECTED"),withDetailsStyle:{},callLogDetailsConfiguration:{},callLogsConfiguration:{}},fr=e=>{const{isMobileView:o,messageText:r,withDetailsStyle:s,callLogDetailsConfiguration:i,callLogsConfiguration:a}=e,{theme:l}=t.useContext(R),[c,C]=t.useState(null),g=t.useCallback((e=>{C(e)}),[C]),u=t.useCallback((()=>o?{width:"100%",display:c?"none":"block"}:{width:"280px",minWidth:"max(25%, 280px)"}),[o,c]),p=t.useCallback((()=>o?{width:"100%",display:c?"block":"none"}:{width:"calc(100% - 280px)"}),[o,c]),h=t.useCallback((()=>{C(null)}),[C]);return function(e,n,o,r,s){t.useEffect((()=>{if(e.callLogDetailsStyle={...e.callLogDetailsStyle,border:`1px solid ${s?.palette?.getAccent100()}`},r){const t=()=>{o(null)};e.onBackClick=t}}),[e,r,o]),t.useEffect((()=>{n.callLogsStyle={...n.callLogsStyle,border:`1px solid ${s?.palette?.getAccent100()}`}}),[n])}(i,a,C,o,l),d.jsxs("div",{style:br(l,s),children:[d.jsx("div",{style:u(),children:d.jsx(Lo,{title:n.localize("CALLS"),onInfoClick:a?.onInfoClick||g,activeCall:c,titleAlignment:a?.titleAlignment,listItemView:a?.listItemView,subtitleView:a?.subtitleView,tailView:a?.tailView,emptyStateView:a?.emptyStateView,errorStateView:a?.errorStateView,loadingIconURL:a?.loadingIconURL,loadingStateView:a?.loadingStateView,callLogRequestBuilder:a?.callLogRequestBuilder,onItemClick:a?.onItemClick||void 0,onError:a?.onError||void 0,listItemStyle:a?.listItemStyle,infoIconUrl:a?.infoIconUrl,datePattern:a?.datePattern,dateSeparatorPattern:a?.dateSeparatorPattern,incomingAudioCallIconUrl:a?.incomingAudioCallIconUrl,incomingVideoCallIconUrl:a?.incomingVideoCallIconUrl,outgoingAudioCallIconUrl:a?.outgoingAudioCallIconUrl,outgoingVideoCallIconUrl:a?.outgoingVideoCallIconUrl,missedAudioCallIconUrl:a?.missedAudioCallIconUrl,missedVideoCallIconUrl:a?.missedVideoCallIconUrl,callLogsStyle:a?.callLogsStyle,avatarStyle:a?.avatarStyle,hideSeparator:a?.hideSeparator,outgoingCallConfiguration:a?.outgoingCallConfiguration})}),d.jsx("div",{style:p(),children:c?d.jsx(xr,{title:n.localize("CALL_DETAIL"),call:c,onBackClick:()=>i?.onBackClick||h,backIconUrl:i?.backIconUrl,avatarStyle:i?.avatarStyle,data:i?.data||void 0,callLogHistoryConfiguration:i?.callLogHistoryConfiguration,callLogParticipantsConfiguration:i?.callLogParticipantsConfiguration,callLogRecordingsConfiguration:i?.callLogRecordingsConfiguration,callLogDetailsStyle:i?.callLogDetailsStyle}):d.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%"},children:d.jsx("cometchat-label",{text:r,labelStyle:JSON.stringify(yr(l,s))})})})]})};function Dr(e,t){return{position:"relative",width:e?.width||"100%",height:e?.height||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"0",boxShadow:e?.boxShadow,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:e?.padding||"0",overflow:"hidden"}}function Er(e,t){return new r.UsersStyle({width:"100%",height:"100%",border:"none",borderRadius:"0",background:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.title1),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.title1),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),onlineStatusColor:e?.onlineStatusColor||t.palette.getSuccess(),separatorColor:e?.separatorColor||t.palette.getAccent50(),searchIconTint:e?.searchIconTint||t.palette.getAccent400(),searchBorder:e?.searchBorder||`1px solid ${t.palette.getAccent50()}`,searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent400(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),sectionHeaderTextFont:e?.sectionHeaderTextFont,sectionHeaderTextColor:e?.sectionHeaderTextColor})}function vr(e,t){return{background:e?.addMembersButtonBackground||t.palette.getPrimary(),buttonTextColor:e?.addMembersButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.addMembersButtonTextFont||n.fontHelper(t.typography.title2),width:"100%",border:"none",borderRadius:"8px",padding:"16px 0",display:"flex",justifyContent:"center",textAlign:"center"}}function Ir(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",left:"19px",top:"19px"}}function Sr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",top:"19px",right:"19px"}}fr.defaultProps=wr;var Fr="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",kr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Tr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Mr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Br(e){const{backButtonIconURL:o=Tr,showBackButton:i=!1,onBack:a,title:l=n.localize("ADD_MEMBERS"),titleAlignment:c=n.TitleAlignment.center,hideSearch:C=!1,searchIconURL:g=Fr,searchPlaceholder:u=n.localize("SEARCH"),showSectionHeader:p=!1,sectionHeaderField:h="getName",loadingIconURL:m=kr,loadingStateView:x,emptyStateText:y=n.localize("NO_USERS_FOUND"),emptyStateView:w,errorStateText:f=n.localize("SOMETHING_WRONG"),errorStateView:D,hideError:E=!1,disableUsersPresence:v=!1,hideSeparator:I=!1,onError:S,menus:F,options:k,selectionMode:T=n.SelectionMode.multiple,onSelect:M,usersRequestBuilder:B,searchRequestBuilder:L,listItemView:U,subtitleView:P,group:O,onAddMembersButtonClick:j=null,buttonText:V=n.localize("ADD_MEMBERS"),closeButtonIconURL:H=Mr,onClose:Q,statusIndicatorStyle:N,avatarStyle:K,listItemStyle:z,addMembersStyle:J=null}=e,Y=t.useRef([]),_=t.useRef(T),W=t.useRef(null),Z=A(M),X=A(O),$=A(a),ee=A(j),te=b(S),{theme:ne}=t.useContext(R),oe=t.useCallback((e=>{const t=new s.CometChat.GroupMember(e.getUid(),n.CometChatUIKitConstants.groupMemberScope.participant);return t.setName(e.getName()),t.setGuid(X.current.getGuid()),t}),[X]),re=t.useCallback(((e,t)=>{if(Z.current)return Z.current(e,t);if(_.current===n.SelectionMode.single)Y.current=[oe(e)];else if(_.current===n.SelectionMode.multiple){const t=e.getUid(),n=[];let o=!1;for(let e=0;e{const i=new s.CometChat.Action(o.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return i.setAction(n.CometChatUIKitConstants.groupMemberAction.ADDED),i.setActionBy(r.CometChatUIKitUtility.clone(t)),i.setActionFor(r.CometChatUIKitUtility.clone(o)),i.setActionOn(r.CometChatUIKitUtility.clone(e)),i.setReceiver(r.CometChatUIKitUtility.clone(o)),i.setSender(r.CometChatUIKitUtility.clone(t)),i.setConversationId("group_"+o.getGuid()),i.setMuid(r.CometChatUIKitUtility.ID()),i.setMessage(`${t.getName()} added ${e.getUid()}`),i.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),i}),[]),ie=t.useCallback((async()=>{if(0!==Y.current.length)try{const e=X.current,t=ee.current;if(t)return t(e.getGuid(),Y.current),void(Y.current=[]);const o=new Set,i=await s.CometChat.addMembersToGroup(e.getGuid(),Y.current,[]);if(i)for(const e in i)"success"===i[e]&&o.add(e);const a=[];for(let e=0;ese(e,l,t))),usersAdded:a,userAddedIn:t,userAddedBy:r.CometChatUIKitUtility.clone(l)})}Y.current=[],$.current?.()}catch(e){te(e)}}),[te,se,X,ee,$]);return function(e){const{loggedInUserRef:n,errorHandler:o,selectionMode:r,selectionModeRef:i,membersToAddRef:a}=e;t.useEffect((()=>{i.current!==r&&(i.current=r,a.current=[])}),[r,a,i]),t.useEffect((()=>{(async()=>{try{n.current=await s.CometChat.getLoggedinUser()}catch(e){o(e)}})()}),[o,n])}({loggedInUserRef:W,errorHandler:te,selectionMode:T,selectionModeRef:_,membersToAddRef:Y}),d.jsxs("div",{className:"cc-add-members",style:Dr(J,ne),children:[d.jsx(G,{title:l,tileAlignment:c,hideSearch:C,searchIconURL:g,searchPlaceholderText:u,showSectionHeader:p,sectionHeaderKey:h,loadingIconURL:m,loadingStateView:x,emptyStateText:y,emptyStateView:w,errorStateText:f,errorStateView:D,hideError:E,disableUsersPresence:v,hideSeparator:I,onError:S,menus:F,options:k,selectionMode:T,onSelect:re,usersRequestBuilder:B,searchRequestBuilder:L,listItemView:U,subtitleView:P,statusIndicatorStyle:N,avatarStyle:K,listItemStyle:z,usersStyle:Er(J,ne),onItemClick:void 0,activeUser:void 0}),d.jsx("div",{className:"cc-add-members__add-btn-wrapper",style:{padding:"16px",boxSizing:"border-box"},children:d.jsx(q,{text:V,buttonStyle:vr(J,ne),onClick:ie})}),i?d.jsx(q,{iconURL:o,buttonStyle:Ir(J,ne),onClick:a}):null,d.jsx(q,{iconURL:H,buttonStyle:Sr(J,ne),onClick:Q})]})}function Lr(e,t){return{position:"relative",height:e?.height||"100%",width:e?.width||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"0",boxShadow:e?.boxShadow||"",padding:e?.padding||"0",boxSizing:"border-box"}}function Ur(e,t){return new r.ListStyle({width:"100%",height:"100%",background:"inherit",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),separatorColor:e?.separatorColor||t.palette.getAccent400()})}function Rr(e){return{...e||{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Pr(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"36px",height:e?.height||"36px",border:e?.border||"none",backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function Or(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function jr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",left:"19px",top:"19px"}}function Vr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",right:"19px",top:"19px"}}function Gr(e,t){return{border:"none",borderRadius:"0",buttonIconTint:e?.unbanIconTint||t.palette.getPrimary(),background:"transparent"}}function Hr(e){return new o.MenuListStyle({border:"none",borderRadius:"8px",background:e.palette.getBackground(),moreIconTint:e.palette.getPrimary(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${e.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground()})}var Qr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";class Nr{constructor(e){const{bannedMembersRequestBuilder:t,searchRequestBuilder:n,searchText:o,groupGuid:r,bannedMembersSearchText:i}=e;let a=t||new s.CometChat.BannedMembersRequestBuilder(r).setLimit(30);o&&n?(a=n,a.setSearchKeyword(o)):o&&!n&&t?(a=t,a.setSearchKeyword(o)):!o&&t&&n?(a=t,a.setSearchKeyword(i.current)):o||!t||n?o||t||!n?a.setSearchKeyword(o):a.setSearchKeyword(i.current):(a=t,a.setSearchKeyword(i.current)),this.bannedMembersRequest=a.build()}fetchNext(){return this.bannedMembersRequest.fetchNext()}static createGroupMemberFromUser(e,t){const n=new s.CometChat.GroupMember(e.getUid());return n.setName(e.getName()),n.setAvatar(e.getAvatar()),n.setGuid(t.getGuid()),n}static attachSDKGroupListener(e,t){const n="BannedMembers_GroupListener_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberBanned:(n,o,r,s)=>{e.current.getGuid()===s.getGuid()&&t({type:"addMember",member:Nr.createGroupMemberFromUser(o,e.current)})},onGroupMemberUnbanned:(n,o,r,s)=>{e.current.getGuid()===s.getGuid()&&t({type:"removeBannedMemberIfPresent",bannedMemberUid:o.getUid()})}})),()=>s.CometChat.removeGroupListener(n)}static attachSDKUserListener(e){const t="BannedMembers_UserListener_"+String(Date.now()),n=t=>e({type:"updateMemberStatusIfPresent",member:t});return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:n,onUserOffline:n})),()=>s.CometChat.removeUserListener(t)}}var Kr,zr="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",Jr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Yr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function _r(e,t){let n=e;const{type:o}=t;switch(o){case"setSearchText":n={...e,searchText:t.searchText};break;case"setFetchState":n={...e,fetchState:t.fetchState};break;case"appendBannedMembers":{const{bannedMembers:o}=t;0!==o.length&&(n={...e,bannedMembers:[...e.bannedMembers,...o]});break}case"setBannedMembers":n={...e,bannedMembers:t.bannedMembers};break;case"removeBannedMemberIfPresent":{const{bannedMembers:o}=e,r=t.bannedMemberUid,s=o.findIndex((e=>e.getUid()===r));s>-1&&(n={...e,bannedMembers:o.filter(((e,t)=>t!==s))});break}case"addMember":n={...e,bannedMembers:[...e.bannedMembers,t.member]};break;case"updateMemberStatusIfPresent":{const{member:o}=t,{bannedMembers:r}=e,s=o.getUid(),i=r.findIndex((e=>e.getUid()===s));i>-1&&(n={...e,bannedMembers:r.map(((e,t)=>(t===i&&e.setStatus(o.getStatus()),e)))});break}}return n}function Wr(e){const{backButtonIconURL:o=Yr,showBackButton:r=!1,onBack:i,menus:a=null,title:l=n.localize("BANNED_MEMBERS"),titleAlignment:c=n.TitleAlignment.center,searchPlaceholder:C=n.localize("SEARCH"),searchIconURL:g=zr,hideSearch:u=!0,loadingIconURL:p=Jr,loadingStateView:h,emptyStateText:m=n.localize("NO_BANNED_MEMBERS_FOUND"),emptyStateView:x,errorStateText:w=n.localize("SOMETHING_WRONG"),errorStateView:f,onError:D,group:E,bannedMembersRequestBuilder:v=null,searchRequestBuilder:I=null,listItemView:S=null,hideSeparator:F=!1,disableUsersPresence:k=!0,closeButtonIconURL:M=Qr,onClose:P,subtitleView:O=null,options:j=null,selectionMode:V=n.SelectionMode.none,unbanIconURL:G=Qr,onItemClick:H=null,onSelect:Q=null,hideError:N=!1,statusIndicatorStyle:K=null,avatarStyle:z=null,bannedMemberStyle:J=null,listItemStyle:Y=null}=e,[_,W]=t.useReducer(_r,{searchText:"",bannedMembers:[],fetchState:n.States.loading}),Z=t.useRef(null),X=t.useRef(""),$=b(D),ee=A(E),{theme:te}=t.useContext(R),ne=t.useRef(""),oe=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(ne.current="",W({type:"setSearchText",searchText:e}))}),[W]),re=t.useCallback((async e=>{if(Z.current){W({type:"setFetchState",fetchState:n.States.loading});try{const t=await Z.current.fetchNext();if(e!==X.current)return;0!==t.length&&W({type:"appendBannedMembers",bannedMembers:t}),W({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===X.current&&(W({type:"setFetchState",fetchState:n.States.error}),$(t))}}}),[$,W]),se=t.useCallback((async e=>{try{await s.CometChat.unbanGroupMember(ee.current.getGuid(),e.getUid()),W({type:"removeBannedMemberIfPresent",bannedMemberUid:e.getUid()})}catch(e){$(e)}}),[W,$,ee]);function ie(e){return k||e.getStatus()===n.CometChatUIKitConstants.userStatusType.offline?null:J?.onlineStatusColor||te.palette.getSuccess()||"rgb(0, 200, 111)"}function ae(e){const t=j?.(e);return t?.length?d.jsx(L,{data:t,menuListStyle:Hr(te),onOptionClick:e=>{const{onClick:t}=e.detail.data;t?.()}}):null}function le(e){switch(V){case n.SelectionMode.none:return d.jsx(q,{iconURL:G,onClick:()=>se(e),hoverText:n.localize("UNBAN"),buttonStyle:Gr(J,te)});case n.SelectionMode.single:return d.jsx(U,{onChange:t=>Q?.(e,t.detail.checked)});case n.SelectionMode.multiple:return d.jsx(y,{onChange:t=>Q?.(e,t.detail.checked)});default:return null}}return function(e){const{bannedMembersManagerRef:o,groupGuid:r,searchText:s,bannedMembersRequestBuilder:i,searchRequestBuilder:a,dispatch:l,fetchNextAndAppendBannedMembers:c,fetchNextIdRef:C,groupPropRef:d,bannedMembersSearchText:g}=e;t.useEffect((()=>{i?.searchKeyword?g.current=i?.searchKeyword:a?.searchKeyword&&(g.current=a?.searchKeyword)}),[]),t.useEffect((()=>{o.current=new Nr({groupGuid:r,bannedMembersRequestBuilder:i,searchRequestBuilder:a,searchText:s,bannedMembersSearchText:g}),l({type:"setBannedMembers",bannedMembers:[]}),c(C.current="initialFetchNext_"+String(Date.now()))}),[r,i,a,s,c,l,o,C]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{const{kickedFrom:t,kickedUser:n}=e;t.getGuid()===d.current.getGuid()&&l({type:"addMember",member:Nr.createGroupMemberFromUser(n,t)})})),t=n.CometChatGroupEvents.ccGroupMemberUnbanned.subscribe((e=>{const{unbannedFrom:t,unbannedUser:n}=e;t.getGuid()===d.current.getGuid()&&l({type:"removeBannedMemberIfPresent",bannedMemberUid:n.getUid()})}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[l,d]),t.useEffect((()=>Nr.attachSDKGroupListener(d,l)),[l,d]),t.useEffect((()=>Nr.attachSDKUserListener(l)),[l])}({groupGuid:E.getGuid(),searchText:_.searchText,bannedMembersRequestBuilder:v,searchRequestBuilder:I,bannedMembersManagerRef:Z,dispatch:W,fetchNextAndAppendBannedMembers:re,fetchNextIdRef:X,groupPropRef:ee,bannedMembersSearchText:ne}),d.jsxs("div",{className:"cc-banned-members",style:Lr(J,te),children:[d.jsxs("div",{className:"cc-banned-members__list-wrapper",style:{position:"relative",height:"100%"},children:[null===a?null:d.jsx("div",{className:"cc-banned-members__menus",style:{position:"absolute",right:"12px",top:"8px",cursor:"pointer"},children:a}),d.jsx(T,{title:l,titleAlignment:c,searchPlaceholderText:C,searchIconURL:g,searchText:_.searchText,onSearch:oe,hideSearch:u,list:_.bannedMembers,listItemKey:"getUid",listItem:S||function(e){return d.jsx(B,{id:e.getUid(),title:e.getName(),avatarURL:e.getAvatar(),avatarName:e.getName(),statusIndicatorColor:ie(e),hideSeparator:F,statusIndicatorStyle:Rr(K),avatarStyle:Pr(z,te),listItemStyle:Or(Y,J,te),subtitleView:O?.(e),subtitleViewClassName:"cc-banned-members__subtitle-view",menuView:ae(e),menuViewClassName:"cc-banned-members__options-view",tailView:le(e),tailViewClassName:"cc-banned-members__tail-view",onClick:t=>H?.(e)})},showSectionHeader:!1,onScrolledToBottom:()=>re(X.current="onScrolledToBottom_"+String(Date.now())),state:_.fetchState===n.States.loaded&&0===_.bannedMembers.length?n.States.empty:_.fetchState,loadingIconURL:p,emptyStateText:m,errorStateText:w,loadingView:h,emptyStateView:x,errorStateView:f,hideError:N,listStyle:Ur(J,te)})]}),r?d.jsx(q,{iconURL:o,buttonStyle:jr(J,te),onClick:i}):null,d.jsx(q,{iconURL:M,buttonStyle:Vr(J,te),onClick:P})]})}function Zr(e,t){return{width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent400()}`,borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),boxShadow:e?.boxShadow||"",position:"relative",boxSizing:"border-box"}}function Xr(e,t){return new o.ConfirmDialogStyle({confirmButtonBackground:e?.confirmButtonBackground||t.palette.getError(),cancelButtonBackground:e?.cancelButtonBackground||t.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||t.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(t.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||t.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(t.typography.text2),titleFont:e?.titleFont||n.fontHelper(t.typography.title1),titleColor:e?.titleColor||t.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(t.typography.subtitle2),messageTextColor:e?.messageTextColor||t.palette.getAccent600(),background:e?.background||t.palette.getBackground(),height:e?.height||"auto",width:e?.width||"auto",border:e?.border||"none",borderRadius:e?.borderRadius||"12px",boxShadow:e?.boxShadow||`0 0 1px 1px ${t.palette.getAccent50()}`})}function qr(e,t){return new r.ListStyle({background:"inherit",width:"100%",height:"100%",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),separatorColor:e?.separatorColor||t.palette.getAccent400(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600()})}function $r(e,t){return new o.AvatarStyle({width:e?.width||"36px",height:e?.height||"36px",borderRadius:e?.borderRadius||"24px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),backgroundSize:e?.backgroundSize||"cover",outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function es(e){return{...null!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function ts(e,t,r){return new o.ListItemStyle({height:e?.height||"auto",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||r.palette.getAccent100(),borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent(),border:e?.border||"none",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),hoverBackground:e?.hoverBackground||r.palette.getAccent50()})}function ns(e,t){return new o.BadgeStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle2),textColor:e?.textColor||t.palette.getAccent("dark"),background:e?.background||t.palette.getPrimary(),borderRadius:e?.borderRadius||"16px",width:e?.width||"24px",height:e?.height||"16px",border:e?.border||"none"})}function os(e,t){return new o.LabelStyle({background:"transparent",textFont:e?.threadIndicatorTextFont||n.fontHelper(t.typography.caption2),textColor:e?.threadIndicatorTextColor||t.palette.getAccent400()})}function rs(e){return new o.IconStyle({width:"24px",height:"24px",iconTint:e.palette.getAccent400()})}function ss(e,t){return new o.ReceiptStyle({waitIconTint:e?.waitIconTint||t.palette.getAccent700(),sentIconTint:e?.sentIconTint||t.palette.getAccent600(),deliveredIconTint:e?.deliveredIconTint||t.palette.getAccent600(),readIconTint:e?.readIconTint||t.palette.getPrimary(),errorIconTint:e?.errorIconTint||t.palette.getError(),height:e?.height||"20px",width:e?.width||"20px",border:e?.border||"none",borderRadius:e?.borderRadius||"inherit",background:e?.background||"inherit"})}function is(e,t,o,r){const i=e.getConversationWith(),a=i instanceof s.CometChat.User?i.getUid():i.getGuid();return void 0!==t.get(a)?{font:o?.typingIndictorTextFont||n.fontHelper(r.typography.subtitle2),color:o?.typingIndictorTextColor||r.palette.getSuccess()||"",width:"100%",overflow:"hidden",textOverflow:"ellipsis"}:{font:o?.lastMessageTextFont||n.fontHelper(r.typography.subtitle2),color:o?.lastMessageTextColor||r.palette.getAccent600()||"",width:"100%",overflow:"hidden",textOverflow:"ellipsis"}}function as(e){return new o.MenuListStyle({width:"",height:"",border:"none",borderRadius:"8px",background:"transparent",moreIconTint:"grey",submenuWidth:"70px",submenuHeight:"20px",submenuBorder:"1px solid #e8e8e8",submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground()})}function ls(e,t){const r=null!==e?e:{};return{...new o.DateStyle({textFont:e?.textFont||n.fontHelper(t.typography.caption2),textColor:e?.textColor||t.palette.getAccent600(),background:"transparent"}),...r}}function cs(e,t){return{width:e?.width||t?.width,height:e?.height||t?.height,background:e?.background||"rgba(0, 0, 0, 0.5)",border:e?.border,borderRadius:e?.borderRadius,position:"absolute"}}class Cs{constructor(e){const{conversationsRequestBuilder:t}=e,n=t||(new s.CometChat.ConversationsRequestBuilder).setLimit(Kr.limit);this.conversationsRequest=n.build(),t&&(Kr.conversationType=t.build().getConversationType())}fetchNext(){return this.conversationsRequest.fetchNext()}static attachUserListener(e){const t="ConversationList_User_"+String(Date.now());return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e})),()=>s.CometChat.removeUserListener(t)}static attachGroupListener(e,t){const n="ConversationList_Group_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberJoined:t=>{e(t)},onGroupMemberLeft:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberKicked:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberBanned:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberUnbanned:t=>{e(t)},onMemberAddedToGroup:t=>{e(t)},onGroupMemberScopeChanged:t=>{e(t)}})),()=>s.CometChat.removeGroupListener(n)}static attachMessageReceivedListener(e){const t=n.CometChatMessageEvents.onTextMessageReceived.subscribe((t=>{e(t)})),o=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((t=>{e(t)})),r=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((t=>{e(t)})),s=n.CometChatMessageEvents.onFormMessageReceived.subscribe((t=>{e(t)})),i=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((t=>{e(t)})),a=n.CometChatMessageEvents.onCardMessageReceived.subscribe((t=>{e(t)})),l=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((t=>{e(t)}));return()=>{t?.unsubscribe(),o?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe()}}static attachMessageReceiptListener(e){const t=n.CometChatMessageEvents.onMessagesRead.subscribe((t=>{e(t,!0)})),o=n.CometChatMessageEvents.onMessagesDelivered.subscribe((t=>{e(t,!1)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachMessageTypingListener(e){const t=n.CometChatMessageEvents.onTypingStarted.subscribe((t=>{e(t,!0)})),o=n.CometChatMessageEvents.onTypingEnded.subscribe((t=>{e(t,!1)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachMessageModifiedListener(e){const t=n.CometChatMessageEvents.onMessageEdited.subscribe((t=>{e(t)})),o=n.CometChatMessageEvents.onMessageDeleted.subscribe((t=>{e(t)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachCallListener(e){const t="ConversationList_Call_"+String(Date.now());return s.CometChat.addCallListener(t,new s.CometChat.CallListener({onIncomingCallReceived:e,onOutgoingCallAccepted:e,onOutgoingCallRejected:e,onIncomingCallCancelled:e})),()=>s.CometChat.removeCallListener(t)}static attachConnestionListener(e){const t="ConversationList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}static shouldIncrementForCustomMessage(e){const t=e.getMetadata();return e.willUpdateConversation()||t&&t.hasOwnProperty("incrementUnreadCount")&&t.incrementUnreadCount||Zn.conversationUpdateSettings?.shouldUpdateOnCustomMessages()}}Kr=Cs,Cs.limit=30,Cs.conversationType=void 0,Cs.shouldLastMessageAndUnreadCountBeUpdated=e=>{if(Kr.conversationType&&Kr.conversationType!=e.getReceiverType())return!1;let t=e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom;return!(e?.getParentMessageId()&&!Zn.conversationUpdateSettings?.shouldUpdateOnMessageReplies())&&(t?!!(e?.getParentMessageId()&&Zn.conversationUpdateSettings?.shouldUpdateOnMessageReplies()&&Kr.shouldIncrementForCustomMessage(e))||Kr.shouldIncrementForCustomMessage(e):e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action?e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember||Zn.conversationUpdateSettings?.shouldUpdateOnGroupActions():e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call||e.getType()!==n.CometChatUIKitConstants.MessageTypes.audio&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.video||Zn.conversationUpdateSettings?.shouldUpdateOnCallActivities())};var ds="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",gs="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",us="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",ps="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M17.6377%207L9.87922%2016.3095L6%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",hs="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ms="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",As="data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",xs="data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E";function bs(e){return e instanceof s.CometChat.TextMessage||e instanceof s.CometChat.MediaMessage||e instanceof s.CometChat.CustomMessage||e instanceof s.CometChat.InteractiveMessage||e instanceof s.CometChat.Action||e instanceof s.CometChat.Call}function ys(e,t){let o=e;const{type:i}=t;switch(i){case"appendConversations":if(t.conversations.length>0){let n=[];t.removeOldConversation?(e.conversationList=[],n=t.conversations):n=[...e.conversationList,...t.conversations],o={...e,conversationList:n}}break;case"setConversationList":{const{typingIndicatorMap:n}=e,{conversationList:r}=t,i=new Map;for(let e=0;ee.getConversationId()===i));if(a>-1){const t=r[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;n.has(i)?(l=new Map(n),l.delete(i)):l=n;const c=e.conversationList.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"updateConversationWithUser":{const{user:n}=t,{conversationList:i}=e,a=n.getUid(),l=i.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.User&&t?.getUid()===a}));if(l>-1){const t=i.map(((e,t)=>{if(t===l){const t=r.CometChatUIKitUtility.clone(e);return t.setConversationWith(n),t}return e}));o={...e,conversationList:t}}break}case"fromUpdateConversationListFn":{const{conversation:n}=t,r=n.getConversationId(),s=e.conversationList.filter((e=>e.getConversationId()!==r));o={...e,conversationList:[n,...s]};break}case"setLastMessageReadOrDeliveredAt":{const{conversationList:n}=e,{messageReceipt:i,updateReadAt:a}=t,l=i.getMessageId(),c=n.findIndex((e=>{if(e.getConversationWith()instanceof s.CometChat.User){const t=e.getLastMessage();if(bs(t)&&String(t.getId())===l)return a?!t.getReadAt():!t.getDeliveredAt()}return!1}));c>-1&&(o={...e,conversationList:n.map(((e,t)=>{if(t===c){const t=r.CometChatUIKitUtility.clone(e),n=t.getLastMessage();return bs(n)&&(a?(n.setReadAt(i.getReadAt()),t.setUnreadMessageCount(0)):n.setDeliveredAt(i.getDeliveredAt())),t}return e}))});break}case"addTypingIndicator":{const{typingIndicator:r}=t,i=r.getSender()?.getUid(),a=r.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group,l=r.getReceiverId();let c;const{conversationList:C,typingIndicatorMap:d}=e;for(let e=0;e{const t=e.getLastMessage();return bs(t)&&t.getId()===s}));a>-1&&(o={...e,conversationList:i.map(((e,t)=>{if(t===a){const t=r.CometChatUIKitUtility.clone(e);return t.setLastMessage(n),t}return e}))});break}case"updateConversationLastMessageAndGroupAndPlaceAtTheTop":{const{conversationList:n}=e,{group:s,message:i}=t,a=i.getConversationId();if(!Cs.shouldLastMessageAndUnreadCountBeUpdated(i))return e;const l=n.findIndex((e=>e.getConversationId()===a));if(l>-1){const t=r.CometChatUIKitUtility.clone(n[l]);t.setConversationWith(s),t.setLastMessage(i),o={...e,conversationList:[t,...n.filter(((e,t)=>t!==l))]}}break}case"removeConversationOfTheGroup":{const{conversationList:n,typingIndicatorMap:r}=e,i=t.group.getGuid(),a=n.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.Group&&t.getGuid()===i}));if(a>-1){const t=n[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;r.has(i)?(l=new Map(r),l.delete(i)):l=r;const c=n.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"removeConversationOfTheUser":{const{conversationList:n,typingIndicatorMap:r}=e,i=t.user.getUid(),a=n.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.User&&t?.getUid()===i}));if(a>-1){const t=n[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;r.has(i)?(l=new Map(r),l.delete(i)):l=r;const c=n.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop":{const{conversationList:n}=e,{message:s,conversation:i}=t,a=s.getConversationId();if(!Cs.shouldLastMessageAndUnreadCountBeUpdated(s))return e;const l=n.findIndex((e=>e.getConversationId()===a));if(l>-1){const t=r.CometChatUIKitUtility.clone(n[l]);t.setLastMessage(s),t.setUnreadMessageCount(0);const i=n.filter(((e,t)=>t!==l));o={...e,conversationList:[t,...i]}}else{i.setUnreadMessageCount(0);const t=[i,...n];o={...e,conversationList:t}}break}case"resetUnreadCountAndSetReadAtIfLastMessage":{const{conversationList:n}=e,{message:s}=t,i=s.getReadAt()||Date.now(),a=n.findIndex((e=>e.getConversationId()===s.getConversationId()));a>-1&&(o={...e,conversationList:n.map(((e,t)=>{if(t===a){const t=r.CometChatUIKitUtility.clone(e);return t.setUnreadMessageCount(0),t.getLastMessage()&&t.getLastMessage().setReadAt(i),t}return e}))});break}case"updateConversationLastMessageAndPlaceAtTheTop":{const{message:n}=t,s=n?.getId(),{conversationList:i}=e;if(!Cs.shouldLastMessageAndUnreadCountBeUpdated(n))return e;const a=i.findIndex((e=>{const t=e.getLastMessage();return bs(t)&&t.getId()===s}));if(a>-1){const t=r.CometChatUIKitUtility.clone(i[a]);t.setLastMessage(n),o={...e,conversationList:[t,...i.filter(((e,t)=>t!==a))]}}break}case"setLoggedInUser":o={...e,loggedInUser:t.loggedInUser};break;case"setIsFirstReload":o={...e,isFirstReload:t.isFirstReload}}return o}function ws(e){const{menus:o=null,title:i=n.localize("CHATS"),titleAlignment:a=n.TitleAlignment.left,conversationsRequestBuilder:l=null,onError:c,listItemView:C=null,subtitleView:g=null,disableUsersPresence:u=!1,hideSeparator:p=!1,activeConversation:h=null,selectionMode:m=n.SelectionMode.none,disableReceipt:w=!1,options:f=null,datePattern:D=n.DatePatterns.DayDateTime,protectedGroupIcon:E=ds,passwordGroupIcon:v,privateGroupIcon:I=hs,readIcon:S=us,deliveredIcon:F=gs,waitIcon:k=As,errorIcon:M=xs,sentIcon:P=ps,loadingIconURL:O=ms,loadingStateView:j,emptyStateText:V=n.localize("NO_CHATS_FOUND"),emptyStateView:G,errorStateText:H=n.localize("SOMETHING_WRONG"),errorStateView:Q,hideError:N=!1,onItemClick:K=null,onSelect:z=null,disableSoundForMessages:J=!1,disableTyping:Y=!1,customSoundForMessages:_=null,confirmDialogTitle:W=n.localize("DELETE_CONVERSATION"),confirmDialogMessage:Z=n.localize("WOULD__YOU_LIKE_TO_DELETE_THIS_CONVERSATION"),cancelButtonText:X=n.localize("CANCEL"),confirmButtonText:q=n.localize("DELETE"),conversationsStyle:$=null,deleteConversationDialogStyle:ee=null,avatarStyle:te=null,statusIndicatorStyle:ne=null,listItemStyle:oe=null,badgeStyle:re=null,receiptStyle:se=null,dateStyle:ie=null,backdropStyle:ae=null,disableMentions:le=!1,textFormatters:ce=[]}=e,[Ce,de]=t.useReducer(ys,{conversationList:[],fetchState:n.States.loading,typingIndicatorMap:new Map,conversationToBeDeleted:null,loggedInUser:null,isFirstReload:!1,unreadMentions:!1}),[ge,ue]=x(null),pe=t.useRef(null),he=t.useRef(""),me=b(c),Ae=A(_),{theme:xe}=t.useContext(R),be=t.useRef(!1),ye=t.useRef(!1);Ce.isFirstReload&&(be.current=!0,Ce.isFirstReload=!1);const we=t.useCallback((async e=>{const t=pe.current;if(!t)return;let o=ye.current?n.States.loaded:n.States.loading;de({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(0!==o.length&&he.current===e){let e=!!ye.current;de({type:"appendConversations",conversations:o,removeOldConversation:e})}be.current&&(Cs.attachConnestionListener((()=>{pe.current=new Cs({conversationsRequestBuilder:l}),ye.current=!0,we(he.current="initialFetchNext_"+String(Date.now()))})),be.current=!1),ye.current?ye.current=!1:de({type:"setFetchState",fetchState:n.States.loaded})}catch(e){Ce.conversationList.length<=0&&de({type:"setFetchState",fetchState:n.States.error}),me(e)}}),[me,de]),fe=t.useCallback((e=>{const t="metadata",n=e instanceof s.CometChat.CustomMessage&&e.willUpdateConversation(),o="incrementUnreadCount";let r;return t in e&&(r=e[t])&&(o in r||n)&&Boolean(r[o])}),[]),Ee=t.useCallback(((e,t)=>{const o=t||e.getLastMessage();if(!bs(o))return;if(!Cs.shouldLastMessageAndUnreadCountBeUpdated(o))return;const r=(o.getCategory()===n.CometChatUIKitConstants.MessageCategory.message||o.getCategory()===n.CometChatUIKitConstants.MessageCategory.call||o.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive||fe(o))&&o.getSender().getUid()!==Ce.loggedInUser?.getUid();if(e.setUnreadMessageCount((e.getUnreadMessageCount()??0)+Number(r)),o instanceof s.CometChat.Action&&o.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&e.getConversationType()===n.CometChatUIKitConstants.MessageReceiverType.group){if(o.getReceiver().getGuid()===o.getActionFor().getGuid()){let t=e.getConversationWith();t.setMembersCount(o.getActionFor().getMembersCount()),e.setConversationWith(t)}}e.setLastMessage(o),de({type:"fromUpdateConversationListFn",conversation:e})}),[de,Ce.loggedInUser,fe]),ve=t.useCallback((async(e,t=!1)=>{try{const n=Ce.conversationList.findIndex((t=>t.getConversationId()===e.getConversationId()));if(n>=0){const o=Ce.conversationList[n];t?de({type:"removeConversation",conversation:o}):Ee(o,e)}else s.CometChat.CometChatHelper.getConversationFromMessage(e).then((t=>{Ee(t,e)}))}catch(e){me(e)}}),[me,Ee,Ce.conversationList]),Ie=t.useCallback((async e=>{if(e.getSender().getUid()!==Ce.loggedInUser?.getUid()&&!w&&!e.getDeliveredAt())try{s.CometChat.markAsDelivered(e)}catch(e){me(e)}J||e.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom&&!fe(e)||h&&h.getConversationId()===e.getConversationId()||r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage,Ae.current),ve(e)}),[w,J,ve,me,Ce.loggedInUser,h,fe,Ae]),Se=t.useCallback(((e,t)=>{de({type:"setLastMessageReadOrDeliveredAt",updateReadAt:t,messageReceipt:e})}),[de]),Fe=t.useCallback(((e,t)=>{Ce.loggedInUser?.getUid()!==e.getSender()?.getUid()&&de(t?{type:"addTypingIndicator",typingIndicator:e}:{type:"removeTypingIndicator",typingIndicator:e})}),[Ce.loggedInUser]);function ke(e){const t=e.getConversationWith();return t instanceof s.CometChat.User?t.getAvatar():t.getIcon()}function Te(e){const t=e.getConversationWith();if(t instanceof s.CometChat.User)return u||t.getStatus()!==n.CometChatUIKitConstants.userStatusType.online?null:$?.onlineStatusColor||xe.palette.getSuccess()||"rgb(0, 200, 111)";switch(t.getType()){case n.CometChatUIKitConstants.GroupTypes.password:return $?.passwordGroupIconBackground||"rgb(247, 165, 0)";case n.CometChatUIKitConstants.GroupTypes.private:return $?.privateGroupIconBackground||xe.palette.getSuccess()||"rgb(0, 200, 111)";default:return null}}function Me(e){let t="";const o=e.getConversationWith();if(o instanceof s.CometChat.Group)switch(o.getType()){case n.CometChatUIKitConstants.GroupTypes.password:t=v||E;break;case n.CometChatUIKitConstants.GroupTypes.private:t=I}return t}function Be(e){const t=e.getLastMessage();return bs(t)&&t.getParentMessageId()?d.jsxs("div",{className:"cc-conversations__thread-view",style:{display:"flex",columnGap:"4px"},children:[d.jsx("cometchat-label",{text:n.localize("IN_A_THREAD"),labelStyle:JSON.stringify(os($,xe))}),d.jsx("cometchat-icon",{URL:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-corner-right-down%22%3E%3Cpolyline%20points%3D%2210%2015%2015%2020%2020%2015%22%3E%3C%2Fpolyline%3E%3Cpath%20d%3D%22M4%204h7a4%204%200%200%201%204%204v12%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",iconStyle:JSON.stringify(rs(xe))})]}):null}function Le(e){return function(e){const t=e.getLastMessage(),o=e.getConversationWith(),r=o instanceof s.CometChat.User?o?.getUid():o.getGuid();return!w&&bs(t)&&!t.getDeletedAt()&&t.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&t.getSender()?.getUid()===Ce.loggedInUser?.getUid()&&void 0===Ce.typingIndicatorMap.get(r)}(e)?d.jsx("cometchat-receipt",{receipt:r.MessageReceiptUtils.getReceiptStatus(e.getLastMessage()),waitIcon:k,sentIcon:P,errorIcon:M,deliveredIcon:F,readIcon:S,receiptStyle:JSON.stringify(ss(se,xe))}):null}function Ue(e){const t=e.getConversationWith(),o=t instanceof s.CometChat.Group?t.getGuid():t?.getUid(),r=Ce.typingIndicatorMap.get(o);if(void 0!==r)return t instanceof s.CometChat.Group?`${r.getSender().getName()} ${n.localize("IS_TYPING")}`:n.localize("IS_TYPING");if(Ce.loggedInUser){let t="";const o=e.getLastMessage();o&&o.getCategory()===n.CometChatUIKitConstants.MessageCategory.call&&(t=(o.getType()===n.CometChatUIKitConstants.MessageTypes.audio?"📞":"📹")+" ");let r=e.getLastMessage(),i=De.getDataSource().getLastConversationMessage(e,Ce.loggedInUser,{disableMentions:le,theme:xe,mentionsTargetElement:n.MentionsTargetElement.conversation,textFormattersList:ce});return r&&e?.getConversationType()!==s.CometChat.RECEIVER_TYPE.USER&&(i=(r?.getSender().getUid(),Ce.loggedInUser?.getUid(),`${i}`)),d.jsx("div",{dangerouslySetInnerHTML:{__html:t+i},style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})}return""}function Re(e){return d.jsx("div",{className:"cc-conversations__subtitle-text",style:is(e,Ce.typingIndicatorMap,$,xe),children:Ue(e)})}function Pe(e){return null!==g?d.jsx(d.Fragment,{children:g(e)}):d.jsxs(d.Fragment,{children:[Be(e),d.jsxs("div",{className:"cc-conversations__subtitle",style:{display:"flex",columnGap:"4px",alignItems:"center"},children:[Le(e),Re(e)]})]})}function Oe(e){de({type:"setConversationToBeDeleted",conversation:e})}function je(e,t){if(m!==n.SelectionMode.none)return null;let o;if(f)o=f?.(e);else{const s=r.ConversationUtils.getDefaultOptions();for(let o=0;oOe(e),s[o].iconTint=t.palette.getAccent600());o=s}return 0===o?.length?null:d.jsx(L,{data:o,menuListStyle:as(t),onOptionClick:e=>{const{onClick:t}=e.detail.data;t?.()}})}function Ve(e){switch(m){case n.SelectionMode.none:{const t=e.getLastMessage();return t?d.jsxs("div",{className:"cc-conversations__tail-content",style:{display:"flex",flexDirection:"column",alignItems:"flex-end"},children:[d.jsx("cometchat-date",{timestamp:t.getSentAt(),pattern:D,dateStyle:JSON.stringify(ls(ie,xe))}),d.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:d.jsx("cometchat-badge",{count:e.getUnreadMessageCount(),badgeStyle:JSON.stringify(ns(re,xe))})})]}):null}case n.SelectionMode.single:return d.jsx("div",{className:"cc-conversations__tail-content",children:d.jsx(U,{onChange:t=>z?.(e,t.detail.checked)})});case n.SelectionMode.multiple:return d.jsx("div",{className:"cc-conversations__tail-content",children:d.jsx(y,{onChange:t=>z?.(e,t.detail.checked)})});default:return null}}const Ge=e=>{const t=e.getConversationWith();if(t instanceof s.CometChat.User)return u||t.getStatus()!==n.CometChatUIKitConstants.userStatusType.online?null:es(ne);switch(t.getType()){case n.CometChatUIKitConstants.GroupTypes.private:case n.CometChatUIKitConstants.GroupTypes.password:return es(ne);default:return null}};return function(e){const{conversationsRequestBuilder:o,conversationsManagerRef:i,fetchNextAndAppendConversations:a,fetchNextIdRef:l,dispatch:c,confirmDialogElement:C,conversationToBeDeleted:d,errorHandler:g,refreshSingleConversation:u,onMessageReceived:p,setReceipts:h,setTypingIndicator:m,disableTyping:A,loggedInUser:x,isFirstReload:b}=e;t.useEffect((()=>{c({type:"setIsFirstReload",isFirstReload:!0}),i.current=new Cs({conversationsRequestBuilder:o}),c({type:"setConversationList",conversationList:[]}),a(l.current="initialFetchNext_"+String(Date.now()))}),[o,a,c,i,l]),t.useEffect((()=>{(async()=>{try{c({type:"setLoggedInUser",loggedInUser:await s.CometChat.getLoggedinUser()})}catch(e){g(e)}})()}),[g,c]),t.useEffect((()=>{if(null===C)return;const e="cc-confirm-clicked",t="cc-cancel-clicked";async function o(){if(d){const e=d.getConversationWith(),t=e instanceof s.CometChat.Group?e.getGuid():e.getUid();try{await s.CometChat.deleteConversation(t,d.getConversationType()),n.CometChatConversationEvents.ccConversationDeleted.next(r.CometChatUIKitUtility.clone(d)),c({type:"removeConversation",conversation:d}),c({type:"setConversationToBeDeleted",conversation:null})}catch(e){g(e)}}}function i(){c({type:"setConversationToBeDeleted",conversation:null})}return C.addEventListener(e,o),C.addEventListener(t,i),()=>{C.removeEventListener(e,o),C.removeEventListener(t,i)}}),[d,C,g,c]),t.useEffect((()=>Cs.attachUserListener((e=>c({type:"updateConversationWithUser",user:e})))),[c]),t.useEffect((()=>Cs.attachGroupListener(u,x)),[u,x]),t.useEffect((()=>Cs.attachMessageReceivedListener(p)),[p]),t.useEffect((()=>Cs.attachMessageModifiedListener((e=>{c({type:"updateConversationLastMessage",message:e})}))),[c]),t.useEffect((()=>Cs.attachMessageReceiptListener(h)),[h]),t.useEffect((()=>{if(!A)return Cs.attachMessageTypingListener(m)}),[A,m]),t.useEffect((()=>Cs.attachCallListener(u)),[u]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e.message})})),t=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{const t=e.messages[e.messages.length-1];t&&c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.userAddedIn,message:t})})),o=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.kickedFrom,message:e.message})})),i=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.kickedFrom,message:e.message})})),a=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{c({type:"removeConversationOfTheGroup",group:e})})),l=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{Cs.shouldLastMessageAndUnreadCountBeUpdated(e.message)&&c({type:"removeConversationOfTheGroup",group:e.leftGroup})})),C=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{c({type:"removeConversationOfTheUser",user:e})})),d=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{e.status===n.MessageStatus.success&&c({type:"updateConversationLastMessage",message:e.message})})),g=n.CometChatMessageEvents.ccMessageSent.subscribe((e=>{e.status===n.MessageStatus.success&&s.CometChat.CometChatHelper.getConversationFromMessage(e.message).then((t=>{c({type:"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop",message:e.message,conversation:t})}))})),u=n.CometChatMessageEvents.ccMessageDeleted.subscribe((e=>{c({type:"updateConversationLastMessage",message:r.CometChatUIKitUtility.clone(e)})})),p=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{c({type:"resetUnreadCountAndSetReadAtIfLastMessage",message:e})})),h=n.CometChatCallEvents.ccCallAccepted.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),m=n.CometChatCallEvents.ccOutgoingCall.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),A=n.CometChatCallEvents.ccCallRejected.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),x=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),C.unsubscribe(),d.unsubscribe(),g.unsubscribe(),u.unsubscribe(),p.unsubscribe(),h.unsubscribe(),m.unsubscribe(),A.unsubscribe(),x.unsubscribe()}}),[c])}({conversationsRequestBuilder:l,conversationsManagerRef:pe,fetchNextAndAppendConversations:we,fetchNextIdRef:he,dispatch:de,confirmDialogElement:ge,conversationToBeDeleted:Ce.conversationToBeDeleted,errorHandler:me,refreshSingleConversation:ve,onMessageReceived:Ie,setReceipts:Se,setTypingIndicator:Fe,disableTyping:Y,loggedInUser:Ce.loggedInUser,isFirstReload:!1}),d.jsxs("div",{className:"cc-conversations",style:Zr($,xe),children:[null===o?null:d.jsx("div",{className:"cc-conversations__menus",style:{position:"absolute",top:"19px",right:"12px",cursor:"pointer",display:"flex",justifyContent:"flex-end",width:"24px"},children:o}),d.jsx(T,{title:i,titleAlignment:a,hideSearch:!0,list:Ce.conversationList,listItemKey:"getConversationId",listItem:null!==C?C:function(e){return d.jsx(B,{id:e.getConversationId(),avatarURL:ke(e),avatarName:e.getConversationWith().getName(),title:e.getConversationWith().getName(),statusIndicatorColor:Te(e),statusIndicatorIcon:Me(e),hideSeparator:p,isActive:m===n.SelectionMode.none&&e.getConversationId()===h?.getConversationId(),avatarStyle:$r(te,xe),statusIndicatorStyle:Ge(e),listItemStyle:ts(oe,$,xe),onClick:t=>K?.(e),subtitleView:Pe(e),subtitleViewClassName:"cc-conversations__subtitle-view",menuView:je(e,xe),menuViewClassName:"cc-conversations__options-view",tailView:Ve(e),tailViewClassName:"cc-conversations__tail-view"})},onScrolledToBottom:()=>we(he.current="onScrolledToBottom_"+String(Date.now())),showSectionHeader:!1,state:Ce.fetchState===n.States.loaded&&0===Ce.conversationList.length?n.States.empty:Ce.fetchState,loadingIconURL:O,loadingView:j,emptyStateText:V,emptyStateView:G,errorStateText:H,errorStateView:Q,hideError:N,listStyle:qr($,xe)}),null===Ce.conversationToBeDeleted?null:d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(cs(ae,$)),children:d.jsx("cometchat-confirm-dialog",{ref:ue,title:W,messageText:Z,cancelButtonText:X,confirmButtonText:q,confirmDialogStyle:JSON.stringify(Xr(ee,xe))})})]})}const fs={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},Ds={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},Es={width:"calc(100% - 280px)",height:"100%"},vs={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},Is={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},Ss={width:"280px",height:"100%",position:"relative"},Fs=(e,t)=>({...Ds,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),ks=(e,t,n,o,r)=>n?Ts(o,r):Ms(e,t),Ts=(e,t)=>({...e||t?{visibility:"hidden"}:{visibility:"visible"},...vs,borderRadius:"inherit"}),Ms=(e,t)=>{const n=e?.borderRadius||0;return{...Ss,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},Bs=(e,t,n,o)=>t?Ls(n,o):Us(e),Ls=(e,t)=>({...e||t?{visibility:"visible"}:{visibility:"hidden"},...vs,borderRadius:"inherit"}),Us=e=>{const t=e?.borderRadius||0;return{...Es,borderRadius:`0 ${t} ${t} 0`}},Rs=(e,t)=>({...fs,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),Ps=e=>({width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...e?.conversationsStyle}),Os=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},js=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},Vs=(e,t)=>({background:t?.background,...e}),Gs=(e,t,n)=>{let o={visibility:"hidden"};return t||n||e||(o={visibility:"visible"}),{...Is,...o,width:"calc(100% - 280px)"}},Hs=(e,t)=>({height:t?.backdropStyle?.height||e?.height,width:t?.backdropStyle?.width||e?.width,background:t?.backdropStyle?.background||"rgba(0, 0, 0, 0.5)",border:t?.backdropStyle?.border||"0 none",borderRadius:t?.backdropStyle?.borderRadius||"0"}),Qs=(e,t)=>({height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:e?t.palette.getAccent600():t.palette.getPrimary()});function Ns(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeIconTint||t.palette.getPrimary(),background:"transparent",position:"absolute",top:"8px",right:"12px"}}function Ks(e,t){return{background:e?.submitButtonBackground||t.palette.getPrimary(),buttonTextColor:e?.submitButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.submitButtonTextFont||n.fontHelper(t.typography.title2),height:"100%",width:"100%",border:"none",borderRadius:"8px",padding:"8px",display:"flex",justifyContent:"center",textAlign:"center"}}function zs(e,t){return{height:"30px",textAlign:"center",font:e?.titleTextFont||n.fontHelper(t.typography.title1),padding:"10px 0px",color:e?.titleTextColor||t.palette.getAccent()}}function Js(e,t){return{height:e?.height||"94%",width:e?.width||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"none",boxShadow:e?.boxShadow||"0",padding:e?.padding||"0",display:"flex",zIndex:1}}const Ys=(e,t,o,r)=>({width:o===n.TabsVisibility.usersAndGroups?"50%":"100%",height:e.tabHeight||"100%",borderRadius:e.tabBorderRadius||"0",border:e.tabBorder||"none",titleTextFont:e.tabTitleTextFont||n.fontHelper(t.typography.text2),titleTextColor:e.tabTitleTextColor||t.palette.getAccent(),activeTitleTextFont:e.activeTabTitleTextFont||n.fontHelper(t.typography.text2),activeTitleTextColor:e.activeTabTitleTextColor||t.palette.getAccent(),activeBackground:e.activeTabBackground||t.palette.getBackground(),activeBorderRadius:"8px",activeBorder:"2px solid red",background:e.tabBackground||"#ececec",boxShadow:"0px 3px 8px rgba(20, 20, 20, 0.12), 0 3px 1px rgba(20, 20, 20, 0.04)"});function _s(e,t){return{position:"relative",boxSizing:"border-box",background:e?.background||t.palette.getBackground(),width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent50()}`,borderRadius:e?.borderRadius||"0",overflow:"hidden"}}function Ws(e){return{...void 0!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Zs(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"28px",height:e?.height||"28px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.caption1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function Xs(e,t,r){return new o.ListItemStyle({height:e?.height||"auto",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||r.palette.getAccent100(),borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent(),border:e?.border||"none",padding:e?.padding||"0",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent100(),hoverBackground:e?.hoverBackground||r.palette.getAccent50()})}function qs(e,t){return new r.GroupsStyle({background:"inherit",width:"100%",height:"100%",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),separatorColor:e?.separatorColor||t.palette.getAccent400(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600()})}function $s(e,t){return{font:e?.subTitleTextFont||n.fontHelper(t.typography.subtitle2),color:e?.subTitleTextColor||t.palette.getAccent600()}}class ei{constructor(e){const{searchText:t,groupsRequestBuilder:n,searchRequestBuilder:o,groupsSearchText:r}=e;let s=n||this.getDefaultRequestBuilder();t&&o?(s=o,s.setSearchKeyword(t)):t&&!o&&n?(s=n,s.setSearchKeyword(t)):!t&&n&&o?(s=n,s.setSearchKeyword(r.current)):t||!n||o?t||n||!o?s.setSearchKeyword(t):(s=this.getDefaultRequestBuilder(),s.setSearchKeyword(r.current)):(s=n,s.setSearchKeyword(r.current)),this.groupsRequest=s.build()}fetchNext(){return this.groupsRequest.fetchNext()}getDefaultRequestBuilder(){return(new s.CometChat.GroupsRequestBuilder).setLimit(ei.defaultLimit)}static async getLoggedInUser(){return void 0===this.loggedInUser&&(this.loggedInUser=await s.CometChat.getLoggedinUser()),this.loggedInUser}static createGroupListener(e){return new s.CometChat.GroupListener({onGroupMemberJoined:async(t,n,o)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&o.setHasJoined(!0),e({type:"updateGroup",group:o})},onGroupMemberLeft:async(t,n,o)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&o.setHasJoined(!1),e({type:"updateGroup",group:o})},onMemberAddedToGroup:async(t,n,o,r)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&r.setHasJoined(!0),e({type:"updateGroup",group:r})},onGroupMemberKicked:async(t,n,o,r)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&r.setHasJoined(!1),e({type:"updateGroup",group:r})},onGroupMemberBanned:async(t,n,o,r)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()?e({type:"removeGroup",guid:r.getGuid()}):e({type:"updateGroup",group:r})},onGroupMemberUnbanned:async(t,n,o,r)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&(r.setHasJoined(!1),e({type:"prependGroup",group:r}))},onGroupMemberScopeChanged:async(t,n,o,r,s)=>{n.getUid()===(await ei.getLoggedInUser())?.getUid()&&s.setScope(o),e({type:"updateGroup",group:s})}})}static attachListeners(e){const t="GroupsList_"+String(Date.now());return s.CometChat.addGroupListener(t,ei.createGroupListener(e)),()=>s.CometChat.removeGroupListener(t)}static attachConnestionListener(e){const t="GroupsList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}}ei.defaultLimit=30;var ti="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ni="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",oi="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",ri="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",si=(e,t)=>{let n=e;const{type:o}=t;switch(o){case"appendGroups":if(t.groups.length>0){let o=[];t.removeOldGroups?(e.groupList=[],o=t.groups):o=[...e.groupList,...t.groups],n={...e,groupList:o}}n={...e,groupList:[...e.groupList,...t.groups]};break;case"setGroupList":n={...e,groupList:t.groupList};break;case"setFetchState":n={...e,fetchState:t.fetchState};break;case"updateGroup":{const{groupList:o}=e,{group:r}=t,s=r.getGuid(),i=o.findIndex((e=>e.getGuid()===s));i>-1&&(n={...e,groupList:o.map(((e,t)=>t===i?r:e))});break}case"removeGroup":{const{groupList:o}=e,r=t.guid,s=o.findIndex((e=>e.getGuid()===r));s>-1&&(n={...e,groupList:o.filter(((e,t)=>t!==s))});break}case"prependGroup":n={...e,groupList:[t.group,...e.groupList]};break;case"setSearchText":n={...e,searchText:t.searchText};break;case"setIsFirstReload":n={...e,isFirstReload:t.isFirstReload}}return n};function ii(e){const{menus:o=null,title:i=n.localize("GROUPS"),titleAlignment:a=n.TitleAlignment.left,searchPlaceholderText:l=n.localize("SEARCH"),searchIconURL:c=oi,hideSearch:C=!1,groupsRequestBuilder:g=null,searchRequestBuilder:u=null,onError:p,listItemView:h=null,hideSeparator:m=!1,subtitleView:A=null,options:x=null,selectionMode:w=n.SelectionMode.none,onSelect:f,onItemClick:D,activeGroup:E=null,loadingIconURL:v=ri,loadingStateView:I,emptyStateText:S=n.localize("NO_GROUPS_FOUND"),emptyStateView:F,errorStateText:k=n.localize("SOMETHING_WRONG"),errorStateView:M,hideError:P=!1,passwordGroupIcon:O=ti,privateGroupIcon:j=ni,statusIndicatorStyle:V,avatarStyle:G,listItemStyle:H,groupsStyle:Q}=e,[N,K]=t.useReducer(si,{searchText:"",groupList:[],fetchState:n.States.loading,isFirstReload:!1}),z=t.useRef(null),J=t.useRef(""),Y=b(p),{theme:_}=t.useContext(R),W=t.useRef(!1),Z=t.useRef(!1),X=t.useRef("");N.searchText!==X.current&&N.searchText.trim().length>0&&N.searchText.trim().length==N.searchText.length&&(X.current=N.searchText),N.isFirstReload&&(W.current=!0,N.isFirstReload=!1);const q=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(X.current="",K({type:"setSearchText",searchText:e}))}),[K]),$=t.useCallback((async e=>{const t=z.current;if(!t)return;let o=Z.current?n.States.loaded:n.States.loading;K({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(e!==J.current)return;if(0!==o.length){let e=!!Z.current;K({type:"appendGroups",groups:o,removeOldGroups:e})}K({type:"setFetchState",fetchState:n.States.loaded}),W.current&&(ei.attachConnestionListener((()=>{const e=null===g?(new s.CometChat.GroupsRequestBuilder).setLimit(30):g;z.current=new ei({searchText:X.current,groupsRequestBuilder:e,searchRequestBuilder:u,groupsSearchText:X}),Z.current=!0})),W.current=!1),Z.current?Z.current=!1:K({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===J.current&&N.groupList?.length<=0&&K({type:"setFetchState",fetchState:n.States.error}),Y(t)}}),[Y,K]);function ee(e){let t="";switch(e.getType()){case n.CometChatUIKitConstants.GroupTypes.password:t=O;break;case n.CometChatUIKitConstants.GroupTypes.private:t=j}return t}function te(e){if(null!==A)return A(e);const t=e.getMembersCount();return d.jsx("div",{className:"cc-groups__subtitle",style:$s(Q,_),children:`${t} ${t>1?n.localize("MEMBERS"):n.localize("MEMBER")}`})}function ne(e){let t;return(t=x?.(e))?.length?d.jsx(L,{data:t,onOptionClick:e=>e.detail.data.onClick?.()}):null}function oe(e){switch(w){case n.SelectionMode.none:return null;case n.SelectionMode.single:return d.jsx(U,{onChange:t=>f?.(e,t.detail.checked)});case n.SelectionMode.multiple:return d.jsx(y,{onChange:t=>f?.(e,t.detail.checked)})}}function re(e){switch(e.getType()){case n.CometChatUIKitConstants.GroupTypes.private:return Q?.privateGroupIconBackground||_.palette.getSuccess()||"rgb(0, 200, 111)";case n.CometChatUIKitConstants.GroupTypes.password:return Q?.passwordGroupIconBackground||"rgb(247, 165, 0)";default:return null}}return function(e){const{groupsRequestBuilder:o,searchRequestBuilder:s,searchText:i,fetchNextIdRef:a,groupsManagerRef:l,dispatch:c,fetchNextAndAppendGroups:C,groupsSearchText:d}=e;t.useEffect((()=>{o?.searchKeyword?d.current=o?.searchKeyword:s?.searchKeyword&&(d.current=s?.searchKeyword)}),[]),t.useEffect((()=>{c({type:"setIsFirstReload",isFirstReload:!0}),c({type:"setGroupList",groupList:[]}),l.current=new ei({searchText:i,groupsRequestBuilder:o,searchRequestBuilder:s,groupsSearchText:d}),C(a.current="initialFetch_"+String(Date.now()))}),[C,o,s,i,c,a,l,d]),t.useEffect((()=>ei.attachListeners(c)),[c]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupCreated.subscribe((e=>{c({type:"prependGroup",group:r.CometChatUIKitUtility.clone(e)})})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{c({type:"removeGroup",guid:e.getGuid()})})),o=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{c({type:"updateGroup",group:r.CometChatUIKitUtility.clone(e.joinedGroup)})})),s=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{c({type:"updateGroup",group:r.CometChatUIKitUtility.clone(e.kickedFrom)})})),i=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{e.leftGroup.getType()===n.CometChatUIKitConstants.GroupTypes.private?c({type:"removeGroup",guid:e.leftGroup.getGuid()}):c({type:"updateGroup",group:e.leftGroup})})),a=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{c({type:"updateGroup",group:e.kickedFrom})})),l=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{c({type:"updateGroup",group:e.userAddedIn})})),C=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{c({type:"updateGroup",group:e.group})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),s.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),C.unsubscribe()}}),[c])}({searchText:N.searchText,groupsRequestBuilder:g,searchRequestBuilder:u,fetchNextIdRef:J,groupsManagerRef:z,dispatch:K,fetchNextAndAppendGroups:$,groupsSearchText:X}),d.jsxs("div",{className:"cc-groups",style:_s(Q,_),children:[null===o?o:d.jsx("div",{className:"cc-groups__menus",style:{position:"absolute",top:"16px",right:"16px",cursor:"pointer",display:"flex",flexDirection:"row-reverse",width:"24px"},children:o}),d.jsx(T,{title:i,titleAlignment:a,searchPlaceholderText:l,searchIconURL:c,hideSearch:C,searchText:N.searchText,onSearch:q,list:N.groupList,listItem:null!==h?h:function(e){return d.jsx(B,{id:e.getGuid(),avatarURL:e.getIcon(),avatarName:e.getName(),title:e.getName(),statusIndicatorColor:re(e),statusIndicatorIcon:ee(e),hideSeparator:m,isActive:w===n.SelectionMode.none&&E?.getGuid()===e.getGuid(),statusIndicatorStyle:Ws(V),avatarStyle:Zs(G,_),listItemStyle:Xs(H,Q,_),subtitleView:te(e),subtitleViewClassName:"cc-groups__subtitle-view",menuView:ne(e),menuViewClassName:"cc-groups__options-view",tailView:oe(e),tailViewClassName:"cc-group__tail-view",onClick:t=>D?.(e)})},onScrolledToBottom:()=>$(J.current="onScrolledToBottom_"+String(Date.now())),listItemKey:"getGuid",showSectionHeader:!1,state:N.fetchState===n.States.loaded&&0===N.groupList.length?n.States.empty:N.fetchState,loadingIconURL:v,loadingView:I,emptyStateText:S,emptyStateView:F,errorStateText:k,errorStateView:M,hideError:P,listStyle:qs(Q,_)})]})}const ai={title:n.localize("NEW_CHAT"),usersTabTitle:n.localize("USERS"),groupsTabTitle:n.localize("GROUPS"),groupsConfiguration:new r.GroupsConfiguration({}),usersConfiguration:new r.UsersConfiguration({}),onError:e=>{console.log(e)},tabVisibility:n.TabsVisibility.usersAndGroups,contactsStyle:{},selectionLimit:5,hideSubmitButton:!0,submitButtonText:"Submit",selectionMode:n.SelectionMode.none},li=e=>{const[o,r]=t.useState([]),i=t.useRef([]),a=t.useRef([]),[l,c]=t.useState(!0),[C,g]=t.useState(!0),[u,p]=t.useState(!1),h=t.useRef(),m=t.useRef(),{theme:A}=t.useContext(R),{title:x,usersTabTitle:b,groupsTabTitle:y,closeIconURL:w,onClose:f,usersConfiguration:D,groupsConfiguration:E,onItemClick:v,tabVisibility:I,contactsStyle:S,selectionLimit:F,hideSubmitButton:k,submitButtonText:T,selectionMode:M,onSubmitButtonClick:B}=e;t.useEffect((()=>{const e=(new s.CometChat.UsersRequestBuilder).setLimit(30).hideBlockedUsers(!0),t=(new s.CometChat.UsersRequestBuilder).setLimit(30).hideBlockedUsers(!0),o=(new s.CometChat.GroupsRequestBuilder).setLimit(30).joinedOnly(!0),i=(new s.CometChat.GroupsRequestBuilder).setLimit(30).joinedOnly(!0);h.current=new n.CometChatTabItem({id:"users",title:b,style:Ys(S,A,I),childView:d.jsx(G,{title:"",activeUser:void 0,hideSearch:D?.hideSearch||!1,searchIconURL:D?.searchIconURL,searchRequestBuilder:D?.searchRequestBuilder||t,onItemClick:D?.onItemClick||L,usersStyle:D?.usersStyle,subtitleView:D?.subtitleView,options:D?.options??void 0,usersRequestBuilder:D?.usersRequestBuilder||e,emptyStateView:D?.emptyStateView,onSelect:D?.onSelect||j,loadingIconURL:D?.loadingIconURL,errorStateView:D?.errorStateView,loadingStateView:D?.loadingStateView,tileAlignment:D?.titleAlignment,showSectionHeader:D?.showSectionHeader,listItemView:D?.listItemView,menus:D?.menu,hideSeparator:D?.hideSeparator,hideError:D?.hideError,selectionMode:M,listItemStyle:D?.listItemStyle,disableUsersPresence:D?.disableUsersPresence,statusIndicatorStyle:D?.statusIndicatorStyle,avatarStyle:D?.avatarStyle}),isActive:l}),m.current=new n.CometChatTabItem({id:"groups",title:y,style:Ys(S,A,I),childView:d.jsx(ii,{title:"",activeGroup:void 0,hideSearch:E?.hideSearch||!1,searchIconURL:E?.searchIconURL,searchRequestBuilder:E?.searchRequestBuilder||i,onItemClick:E?.onItemClick||U,groupsStyle:E?.groupsStyle,subtitleView:E?.subtitleView,options:E?.options??void 0,privateGroupIcon:E?.privateGroupIcon,passwordGroupIcon:E?.passwordGroupIcon||E?.protectedGroupIcon,groupsRequestBuilder:E?.groupsRequestBuilder||o,emptyStateView:E?.emptyStateView,onSelect:E?.onSelect||O,loadingIconURL:E?.loadingIconURL,errorStateView:E?.errorStateView,loadingStateView:E?.loadingStateView,titleAlignment:E?.titleAlignment,listItemView:E?.listItemView,menus:E?.menu,hideSeparator:E?.hideSeparator,hideError:E?.hideError,selectionMode:M,listItemStyle:E?.listItemStyle}),isActive:u}),r([h.current,m.current])}),[]),t.useEffect((()=>{I===n.TabsVisibility.groups?(p(!0),c(!1),r([m.current])):I===n.TabsVisibility.users?(p(!1),c(!0),r([h.current])):I===n.TabsVisibility.usersAndGroups&&(p(!1),c(!0),r([h.current,m.current]))}),[I]);const L=e=>{v&&v(e,void 0)},U=e=>{v&&v(void 0,e)},P=()=>{B&&B(a.current,i.current)},O=e=>{var t=i.current.findIndex((t=>t?.getGuid()===e.getGuid()));t>=0?i.current.splice(t,1):i.current.push(e),g(a.current.length+i.current.length>F)},j=e=>{var t=a.current.findIndex((t=>t?.getUid()===e.getUid()));t>=0?a.current.splice(t,1):a.current.push(e),g(a.current.length+i.current.length>F)};return o.length?d.jsx("div",{className:"cc-contacts-wrapper",style:Js(S,A),children:d.jsxs("div",{className:"cc-contacts",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column"},children:[d.jsx("div",{className:"cc-contacts-header",style:zs(S,A),children:x}),d.jsxs("div",{className:"cc-contacts-content",style:{height:"calc(100% - 50px)"},children:[d.jsx(ro,{tabAlignment:n.TabAlignment.right,tabs:o,tabsStyle:{height:"100%",width:"100%",tabListHeight:"30px",tabListBackground:"#ececec",tabListPadding:"2px 2px",tabListBorderRadius:"8px",tabPaneWidth:"100%",tabPaneHeight:"calc(100% - 30px)"},keepAlive:!0}),""===w?d.jsx(d.Fragment,{}):d.jsx(q,{iconURL:w,hoverText:n.localize("CLOSE"),buttonStyle:Ns(S,A),onClick:f})]}),M===n.SelectionMode.none&&k?d.jsx(d.Fragment,{}):d.jsx("div",{className:"cc-contacts__submit--buttons",style:{boxSizing:"border-box"},children:d.jsx(q,{text:T,buttonStyle:Ks(S,A),disabled:C,onClick:P})})]})}):d.jsx(d.Fragment,{})};li.defaultProps=ai;const ci=(e,t)=>({display:"flex",position:"relative",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"0 none",borderRadius:e?.borderRadius||"inherit",background:e?.background||t.palette.getBackground()}),Ci={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",maxHeight:"100%",overflowY:"auto",overflowX:"hidden",maxWidth:"100%",zIndex:"1"},di={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",maxHeight:"100%",overflowY:"auto",overflowX:"hidden",maxWidth:"100%",zIndex:"1",borderRadius:"inherit"},gi={width:"100%",borderRadius:"inherit"},ui={height:"100%",width:"100%",overflow:"hidden"},pi=e=>({border:"0 none",background:"inherit",borderRadius:"inherit",...e?.messageHeaderStyle}),hi=e=>({border:"0 none",background:"inherit",borderRadius:"inherit",...e?.messageListStyle}),mi=e=>({...e?.messageComposerStyle}),Ai=(e,t,n)=>({...e?.detailsStyle});function xi(e){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:e.palette.getPrimary(),padding:0}}const bi={position:"absolute",display:"flex",alignItems:"center",height:"100%",width:"100%",justifyContent:"center",zIndex:1e3,overflow:"hidden"};function yi(e,t){return{boxSizing:"border-box",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),position:"relative",padding:"19px",display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}function wi(e,t){return{background:"inherit",textFont:e?.titleTextFont||n.fontHelper(t.typography.title1),textColor:e?.titleTextColor||t.palette.getAccent()}}function fi(e,t){return{width:"24px",height:"24px",background:"transparent",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary(),position:"absolute",right:"12px"}}function Di(e,t){return{width:e?.width||"100%",height:e?.height||"fit-content",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"transparent",hoverBackground:e?.hoverBackground||"transparent",separatorColor:e?.separatorColor||t.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent()}}function Ei(e,t){return{...e??{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function vi(e,t){return{width:e?.width||"36px",height:e?.height||"36px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px",backgroundColor:e?.backgroundColor||t.palette.getAccent700(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"}}function Ii(e,t,o){return{background:"inherit",textFont:t?.subtitleTextFont||n.fontHelper(o.typography.subtitle2),textColor:e?o.palette.getPrimary():t?.subtitleTextColor}}function Si(e){return{background:"inherit",textFont:e.titleFont,textColor:e.titleColor}}function Fi(e){return{width:"100%",height:"100%",border:"none",borderRadius:"0",buttonTextFont:e.titleFont,buttonTextColor:e.titleColor,backgroundColor:e.backgroundColor||"inherit",buttonIconTint:e.iconTint,padding:"18px 0 16px 0"}}function ki(e,t){return{background:"rgba(0, 0, 0, 0.5)",position:"absolute",width:t?.width,height:t?.height,...e}}function Ti(e,t,o){return{confirmButtonBackground:e?.confirmButtonBackground||o.palette.getPrimary(),cancelButtonBackground:e?.cancelButtonBackground||o.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||o.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(o.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||o.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(o.typography.text2),titleFont:e?.titleFont||n.fontHelper(o.typography.title1),titleColor:e?.titleColor||o.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(o.typography.subtitle2),messageTextColor:e?.messageTextColor||o.palette.getAccent600(),background:e?.background||t?.background||o.palette.getBackground(),width:e?.width||"320px",height:e?.height||"100%",border:e?.border||`1px solid ${o.palette.getAccent200()}`,borderRadius:e?.borderRadius||"8px",boxShadow:e?.boxShadow}}function Mi(e,t){return{confirmButtonBackground:e?.confirmButtonBackground||t.palette.getError(),cancelButtonBackground:e?.cancelButtonBackground||t.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||t.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(t.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||t.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(t.typography.text2),titleFont:e?.titleFont||n.fontHelper(t.typography.title1),titleColor:e?.titleColor||t.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(t.typography.subtitle2),messageTextColor:e?.messageTextColor||t.palette.getAccent600(),background:e?.background||t.palette.getBackground(),width:e?.width||"320px",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent200()}`,borderRadius:e?.borderRadius||"8px",boxShadow:e?.boxShadow}}function Bi(e,t,n){return{width:"100%",height:(t?"2":"1")+"px",background:e||n.palette.getAccent200()}}const Li=(e,t)=>{const n=e?.groupMembersStyle;return{background:n?.background||t?.background,...n}},Ui=(e,t)=>{const n=e?.addMembersStyle;return{background:n?.background||t?.background,...n}},Ri=(e,t)=>{const n=e?.bannedMembersStyle;return{background:n?.background||t?.background,...n}},Pi=(e,t)=>{const n=e?.transferOwnershipStyle;return{background:n?.background||t?.background,...n}};var Oi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ji="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Vi(e,t){return{boxSizing:"border-box",width:e?.width||"max(100%, 360px)",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"8px",background:e?.background||t.palette.getBackground(),display:"flex",flexDirection:"column"}}function Gi(e,t,r){const s={height:"14px",width:"14px",border:"none",borderRadius:"4px",background:"inherit"};return r?new o.RadioButtonStyle({...s,labelTextColor:e?.MemberScopeTextColor||t.palette.getAccent600(),labelTextFont:e?.MemberScopeTextFont||n.fontHelper(t.typography.text2)}):new o.LabelStyle({...s,textColor:e?.MemberScopeTextColor||t.palette.getAccent600(),textFont:e?.MemberScopeTextFont||n.fontHelper(t.typography.text2)})}function Hi(e,t){return{width:"100%",background:t.palette.getPrimary(),padding:"16px",buttonTextColor:e?.transferButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.transferButtonTextFont||n.fontHelper(t.typography.title2),display:"flex",justifyContent:"center",textAlign:"center",border:"none",borderRadius:"8px"}}function Qi(e,t){return{width:"100%",background:"#f1f1f1",padding:"16px",color:e?.cancelButtonTextColor||t.palette.getAccent(),font:e?.cancelButtonTextFont||n.fontHelper(t.typography.title2),display:"flex",justifyContent:"center",textAlign:"center",border:"0 none",borderRadius:"8px"}}function Ni(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"36px",height:e?.height||"36px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function Ki(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||r.palette.getBackground(),activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function zi(e,t){return new r.GroupMembersStyle({height:e?.height||"100%",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"inherit",background:e?.background||"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||"",emptyStateTextColor:e?.emptyStateTextColor||"",errorStateTextFont:e?.errorStateTextFont||"",errorStateTextColor:e?.errorStateTextColor||"",loadingIconTint:e?.loadingIconTint||"",searchIconTint:e?.searchIconTint||"",searchBorder:e?.searchBorder||"",searchBorderRadius:e?.searchBorderRadius||"",searchBackground:e?.searchBackground||"",searchPlaceholderTextFont:e?.searchPlaceholderTextFont||"",searchPlaceholderTextColor:e?.searchPlaceholderTextColor||"",searchTextFont:e?.searchTextFont||"",searchTextColor:e?.searchTextColor||"",onlineStatusColor:e?.onlineStatusColor||t.palette.getSuccess(),backButtonIconTint:e?.backButtonIconTint||t.palette.getPrimary(),closeButtonIconTint:e?.closeButtonIconTint||t.palette.getPrimary(),padding:e?.padding||"0",separatorColor:e?.separatorColor||t.palette.getAccent200(),boxShadow:e?.boxShadow})}var Ji="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",Yi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function _i(e){const{group:o,title:i=n.localize("TRANSFER_OWNERSHIP"),titleAlignment:a=n.TitleAlignment.center,searchIconURL:l=Ji,searchPlaceholder:c=n.localize("SEARCH"),hideSearch:C=!1,groupMembersRequestBuilder:g,searchRequestBuilder:u,loadingIconURL:p=Yi,loadingStateView:h,emptyStateText:m=n.localize("NO_USERS_FOUND"),emptyStateView:x,errorStateText:y=n.localize("SOMETHING_WRONG"),errorStateView:w,onError:f,hideSeparator:D=!1,disableUsersPresence:E=!1,closeButtonIconURL:v,onClose:I,listItemView:S,subtitleView:F,transferButtonText:k=n.localize("TRANSFER_OWNERSHIP"),onTransferOwnership:T,cancelButtonText:M=n.localize("CANCEL"),options:B,statusIndicatorStyle:L,avatarStyle:P=null,listItemStyle:O=null,groupMemberStyle:j=null,transferOwnershipStyle:V=null}=e,[G,H]=t.useState(null),[Q,N]=t.useState(!0),K=t.useRef(null),z=b(f),J=A(T),Y=A(o),{theme:_}=t.useContext(R);const W=t.useCallback((async()=>{const e=K.current;if(e)try{const t=J.current;if(t)t(e);else{const t=Y.current;if(await s.CometChat.transferGroupOwnership(t.getGuid(),e.getUid()),G){const o=r.CometChatUIKitUtility.clone(t);o.setOwner(e.getUid()),n.CometChatGroupEvents.ccOwnershipChanged.next({group:o,newOwner:r.CometChatUIKitUtility.clone(e)}),I&&I()}}K.current=null}catch(e){z(e)}}),[z,G,Y,J]);return function(e){const{errorHandler:n,setLoggedInUser:o}=e;t.useEffect((()=>{(async()=>{try{o(await s.CometChat.getLoggedinUser())}catch(e){n(e)}})()}),[n,o])}({errorHandler:z,setLoggedInUser:H}),d.jsxs("div",{className:"cc-transfer-ownership",style:Vi(V,_),children:[d.jsx(ie,{menus:void 0,hideError:void 0,onItemClick:void 0,dropDownIconURL:void 0,groupScopeStyle:void 0,onBack:void 0,backButtonIconURL:void 0,showBackButton:!1,options:B,group:o,title:i,titleAlignment:a,searchIconURL:l,searchPlaceholder:c,hideSearch:C,groupMemberRequestBuilder:g,searchRequestBuilder:u,loadingIconURL:p,loadingStateView:h,emptyStateText:m,emptyStateView:x,errorStateText:y,errorStateView:w,onError:z,hideSeparator:D,disableUsersPresence:E,closeButtonIconURL:v,onClose:I,selectionMode:n.SelectionMode.none,listItemView:S,subtitleView:F,tailView:function(e){const t=o.getOwner()===e.getUid()?n.CometChatUIKitConstants.groupMemberScope.owner:e.getScope();return o.getOwner()===e.getUid()?d.jsx("cometchat-label",{text:n.localize(t.toUpperCase()),labelStyle:JSON.stringify(Gi(V,_,!1))}):d.jsx(U,{labelText:n.localize(t.toUpperCase()),radioButtonStyle:Gi(V,_,!0),onChange:()=>function(e){Q&&N(!1),K.current=e}(e)})},statusIndicatorStyle:L,avatarStyle:Ni(P,_),listItemStyle:Ki(O,j,_),groupMembersStyle:zi(j,_)}),d.jsxs("div",{className:"cc-transfer-ownership__btns-wrapper",style:{flexShrink:"0",display:"flex",flexDirection:"column",rowGap:"8px",padding:"4px 28px 20px 28px",boxSizing:"border-box"},children:[d.jsx(q,{text:k,disabled:Q,buttonStyle:Hi(V,_),onClick:W}),d.jsx(q,{text:M,buttonStyle:Qi(V,_),onClick:I})]})]})}var Wi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Zi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Xi(e){const{user:o,group:i,title:a=n.localize("DETAILS"),closeButtonIconURL:l=ji,cancelButtonText:c=n.localize("CANCEL"),onClose:C,disableUsersPresence:g=!1,customProfileView:u=null,hideProfile:p=!1,privateGroupIcon:h=Zi,protectedGroupIcon:m=Wi,passwordGroupIcon:y,subtitleView:w=null,data:f,onError:D,leaveButtonText:E=n.localize("LEAVE_GROUP"),leaveConfirmDialogMessage:v=n.localize("LEAVE_CONFIRM"),transferButtonText:I=n.localize("TRANSFER_OWNERSHIP"),transferConfirmDialogMessage:S=n.localize("TRANSFER_CONFIRM"),deleteButtonText:F=n.localize("DELETE"),deleteConfirmDialogMessage:k=n.localize("DELETE_CONFIRM"),addMembersConfiguration:T=null,bannedMembersConfiguration:M=null,groupMembersConfiguration:L=null,transferOwnershipConfiguration:U=null,listItemStyle:P=null,statusIndicatorStyle:O=null,avatarStyle:j=null,leaveDialogStyle:V=null,deleteDialogStyle:G=null,backdropStyle:H=null,detailsStyle:Q=null}=e,[N,K]=t.useState("none"),[z,J]=t.useState(null),[Y,_]=t.useState(null),[W,Z]=t.useState(void 0),[X,$]=x(null),[ee,te]=x(null),ne=A(C),oe=b(D),{theme:re}=t.useContext(R),se=t.useCallback(((e,t)=>{const o=n.CometChatUIKitConstants.groupMemberAction.LEFT,i=new s.CometChat.Action(e.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return i.setAction(o),i.setActionBy(r.CometChatUIKitUtility.clone(t)),i.setActionFor(r.CometChatUIKitUtility.clone(e)),i.setActionOn(r.CometChatUIKitUtility.clone(t)),i.setReceiver(r.CometChatUIKitUtility.clone(e)),i.setSender(r.CometChatUIKitUtility.clone(t)),i.setConversationId("group_"+e.getGuid()),i.setMuid(r.CometChatUIKitUtility.ID()),i.setMessage(`${t.getName()} ${o} ${t.getUid()}`),i.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),i}),[]),ae=t.useCallback((async e=>{if(!(e instanceof s.CometChat.User))if(e.getOwner()===Y?.getUid())J({type:"transferOwnership"});else{J(null);try{if(Y){await s.CometChat.leaveGroup(e.getGuid());const t=r.CometChatUIKitUtility.clone(e);t.setHasJoined(!1),n.CometChatGroupEvents.ccGroupLeft.next({userLeft:r.CometChatUIKitUtility.clone(Y),leftGroup:t,message:se(t,Y)}),ne.current?.()}}catch(e){oe(e)}}}),[Y,J,oe,se,ne]),le=t.useCallback((async e=>{if(!(e instanceof s.CometChat.User)){J(null);try{await s.CometChat.deleteGroup(e.getGuid()),n.CometChatGroupEvents.ccGroupDeleted.next(r.CometChatUIKitUtility.clone(e)),ne.current?.()}catch(e){oe(e)}}}),[J,oe,ne]);function ce(e){if(e instanceof s.CometChat.User){if(!g&&e.getStatus()===n.CometChatUIKitConstants.userStatusType.online)return Q?.onlineStatusColor||re.palette.getSuccess()||"rgb(0, 200, 111)"}else{const t=e.getType();if(t===n.CometChatUIKitConstants.GroupTypes.private)return Q?.privateGroupIconBackground||"#F7A500";if(t===n.CometChatUIKitConstants.GroupTypes.password)return Q?.passwordGroupIconBackground||"#F7A500"}return null}function Ce(e){let t="";if(e instanceof s.CometChat.Group){const o=e.getType();o===n.CometChatUIKitConstants.GroupTypes.private?t=h:o===n.CometChatUIKitConstants.GroupTypes.password&&(t=y||m)}return t}function de(e){if(e instanceof s.CometChat.User)return g?"":n.localize(e.getStatus().toUpperCase());const t=e.getMembersCount();return`${t} ${n.localize(t>1?"MEMBERS":"MEMBER")}`}function ge(e){if(w)return e instanceof s.CometChat.User?w(e):w(void 0,e);const t=e instanceof s.CometChat.User&&e.getStatus()===n.CometChatUIKitConstants.userStatusType.online;return d.jsx("cometchat-label",{text:de(e),labelStyle:JSON.stringify(Ii(t,Q,re))})}function ue(e,t){const{id:o,onClick:i}=e;if(i)i(t);else switch(o){case n.CometChatUIKitConstants.UserOptions.viewProfile:t instanceof s.CometChat.User&&t.getLink()&&window.open(t.getLink(),"_blank");break;case n.CometChatUIKitConstants.UserOptions.block:t instanceof s.CometChat.User&&async function(e){if(!e.getBlockedByMe())try{await s.CometChat.blockUsers([e.getUid()]);const t=r.CometChatUIKitUtility.clone(e);t.setBlockedByMe(!0),n.CometChatUserEvents.ccUserBlocked.next(t),Z(t)}catch(e){oe(e)}}(t);break;case n.CometChatUIKitConstants.UserOptions.unblock:t instanceof s.CometChat.User&&async function(e){if(e.getBlockedByMe())try{await s.CometChat.unblockUsers([e.getUid()]);const t=r.CometChatUIKitUtility.clone(e);t.setBlockedByMe(!1),n.CometChatUserEvents.ccUserUnblocked.next(t),Z(t)}catch(e){oe(e)}}(t);break;case n.CometChatUIKitConstants.GroupOptions.viewMembers:t instanceof s.CometChat.Group&&K("groupMembers");break;case n.CometChatUIKitConstants.GroupOptions.addMembers:t instanceof s.CometChat.Group&&K("addMembers");break;case n.CometChatUIKitConstants.GroupOptions.bannedMembers:t instanceof s.CometChat.Group&&K("bannedMembers");break;case n.CometChatUIKitConstants.GroupOptions.leave:if(t instanceof s.CometChat.Group){const e=t.getOwner()===Y?.getUid();J({type:"leaveOrTransferConfirm",buttonText:e?I:E,confirmDialogMessage:e?S:v})}break;case n.CometChatUIKitConstants.GroupOptions.delete:t instanceof s.CometChat.Group&&J({type:"deleteConfirm",buttonText:F,confirmDialogMessage:k})}}function pe(e,t,n){return t?d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(Bi(t,n,re))}):null}function he(e,t){const{title:n,id:o,hideSectionSeparator:r=!0,sectionSeparatorColor:i,hideItemSeparator:a=!1,itemSeparatorColor:l}=e;let c=null;n&&(c=d.jsx("div",{className:"cc-details__section-header",style:{textAlign:"left"},children:d.jsx("cometchat-label",{text:n.toUpperCase(),labelStyle:JSON.stringify(Si(e))})}));let C=null;const g=function(e,t){const{id:n}=e;if(void 0!==n)return t instanceof s.CometChat.User?e.options?.(t,null,n):e.options?.(null,t,n)}(e,t);return g?.length&&(C=d.jsx("div",{className:"cc-details__options",style:{display:"flex",flexDirection:"column"},children:g.map(((e,n)=>function(e,t,n,o){const{id:r,customView:s}=e;if(s)return d.jsx("div",{className:"cc-details__option",children:s},r);const{title:i,tail:a,iconURL:l}=e,c=d.jsx(q,{text:i,iconURL:l,buttonStyle:Fi(e),onClick:()=>ue(e,t)});let C=c;return a&&(C=d.jsxs("div",{className:"cc-details__option-content",style:{position:"relative"},children:[c,d.jsx("div",{className:"cc-details__option-tail",style:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"},children:a})]})),d.jsxs("div",{className:"cc-details__option",style:{display:"flex",flexDirection:"column"},children:[C,pe(0,o,!1)]},r)}(e,t,0,l)))})),d.jsxs("div",{className:"cc-details__section",style:{padding:"16px 0"},children:[c,C,pe(0,i,!0)]},o)}function me(){K("none")}function Ae(){J(null)}function xe(e){if(e instanceof s.CometChat.User)return null;const t=U?.options;return d.jsx(_i,{group:e,onTransferOwnership:U?.onTransferOwnership,titleAlignment:U?.titleAlignment,loadingIconURL:U?.loadingIconURL,loadingStateView:U?.loadingStateView,errorStateView:U?.errorStateView,emptyStateView:U?.emptyStateView,onError:U?.onError,hideSearch:U?.hideSearch,searchIconURL:U?.searchIconURL,hideSeparator:U?.hideSeparator,closeButtonIconURL:U?.closeButtonIconURL||ji,disableUsersPresence:U?.disableUsersPresence,listItemView:U?.listItemView,subtitleView:U?.subtitleView,onClose:U?.onClose??Ae,groupMembersRequestBuilder:U?.groupMembersRequestBuilder,searchRequestBuilder:U?.searchRequestBuilder,options:t?(e,n)=>t(n):void 0,statusIndicatorStyle:U?.statusIndicatorStyle,avatarStyle:U?.avatarStyle,listItemStyle:U?.listItemStyle,groupMemberStyle:U?.groupMemberStyle,transferOwnershipStyle:Pi(U,Q)})}return function(e){const{setLoggedInUser:n,errorHandler:o,leaveOrTransferConfirmDialogElement:r,setModalInfo:i,handleLeaveOrTransferConfirmClick:a,deleteConfirmDialogElement:l,handleDeleteConfirmClick:c,userOrGroup:C,user:d,group:g,setUserOrGroup:u}=e;t.useEffect((()=>{d instanceof s.CometChat.User&&(d.getStatus?.()?u(d):s.CometChat.getUser(d.getUid()).then((e=>{u(e)})).catch((e=>o(e)))),g instanceof s.CometChat.Group&&(g.getOwner?.()?u(g):s.CometChat.getGroup(g.getGuid()).then((e=>{u(e)})).catch((e=>o(e))))}),[d,g,u,o]),t.useEffect((()=>{if(!r)return;const e="cc-confirm-clicked",t=()=>{C&&a(C)};return r.addEventListener(e,t),()=>{r.removeEventListener(e,t)}}),[r,a,C]),t.useEffect((()=>{if(!r)return;const e="cc-cancel-clicked",t=()=>i(null);return r.addEventListener(e,t),()=>{r.removeEventListener(e,t)}}),[r,i]),t.useEffect((()=>{if(!l)return;const e="cc-confirm-clicked",t=()=>{C&&c(C)};return l.addEventListener(e,t),()=>{l.removeEventListener(e,t)}}),[l,c,C]),t.useEffect((()=>{if(!l)return;const e="cc-cancel-clicked",t=function(){i(null)};return l.addEventListener(e,t),()=>{l.removeEventListener(e,t)}}),[l,i]),t.useEffect((()=>{(async()=>{try{n(await s.CometChat.getLoggedinUser())}catch(e){o(e)}})()}),[o,n])}({setLoggedInUser:_,errorHandler:oe,leaveOrTransferConfirmDialogElement:X,setModalInfo:J,handleLeaveOrTransferConfirmClick:ae,deleteConfirmDialogElement:ee,handleDeleteConfirmClick:le,userOrGroup:W,user:o,group:i,setUserOrGroup:Z}),W?d.jsxs("div",{className:"cc-details",style:yi(Q,re),children:[d.jsxs("div",{className:"cc-details__header",style:{display:"flex",justifyContent:"center",textAlign:"center",width:"100%",paddingBottom:"19px"},children:[d.jsx("cometchat-label",{text:a,labelStyle:JSON.stringify(wi(Q,re))}),d.jsx(q,{iconURL:l,buttonStyle:fi(Q,re),onClick:C})]}),d.jsxs("div",{className:"cc-details__content",style:{flexGrow:"1",display:"flex",flexDirection:"column",overflowY:"auto"},children:[function(e){if(p)return null;let t;return t=u?e instanceof s.CometChat.User?u(e):u(void 0,e):function(e){return d.jsx(B,{avatarName:e.getName(),title:e.getName(),avatarURL:e instanceof s.CometChat.User?e.getAvatar():e.getIcon(),statusIndicatorColor:ce(e),statusIndicatorIcon:Ce(e),listItemStyle:Di(P,re),statusIndicatorStyle:Ei(O),avatarStyle:vi(j,re),subtitleViewClassName:"cc-details__subtitle-view",subtitleView:ge(e)})}(e),d.jsx("div",{className:"cc-details__profile",style:{overflowX:"auto"},children:t})}(W),function(t){const n=function(t){let n;return f&&(n=f),n||(n=r.DetailsUtils.getDefaultDetailsTemplate(Y,e?.user,e?.group,re)),n}().map(((e,n)=>he(e,t)));return 0===n.length?null:d.jsx("div",{className:"cc-details__section-list",style:{flexGrow:"1",overflowY:"auto",display:"flex",flexDirection:"column",padding:"28px 0"},children:n})}(W)]}),function(e){try{let t=null;switch(N){case"addMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=T?.sectionHeaderField,o=T?.options;return d.jsx(Br,{group:e,selectionMode:T?.selectionMode??n.SelectionMode.multiple,onClose:T?.onClose??C??me,onBack:T?.onBack??me,backButtonIconURL:T?.backButtonIconURL||Oi,showBackButton:T?.showBackButton??!0,titleAlignment:T?.titleAlignment,hideSearch:T?.hideSearch,searchIconURL:T?.searchIconURL,showSectionHeader:T?.showSectionHeader,sectionHeaderField:(r=t,void 0!==r&&r in new s.CometChat.User("anyString")?t:void 0),loadingIconURL:T?.loadingIconURL,loadingStateView:T?.loadingStateView,emptyStateView:T?.emptyStateView,errorStateView:T?.errorStateView,hideError:T?.hideError,disableUsersPresence:T?.disableUsersPresence,hideSeparator:T?.hideSeparator,onError:T?.onError??void 0,menus:T?.menu,options:o??void 0,onSelect:T?.onSelect,usersRequestBuilder:T?.usersRequestBuilder,searchRequestBuilder:T?.searchRequestBuilder,listItemView:T?.listItemView,subtitleView:T?.subtitleView,onAddMembersButtonClick:T?.onAddMembersButtonClick??void 0,closeButtonIconURL:T?.closeButtonIconURL||ji,listItemStyle:T?.listItemStyle,statusIndicatorStyle:T?.statusIndicatorStyle,avatarStyle:T?.avatarStyle,addMembersStyle:Ui(T,Q)});var r}(e);break;case"bannedMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=M?.options;return d.jsx(Wr,{group:e,onClose:M?.onClose??C??me,onBack:M?.onBack??me,backButtonIconURL:M?.backButtonIconURL||Oi,showBackButton:M?.showBackButton||!0,menus:M?.menu,titleAlignment:M?.titleAlignment,hideSearch:M?.hideSearch,searchIconURL:M?.searchIconURL,bannedMembersRequestBuilder:M?.bannedMembersRequestBuilder,searchRequestBuilder:M?.searchRequestBuilder,listItemView:M?.listItemView,subtitleView:M?.subtitleView,hideSeparator:M?.hideSeparator,disableUsersPresence:M?.disableUsersPresence,options:t??void 0,selectionMode:M?.selectionMode,closeButtonIconURL:M?.closeButtonIconURL||ji,onError:M?.onError??void 0,onSelect:M?.onSelect,emptyStateView:M?.emptyStateView,errorStateView:M?.errorStateView,loadingStateView:M?.loadingStateView,loadingIconURL:M?.loadingIconURL,hideError:M?.hideError,statusIndicatorStyle:M?.statusIndicatorStyle,avatarStyle:M?.avatarStyle,listItemStyle:M?.listItemStyle,bannedMemberStyle:Ri(M,Q)})}(e);break;case"groupMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=L?.options;return d.jsx(ie,{group:e,onClose:L?.onClose??C??me,onBack:L?.onBack??me,groupMemberRequestBuilder:L?.groupMembersRequestBuilder,searchRequestBuilder:L?.searchRequestBuilder,listItemView:L?.listItemView,subtitleView:L?.subtitleView,disableUsersPresence:L?.disableUsersPresence,menus:L?.menu,options:t?(e,n)=>t(n):void 0,backButtonIconURL:L?.backButtonIconURL||Oi,closeButtonIconURL:L?.closeButtonIconURL||ji,showBackButton:L?.showBackButton||!0,hideSeparator:L?.hideSeparator,selectionMode:L?.selectionMode,hideError:L?.hideError,searchIconURL:L?.searchIconURL,dropDownIconURL:L?.dropdownIconURL,hideSearch:L?.hideSearch,onError:L?.onError??void 0,onSelect:L?.onSelect,emptyStateView:L?.emptyStateView,errorStateView:L?.errorStateView,loadingIconURL:L?.loadingIconURL,loadingStateView:L?.loadingStateView,titleAlignment:L?.titleAlignment,statusIndicatorStyle:L?.statusIndicatorStyle,avatarStyle:L?.avatarStyle,groupMembersStyle:Li(L,Q),groupScopeStyle:L?.groupScopeStyle,listItemStyle:L?.listItemStyle})}(e);break;case"none":break;default:}if(null!==t)return d.jsx("div",{className:"cc-details__page-wrapper",style:{position:"absolute",top:"0",left:"0",boxSizing:"border-box",width:"100%",height:"100%",border:"none",borderRadius:"inherit"},children:t})}catch(e){oe(e)}}(W),function(e){if(!z)return null;const{type:t}=z;try{switch(t){case"leaveOrTransferConfirm":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(ki(H,Q)),children:d.jsx("cometchat-confirm-dialog",{ref:$,title:"",cancelButtonText:c,confirmButtonText:z.buttonText,messageText:z.confirmDialogMessage,confirmDialogStyle:JSON.stringify(Ti(V,Q,re))})});case"transferOwnership":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(ki(H,Q)),children:xe(e)});case"deleteConfirm":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(ki(H,Q)),children:d.jsx("cometchat-confirm-dialog",{ref:te,cancelButtonText:c,confirmButtonText:z.buttonText,messageText:z.confirmDialogMessage,confirmDialogStyle:JSON.stringify(Mi(G,re))})});default:}}catch(e){oe(e)}}(W)]}):null}const qi="10px";function $i(e,t){return new o.PreviewStyle({height:"100%",width:"100%",border:`1px solid ${t.palette.getAccent200()}`,background:t.palette.getBackground(),previewTitleFont:e?.previewTitleFont||n.fontHelper(t.typography.caption1),previewTitleColor:e?.previewTitleColor||t.palette.getAccent600(),previewSubtitleFont:e?.previewSubtitleFont||n.fontHelper(t.typography.subtitle2),previewSubtitleColor:e?.previewSubtitleColor||t.palette.getAccent400(),closeButtonIconTint:e?.closePreviewTint||t.palette.getAccent600(),borderRadius:"12px"})}function ea(e,t,o){return{height:"fit-content",width:"fit-content",buttonTextFont:n.fontHelper(t.typography.subtitle2),buttonTextColor:t.palette.getAccent600(),borderRadius:"8px",border:"none",buttonIconTint:t.palette.getAccent600(),padding:"8px",iconHeight:"20px",iconWidth:"20px",iconBackground:"transparent",gap:"5px",...o}}function ta(e,t){return new o.TextInputStyle({height:"100%",width:"100%",maxHeight:e?.maxInputHeight||"150px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||"12px",background:e?.background||`${t.palette.getAccent50()}`,textFont:e?.textFont||n.fontHelper(t.typography.text2),textColor:e?.textColor||t.palette.getAccent(),dividerColor:e?.dividerTint||t.palette.getAccent100(),inputBorder:e?.inputBorder||"none",inputBorderRadius:e?.inputBorderRadius||"0px",inputBackground:e?.inputBackground||"transparent",placeholderTextColor:t.palette.getAccent500(),placeholderTextFont:n.fontHelper(t.typography.subtitle2)})}function na(e,t,n=!1){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:n?t.palette.getAccent200():e?.sendIconTint||t.palette.getPrimary(),background:"transparent",padding:"0"}}function oa(e,t,n){return n?e?.emojiIconTint||t.palette.getAccent():e?.emojiIconTint||t.palette.getAccent500()}function ra(e,t,n){return n?e?.voiceRecordingIconTint||t.palette.getAccent():e?.voiceRecordingIconTint||t.palette.getAccent500()}function sa(e,t,n){return n?e?.attachIcontint||t.palette.getAccent():e?.attachIcontint||t.palette.getAccent500()}function ia(e,t,n){return n?e?.AIIconTint||t.palette.getAccent():e?.AIIconTint||t.palette.getAccent500()}const aa="244px",la="275px",ca="12px";function Ca(e,t){let n=e?.height,r=e?.width,s="100%"==n||"100%"==r;return new o.PopoverStyle({width:r&&!s?e?.width:la,height:n&&!s?e?.height:aa,borderRadius:e?.borderRadius||ca,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})}function da(e={},t){return{width:e?.width||la,height:e?.height||aa,borderRadius:e?.borderRadius||ca,border:`1px solid ${t.palette.getAccent100()}`,boxSizing:"border-box",overflow:"auto"}}function ga(e,t){return{width:e?.width||la,height:e?.height||aa,borderRadius:e?.borderRadius||ca,border:`1px solid ${t.palette.getAccent100()}`,boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}}function ua(e,t){return new o.ActionSheetStyle({width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||ca,background:e?.background||t.palette.getBackground(),layoutModeIconTint:e?.layoutModeIconTint||t.palette.getPrimary(),titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent(),listItemBackground:e?.listItemBackground||"transparent",listItemIconTint:e?.listItemIconTint||t.palette.getAccent700(),listItemIconBackground:e?.listItemIconBackground||"transparent",listItemIconBorderRadius:e?.listItemIconBorderRadius||"0",ActionSheetSeparatorTint:e?.ActionSheetSeparatorTint||`${t.palette.getAccent400()}`})}function pa(e,t){return new o.ActionSheetStyle({width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||ca,background:e?.background||t.palette.getBackground(),listItemBackground:e?.listItemBackground||"transparent",ActionSheetSeparatorTint:e?.optionsSeparatorTint||`${t.palette.getAccent600()}`})}function ha(e,t,n){return{height:"24px",width:"24px",border:"none",borderRadius:"0",padding:"0",buttonIconTint:sa(e,t,n),background:"transparent"}}function ma(e,t,n){return{height:"24px",width:"24px",border:"none",borderRadius:"0",padding:"0",buttonIconTint:ia(e,t,n),background:"transparent"}}const Aa="400px",xa="320px",ba="12px";function ya(e){return{width:xa,height:Aa,borderRadius:ba,border:`1px solid ${e.palette.getAccent100()}`,boxSizing:"border-box"}}function wa(e,t){return new o.EmojiKeyboardStyle({width:"100%",height:"100%",border:"none",borderRadius:ba,background:t.palette.getBackground(),textFont:e?.emojiKeyboardTextFont||n.fontHelper(t.typography.caption1),textColor:e?.emojiKeyboardTextColor||t.palette.getAccent()})}function fa(e,t,n,o=!1){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:oa(e,t,n),background:"transparent",padding:"0"}}const Da="100px",Ea="250px",va="8px";function Ia(e,t){return new o.MediaRecorderStyle({...e,background:e?.background||t.palette.getBackground(),border:"1px solid rgba(20, 20, 20, 0.08)",borderRadius:va,closeIconTint:e?.closeIconTint||t.palette.getAccent600(),submitIconTint:e?.submitIconTint||t.palette.getAccent600(),startIconTint:e?.startIconTint||t.palette.getError(),stopIconTint:e?.stopIconTint||t.palette.getError(),timerTextColor:e?.timerTextColor||t.palette.getAccent400(),timerTextFont:e?.timerTextFont||n.fontHelper(t.typography.text3)})}function Sa(e,t,n,o=!1){const r={};return o&&(r.margin=`0px ${qi}`),{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:ra(e,t,n),background:"transparent",...r}}var Fa="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABeZJREFUeF7tnOGx5TQMhbUdQAdQAUsFQAVABSwVLFQAVABUAFTAUgFQAXSwuxVABzAfc81kM7ElJ7KjeyPPvHk%2FrpPI5%2BRIsuz4iWQLhcCTUNakMZKEBHsJkpAkJBgCwcxJhSQhwRAIZk4qJAkJhkAwc1IhSUgwBIKZkwpJQoIhEMycVIiNkLdE5Omt62%2B2S%2Fb1SkJ03N4RkV9FhP%2B0VyLy0e2%2FfnVnjyREBwwyPlx1QyWQ4t6SEB3SfypdhmA35Kb6GO%2BmB7Hjr4q1b4vI394jSULaiD4TkR8qXXBZ7gE%2BCWkT8nIRzNc9%2FxSR91Mh3gjU74cyUEir%2FSgin3ualAp5E80y3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OEbD0Agqg94UYsc5JeUogVlo3XZE7sCUbRYcHfAtCbkOUzIAYANWKspFjIKEQQWzxSa9Nb7dlpJCHYSeAF8K1d7ctxaKRYyEAR3OcuiShgjCakPMcShFEUtad102KGR5Lg%2BZIfutcsQjAyF6gMVM0kxELK%2BtOD1vd%2FD7daCECzCbGQUmbNrbjxkGScRUghZf3FbRE0QZnNCz9XMrSttXeDM7iPLmcopCCTG%2BU23pEzCcGc3q2kwzY5K%2Fq5zIlyPZ8lgxlfts6eeV9qszUg176%2BXb%2B0o7%2FGrYnkcifKWVVCifyMquzlPtixxJKZn0YvlXLJT9oAQNtJctaK3mVPlNPc1lnu6tInykU7OODyJ8rVPj2YOffIE%2BUWEbT2Ne4vt%2FNHRtU%2B8kS5CrJnHM%2BEKXmiXIWQPMDspPJ7zfXkEX%2FBCNnajDe61J4nyimRebkZb9YmtjxRblS65HDfPFHOAcRRt7AcivOwJ8qNAvXofbXv5HedPNoy6uwVw6OAjb7%2BsifKjQZ27%2F0vW37fC9iM6y65QDUD2L3PuNSJcntBmnnd5TY5zAT3yLMe%2FkS5I%2BA87LWZ9gajNglJQoIhEMycVEgSEgyBYOakQpKQYAgEMycVkoQEQyCYOamQJCQYAsHMSYUEI%2BRfzec9dI8XxxgAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E",ka="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ta="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FHeart%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FHeart%22%20fill%3D%22%23000000%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.375%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.3134395%2C18.0459049%20L1.52443954%2C8.87923824%20C-0.0597509272%2C7.29629358%20-0.452349335%2C4.87680895%200.550022872%2C2.87415491%20L0.550022872%2C2.87415491%20C1.29768241%2C1.3792661%202.71831477%2C0.334867269%204.36817344%2C0.0671851901%20C6.01803212%2C-0.200496889%207.69599623%2C0.341168737%208.87793954%2C1.52298824%20L10.3134395%2C2.95757158%20L11.7489395%2C1.52298824%20C12.9308829%2C0.341168737%2014.608847%2C-0.200496889%2016.2587056%2C0.0671851901%20C17.9085643%2C0.334867269%2019.3291967%2C1.3792661%2020.0768562%2C2.87415491%20L20.0768562%2C2.87415491%20C21.0778256%2C4.87595612%2020.6857045%2C7.29366739%2019.1033562%2C8.87648824%20L10.3134395%2C18.0459049%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";var Ma="data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M30.0001%200.666626C46.2004%200.666626%2059.3334%2013.7996%2059.3334%2030C59.3334%2046.2003%2046.2004%2059.3333%2030.0001%2059.3333C13.7997%2059.3333%200.666748%2046.2003%200.666748%2030C0.666748%2013.7996%2013.7997%200.666626%2030.0001%200.666626ZM30.0001%205.99996C16.7452%205.99996%206.00008%2016.7451%206.00008%2030C6.00008%2043.2548%2016.7452%2054%2030.0001%2054C43.2549%2054%2054.0001%2043.2548%2054.0001%2030C54.0001%2016.7451%2043.2549%205.99996%2030.0001%205.99996ZM31.6667%2027.3333C32.219%2027.3333%2032.6667%2027.781%2032.6667%2028.3333V42.3333C32.6667%2042.8856%2032.219%2043.3333%2031.6667%2043.3333H28.3334C27.7811%2043.3333%2027.3334%2042.8856%2027.3334%2042.3333V28.3333C27.3334%2027.781%2027.7811%2027.3333%2028.3334%2027.3333H31.6667ZM30.0001%2019.3333C31.4728%2019.3333%2032.6667%2020.5272%2032.6667%2022C32.6667%2023.4727%2031.4728%2024.6666%2030.0001%2024.6666C28.5273%2024.6666%2027.3334%2023.4727%2027.3334%2022C27.3334%2020.5272%2028.5273%2019.3333%2030.0001%2019.3333Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",Ba="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FMic%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMic%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284%2C%201%29%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%228%22%20y1%3D%2218.3333333%22%20x2%3D%228%22%20y2%3D%2222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20x%3D%223.5%22%20y%3D%220%22%20width%3D%229%22%20height%3D%2214.9111111%22%20rx%3D%223.91111111%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C8.8%20L0%2C11%20C0%2C15.0500882%203.35786438%2C18.3333333%207.5%2C18.3333333%20L8.5%2C18.3333333%20C12.6421356%2C18.3333333%2016%2C15.0500882%2016%2C11%20L16%2C8.8%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",La="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ua="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%20Rotated%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus-Rotated%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%2845.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ra="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Pa="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FStipop%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FStipop%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.5%2C1%20C18.2989899%2C1%2023%2C5.70101013%2023%2C11.5%20C23%2C17.2039245%2018.451858%2C21.8455734%2012.7842951%2C21.9962258%20L12.5%2C22%20L6%2C23%20L6.47908443%2C20.1033393%20C3.77065445%2C18.2043706%202%2C15.0589646%202%2C11.5%20C2%2C5.70101013%206.70101013%2C1%2012.5%2C1%20Z%20M12.5%2C2.5%20C7.52943725%2C2.5%203.5%2C6.52943725%203.5%2C11.5%20C3.5%2C14.3705191%204.85206397%2C17.0112175%207.09635804%2C18.6980916%20L7.34021132%2C18.8751453%20L8.11298335%2C19.416961%20L7.817%2C21.202%20L12.3852902%2C20.5%20L12.5%2C20.5%20C17.4705627%2C20.5%2021.5%2C16.4705627%2021.5%2C11.5%20C21.5%2C6.52943725%2017.4705627%2C2.5%2012.5%2C2.5%20Z%20M13.5%2C12.3%20C13.1666667%2C13.9666667%2012.3333333%2C14.8%2011%2C14.8%20C9.66666667%2C14.8%208.83333333%2C13.9666667%208.5%2C12.3%20L13.5%2C12.3%20Z%20M15.0030662%2C6.67300699%20C15.1656001%2C6.92305919%2015.1180007%2C7.24908483%2014.9043132%2C7.44344192%20L14.826993%2C7.50306617%20L13.632%2C8.279%20L14.8086975%2C8.98550424%20C15.0644308%2C9.13894425%2015.1646368%2C9.45281874%2015.0578342%2C9.72120324%20L15.0144958%2C9.80869745%20C14.8610557%2C10.0644308%2014.5471813%2C10.1646368%2014.2787968%2C10.0578342%20L14.1913025%2C10.0144958%20L12.1913025%2C8.81449576%20C11.8402552%2C8.60386734%2011.8048611%2C8.12100565%2012.0939654%2C7.85785853%20L12.173007%2C7.79693383%20L14.173007%2C6.49693383%20C14.4508428%2C6.31634058%2014.8224729%2C6.39517122%2015.0030662%2C6.67300699%20Z%20M8.1%2C6.7%20C8.92842712%2C6.7%209.6%2C7.37157288%209.6%2C8.2%20C9.6%2C9.02842712%208.92842712%2C9.7%208.1%2C9.7%20C7.27157288%2C9.7%206.6%2C9.02842712%206.6%2C8.2%20C6.6%2C7.37157288%207.27157288%2C6.7%208.1%2C6.7%20Z%22%20id%3D%22Oval%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Oa="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20height%3D%2224px%22%3E%3Cpath%20d%3D%22M%2012%202%20C%206.477%202%202%206.477%202%2012%20C%202%2017.523%206.477%2022%2012%2022%20C%2017.523%2022%2022%2017.523%2022%2012%20C%2022%206.477%2017.523%202%2012%202%20z%20M%2012%204%20C%2016.411%204%2020%207.589%2020%2012%20C%2020%2016.411%2016.411%2020%2012%2020%20C%207.589%2020%204%2016.411%204%2012%20C%204%207.589%207.589%204%2012%204%20z%20M%208%208%20L%208%2016%20L%2016%2016%20L%2016%208%20L%208%208%20z%22%2F%3E%3C%2Fsvg%3E";const ja=de({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t,events:{onClick:"cc-actionsheet-clicked"}}),Va=de({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t}),Ga=de({tagName:"cometchat-text-input",elementClass:o.CometChatTextInput,react:t});function Ha(e,t){let n=e;const{type:o}=t;switch(o){case"setText":n={...e,text:t.text};break;case"setAddToMsgInputText":n={...e,addToMsgInputText:t.addToMsgInputText};break;case"setTextMessageToEdit":n={...e,textMessageToEdit:t.textMessageToEdit};break;case"setContentToDisplay":n={...e,contentToDisplay:t.contentToDisplay};break;case"setLoggedInUser":n={...e,loggedInUser:t.loggedInUser};break;case"setShowPoll":n={...e,showPoll:t.showPoll};break;case"setShowMentionsCountWarning":n={...e,showMentionsCountWarning:t.showMentionsCountWarning}}return n}function Qa(e){const{user:a,group:l,text:c="",onTextChange:C,placeHolderText:g=n.localize("ENTER_YOUR_MESSAGE_HERE"),sendButtonIconURL:u=Ra,sendButtonView:p,onSendButtonClick:h,secondaryButtonView:m,attachmentIconURL:y=La,emojiIconURL:w=Pa,AIIconURL:f=Fa,auxiliaryButtonView:D,auxiliaryButtonAlignment:E=n.AuxiliaryButtonAlignment.right,attachmentOptions:v,hideLayoutMode:I=!1,parentMessageId:S=null,LiveReactionIconURL:F=Ta,hideLiveReaction:k=!0,headerView:T=null,onError:M,disableSoundForMessages:B=!1,customSoundForMessage:L,disableTypingEvents:U=!1,messageComposerStyle:P,hideVoiceRecording:O=!1,actionSheetStyle:j,AIOptionsStyle:V={},mediaRecorderStyle:G,voiceRecordingStartIconURL:H=Ba,voiceRecordingCloseIconURL:Q=ka,voiceRecordingStopIconURL:N=Oa,voiceRecordingSubmitIconURL:K=Ra,userMemberWrapperConfiguration:z,textFormatters:J=[],disableMentions:Y=!1,InfoSimpleIcon:_=Ma,mentionsWarningText:W,mentionsWarningStyle:Z={}}=e,[X,q]=t.useReducer(Ha,{text:c,addToMsgInputText:c,textMessageToEdit:null,contentToDisplay:"none",loggedInUser:null,showPoll:!1,showMentionsCountWarning:!1}),$=t.useRef(null),ee=t.useRef(null),[te,ne]=x(null),[oe,re]=x(null),[se,ie]=x(null),[le,ce]=x(null),[Ce,de]=x(null),[ge,ue]=x(null),[pe,he]=x(null),[me,Ae]=x(null),[xe,be]=x(null),[ye,we]=x(null),[fe,Ee]=x(null),[ve,Ie]=x(null),[Se,Fe]=x(null),[ke,Te]=x(null),Me=t.useRef(new Map),Be=t.useRef(null),Le=t.useRef(null),Ue=b(M),Re=A(a),Pe=A(l),Oe=A(S),je=A(B),Ve=A(L),Ge=A(h),{theme:He}=t.useContext(R),[Qe,Ne]=t.useState(null),[Ke,ze]=t.useState(J),[Je,Ye]=t.useState(""),_e=t.useRef(""),We=t.useRef(""),[Ze,Xe]=t.useState(!1),qe=t.useRef(De.getDataSource().getMentionsTextFormatter({theme:He})),[$e,et]=t.useState(0),[tt,nt]=t.useState(z??new r.UserMemberWrapperConfiguration({})),[ot,rt]=t.useState(),[st,it]=t.useState(void 0),[at,lt]=t.useState(void 0),ct=t.useRef(null),Ct="composer_"+Date.now(),dt=t.useCallback((()=>{We.current=_e.current,Xe(!1),Ye(""),_e.current=""}),[Xe,Ye]),gt=t.useCallback((e=>{if(!e||!e.length)return Ye(""),_e.current="",Xe(!1),void et(1);let t=e.split("@")[1].toLowerCase()?e.split("@")[1].toLowerCase():void 0;t&&We.current&&t.startsWith(We.current.toLowerCase())||t===Je||(Ye(t),_e.current=t,Xe(!0),We.current="",et($e+1))}),[Ye,Xe,et]),ut=t.useCallback((()=>{const e=Re.current,t=Pe.current;if(e){const t=e.getBlockedByMe()||e.getHasBlockedMe();return{receiverId:e?.getUid(),receiverType:n.CometChatUIKitConstants.MessageReceiverType.user,isBlocked:t}}if(t)return{receiverId:t?.getGuid(),receiverType:n.CometChatUIKitConstants.MessageReceiverType.group};throw new Error("No user or group object provided. Should at least provide one.")}),[Pe,Re]),pt=t.useCallback((()=>{const{receiverId:e,receiverType:t,isBlocked:n}=ut();return n?null:new s.CometChat.TypingIndicator(e,t)}),[ut]),ht=t.useCallback((()=>{try{const e=pt();if(!e)return;s.CometChat.startTyping(e)}catch(e){Ue(e)}}),[pt,Ue]),mt=t.useCallback((()=>{try{s.CometChat.endTyping(pt()),Be.current=null}catch(e){Ue(e)}}),[pt,Ue]),At=t.useCallback((()=>{U||(null!==Be.current?(window.clearTimeout(Be.current),Be.current=null):ht(),Be.current=window.setTimeout((()=>mt()),500))}),[ht,mt,U]);function xt(){const e=Re.current;if(null!=e)return{user:e?.getUid(),group:null,parentMessageId:S};const t=Pe.current;return null!=t?{user:null,group:t?.getGuid(),parentMessageId:S}:{user:null,group:null,parentMessageId:S}}const bt=t.useCallback((function(e){i.flushSync((()=>{q({type:"setAddToMsgInputText",addToMsgInputText:""})})),q({type:"setAddToMsgInputText",addToMsgInputText:e}),setTimeout((()=>{q({type:"setAddToMsgInputText",addToMsgInputText:""})}),0)}),[q]),yt=t.useCallback(((e,t,o)=>{throw t.setMetadata({error:e}),o?n.CometChatMessageEvents.ccMessageEdited.next({message:t,status:n.MessageStatus.error}):n.CometChatMessageEvents.ccMessageSent.next({message:t,status:n.MessageStatus.error}),e}),[]),wt=t.useCallback((()=>{je.current||r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.outgoingMessage,Ve.current)}),[Ve,je]),ft=t.useCallback((e=>{const{receiverId:t,receiverType:n}=ut(),o=new s.CometChat.TextMessage(t,e,n);o.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),o.setMuid(r.CometChatUIKitUtility.ID());const i=Oe.current;return null!==i&&o.setParentMessageId(i),o}),[ut,Oe]),Dt=t.useCallback((async e=>{try{for(let t=0;t{try{const t=ft(e);let o=qe.current.getCometChatUserGroupMembers();if(o){let e=[];for(let t=0;t{const{receiverId:n,receiverType:o}=ut(),r=new s.CometChat.TextMessage(n,e,o);return r.setId(t),r}),[ut]),It=t.useCallback((async e=>{try{for(let t=0;t{try{if(Ge.current)Ge.current(vt(e,t.getId()),n.PreviewMessageMode.edit),bt("");else{const o=await It(vt(e,t.getId()));bt(""),o&&n.CometChatMessageEvents.ccMessageEdited.next({message:o,status:n.MessageStatus.success})}}catch(e){Ue(e)}}),[It,vt,Ue]),Ft=t.useCallback((async e=>{if(0===(e=e?.trim())?.length||null!==X.textMessageToEdit&&X.textMessageToEdit.getText()===e)return;let t;if("emojiKeyboard"===X.contentToDisplay&&(pe?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})),"voiceRecording"===X.contentToDisplay&&(ge?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})),q({type:"setText",text:""}),$.current?.emptyInputField(),null!==X.textMessageToEdit)q({type:"setTextMessageToEdit",textMessageToEdit:null}),await St(e,X.textMessageToEdit);else if(t=Ge.current)try{await Promise.all([t(ft(e),n.PreviewMessageMode.none)])}catch(e){Ue(e)}else await Et(e)}),[X.textMessageToEdit,X.contentToDisplay,pe,ge,q,St,Et,Ue,ft,Ge,Re]),kt=t.useCallback((async(e,t)=>{const n=await function(e){return new Promise(((t,n)=>{const o=new FileReader;o.onload=()=>{null!==o.result&&t(new File([o.result],e.name,e))},o.onerror=()=>n(new Error(`Converting the file named "${e.name}" to binary failed`)),o.readAsArrayBuffer(e)}))}(e),{receiverId:o,receiverType:i}=ut(),a=new s.CometChat.MediaMessage(o,n,t,i);a.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),a.setMuid(r.CometChatUIKitUtility.ID()),a.setMetadata({file:n});const l=Oe.current;return null!==l&&a.setParentMessageId(l),a}),[ut,Oe]),Tt=t.useCallback((async e=>{try{return await s.CometChat.sendMediaMessage(e)}catch(t){yt(t,e,!1)}}),[yt]),Mt=t.useCallback((async(e,t)=>{try{const o=await kt(e,t);n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.inprogress});const r=await Tt(o);r&&(n.CometChatMessageEvents.ccMessageSent.next({message:r,status:n.MessageStatus.success}),wt())}catch(e){Ue(e)}}),[kt,wt,Tt,Ue]),Bt=t.useCallback((async e=>{try{const t=new File([e],`${function(){const e=new Date,t="audio-recording-yyyyMMddHHmmss",n=e.getFullYear().toString(),o=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0"),s=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return t.replace("yyyyMMdd",`${n}${o}${r}`).replace("HHmmss",`${s}${i}${a}`)}()}.wav`,{type:e.type});Mt(t,n.CometChatUIKitConstants.MessageTypes.audio)}catch(e){Ue(e)}}),[Mt,Ue]);const Lt=t.useCallback((async()=>{const e=ee.current;if(!e?.files?.length||Re.current?.getBlockedByMe())return;const t=e.files[0],o=e.accept.slice(0,-2),r=Ge.current;if(r)try{await Promise.all([r(await kt(t,o),n.PreviewMessageMode.none)])}catch(e){Ue(e)}else await Mt(t,o);e.value=""}),[Mt,Ue,kt,Ge,Re]);function Ut(){return!X.text||""===X?.text?.trim()||null!==X.textMessageToEdit&&X.textMessageToEdit.getText()===X.text}function Rt(){return p?p(void 0!==a?a:l,xt()):d.jsx("div",{className:"cc-message-composer__send-btn-wrapper",children:d.jsx("cometchat-button",{ref:ie,iconURL:u,hoverText:n.localize("SEND_MESSAGE"),buttonStyle:JSON.stringify(na(P,He,Ut()))})})}function Pt(){if(m&&(void 0!==a||void 0!==l))return m(void 0!==a?a:l,xt());const e=d.jsx("cometchat-button",{ref:ce,hoverText:n.localize("ATTACH"),iconURL:"attachments"===X.contentToDisplay?Ua:y,buttonStyle:JSON.stringify(ha(P,He,"attachments"===X.contentToDisplay))});let t;if(v&&v.length>0&&(void 0!==a||void 0!==l)){t=v(a||l,xt())}else t=De.getDataSource().getAttachmentOptions(He,xt());for(let e=0;e{n.onClick?.call(new On(De.getDataSource(),new so({})),[a,l])}),Me.current.set(o,e||null)}}const o=d.jsx(Va,{ref:Ie,hideLayoutMode:I,actions:t,actionSheetStyle:ua(j,He)});return d.jsxs("cometchat-popover",{ref:be,placement:n.Placement.top,popoverStyle:JSON.stringify(Ca(j)),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__secondary-btn-wrapper",children:e}),d.jsx("div",{slot:"content",className:"cc-message-composer__secondary-content",style:da(j,He),children:o})]})}function Ot(){const e=d.jsx("cometchat-media-recorder",{ref:re,mediaPlayerStyle:JSON.stringify(Ia(G,He)),"cc-media-recorder-submitted":"onVoiceRecordingSubmit",autorecording:"true",recordingType:n.RecordingType.audio,closeIconURL:Q,startIconURL:H,stopIconURL:N,submitButtonIconURL:K,startIconText:"",stopIconText:"",submitButtonIconText:""}),t=d.jsx("cometchat-button",{ref:ue,hoverText:n.localize("VOICE_RECORDING"),iconURL:"voiceRecording"===X.contentToDisplay?Ua:H,buttonStyle:JSON.stringify(Sa(P,He,"voiceRecording"===X.contentToDisplay,!1))});return O?null:d.jsxs("cometchat-popover",{placement:n.Placement.top,popoverStyle:JSON.stringify(new o.PopoverStyle({width:Ea,height:Da,borderRadius:va,border:"1px solid rgba(20, 20, 20, 0.08)",boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})),closeOnOutsideClick:!1,children:[d.jsx("div",{slot:"children",className:"cc-message-composer__secondary-btn-wrapper",children:t}),d.jsx("div",{slot:"content",className:"cc-message-composer__secondary-content",style:{width:Ea,height:Da,borderRadius:va,boxSizing:"border-box"},children:"voiceRecording"===X.contentToDisplay?e:null})]})}function jt(){const e=d.jsx("cometchat-button",{ref:de,hoverText:n.localize("AI"),iconURL:"ai"===X.contentToDisplay?Ua:f,buttonStyle:JSON.stringify(ma(P,He,"ai"===X.contentToDisplay))});let t;t=De.getDataSource().getAIOptions(Re?.current||null,Pe?.current||null,He,xt(),V);const r=()=>{Ce?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})},s=()=>{Ne(null)},i=d.jsx(ja,{ref:Fe,hideLayoutMode:!0,actions:t,actionSheetStyle:pa(V,He),onActionItemClick:e=>{e instanceof n.CometChatMessageComposerAction&&e?.onClick&&(e.onClick(),r()),e instanceof n.CometChatActionsView&&e?.customView&&Ne(e.customView({backAction:s,closePopover:r}))}});return t.length<=0?d.jsx(d.Fragment,{}):d.jsxs("cometchat-popover",{ref:we,placement:n.Placement.top,popoverStyle:JSON.stringify((a=V,new o.PopoverStyle({width:a?.width||la,height:a?.height||aa,borderRadius:a?.borderRadius||ca,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"}))),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__ai-btn-wrapper",children:e}),d.jsx("div",{slot:"content",className:"cc-message-composer__ai-content",style:ga(V,He),children:Qe||i})]});var a}function Vt(){if(D&&(void 0!==a||void 0!==l))return D(void 0!==a?a:l,xt());const e=k&&Ut(),t=De.getDataSource().getAuxiliaryOptions(xt(),He,a,l),r=d.jsx("cometchat-button",{ref:he,hoverText:n.localize("EMOJI"),iconURL:"emojiKeyboard"===X.contentToDisplay?Ua:w,buttonStyle:JSON.stringify(fa(P,He,"emojiKeyboard"===X.contentToDisplay,e))}),s=d.jsx("cometchat-emoji-keyboard",{ref:ne,emojiKeyboardStyle:JSON.stringify(wa(P,He))});return d.jsxs(d.Fragment,{children:[d.jsx(d.Fragment,{children:jt()}),d.jsx("div",{style:{flex:1,display:"flex",columnGap:"8px"},children:t.map((e=>e))}),d.jsx("div",{className:"cc-message-composer__default-auxiliary-view-wrapper",style:{display:"flex",flex:"1"},children:d.jsxs("cometchat-popover",{ref:Ae,placement:n.Placement.top,popoverStyle:JSON.stringify(new o.PopoverStyle({width:xa,height:Aa,borderRadius:ba,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__auxiliary-btn-wrapper",children:r}),d.jsx("div",{slot:"content",className:"cc-message-composer__auxiliary-content",style:ya(He),children:s})]})})]})}function Gt(){if(null===X.textMessageToEdit)return null;const e=X.textMessageToEdit;return d.jsx("cometchat-preview",{style:{textAlign:"left"},ref:Ee,previewSubtitle:(e=>{const t=/<@uid:(.*?)>/g;let n=e.getText(),o=n,s=t.exec(n),i=[],a=e.getMentionedUsers();for(;null!==s;){let e;for(let t=0;t{const e=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{let t=e?.message?.getParentMessageId();(te.current&&t&&t===te.current||!te.current&&!t)&&(e.status===n.MessageStatus.inprogress&&e.message instanceof s.CometChat.TextMessage?(ne.current=!0,o({type:"setTextMessageToEdit",textMessageToEdit:e.message}),i.current?.emptyInputField(),c(e.message.getText())):ne.current=!0)})),t=n.CometChatUIEvents.ccComposeMessage.subscribe((e=>{o({type:"setText",text:""}),i.current?.emptyInputField(),c(e)}));O.current.setId(W);const r=n.CometChatUIEvents.ccShowMentionsCountWarning.subscribe((e=>{if(e.id===W){if(e.showWarning)return void o({type:"setShowMentionsCountWarning",showMentionsCountWarning:!0});o({type:"setShowMentionsCountWarning",showMentionsCountWarning:!1})}}));return()=>{e.unsubscribe(),t.unsubscribe(),r.unsubscribe()}}),[c,o,i,W]),t.useEffect((()=>{if(!a)return;async function e(){try{const{receiverId:e,receiverType:t}=S(),o={type:"live_reaction",reaction:"heart"};s.CometChat.sendTransientMessage(new s.CometChat.TransientMessage(e,t,o)),n.CometChatMessageEvents.ccLiveReaction.next("heart")}catch(e){I(e)}}const t="cc-button-clicked";return a.addEventListener(t,e),()=>{a.removeEventListener(t,e)}}),[l,a,I,S]),t.useEffect((()=>{if(!C||!d.current)return;function e(e){const{action:t}=e.detail;g?.click(),o({type:"setContentToDisplay",contentToDisplay:"none"});const n=E.current.get(`${t.id}`);"function"==typeof n?n():(d.current.accept=`${t.id}/*`,d.current.click())}const t="cc-actionsheet-clicked";return C.addEventListener(t,e),()=>{C.removeEventListener(t,e)}}),[g,C,o,E,d]),t.useEffect((()=>{if(!u)return;function e(){o({type:"setTextMessageToEdit",textMessageToEdit:null}),o({type:"setText",text:""}),i.current?.emptyInputField(),c("")}const t="cc-preview-close-clicked";return u.addEventListener(t,e),()=>{u.removeEventListener(t,e)}}),[u,o,i]),t.useEffect((()=>{if(!g)return;function e(){switch(F){case"attachments":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"attachments"})}}function t(){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-button-clicked",r="cc-popover-outside-clicked";return g.addEventListener(n,e),b.addEventListener(r,t),()=>{g.removeEventListener(n,e),b.removeEventListener(r,t)}}),[F,g,b,p,h,B,o]),t.useEffect((()=>{if(!B)return;function e(){switch(L(null),F){case"ai":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"ai"})}}function t(){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-button-clicked",r="cc-popover-outside-clicked";return B.addEventListener(n,e),M.addEventListener(r,t),()=>{B.removeEventListener(n,e),M.removeEventListener(r,t)}}),[F,B,M,g,p,h,L,o]),t.useEffect((()=>{if(!p||!h)return;function e(){switch(F){case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"emojiKeyboard":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"})}}function t(){switch(F){case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"voiceRecording":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"})}}const n="cc-button-clicked";return p.addEventListener(n,e),h.addEventListener(n,t),()=>{p.removeEventListener(n,e),h.removeEventListener(n,t)}}),[F,g,h,p,B,o]),t.useEffect((()=>{if(!m)return;function e(e){const t=e.detail.id;"string"==typeof t&&c(t)}function t(e){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-emoji-clicked",r="cc-popover-outside-clicked";return m.addEventListener(n,e),x.addEventListener(r,t),()=>{m.removeEventListener(n,e),x.removeEventListener(r,t)}}),[c,x,m,o]),t.useEffect((()=>{if(!A)return;function e(e){const t=new CustomEvent("cc-button-clicked",{});h?.click(),h?.dispatchEvent(t)}function t(t){const n=t.detail.file;e(),T(n)}const n="cc-media-recorder-closed",o="cc-media-recorder-submitted";return A.addEventListener(n,e),A.addEventListener(o,t),()=>{A.removeEventListener(n,e),A.removeEventListener(o,t)}}),[A,h,o,T]),t.useEffect((()=>{if(!f)return;function e(){y&&w(y)}const t="cc-button-clicked";return f.addEventListener(t,e),()=>{f.removeEventListener(t,e)}}),[w,y,f]),t.useEffect((()=>{const e=i.current;if(!e)return;function t(e){Y(!1);const t=e.detail.value;"string"==typeof t&&w(t)}const n="cc-text-input-entered";return e.addEventListener(n,t),()=>{e.removeEventListener(n,t)}}),[w,i]),t.useEffect((()=>{const e=i.current;if(!e)return;function t(e){const t=e.detail.value;"string"!=typeof t&&null!=t||(v(),o({type:"setText",text:t}),void 0!==D&&D(t))}const n="cc-text-input-changed";return e.addEventListener(n,t),()=>{e.removeEventListener(n,t)}}),[D,v,o,i]),t.useEffect((()=>{const e=n.CometChatUIEvents.ccShowModal.subscribe((e=>{o({type:"setShowPoll",showPoll:!0}),k.current=e.child})),t=n.CometChatUIEvents.ccHideModal.subscribe((()=>{o({type:"setShowPoll",showPoll:!1}),k.current=null}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[k,o]),t.useEffect((()=>{if(!R)if(U.length){let e=!1;for(let t=0;t{e&&e.cleanup()}}),[]),t.useEffect((()=>{(z.current&&Q&&z.current.getUid()!==Q.getUid()||J.current&&H&&J?.current.getGuid()!==H.getGuid())&&(o({type:"setText",text:""}),c("")),z.current&&Y(Q&&z.current.getUid()!==Q.getUid()),J.current&&Y(H&&J?.current.getGuid()!==H.getGuid());for(let e=0;e{if(!R){if(H){const e=void 0!==j?.userMemberListType?j?.userMemberListType:n.UserMemberListType.groupmembers;q(e);const t=j?.groupMemberRequestBuilder?j?.groupMemberRequestBuilder:new s.CometChat.GroupMembersRequestBuilder(H.getGuid()).setLimit(15);X(t)}if(Q){const e=void 0!==j?.userMemberListType?j?.userMemberListType:n.UserMemberListType.users;q(e);const t=j?.usersRequestBuilder?j?.usersRequestBuilder:(new s.CometChat.UsersRequestBuilder).setLimit(15);Z(t)}}}),[Q,H,R]),t.useEffect((()=>{const e=e=>{$.current&&!$.current.contains(e.target)&&Y(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),t.useEffect((()=>{try{setTimeout((()=>{ne.current&&i.current&&(o({type:"setTextMessageToEdit",textMessageToEdit:null}),o({type:"setText",text:""}),i.current?.emptyInputField(),c(""),ne.current=!1)}))}catch(e){I(e)}}),[Q,H,te])}({dispatch:q,textInputRef:$,liveReactionBtnElement:ke,LiveReactionIconURL:F,mySetAddToMsgInputText:bt,actionSheetElement:ve,secondaryBtnElement:le,mediaFilePickerRef:ee,textMessageEditPreviewElement:fe,auxiliaryBtnElement:pe,voiceRecordingBtnElement:ge,emojiKeyboardElement:te,voiceRecordingElement:oe,text:X.text,handleSendButtonClick:Ft,primaryBtnElement:se,onTextChange:C,actionIdToActionOnClick:Me,handleTyping:At,errorHandler:Ue,getReceiverDetails:ut,contentToDisplay:X.contentToDisplay,createPollViewRef:Le,handleSendVoiceMessage:Bt,auxiliaryPopoverElement:me,attachmentPopoverElement:xe,aiPopoverElement:ye,aiBtnElement:Ce,setSmartRepliesView:Ne,textFormatters:J,disableMentions:Y,textFormatterArray:Ke,mentionsTextFormatterInstanceRef:qe,userMemberWrapperConfiguration:z,setTextFormatters:ze,CometChatUIKitLoginListener:r.CometChatUIKitLoginListener,group:l,user:a,setUserMemberWrapperConfig:nt,userMemberWrapperConfig:tt,userPropRef:Re,groupPropRef:Pe,setShowListForMentions:Xe,searchMentions:gt,mentionsFormatterInstanceId:Ct,setUsersRequestBuilder:it,setGroupMembersRequestBuilder:lt,setUserMemberListType:rt,userMemberWrapperRef:ct,getComposerId:xt,parentMessageIdPropRef:Oe}),d.jsxs(d.Fragment,{children:[X.showPoll&&Le?.current?Le.current:null,d.jsxs("div",{className:"cc-message-composer",style:(Qt=P,{width:Qt?.width||"100%",height:Qt?.height||"100%",boxSizing:"border-box",padding:"14px 16px",border:"none",borderRadius:"0",background:"transparent",display:"flex",flexDirection:"column",justifyContent:"flex-end"}),children:[Ze&&d.jsx("div",{style:{maxHeight:"196px",overflowY:"hidden",display:"flex !important",flexDirection:"column",justifyContent:"flex-end !important",zIndex:2,height:"auto",minHeight:"45px",padding:"0px 0px 1px 0px",width:"100%"},ref:ct,children:d.jsx(ae,{userMemberListType:ot,onItemClick:tt?.onItemClick||(e=>{let t=[e];qe.current.setCometChatUserGroupMembers(t),qe.current.getCometChatUserGroupMembers(),qe.current.reRender(),Xe(!1),et(1),Ye("")}),usersRequestBuilder:st,searchKeyword:Je,subtitleView:tt?.subtitleView,disableUsersPresence:tt?.disableUsersPresence,avatarStyle:tt?.avatarStyle,listItemView:tt?.listItemView,statusIndicatorStyle:tt?.statusIndicatorStyle,userPresencePlacement:tt?.userPresencePlacement,hideSeparator:tt?.hideSeparator,loadingStateView:tt?.loadingStateView,onEmpty:dt,loadingIconUrl:tt?.loadingIconURL,group:l,groupMemberRequestBuilder:at,disableLoadingState:!0,onError:dt})}),X.showMentionsCountWarning&&d.jsx("div",{style:{height:"fit-content",position:"relative",width:"100%",boxSizing:"border-box",left:"50%",transform:"translate(-50%)",zIndex:1,padding:"0px 0px 1px 0px"},children:d.jsx("cometchat-icon-button",{text:W||n.localize("MENTIONS_LIMIT_WARNING_MESSAGE"),iconURL:_,buttonStyle:JSON.stringify(ea(0,He,Z))})}),d.jsx("input",{ref:ee,type:"file",onChange:Lt,style:{display:"none"}}),d.jsx("div",{className:"cc-message-composer__header",style:{height:"fit-content",position:"relative",width:"100%",boxSizing:"border-box",left:"50%",transform:"translate(-50%)",zIndex:1,padding:"0px 0px 1px 0px"},children:T??Gt()}),d.jsxs(Ga,{ref:$,text:X.addToMsgInputText,placeholderText:g,auxiliaryButtonAlignment:E,textInputStyle:ta(P,He),textFormatters:Ke,children:[d.jsx("div",{"data-slot":"primaryView",className:"cc-message-composer__primary-view",style:{display:"flex",gap:"6px"},children:d.jsxs(d.Fragment,{children:[Ot(),Ut()?k?d.jsx(d.Fragment,{}):d.jsx("div",{className:"cc-message-composer__live-reaction-btn-wrapper",style:{},children:d.jsx("cometchat-button",{ref:Te,iconURL:F,hoverText:n.localize("LIVE_REACTION"),buttonStyle:JSON.stringify((Ht=P,{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:Ht?.liveReactionIconTint||"red",background:"transparent",padding:"0"}))})}):d.jsx(d.Fragment,{}),k?Rt():Ut()?d.jsx(d.Fragment,{}):Rt()]})}),d.jsx("div",{"data-slot":"secondaryView",className:"cc-message-composer__secondary-view",style:{flex:"1"},children:Pt()}),d.jsx("div",{"data-slot":"auxilaryView",className:"cc-message-composer__auxiliary-view",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"fit-content",gap:"8px",padding:"0",marginRight:"8px"},children:Vt()})]})]})]});var Ht,Qt}const Na=(e,t)=>({width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent50()}`,borderRadius:"inherit",background:t.palette.getBackground(),display:"flex",alignItems:"center",justifyContent:"space-between",flexDirection:"row",padding:"8px",boxSizing:"border-box",...e}),Ka=(e,t,o,r)=>t&&t.current?{textFont:o?.typingIndicatorTextFont||n.fontHelper(r.typography.subtitle2),textColor:o?.typingIndicatorTextColor||r.palette.getPrimary()}:{textFont:o?.subtitleTextFont||n.fontHelper(r.typography.subtitle2),textColor:o?.subtitleTextColor||r.palette.getAccent600()},za=e=>({borderRadius:"24px",width:"36px",height:"36px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorder:"",outerViewBorderSpacing:""}),Ja=e=>({height:"24px",width:"24px",border:"none",borderRadius:"none",background:"transparent",buttonIconTint:e.palette.getPrimary()});var Ya="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";var _a="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Wa="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const Za=e=>{const{theme:r}=t.useContext(R),{avatarStyle:i={},statusIndicatorStyle:a={},messageHeaderStyle:l={},listItemStyle:c={},subtitleView:C=null,disableUsersPresence:g=!1,disableTyping:u=!1,protectedGroupIcon:p=_a,passwordGroupIcon:h,privateGroupIcon:m=Wa,menu:y=null,user:w,group:f,backButtonIconURL:D=Ya,hideBackButton:E,listItemView:v=null,onError:I,onBack:S=(()=>{})}=e,[F,k]=t.useState(""),[T,M]=t.useState(null),B=A(w),L=A(f),U=A(S),[P,O]=x(null),j=t.useRef(!1),V=b(I),G=t.useCallback((()=>{const e=B.current,t=L.current;if(e)k(n.localize(e.getStatus().toUpperCase()));else if(t){const e=t.getMembersCount(),o=n.localize(e>1?"MEMBERS":"MEMBER");k(`${e} ${o}`)}}),[B,L]),H=t.useCallback((e=>{const t=B.current;t&&(t.setStatus(e.getStatus()),k(t.getStatus()))}),[B]),Q=t.useCallback((e=>{try{const t=e?.getSender(),o=e?.getReceiverId();if(t?.getUid()===B?.current?.getUid()&&T?.getUid()===o){if(B?.current?.getBlockedByMe()||B?.current?.getHasBlockedMe())return;k(n.localize("IS_TYPING"))}L?.current?.getGuid()===o&&k(`${t?.getName()} ${n.localize("IS_TYPING")}`)}catch(e){V(e)}}),[B,L,V,T]),N=t.useCallback((()=>{try{const e=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{L?.current?.getGuid()===e?.userAddedIn?.getGuid()&&(e?.usersAdded.length>0&&e?.usersAdded.forEach((e=>{e?.getUid()===T?.getUid()&&L?.current?.setHasJoined(!0)})),L?.current?.setMembersCount(e?.userAddedIn?.getMembersCount()),G())})),t=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{L?.current?.getGuid()===e?.kickedFrom?.getGuid()&&(T?.getUid()===e?.kickedUser?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.kickedFrom?.getMembersCount()),G())})),o=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{L?.current?.getGuid()===e?.joinedGroup?.getGuid()&&(T?.getUid()===e?.joinedUser?.getUid()&&L?.current?.setHasJoined(!0),L?.current?.setMembersCount(e?.joinedGroup?.getMembersCount()),G())})),r=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{L?.current?.getGuid()===e?.kickedFrom?.getGuid()&&(T?.getUid()===e?.kickedUser?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.kickedFrom?.getMembersCount()),G())})),s=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{L?.current?.getGuid()===e?.group?.getGuid()&&(L?.current?.setOwner(e?.group?.getOwner()),G())})),i=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{L?.current?.getGuid()===e?.leftGroup?.getGuid()&&(T?.getUid()===e?.userLeft?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.leftGroup?.getMembersCount()),G())}));return()=>{try{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe()}catch(e){V(e)}}}catch(e){V(e)}}),[L,G,V,T]),K=t.useCallback((()=>{const e="userList_"+Date.now(),t="groupsList_"+Date.now(),o="connection_"+Date.now();let r,i;return g||s.CometChat.addUserListener(e,new s.CometChat.UserListener({onUserOnline:e=>{B.current?.getUid()===e.getUid()&&H(e)},onUserOffline:e=>{B.current?.getUid()===e?.getUid()&&H(e)}})),u||(r=n.CometChatMessageEvents.onTypingStarted.subscribe((e=>{j.current=!0,Q(e)})),i=n.CometChatMessageEvents.onTypingEnded.subscribe((e=>{j.current=!1,G()}))),s.CometChat.addGroupListener(t,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(e,t,n,o,r)=>{L.current?.getGuid()===r?.getGuid()&&t.getUid()===T?.getUid()&&L.current?.setScope(n),G()},onGroupMemberKicked:(e,t,n,o)=>{L.current?.getGuid()===o?.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(o?.getMembersCount()),G())},onMemberAddedToGroup:(e,t,n,o)=>{L.current?.getGuid()===o.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!0),L.current?.setMembersCount(o?.getMembersCount()),G())},onGroupMemberLeft:(e,t,n)=>{L.current?.getGuid()===n.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(n.getMembersCount()),G())},onGroupMemberJoined:(e,t,n)=>{L.current?.getGuid()===n.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!0),L.current?.setMembersCount(n.getMembersCount()),G())},onGroupMemberBanned:(e,t,n,o)=>{L.current?.getGuid()===o.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(o.getMembersCount()),G())}})),s.CometChat.addConnectionListener(o,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener => On Connected")}})),()=>{s.CometChat.removeUserListener(e),s.CometChat.removeGroupListener(t),s.CometChat.removeConnectionListener(o),r?.unsubscribe(),i?.unsubscribe()}}),[B,L,H,u,G,Q,T,g]),z=t.useCallback((()=>{if(B.current){if(!g&&B.current.getStatus()===n.CometChatUIKitConstants.userStatusType.online)return"#00f300"}else if(L.current){const e=L.current.getType();if(e===n.CometChatUIKitConstants.GroupTypes.private)return"#00f300";if(e===n.CometChatUIKitConstants.GroupTypes.password)return"#F7A500"}return null}),[B,L,g]),J=t.useCallback((()=>{let e="";if(L.current)switch(L.current?.getType()){case n.CometChatUIKitConstants.GroupTypes.password:e=h||p;break;case n.CometChatUIKitConstants.GroupTypes.private:e=m;break;default:e=""}return e}),[L,p,m,h]),Y=t.useCallback((()=>({...new o.AvatarStyle(za(r)),...i})),[i,r]),_=t.useCallback((()=>({height:"12px",width:"12px",border:"none",borderRadius:"24px",...a})),[a]),W=t.useCallback((()=>((e,t)=>new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||"transparent",borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent(),border:e?.border||"none",separatorColor:e?.separatorColor||"",hoverBackground:e?.hoverBackground||"transparent"}))(c,r)),[c,r]),Z=t.useCallback((()=>C||d.jsx("div",{children:d.jsx("cometchat-label",{text:F,labelStyle:JSON.stringify(Ka(B.current,j,l,r))})})),[B,C,F,r,l]),X=t.useCallback((()=>v||d.jsx("cometchat-list-item",{avatarName:B.current?.getName()||L.current?.getName(),avatarURL:B.current?.getAvatar()||L.current?.getIcon(),listItemStyle:JSON.stringify(W()),statusIndicatorColor:z(),statusIndicatorIcon:J(),title:B.current?.getName()||L.current?.getName(),hideSeparator:!0,statusIndicatorStyle:JSON.stringify(_()),avatarStyle:JSON.stringify(Y()),style:{width:"100%"},children:d.jsx("div",{slot:"subtitleView",children:Z()})})),[B,L,v,Z,Y,_,W,J,z]),q=t.useCallback((()=>y?d.jsx("div",{className:"cc-message-header__menu",style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:y}):null),[y]);return function(e,n,o,r,i,a,l,c,C,d){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{const t=[];return e&&(t.push(o()),t.push(r())),()=>{for(let e=0;e{if(!a)return;const e="cc-button-clicked",t=()=>l.current?.();return a.addEventListener(e,t),()=>{a.removeEventListener(e,t)}}),[a,l]),t.useEffect((()=>{d()}),[c.current,C.current,d])}(T,M,N,K,V,P,U,B,L,G),d.jsxs("div",{className:"cc-message-header__wrapper",style:Na(l,r),children:[d.jsxs("div",{className:"cc-message-header",style:{display:"flex",alignItems:"center",justifyContent:"flex-start",height:"100%",width:"100%",boxSizing:"border-box",borderRadius:"inherit"},children:[E?null:d.jsx("div",{className:"cc-message-header__back-button",style:{width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:d.jsx("cometchat-button",{iconURL:D,buttonStyle:JSON.stringify(Ja(r)),ref:O})}),d.jsx("div",{className:"cc-message-header__listitem",style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:X()})]}),q()]})},Xa=de({tagName:"cometchat-reactions",elementClass:r.CometChatReactions,react:t}),qa=de({tagName:"cometchat-emoji-keyboard",elementClass:o.CometChatEmojiKeyboard,events:{onEmojiClick:"cc-emoji-clicked"},react:t}),$a=de({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t,events:{buttonClick:"cc-button-clicked"}}),el=de({tagName:"cometchat-button",elementClass:o.CometChatButton,react:t,events:{buttonClick:"cc-button-clicked"}}),tl=de({tagName:"cometchat-date",elementClass:o.CometChatDate,react:t}),nl=de({tagName:"cometchat-label",elementClass:o.CometChatLabel,react:t}),ol=de({tagName:"cometchat-loader",elementClass:o.CometChatLoader,react:t}),rl=de({tagName:"cometchat-avatar",elementClass:o.CometChatAvatar,react:t}),sl=de({tagName:"cometchat-receipt",elementClass:o.CometChatReceipt,react:t}),il=(e,t)=>({height:"100%",width:"100%",flex:"1 1 0",order:"2",position:"relative",display:"flex",flexDirection:"column",border:`1px solid ${t.palette.getAccent50()}`,borderRadius:"inherit",background:t.palette.getBackground(),...e}),al=(e,t,o,r={},s)=>{const i={height:"100%",width:"100%",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:r.threadReplyIconTint||t.palette.getAccent600(),display:"flex",alignItems:"center",gap:"5px",buttonTextColor:r?.threadReplyTextColor||t.palette.getAccent(),buttonTextFont:r?.threadReplyTextFont||n.fontHelper(t.typography.text2),iconHeight:"15px",iconWidth:"15px"};return e.getSender()&&e.getSender().getUid()!==o?.getUid()||s==n.MessageBubbleAlignment.left?{...i,flexFlow:"row"}:{...i,flexFlow:"row-reverse"}},ll=e=>({height:"fit-content",width:"fit-content",background:e.palette.getPrimary(),display:"flex",justifyContent:"center",buttonTextFont:n.fontHelper(e.typography.text2),buttonTextColor:e.palette.getAccent("dark"),border:"none",borderRadius:"12px",padding:"2px 6px"}),cl=(e,t,o,s)=>{const i={background:"transparent",borderRadius:"12px"},a={background:t.palette.getSecondary(),borderRadius:"12px"};return e.getDeletedAt()?{...i}:e?.getType()!==n.CometChatUIKitConstants.calls.meeting||e?.getSender()&&e?.getSender().getUid()!==s?.getUid()?e?.getType()===r.StickersConstants.sticker?i:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.text||e.getSender()&&s?.getUid()!==e.getSender().getUid()?e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.audio?e.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember||e.getCategory()===n.CometChatUIKitConstants.MessageCategory.call?{...i,border:`1px solid ${t.palette.getSecondary()}`}:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.interactive?a:{...a,width:"300px"}:{...a,borderRadius:""}:{...a,background:o===n.MessageListAlignment.left?t.palette.getSecondary():t.palette.getPrimary()}:{...a,background:t.palette.getPrimary(),border:"none"}},Cl=(e,t)=>{const r=t?.getType()===n.CometChatUIKitConstants.MessageTypes.text;return new o.ReceiptStyle({waitIconTint:e.palette.getAccent700(),sentIconTint:e.palette.getAccent600(),deliveredIconTint:e.palette.getAccent600(),readIconTint:r?e.palette.getBackground():e.palette.getPrimary(),errorIconTint:e.palette.getError(),height:"11px",width:"12px",background:"none"})},dl=(e,t,o,r)=>{const s={display:"flex",alignItems:"end",padding:"1px 8px 8px",gap:"4px",marginTop:"0"};return e?{...s,justifyContent:"center",height:"fit-content",borderRadius:"22px",padding:"3px 5px",paddingTop:"2px",position:"relative",marginTop:"-22px",marginRight:"12px",background:t.palette.getAccent500("dark"),width:"fit-content"}:(o?.getType()===n.CometChatUIKitConstants.MessageTypes.text&&(s.padding="0px 8px 8px",s.marginTop=r===n.MessageBubbleAlignment.right?"-6px":"-5px"),s)},gl=e=>{let t="center";return e===n.MessageBubbleAlignment.right?t="flex-end":e===n.MessageBubbleAlignment.left&&(t="flex-start"),{display:"flex",justifyContent:t,width:"100%",boxSizing:"border-box"}},ul=(e,t)=>({textColor:e?.TimestampTextColor||t.palette.getAccent600(),textFont:e?.TimestampTextFont||n.fontHelper(t.typography.caption3),padding:"0",display:"block"}),pl=(e,t)=>{const o={...ml(e),...t};return{textFont:o?.nameTextFont||n.fontHelper(e.typography.caption2),textColor:o?.nameTextColor||e.palette.getAccent600()}},hl=(e,t)=>new o.DateStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle2),textColor:e?.textColor||t.palette.getAccent600(),background:e?.background||"inherit",height:e?.height||"100%",width:e?.width||"100%",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||"8px"}),ml=e=>new r.MessageListStyle({background:e.palette.getBackground(),border:"none",emptyStateTextFont:n.fontHelper(e.typography.title1),emptyStateTextColor:e.palette.getAccent600(),errorStateTextFont:n.fontHelper(e.typography.title1),errorStateTextColor:e.palette.getAccent600(),loadingIconTint:e.palette.getAccent600(),nameTextFont:n.fontHelper(e.typography.caption2),nameTextColor:e.palette.getAccent600(),threadReplyTextFont:n.fontHelper(e.typography.subtitle1),threadReplyIconTint:e.palette.getAccent600(),threadReplyTextColor:e.palette.getAccent600(),TimestampTextFont:n.fontHelper(e.typography.caption2),TimestampTextColor:e.palette.getAccent600()}),Al=(e,t)=>({iconTint:{...ml(t),...e}.loadingIconTint}),xl=(e,t)=>{const n={...ml(t),...e};return{textFont:n.errorStateTextFont,textColor:n.errorStateTextColor}},bl=(e,t)=>({...new o.AvatarStyle({borderRadius:"24px",width:"28px",height:"28px",border:"none",backgroundColor:t.palette.getAccent700(),nameTextColor:t.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:"0",outerViewBorderRadius:"0",outerViewBorderColor:"",outerViewBorderSpacing:"0"}),...e}),yl=e=>{let t="center";return e===n.MessageBubbleAlignment.right?t="flex-end":e===n.MessageBubbleAlignment.left&&(t="flex-start"),{display:"flex",justifyContent:t,width:"100%",marginBottom:"16px"}},wl={padding:"0px 0px 0px 15px",overflow:"hidden",display:"flex",justifyContent:"flex-end",marginRight:"8px",boxSizing:"border-box"},fl=e=>({width:"100%",padding:"5px 0px",boxSizing:"border-box",display:"flex",marginTop:"-9px",justifyContent:e===n.MessageBubbleAlignment.left?"flex-start":"flex-end"});function Dl(e){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e.palette.getPrimary(),background:"transparent",position:"absolute",top:"20px",right:"16px"}}const El=e=>({height:"1px",width:"100%",background:e.palette.getAccent100()});function vl(e){return new o.ReceiptStyle({deliveredIconTint:e.palette.getAccent600(),readIconTint:e.palette.getPrimary(),errorIconTint:e.palette.getError(),height:"20px",width:"20px"})}const Il=(e,t)=>{let r=e;return r={...new o.DateStyle({textFont:n.fontHelper(t.typography.caption2),textColor:t.palette.getAccent600(),background:t.palette.getAccent100(),height:"100%",width:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"8px"}),...r},r.background=r.background||t.palette.getAccent600(),r},Sl={background:"transparent",height:"",width:"",border:"none",borderRadius:"none"},Fl={marginLeft:"auto"},kl={display:"flex"},Tl={width:"100%"},Ml=(e,t)=>({...{width:"360px",height:"620px",margin:"0 auto",background:e.palette.getBackground(),borderRadius:"12px",overflow:"hidden",boxSizing:"border-box"},...t}),Bl=e=>({marginTop:"8px",marginBottom:"8px",marginLeft:"10px",fontSize:n.fontHelper(e.typography.subtitle2),fontWeight:"500",color:e.palette.getAccent600(),display:"flex"}),Ll=e=>({marginBottom:"8px",marginLeft:"10px",fontSize:n.fontHelper(e.typography.subtitle2),fontWeight:"500",color:e.palette.getAccent600(),display:"flex"});class Ul{messageBubbleStyle(e,t,o,r){return e.getDeletedAt()?{background:"transparent",border:`1px dashed ${t.palette.getAccent400()}`,borderRadius:"12px"}:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.text||e.getSender()&&r?.getUid()!==e.getSender().getUid()?e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.audio?e.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember?{background:"transparent",borderRadius:"12px",border:`1px solid ${t.palette.getAccent100()}`}:(e.getSender()&&(e.getSender().getUid(),r?.getUid()),{background:t.palette.getAccent100(),borderRadius:"12px"}):{borderRadius:"",background:t.palette.getAccent100()}:{background:o===n.MessageBubbleAlignment.left?t.palette.getAccent100():t.palette.getPrimary(),borderRadius:"12px"}}getContentView(e,t){let o;const r={};return r[`${t.category}_${t.type}`]=t,r[`${e?.getCategory()}_${e?.getType()}`]&&r[`${e?.getCategory()}_${e?.getType()}`]?.contentView?(o=r[`${e?.getCategory()}_${e?.getType()}`]?.contentView(e,n.MessageBubbleAlignment.right),"string"==typeof o?{html:o}:o):null}getBubbleWrapper(e,t){let n;const o={};return o[`${t.category}_${t.type}`]=t,o&&o[`${e?.getCategory()}_${e?.getType()}`]&&o[`${e?.getCategory()}_${e?.getType()}`].bubbleView?(n=o[`${e?.getCategory()}_${e?.getType()}`].bubbleView(e),n):(n=null,n)}getMessageBubble(e,t,n,o){return this.getBubbleWrapper(e,t)?this.getBubbleWrapper(e,t):d.jsx(at,{bottomView:null,headerView:null,options:[],footerView:null,leadingView:null,statusInfoView:null,contentView:this.getContentView(e,t),replyView:null,threadView:null,alignment:o,messageBubbleStyle:n,id:e?.getId()||e?.getMuid()})}}var Rl="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Pl="data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E";const Ol=e=>{const{theme:i}=t.useContext(R),{title:a=n.localize("MESSAGE_INFORMATION"),closeIconURL:l,onClose:c,message:C,bubbleView:g,subtitleView:u=null,listItemView:p=null,messageInformationStyle:h,listItemStyle:m,receiptDatePattern:A,template:x,loadingIconURL:b=Rl,backdropStyle:y=new o.BackdropStyle({})}=e,[w,f]=t.useState(),[D,E]=t.useState(x),[v,I]=t.useState([]),S=t.useRef(null),F=()=>({...new o.ListItemStyle({height:"70px",width:"100%",background:"inherit",borderRadius:"0",titleFont:n.fontHelper(i.typography.title2),titleColor:i.palette.getAccent(),border:"none",separatorColor:i.palette.getAccent200(),hoverBackground:i.palette.getAccent50()}),...m});t.useEffect((()=>{if(!x){const t=Zn.getDataSource()?.getMessageTemplate(e.message?.getType(),e.message?.getCategory(),i);t&&E(t)}}),[e.message,x,i]),t.useEffect((()=>{C?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&f(C.getReceiver()),C?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&async function(e){if(e?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group){let t=await s.CometChat.getMessageReceipts(e?.getId()),n=t.filter((e=>e.getSender().getUid()!==S.current?.getUid()));I(n)}}(C)}),[C]);const k=t.useCallback((()=>{if(r.CometChatUIKitLoginListener.getLoggedInUser()&&(S.current=r.CometChatUIKitLoginListener.getLoggedInUser()),C){if(g)return g(C);{if(!D)return d.jsx(d.Fragment,{});const e=(new Ul).messageBubbleStyle(C,i,n.MessageBubbleAlignment.right,S.current);return(new Ul).getMessageBubble(C,D,e,n.MessageBubbleAlignment.right)}}return null}),[C,g,D,i]);function M(e,t){return null!==u&&"function"==typeof u?d.jsx(d.Fragment,{children:u(C)}):d.jsx("div",{style:Tl,children:d.jsx("div",{className:"cc-receipts__subtitle",children:L(e,t)})})}function L(e,t){return d.jsxs("div",{className:"cc-message_information__receipt-container",children:[d.jsxs("div",{className:"cc-message_information__receipt",style:kl,children:[d.jsx("div",{className:"cc-message_information__delivered-receipt",children:d.jsx("cometchat-receipt",{receipt:n.Receipts.delivered,errorIcon:Pl,deliveredIcon:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",receiptStyle:JSON.stringify(vl(i))})}),d.jsx("div",{style:U,className:"cc_message-information__subtitle-text",children:void 0!==e&&n.localize("DELIVERED")}),d.jsx("div",{className:"cc_message-information__date",style:Fl,children:d.jsx("cometchat-date",{timestamp:e,customDateString:A?A(e):null,pattern:A?null:n.DatePatterns.DateTime,dateStyle:JSON.stringify(Il(Sl,i))})})]}),t&&d.jsxs("div",{className:"cc-message_information__receipt",style:kl,children:[d.jsx("div",{className:"cc-message_information__read-receipt",children:d.jsx("cometchat-receipt",{receipt:n.Receipts.read,errorIcon:Pl,readIcon:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",receiptStyle:JSON.stringify(vl(i))})}),d.jsx("div",{style:U,className:"cc_message-information__subtitle-text",children:void 0!==t&&n.localize("READ")}),void 0!==t&&d.jsx("div",{className:"cc_message-information__date",style:Fl,children:d.jsx("cometchat-date",{timestamp:t,customDateString:A?A(t):null,pattern:A?null:n.DatePatterns.DateTime,dateStyle:JSON.stringify(Il(Sl,i))})}),void 0===t&&d.jsx("div",{className:"cc_message-information__date",style:Fl,children:"..."})]})]})}const U={font:n.fontHelper(i.typography.subtitle2),color:i.palette.getAccent600()},P=new o.AvatarStyle({borderRadius:"50%",width:"43px",height:"43px"});function O(e){return d.jsx(B,{id:e.getMessageId(),title:e.getSender()?.getName(),avatarURL:e.getSender()?.getAvatar(),avatarName:e.getSender()?.getName(),hideSeparator:!1,isActive:!1,avatarStyle:P,listItemStyle:F(),subtitleView:M(e.getDeliveredAt(),e.getReadAt()),subtitleViewClassName:"cc-message_information__subtitle-view",tailViewClassName:"cc-receipt-details__tail-view"})}return d.jsx("div",{className:"cc__messageinfo__wrapper",style:Tl,children:d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify((V=y,{background:"rgba(0, 0, 0, 0.5)",position:"absolute",width:V?.width,height:V?.height,...V})),children:d.jsxs("div",{className:"cc__messageinfo",style:Ml(i,h),children:[d.jsxs("div",{className:"cc__messageinfo__header",style:{textAlign:"center",fontSize:"22px",fontWeight:"700",padding:"19px 0px",position:"relative"},children:[d.jsxs("div",{className:"cc__messageinfo__title",children:[" ",a," "]}),d.jsx(q,{iconURL:l,hoverText:n.localize("CLOSE"),buttonStyle:Dl(i),onClick:c})]}),d.jsxs("div",{className:"cc__messageinfo__content",style:Tl,children:[d.jsx("div",{style:Ll(i),children:n.localize("MESSAGE")}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(El(i))}),d.jsx("div",{className:"cc__messageinfo__bubble-wrapper",style:(j=!g,{height:"fit-content",maxHeight:"182px",overflow:"hidden auto",boxSizing:"border-box",padding:"2px 8px",justifyContent:"flex-end",display:j?"flex":"inherit",paddingRight:j?"16px":"8px"}),children:k()}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(El(i))}),d.jsx("div",{style:Bl(i),children:n.localize("RECEIPT_INFORMATION")}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(El(i))}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&void 0!==C.getDeliveredAt()&&d.jsx("div",{children:d.jsx(B,{id:C.getConversationId(),title:w?.getName(),avatarURL:w?.getAvatar(),avatarName:w?.getName(),hideSeparator:!1,isActive:!1,avatarStyle:P,listItemStyle:F(),subtitleView:M(C.getDeliveredAt(),C.getReadAt()),subtitleViewClassName:"cc-message_information__subtitle-view",tailViewClassName:"cc-receipt-details__tail-view"})}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&void 0===C.getDeliveredAt()&&d.jsxs("div",{style:{padding:"2em 0px 0px 0px",fontSize:"18px",textAlign:"center",color:i.palette.getAccent400()},children:[" ",n.localize("NO_RECIPIENT")," "]}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&v.length>0&&d.jsx("div",{children:d.jsx(T,{list:v,listItem:function(e){return d.jsx(d.Fragment,{children:p?p(C,e):O(e)})},state:0===v.length?n.States.loading:n.States.loaded,hideSearch:!0,showSectionHeader:!1,loadingIconURL:b})}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&v.length<=0&&d.jsxs("div",{style:{padding:"2em 0px 0px 0px",fontSize:"18px",textAlign:"center",color:i.palette.getAccent400()},children:[" ",n.localize("NO_RECIPIENTS")," "]})]})]})})});var j,V};var jl;class Vl{constructor(e,t,n,o,r){if(this.messagesRequest=null,this.fetchNextMessages=()=>this.messagesRequest?.fetchNext(),this.fetchPreviousMessages=()=>this.messagesRequest?.fetchPrevious(),e){let r;t?(e.guid=void 0,r=e.setUID(t.getUid())):n&&(e.uid=void 0,r=e.setGUID(n.getGuid())),o&&r.setMessageId(o),this.messagesRequest=r.build()}else{const e=(new s.CometChat.MessagesRequestBuilder).setTypes(De.dataSource.getAllMessageTypes()).setCategories(De.dataSource.getAllMessageCategories()).hideReplies(!0).setLimit(30);o&&e.setMessageId(o),r&&e.setParentMessageId(r),t?(e.setUID(t.getUid()),e.guid=void 0):n&&(e.setGUID(n.getGuid()),e.uid=void 0),this.messagesRequest=e.build()}}static removeListeners(){s.CometChat.removeGroupListener(this.groupListenerId),s.CometChat.removeConnectionListener(this.connectionListenerId),De.names.includes("calling")&&s.CometChat.removeCallListener(this.callListenerId)}static attachConnectionListener(e){const t="MessageList_connection_"+String(Date.now());s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}}))}}jl=Vl,Vl.groupListenerId="group_"+(new Date).getTime(),Vl.callListenerId="call_"+(new Date).getTime(),Vl.connectionListenerId="MessageList_connection_"+String(Date.now()),Vl.attachListeners=e=>{s.CometChat.addGroupListener(jl.groupListenerId,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(t,o,r,s,i)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,i)},onGroupMemberKicked:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberBanned:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberUnbanned:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onMemberAddedToGroup:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberLeft:(t,o,r)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,r)},onGroupMemberJoined:(t,o,r)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,r)}})),De.names.includes("calling")&&s.CometChat.addCallListener(jl.callListenerId,new s.CometChat.CallListener({onIncomingCallReceived:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onIncomingCallCancelled:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onOutgoingCallRejected:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onOutgoingCallAccepted:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onCallEndedMessageReceived:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)}}))};const Gl={parentMessageId:0,user:void 0,group:void 0,emptyStateText:n.localize("NO_MESSAGES_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),emptyStateView:null,errorStateView:null,loadingStateView:null,disableReceipt:!1,disableSoundForMessages:!1,customSoundForMessages:"",readIcon:"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",deliveredIcon:"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",sentIcon:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMessage%20Sent%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMessage-Sent%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.1282564%2C3.43708984%20C11.3839897%2C3.0108676%2011.9368239%2C2.87265904%2012.3630462%2C3.12839238%20C12.7564821%2C3.36445393%2012.9045099%2C3.85366653%2012.7238142%2C4.26276853%20L12.6717436%2C4.3631822%20L7.87174363%2C12.3631822%20C7.59058211%2C12.8317847%206.96826751%2C12.9373278%206.54992747%2C12.6127032%20L6.4636039%2C12.5365321%20L3.2636039%2C9.33653212%20C2.91213203%2C8.98506026%202.91213203%2C8.41521177%203.2636039%2C8.06373991%20C3.58578644%2C7.74155737%204.091466%2C7.71470883%204.44423138%2C7.98319428%20L4.5363961%2C8.06373991%20L6.921%2C10.448136%20L11.1282564%2C3.43708984%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",waitIcon:"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",errorIcon:"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E",loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",alignment:n.MessageListAlignment.standard,showAvatar:!0,datePattern:n.DatePatterns.time,timestampAlignment:n.TimestampAlignment.bottom,DateSeparatorPattern:n.DatePatterns.DayDate,hideDateSeparator:!1,templates:[],messagesRequestBuilder:void 0,newMessageIndicatorText:"",scrollToBottomOnNewMessages:!1,thresholdValue:1e3,onThreadRepliesClick:()=>{},headerView:null,footerView:null,avatarStyle:{borderRadius:"24px",width:"36px",height:"36px"},dateSeparatorStyle:void 0,messageListStyle:{nameTextFont:"600 15px Inter, sans-serif",nameTextColor:"white",TimestampTextFont:"",TimestampTextColor:"",threadReplyTextFont:"",threadReplyIconTint:"",threadReplyTextColor:"",emptyStateTextFont:"700 22px Inter, sans-serif",emptyStateTextColor:"#bcbcbc",errorStateTextFont:"700 22px Inter, sans-serif",errorStateTextColor:"#bcbcbc",loadingIconTint:"grey"},onError:e=>{console.log(e)},hideError:!1,messageInformationConfiguration:new r.MessageInformationConfiguration({}),reactionsConfiguration:new r.ReactionsConfiguration({}),disableReactions:!1,emojiKeyboardStyle:{},threadIndicatorIcon:"data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_10800_33104%29%22%3E%3Cpath%20d%3D%22M13.9906%201.69617C13.824%204.12358%2012.7401%206.39667%2010.959%208.05423C9.17776%209.71179%206.83266%2010.6296%204.39955%2010.6215C4.23748%2010.6215%203.84965%2010.6297%203.68799%2010.6215H1.03645%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.2041%207.43042L1.0094%2010.6251L4.2041%2013.8198%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_10800_33104%22%3E%3Crect%20width%3D%2215%22%20height%3D%2215%22%20fill%3D%22white%22%20transform%3D%22matrix%28-1%200%200%201%2015%200%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",disableMentions:!1,textFormatters:[],backdropStyle:new o.BackdropStyle({})},Hl=e=>{const{parentMessageId:i,user:a,group:l,emptyStateText:c,errorStateText:C,emptyStateView:g,errorStateView:u,loadingStateView:p,disableReceipt:h,disableSoundForMessages:m,customSoundForMessages:x,readIcon:y,deliveredIcon:w,sentIcon:f,waitIcon:D,errorIcon:E,loadingIconURL:v,alignment:I,showAvatar:S,datePattern:F,timestampAlignment:k,DateSeparatorPattern:M,hideDateSeparator:B,templates:L,messagesRequestBuilder:U,newMessageIndicatorText:P,scrollToBottomOnNewMessages:O,thresholdValue:j,onThreadRepliesClick:V,headerView:G,footerView:H,avatarStyle:Q,dateSeparatorStyle:N,messageListStyle:K,onError:z,hideError:J,messageInformationConfiguration:Y,reactionsConfiguration:_,disableReactions:W,emojiKeyboardStyle:Z,threadIndicatorIcon:X,disableMentions:q,textFormatters:$,backdropStyle:ee}=e,[te,ne]=t.useState([]),[oe,re]=t.useState(!0),[se,ie]=t.useState(n.States.loading),[ae,le]=t.useState(!1),[ce,Ce]=t.useState(!1),[de,ge]=t.useState(null),[ue,pe]=t.useState(!1),[he,me]=t.useState(null),[Ae,xe]=t.useState(!1),[be,ye]=t.useState(!1),[we,fe]=t.useState(!1),Ee=t.useRef(null),ve=t.useRef(null),Ie=t.useRef(!1),Se=t.useRef({}),Fe=t.useRef(null),ke=t.useRef({prevMessageId:0,nextMessageId:0}),Te=t.useRef(0),Me=t.useRef([]),Be=t.useRef(""),Le=t.useRef(null),Ue=A(a),Re=A(l),Pe=A(i),Oe=t.useRef(null),je=t.useRef(null),Ve=t.useRef(!1),Ge=t.useRef(!1),{theme:He}=t.useContext(R),Qe=b(z);let Ne=!0,Ke=n.TimestampAlignment,ze=!1,Je=n.MessageBubbleAlignment.left;const Ye=t.useMemo((()=>p?d.jsx("div",{className:"cc__messagelist__loadingview",children:d.jsx("span",{className:"cc__messagelist__customview--loading",children:p})}):d.jsx("div",{className:"cc__messagelist__loadingview",children:d.jsx(ol,{iconURL:v,loaderStyle:Al(K,He)})})),[p,v,K,He]),_e=t.useMemo((()=>u?d.jsx("div",{className:"cc__messagelist__errorview",children:d.jsx("span",{className:"cc__messagelist__customview--error",children:u})}):d.jsx("div",{className:"cc__messagelist__errorview",children:d.jsx(nl,{labelStyle:xl(K,He),text:C})})),[u,C,K,He]),We=t.useMemo((()=>g?d.jsx("div",{className:"cc__messagelist__emptyview",children:d.jsx("span",{className:"cc__messagelist__customview--empty",children:g})}):void 0),[g,c,K,He]),Ze=t.useMemo((()=>L&&L.length>0?L:De.getDataSource().getAllMessageTemplates(He,{disableMentions:q,textFormatters:$})),[L,He]),Xe=t.useMemo((()=>{let e={};return Ze.forEach((t=>{e[t.category+"_"+t.type]=t})),e}),[Ze]),qe=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType();if(!Pe.current){if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&t===Ue.current.getUid())return!0}else if(Re.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Re.current.getGuid())return!0;return!1}if(e.getParentMessageId()===Pe.current)return!0}),[]),$e=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getSender()?.getUid();if(Pe.current)return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current.getUid()||r===Ue.current.getUid()))return!0}else if(Re.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Re.current.getGuid())return!0;return!1}),[]),et=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getSender()?.getUid();if(!Pe.current){if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current.getUid()||r===Ue.current.getUid()))return!0}else if(Re.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Re.current.getGuid())return!0;return!1}if(e.getParentMessageId()===Pe.current)return!0}),[]),tt=t.useCallback((e=>{if(!e.getParentMessageId())return!1;const t=e?.getReceiverId();if(Ue.current){if(t===Ue.current.getUid())return!0}else if(Re.current&&t===Re.current.getGuid())return!0;return!1}),[]),nt=t.useCallback((e=>{if(!e.getParentMessageId())return!1;const t=e?.getReceiverId(),n=e?.getSender()?.getUid();if(Ue.current){if(t===Ue.current.getUid()||n===Ue.current.getUid())return!0}else if(Re.current&&t===Re.current.getGuid())return!0;return!1}),[]),ot=t.useCallback((e=>{try{return te.find((t=>t?.getId()?.toString()===e?.toString()))}catch(e){Qe(e)}}),[te,Qe]),rt=t.useCallback((e=>{try{Ge.current=!1,re(!1),V&&V(e,Tn)}catch(e){Qe(e)}}),[V,Qe,Ge]),st=t.useCallback((e=>{void 0!==e&&(Ge.current=e)}),[Ge]),it=t.useCallback((e=>{try{ne((t=>t.map((t=>t.getMuid()===e.getMuid()?e:t))))}catch(e){Qe(e)}}),[Qe]),lt=t.useCallback((e=>{try{re(!1),ne((t=>t.map((t=>t?.getId()===e?.getId()?e:t))))}catch(e){Qe(e)}}),[Qe]),ct=t.useCallback((e=>{try{et(e)&<(e)}catch(e){Qe(e)}}),[lt,Qe,et]),Ct=t.useCallback(((e,t=!1)=>{try{t?(re(!0),it(e)):(re(!1),lt(e))}catch(e){Qe(e)}}),[it,lt,Qe]),dt=t.useCallback(((e,t)=>{const n=t?.getId(),o=ot(n),i=o?.getReactions()||[],a=i?.find((t=>t?.reaction===e));if(a&&a?.getReactedByMe()){const t=[];i.forEach((n=>{if(n?.getReaction()===e){if(1===n?.getCount())return;n.setCount(n?.getCount()-1),n.setReactedByMe(!1),t.push(n)}else t.push(n)}));const a=r.CometChatUIKitUtility.clone(o);a.setReactions(t),Ct(a),s.CometChat.removeReaction(n,e).then((e=>{})).catch((e=>{Ct(o),console.log(e)}))}else{const t=[],a=i.find((t=>t?.getReaction()===e));if(i.forEach((n=>{n?.getReaction()===e?(n.setCount(n?.getCount()+1),n.setReactedByMe(!0),t.push(n)):t.push(n)})),!a){const n=new s.CometChat.ReactionCount(e,1,!0);t.push(n)}const l=r.CometChatUIKitUtility.clone(o);l.setReactions(t),Ct(l),s.CometChat.addReaction(n,e).then((()=>{})).catch((e=>{Qe(e),Ct(o)}))}}),[ot,Qe,Ct]),gt=t.useCallback((e=>{let t={zIndex:"100"},n=Z,r=new o.EmojiKeyboardStyle({width:n?.width||"320px",height:n?.height||"300px",border:n?.border||"1px solid #e0e0e0",borderRadius:n?.borderRadius||"8px",activeIconTint:n?.activeIconTint,background:n?.background,iconTint:n?.iconTint,textColor:n?.textColor,textFont:n?.textFont});const s=ot(e);return e=>d.jsx(qa,{emojiKeyboardStyle:r,style:t,onEmojiClick:t=>{e(t),dt(t?.detail?.id,s)}})}),[Z,ot,dt]),ut=t.useCallback((e=>{try{let t=ot(e);if(t){let e=t.getText();!q&&t.getMentionedUsers()&&t.getMentionedUsers().length&&(e=(e=>{const t=/<@uid:(.*?)>/g;let n=e.getText(),o=e.getText(),r=t.exec(n),s=e.getMentionedUsers();for(;null!==r;){let e;for(let t=0;t{try{let t=ot(e);t&&(Ge.current=!1,re(!1),ge(t),Ce(!0))}catch(e){Qe(e)}}),[Qe,Ge,ot]),ht=t.useCallback((e=>{try{let t=ot(e);t&&rt(t)}catch(e){Qe(e)}}),[rt,Qe,ot]),mt=t.useCallback((e=>{try{const t=ot(e);if(t){const e=t.getSender();n.CometChatUIEvents.ccOpenChat.next({user:e})}}catch(e){Qe(e)}}),[ot,Qe]),At=t.useCallback((e=>{try{let t=ot(e);if(t){const e=t.getId();s.CometChat.deleteMessage(e).then((e=>{ct(e),n.CometChatMessageEvents.ccMessageDeleted.next(e)}),(e=>{Qe(e)}))}}catch(e){Qe(e)}}),[ct,Qe,ot]),xt=t.useCallback((e=>{try{let t=ot(e);t&&n.CometChatMessageEvents.ccMessageEdited.next({message:t,status:n.MessageStatus.inprogress})}catch(e){Qe(e)}}),[Qe,ot]),bt=t.useCallback(((e,t)=>{try{return e.forEach((e=>{switch(e.id){case n.CometChatUIKitConstants.MessageOption.deleteMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=At);break;case n.CometChatUIKitConstants.MessageOption.editMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=xt);break;case n.CometChatUIKitConstants.MessageOption.copyMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=ut);break;case n.CometChatUIKitConstants.MessageOption.replyInThread:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=ht);break;case n.CometChatUIKitConstants.MessageOption.messageInformation:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=pt);break;case n.CometChatUIKitConstants.MessageOption.sendMessagePrivately:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=mt);break;case n.CometChatUIKitConstants.MessageOption.reactToMessage:e instanceof n.CometChatActionsView&&!e?.customView&&(e.customView=gt(t))}})),e}catch(t){return Qe(t),e}}),[Qe,At,xt,ht,ut,pt,mt,gt]),yt=t.useCallback((e=>W?e.filter((e=>e.id!==n.CometChatUIKitConstants.MessageOption.reactToMessage)):e),[W]),wt=t.useCallback((e=>{let t=[];if(!e.getId())return t;try{return Ze&&Ze.length>0&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&Ze.forEach((n=>{n.type===e.getType()&&n.category===e.getCategory()&&(t=bt(n?.options?.(ve.current,e,He,Re.current),e?.getId()))})),t=yt(t),t}catch(e){return Qe(e),t}}),[Ze,yt,bt,He,Qe]),ft=t.useCallback((e=>{let t=n.MessageBubbleAlignment.center;try{return t=I===n.MessageListAlignment.left&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember?n.MessageBubbleAlignment.left:e?.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember||e?.getCategory()==n.CometChatUIKitConstants.MessageCategory.call?n.MessageBubbleAlignment.center:!e.getSender()||e?.getSender().getUid()===ve.current?.getUid()&&e?.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember?n.MessageBubbleAlignment.right:n.MessageBubbleAlignment.left,t}catch(e){return Qe(e),t}}),[I,Qe]),Dt=t.useCallback((e=>{try{let t=ft(e);return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()]?.contentView?Xe[e?.getCategory()+"_"+e?.getType()]?.contentView(e,t):null}catch(e){return Qe(e),null}}),[Xe,Qe,ft]),Et=t.useCallback((e=>{try{let t=ft(e);return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()]?.bottomView?Xe[e?.getCategory()+"_"+e?.getType()]?.bottomView(e,t):null}catch(e){return Qe(e),null}}),[Xe,Qe,ft]),vt=t.useCallback((e=>{try{let t=null;return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()]?.headerView&&(t=Xe[e?.getCategory()+"_"+e?.getType()]?.headerView(e)),t}catch(e){return Qe(e),null}}),[Xe,Qe]),It=t.useCallback((e=>{try{let t=null;return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()]?.footerView&&(t=Xe[e?.getCategory()+"_"+e?.getType()]?.footerView(e)),t}catch(e){return Qe(e),null}}),[Xe,Qe]),St=t.useCallback((e=>{let t=null;try{return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()].bubbleView&&(t=Xe[e?.getCategory()+"_"+e?.getType()].bubbleView(e)),t}catch(e){return Qe(e),t}}),[Xe,Qe]),Ft=t.useCallback((e=>{s.CometChat.markAsRead(e).then((()=>{n.CometChatMessageEvents.ccMessageRead.next(e)}),(e=>{Qe(e)}))}),[Qe]),kt=t.useCallback((e=>{h||e.getSender().getUid()===ve.current?.getUid()||Ft(e)}),[h,Ft]),Tt=t.useCallback((()=>{Ge.current=!0,Ee.current&&Ee.current?.click();const e=Me.current[Me.current.length-1];e&&kt(e),Me.current=[],Be.current&&(Be.current=""),Ae&&xe(!1)}),[kt,Ae]),Mt=t.useCallback((()=>{try{ne(Ne?e=>e.slice(-30):e=>e.slice(0,30))}catch(e){Qe(e)}}),[Qe]),Bt=t.useCallback((e=>new Promise(((t,o)=>{if(et(e[0]))try{ne((t=>[...e,...t])),Te.current=Te.current+e.length,ie(n.States.loaded),Te.current>j&&(Ne=!1,Mt()),t(!0)}catch(e){te?.length<=0&&ie(n.States.error),Qe(e),o(e)}else 0==te.length&&ie(n.States.loaded),t(!0)}))),[te,j,Mt,et,Qe]),Lt=t.useCallback((()=>new Promise((async(e,t)=>{try{ie(n.States.loading);let o=0;if(Ue?.current){const e=await s.CometChat.getUnreadMessageCountForUser(Ue.current?.getUid());o=e[Ue.current?.getUid()]||0}if(Re?.current){const e=await s.CometChat.getUnreadMessageCountForGroup(Re.current?.getGuid());o=e[Re.current?.getGuid()]||0}ze?e(!0):(ze=!0,Fe.current.previous||(Fe.current.previous=new Vl(U,Ue.current,Re.current,ke.current.prevMessageId,Pe.current)),Fe?.current.previous.fetchPreviousMessages().then((i=>{if(Pe.current,i&&i.length>0&&(i=i.map((e=>e.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive?r.InteractiveMessageUtils.convertInteractiveMessage(e):e))),Ie.current&&(n.CometChatUIEvents.ccActiveChatChanged.next({user:Ue.current,group:Re.current,message:i.length>0?i[i.length-1]:void 0,unreadMessageCount:o}),Ie.current=!1,Vl.attachConnectionListener((()=>{Ve.current=!0,Rt().then((()=>{Pt().then((t=>{e(t),Ve.current=!1}),(e=>{t(e)})).catch((e=>{Qe(e)}))}))}))),ze=!1,i&&i.length>0){let o=i[i.length-1],r=o?.getSender().getUid()==ve.current?.getUid();o.getDeliveredAt()||h||r||s.CometChat.markAsDelivered(o).then((()=>{i.forEach((e=>(e?.getId()<=o?.getId()&&!r&&!e.getDeliveredAt()&&e.setDeliveredAt((new Date).getTime()),e)))})),o.getReadAt()||r?r||n.CometChatMessageEvents.ccMessageRead.next(o):h?Me.current=[]:s.CometChat.markAsRead(o).then((()=>{i.forEach((e=>(e?.getId()<=o?.getId()&&!r&&!e.getReadAt()&&e.setReadAt((new Date).getTime()),e))),n.CometChatMessageEvents.ccMessageRead.next(o)})),Bt(i).then((t=>{e(t)}),(e=>{t(e)}))}else 0===i.length&&0===Te.current&&ie(n.States.empty),e(!0)}),(e=>{ze=!1,te?.length<=0&&ie(n.States.error),"REQUEST_IN_PROGRESS"!=e.code?(Qe(e),t(e)):ie(n.States.loading)})))}catch(e){te?.length<=0&&ie(n.States.error),Qe(e)}}))),[h,Qe,Bt]),Ut=t.useCallback((e=>new Promise(((t,o)=>{try{ne((t=>[...t,...e])),Te.current=Te.current+e.length;let o=e[e.length-1]?.getId();if(o&&ke.current.prevMessageId!==o&&(ke.current.nextMessageId=o),O)setTimeout((()=>{re(!0),Ge.current=!0}),100);else{if(Ve.current){re(Ge.current);let t=e[e?.length-1];Ge.current&&t&&t.getSender().getUid()!=ve.current?.getUid()&&!t.getReadAt()&&s.CometChat.markAsRead(t).then((()=>{Me.current=[],n.CometChatMessageEvents.ccMessageRead.next(t)}))}else re(!1);let t=P||(Me.current.length>1?n.localize("NEW_MESSAGES"):n.localize("NEW_MESSAGE"));Me.current.push(...e),Be.current=" ↓ "+Me.current.length+" "+t,xe(!0)}ie(n.States.loaded),Te.current>j&&(Ne=!0,Mt()),t(!0)}catch(e){te?.length<=0&&ie(n.States.error),Qe(e),o(e)}}))),[j,Mt,Qe,Ge]),Rt=t.useCallback((()=>new Promise(((e,t)=>{let o=(new s.CometChat.MessagesRequestBuilder).setType(n.CometChatUIKitConstants.MessageCategory.message).setCategory(n.CometChatUIKitConstants.MessageCategory.action).setMessageId(ke.current.nextMessageId).setLimit(30);Ue.current?o.setUID(Ue.current.getUid()):Re.current&&o.setGUID(Re.current.getGuid()),o.build().fetchNext().then((t=>t&&t.length>0?(t.forEach((e=>{ct(e.getActionOn())})),e(!0)):e(!0))).catch((e=>(Qe(e),te?.length<=0&&ie(n.States.error),t(e))))}))),[Qe]),Pt=t.useCallback((()=>new Promise(((e,t)=>{try{ke.current.nextMessageId?(Fe.current.next||(Fe.current.next=new Vl(U,Ue.current,Re.current,ke.current.nextMessageId,Pe.current)),ie(n.States.loading),Fe?.current.next.fetchNextMessages().then((o=>{o&&o.length>0&&(o=o.map((e=>e.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive?r.InteractiveMessageUtils.convertInteractiveMessage(e):e))),o?0===o.length?(0===Te.current?ie(n.States.empty):ie(n.States.loaded),e(!0)):Ut(o).then((t=>{e(t)}),(e=>{t(e)})):e(!0)}),(e=>{te?.length<=0&&ie(n.States.error),Qe(e),t(e)}))):e(!0)}catch(e){Qe(e)}}))),[Ut,Qe,te?.length,U]),Ot=t.useCallback((e=>{try{ne((t=>t.map((t=>t?.getId()===e.getParentMessageId()?(t.getReplyCount()?t.setReplyCount(t.getReplyCount()+1):t.setReplyCount(1),t):t))))}catch(e){Qe(e)}}),[Qe]),jt=t.useCallback((e=>{try{ne((t=>{let n=[...t],o=n.findIndex((t=>t.getId()===e.getParentMessageId()));if(o>-1){const e=n[o];n.splice(o,1,e),t=[...n]}return t}))}catch(e){Qe(e)}}),[Qe]),Vt=t.useCallback((e=>{try{Te.current+=1,Te.current>0&&se!=n.States.loaded&&ie(n.States.loaded),ne((t=>[...t,e])),e.getSender()&&e.getSender().getUid()!=ve.current?.getUid()||re(!0),Te.current>j&&(Ne=!0,Mt())}catch(e){Qe(e)}}),[j,Qe,oe]),Gt=t.useCallback((e=>{try{return r.MessageReceiptUtils.getReceiptStatus(e)}catch(e){Qe(e)}}),[Qe]),Ht=t.useCallback((()=>{try{m||(x?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage,x):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage))}catch(e){Qe(e)}}),[m,x,Qe]),Qt=t.useCallback((e=>{if(!Ge.current&&e.getSender()&&e.getSender().getUid()!=ve.current?.getUid()){let t=P||(Me.current.length>1?n.localize("NEW_MESSAGES"):n.localize("NEW_MESSAGE"));Me.current.push(e),Be.current=" ↓ "+Me.current.length+" "+t,xe(!0)}}),[P]),Nt=t.useCallback((e=>{try{ne((t=>t.map((t=>(parseInt(t?.getId()?.toString())<=parseInt(e.getMessageId())&&t.getSender().getUid()===ve.current?.getUid()&&!t.getDeliveredAt()&&t.setDeliveredAt(e.getDeliveredAt()),t)))))}catch(e){Qe(e)}}),[Qe]),Kt=t.useCallback((e=>{try{const t=[];ne((o=>{const r=o.map((n=>(parseInt(n?.getId()?.toString())<=parseInt(e.getMessageId())&&n.getSender().getUid()===ve.current?.getUid()&&!n.getReadAt()&&(n.setReadAt(e.getReadAt()),parseInt(n?.getId()?.toString())===parseInt(e.getMessageId())&&t.push(n)),n)));return t.forEach((e=>{n.CometChatMessageEvents.ccMessageRead.next(e)})),r}))}catch(e){Qe(e)}}),[Qe]),zt=t.useCallback((e=>{try{e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&e.getSender().getUid()===Ue.current?.getUid()&&e.getReceiver()===ve.current?.getUid()&&("delivery"===e.getReceiptType()?Nt(e):Kt(e))}catch(e){Qe(e)}}),[Nt,Kt,Qe]),Jt=t.useCallback((e=>{ve.current?.getUid()===e.getSender().getUid()&&ne((t=>t.map((t=>{if(String(t.getId())===String(e.getMessageId())){const n=e.getInteractions();return t.setInteractions(n),r.InteractiveMessageUtils.convertInteractiveMessage(t)}return t}))))}),[]),Yt=t.useCallback(((e=!1)=>{(e||O)&&setTimeout((()=>{re(!0),Ge.current=!0,Me.current=[]}),100)}),[O]),_t=t.useCallback((e=>{try{et(e)?(Vt(e),O?(Yt(),kt(e)):Ge.current?(Yt(!0),kt(e)):(re(!1),Qt(e))):nt(e)&&(Ot(e),jt(e)),Ht()}catch(e){Qe(e)}}),[et,nt,Ht,Vt,O,Yt,kt,Qt,Ot,jt,Qe]),Wt=t.useCallback(((e,t)=>{try{t?.getGuid()===Re?.current?.getGuid()&&(Vt(e),Ge.current?Yt(!0):O?Yt():(re(!1),Qt(e)))}catch(e){Qe(e)}}),[Vt,O,Yt,Qt,Qe]),Zt=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getReaction()?.getReactedBy()?.getUid(),s=e?.getParentMessageId(),i=s&&String(s);if(i)return s===i;if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current?.getUid()||r===Ue.current?.getUid()))return!0}else if(Re.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Re.current?.getGuid())return!0;return!1}),[]),Xt=t.useCallback(((e,t)=>{if(!Zt(e))return!1;ne((n=>{const o=n.findIndex((t=>t.getId().toString()===e.getReaction()?.getMessageId().toString()));if(-1===o)return n;const i=n[o];let a;a=t?s.CometChat.REACTION_ACTION.REACTION_ADDED:s.CometChat.REACTION_ACTION.REACTION_REMOVED;const l=s.CometChat.CometChatHelper.updateMessageWithReactionInfo(i,e.getReaction(),a);return n.map((e=>e.getId().toString()===l?.getId().toString()?r.CometChatUIKitUtility.clone(l):e))}))}),[Zt]),qt=t.useCallback((e=>{try{et(e)&&De.names.includes("calling")&&(Vt(e),Ge.current?Yt(!0):O?Yt():(re(!1),Qt(e)))}catch(e){Qe(e)}}),[et,Vt,O,Yt,Qt,Qe]),$t=t.useCallback(((e="",t,o)=>{try{switch(e){case n.CometChatUIKitConstants.MessageCategory.action:o&&Wt(t,o);break;case n.CometChatUIKitConstants.MessageCategory.call:qt(t)}}catch(e){Qe(e)}}),[Wt,qt,Qe]),en=t.useCallback((()=>new Promise(((e,t)=>{try{Tt(),re(!1),Fe.current&&Fe.current.previous&&(Fe.current.previous=null),Pt().then((t=>{e(t)}),(e=>{t(e)}))}catch(e){Qe(e)}}))),[te,kt,Pt,Tt,Qe]),tn=t.useCallback((()=>new Promise(((e,t)=>{try{re(!1),Ge.current=!1,Fe.current&&Fe.current.next&&(Fe.current.next=null),Lt().then((t=>{e(t)}),(e=>{t(e)}))}catch(e){Qe(e)}}))),[Lt,Qe,Ge]),nn=t.useCallback((e=>{Se.current[e.getId()].current?.scrollIntoView({block:"center"})}),[]),on=t.useCallback((()=>{try{Tt(),re(!0)}catch(e){Qe(e)}}),[Ft,Qe,Tt]),rn=t.useCallback((e=>{ne((e=>e.map((e=>(e?.getId(),e)))))}),[]),sn=t.useCallback((()=>{try{const e=n.CometChatUIEvents.ccShowOngoingCall.subscribe((e=>{le(!0),me(e.child)})),t=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{le(!1),me(null),e&&qt(e)})),o=n.CometChatCallEvents.ccCallRejected.subscribe((e=>{qt(e)})),r=n.CometChatCallEvents.ccOutgoingCall.subscribe((e=>{qt(e)})),s=n.CometChatCallEvents.ccCallAccepted.subscribe((e=>{qt(e)})),a=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{nt(e)&&rn(e.getParentMessageId())})),l=n.CometChatUIEvents.ccShowDialog.subscribe((e=>{Le.current=e.child,pe(!0)})),c=n.CometChatUIEvents.ccHideDialog.subscribe((()=>{Le.current=null,pe(!1)})),C=n.CometChatUIEvents.ccShowPanel.subscribe((e=>{(!e.message||e.message.getParentMessageId()&&i&&e.message.getParentMessageId()==i||!i&&!e.message?.getParentMessageId())&&(e.position===n.PanelAlignment.messageListFooter?(Oe.current&&(Oe.current=null,xe(!1),ye(!1)),setTimeout((()=>{Oe.current=e.child,ye(!0)}),0)):e.position===n.PanelAlignment.messageListHeader&&(je.current&&(je.current=null,fe(!1)),setTimeout((()=>{je.current=e.child,fe(!0)}),0)))})),d=n.CometChatUIEvents.ccHidePanel.subscribe((e=>{e===n.PanelAlignment.messageListFooter?(Oe.current=null,xe(!1),ye(!1)):e===n.PanelAlignment.messageListHeader&&(je.current=null,fe(!1))})),g=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{e.messages.map((t=>{Wt(t,e.userAddedIn)}))})),u=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{Wt(e.message,e.kickedFrom)})),p=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{Wt(e.message,e.kickedFrom)})),m=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{Wt(e.message,e.group)})),A=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{Wt(e.message,e.leftGroup)})),x=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{e?.status===n.MessageStatus.success&&qe(e.message)&&Ct(e.message,!1)})),b=n.CometChatMessageEvents.ccMessageTranslated.subscribe((e=>{e?.status===n.MessageStatus.success&&et(e.message)&&(Ct(e.message,!1),setTimeout((()=>{nn(e.message)}),100))})),y=n.CometChatMessageEvents.ccMessageSent.subscribe((e=>{let{message:t,status:o}=e;switch(o){case n.MessageStatus.inprogress:qe(t)&&Vt(t);break;case n.MessageStatus.success:qe(t)&&Ct(t,!0),tt(t)&&Ot(t);break;default:Ct(t,!0),tt(t)&&Ot(t)}})),w=n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{_t(e)})),f=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{_t(e)})),D=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{_t(e)})),E=n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{_t(e)})),v=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{_t(e)})),I=n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{_t(e)})),S=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{_t(e)})),F=n.CometChatMessageEvents.onMessagesDelivered.subscribe((e=>{h||zt(e)})),k=n.CometChatMessageEvents.onMessagesRead.subscribe((e=>{h||zt(e)})),T=n.CometChatMessageEvents.onMessageDeleted.subscribe((e=>{ct(e)})),M=n.CometChatMessageEvents.onMessageEdited.subscribe((e=>{ct(e)})),B=n.CometChatMessageEvents.onTransientMessageReceived.subscribe((e=>{let t=e.getData();$e(e)&&"live_reaction"==t.type&&n.CometChatMessageEvents.ccLiveReaction.next(t.reaction)})),L=n.CometChatMessageEvents.onInteractionGoalCompleted.subscribe((e=>{Jt(e)}));let U,R;return W||(U=n.CometChatMessageEvents.onMessageReactionAdded.subscribe((e=>{Xt(e,!0)})),R=n.CometChatMessageEvents.onMessageReactionRemoved.subscribe((e=>{Xt(e,!1)}))),()=>{try{x?.unsubscribe(),y?.unsubscribe(),g?.unsubscribe(),u?.unsubscribe(),p?.unsubscribe(),m?.unsubscribe(),A?.unsubscribe(),e?.unsubscribe(),r?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),s?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe(),b?.unsubscribe(),a?.unsubscribe(),w?.unsubscribe(),f?.unsubscribe(),D?.unsubscribe(),E?.unsubscribe(),v?.unsubscribe(),I?.unsubscribe(),S?.unsubscribe(),F?.unsubscribe(),k?.unsubscribe(),T?.unsubscribe(),M?.unsubscribe(),B?.unsubscribe(),L?.unsubscribe(),W||(U?.unsubscribe(),R?.unsubscribe())}catch(e){Qe(e)}}}catch(e){Qe(e)}}),[$e,rn,W,qt,nt,Ct,Wt,qe,nn,Vt,tt,Ot,Qe,be]),an=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){Qe(e)}}),[Qe]),ln=t.useCallback((e=>I===n.MessageListAlignment.left||!(!Re.current||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action||!e?.getSender()||e?.getSender()?.getUid()===ve.current?.getUid()||I!==n.MessageListAlignment.standard)),[I]),cn=t.useCallback((e=>e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&S&&ln(e)?d.jsx(rl,{name:e?.getSender()?.getName(),avatarStyle:bl(Q,He),image:e?.getSender()?.getAvatar()}):null),[S,Q,ln,He]),Cn=t.useCallback((e=>d.jsx(d.Fragment,{children:d.jsx(tl,{timestamp:e.getSentAt(),dateStyle:ul(K,He),pattern:F})})),[K,F,He]),dn=t.useCallback((e=>d.jsx(d.Fragment,{children:d.jsx(nl,{text:e?.getSender()?.getName(),labelStyle:pl(He,K)})})),[He]),gn=t.useCallback((e=>vt(e)?vt(e):e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&(ln(e)||k===Ke.top)?d.jsxs(d.Fragment,{children:[ln(e)?dn(e):null,k===Ke.top?Cn(e):null]}):null),[k,Cn,ln,vt,dn]),un=t.useCallback((e=>k===Ke.bottom&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call?d.jsx(tl,{timestamp:e.getSentAt(),dateStyle:ul(K,He),pattern:F}):null),[k,K,F,He]),pn=t.useCallback((e=>h||e?.getSender()&&ve.current?.getUid()!==e?.getSender()?.getUid()||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.call?null:d.jsx(sl,{receiptStyle:Cl(He,e),receipt:Gt(e),waitIcon:D,sentIcon:f,deliveredIcon:w,readIcon:y,errorIcon:E})),[h,D,f,w,y,E,Gt,He]),hn=t.useCallback((()=>{const e=_?.reactionListConfiguration||{},t=(e=>new o.AvatarStyle({borderRadius:"50%",width:"35px",height:"35px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:"0",outerViewBorderRadius:"0",outerViewBorderColor:"",outerViewBorderSpacing:"0"}))(He),s=(e=>new o.ListItemStyle({background:"transparent",activeBackground:"transparent",hoverBackground:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent(),separatorColor:e.palette.getAccent100()}))(He),i=(e=>new r.ReactionListStyle({width:"320px",height:"300px",borderRadius:"12px",background:e.palette.getAccent900(),border:"none",errorIconTint:e.palette.getAccent400(),loadingIconTint:e.palette.getAccent400(),sliderEmojiCountFont:n.fontHelper(e.typography.subtitle2),sliderEmojiFont:n.fontHelper(e.typography.subtitle1),subtitleTextColor:e.palette.getAccent500(),subtitleTextFont:n.fontHelper(e.typography.subtitle2),tailViewFont:n.fontHelper(e.typography.title1),dividerTint:e.palette.getAccent100(),sliderEmojiCountColor:e.palette.getAccent500(),activeEmojiBackground:e.palette.getAccent100()}))(He);return new r.ReactionListConfiguration({avatarStyle:{...t,...e?.avatarStyle},errorIconURL:e?.errorIconURL||"",listItemStyle:{...s,...e?.listItemStyle},loadingIconURL:e?.loadingIconURL||"",reactionListStyle:{...i,...e?.reactionListStyle},reactionItemClicked:e?.reactionItemClicked||((e,t)=>{e?.getReactedBy()?.getUid()===ve.current?.getUid()&&dt(e?.getReaction(),t)}),reactionsRequestBuilder:e?.reactionsRequestBuilder||void 0})}),[_,dt,He]),mn=t.useCallback((()=>{const e=_?.reactionInfoConfiguration||{},t=((e,t)=>new r.ReactionInfoStyle({background:t?.reactionInfoStyle?.background||e.palette.getAccent("light"),border:t?.reactionInfoStyle?.border||"none",borderRadius:t?.reactionInfoStyle?.borderRadius||"12px",errorIconTint:t?.reactionInfoStyle?.errorIconTint||e.palette.getBackground("light"),loadingIconTint:t?.reactionInfoStyle?.loadingIconTint||e.palette.getBackground("light"),namesColor:t?.reactionInfoStyle?.namesColor||e.palette.getBackground("light"),namesFont:t?.reactionInfoStyle?.namesFont||n.fontHelper(e.typography.subtitle2),reactedTextColor:t?.reactionInfoStyle?.reactedTextColor||e.palette.getAccent700("dark"),reactedTextFont:t?.reactionInfoStyle?.reactedTextFont||n.fontHelper(e.typography.subtitle2),reactionFontSize:t?.reactionInfoStyle?.reactionFontSize||"37px"}))(He,e);return new r.ReactionInfoConfiguration({reactionInfoStyle:t,reactionsRequestBuilder:e?.reactionsRequestBuilder||void 0,errorIconURL:e?.errorIconURL||"",loadingIconURL:e?.loadingIconURL||""})}),[_,He]),An=t.useCallback((e=>{const t=e?.getReactions()||[],o=ft(e);if(t&&t.length>0&&!W){const t=((e={},t)=>new r.ReactionsStyle({height:e?.height||"100%",width:e?.width||"fit-content",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"transparent",activeReactionBackground:e?.activeReactionBackground||t.palette.getPrimary150(),reactionBackground:e?.reactionBackground||t.palette.getAccent100(),reactionBorder:e?.reactionBorder||"none",activeReactionBorder:e?.activeReactionBorder||`1px solid ${t.palette.getPrimary500()}`,reactionBorderRadius:e?.reactionBorderRadius||"20px",activeReactionCountTextColor:e?.activeReactionCountTextColor||t.palette.getAccent(),activeReactionCountTextFont:e?.activeReactionCountTextFont||n.fontHelper(t.typography.caption1),reactionCountTextFont:e?.reactionCountTextFont||n.fontHelper(t.typography.caption1),reactionCountTextColor:e?.reactionCountTextColor||t.palette.getAccent(),reactionBoxShadow:e?.reactionBoxShadow||"rgba(0, 0, 0, 0.1) 0px 4px 12px",reactionEmojiFont:e?.reactionEmojiFont||n.fontHelper(t.typography.subtitle1),baseReactionBackground:e?.baseReactionBackground||t.palette.getBackground()}))(_?.reactionsStyle,He);return d.jsx(Xa,{messageObject:e,alignment:o,reactionsStyle:t,hoverDebounceTime:500,reactionClick:(e,t)=>{_?.reactionClick?_?.reactionClick(e,t):dt(e?.getReaction(),t)},reactionListConfiguration:hn(),reactionInfoConfiguration:mn(),style:fl(o)})}return null}),[W,mn,hn,dt,_,ft,He]),xn=t.useCallback((e=>It(e)?d.jsx("div",{className:"cc-message-bubble__footer",style:gl(ft(e)),children:It(e)}):d.jsx("div",{className:"cc-message-bubble__footer",style:gl(ft(e)),children:An(e)})),[An,It,ft]),bn=t.useCallback((e=>{if(e?.getReplyCount()&&!e?.getDeletedAt()){const t=ft(e),o=X;return d.jsx("div",{className:"cc-message-bubble__thread-replies",children:d.jsx($a,{text:kn(e),hoverText:kn(e),buttonStyle:al(e,He,ve.current,K,t),mirrorIcon:t===n.MessageBubbleAlignment.left,iconURL:o,buttonClick:()=>{rt(e)}})})}}),[ft,X,He,K,rt]),yn=e=>{const t=e?.getType();return[n.CometChatUIKitConstants.MessageTypes.image,n.CometChatUIKitConstants.MessageTypes.video].includes(t)},wn=t.useCallback((e=>{try{let t=ft(e);return Xe[e?.getCategory()+"_"+e?.getType()]&&Xe[e?.getCategory()+"_"+e?.getType()]?.statusInfoView?Xe[e?.getCategory()+"_"+e?.getType()]?.statusInfoView(e,t):e?.getDeletedAt()||e instanceof s.CometChat.Action||e instanceof s.CometChat.Call?null:d.jsx("div",{style:{position:"relative",display:"flex",justifyContent:"flex-end"},children:d.jsxs("div",{className:"cc-message-bubble__statusInfo",style:dl(yn(e),He,e,ft(e)),children:[un(e),pn(e)]})})}catch(e){return Qe(e),null}}),[un,pn,Xe,Qe,ft]),fn=t.useCallback(((e,t)=>d.jsx(at,{setRef:t=>{Se.current[e.getId()]=t},leadingView:cn(e),headerView:gn(e),footerView:xn(e),contentView:Dt(e),bottomView:Et(e),id:e?.getId()||e?.getMuid(),options:wt(e),messageBubbleStyle:cl(e,He,I,ve.current),alignment:ft(e),replyView:null,threadView:bn(e),statusInfoView:wn(e)})),[cn,gn,xn,Dt,I,ft,bn,wn,wt,Et,He]),Dn=t.useCallback(((e,t)=>0===t||an(te[t-1]?.getSentAt(),e?.getSentAt())?d.jsx("div",{className:"cc-message-list__date-container",style:{display:"flex",justifyContent:"center",width:"100%",marginBottom:"16px"},children:d.jsx(tl,{timestamp:e.getSentAt(),pattern:M,dateStyle:hl(N,He)})},`${e.getId()}-${e.getSentAt()}`):null),[M,te,N,an,He]),En=t.useCallback(((e,t)=>{let n=ft(e);return d.jsxs(d.Fragment,{children:[B?d.jsx(d.Fragment,{}):Dn(e,t),d.jsx("div",{className:"cc-message-list__bubble",style:yl(n),children:St(e)?St(e):fn(e,t)},e.getId())]})}),[St,Dn,fn,ft]),vn=t.useCallback(((e,t)=>d.jsx(at,{leadingView:cn(e),headerView:gn(e),footerView:null,contentView:Dt(e),bottomView:null,statusInfoView:null,id:e?.getId()||e?.getMuid(),options:[],messageBubbleStyle:cl(e,He,I,ve.current),alignment:ft(e),replyView:null,threadView:null})),[cn,gn,Dt,I,ft,He]),In=t.useCallback(((e,t)=>d.jsx("div",{className:"cc__messagelist__bubble",style:wl,children:St(e)?St(e):vn(e,t)},e.getId())),[St,Dn,fn,vn]),Sn=t.useCallback((()=>d.jsxs(d.Fragment,{children:[be&&Oe.current?Oe.current:null,H&&!Oe.current?H:null]})),[H,on,be]),Fn=t.useCallback((()=>d.jsxs(d.Fragment,{children:[we&&je.current?je.current:null,G&&!je.current?G:null]})),[G,we]),kn=e=>{const t=e?.getReplyCount()||0;return`${t} ${1===t?n.localize("REPLY"):n.localize("REPLIES")}`},Tn=t.useCallback((e=>d.jsx(d.Fragment,{children:St(e)?St(e):d.jsx(at,{leadingView:cn(e),headerView:gn(e),footerView:null,contentView:Dt(e),bottomView:Et(e),statusInfoView:wn(e),id:e?.getId()||e?.getMuid(),messageBubbleStyle:cl(e,He,I,ve.current),alignment:Je,replyView:null,threadView:null,options:[]})})),[cn,gn,xn,Dt,I,wt,St,Et,He]),Mn=t.useMemo((()=>function(e,t){return En(e,t)}),[En]),Bn=t.useCallback((()=>se),[se]);return function(e,n,o,i,a,l,c,C,d,g,u,p,h,m,A,x,b){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((t=>{b.current=!0,t&&(e.current=t)}),(e=>{p(e)}))}),[p]),t.useEffect((()=>{let e;return r.CometChatUIKitLoginListener.getLoggedInUser()&&(l||c)&&(n.current={previous:new Vl(a,l,c)},Vl.attachListeners(i),e=C(),h([]),m(!0),x.current=!0,o(),A.current=null),()=>{Vl?.removeListeners?.(),e?.()}}),[l,c]),t.useEffect((()=>{g.current=u.length,u?.length>0&&(d.current.prevMessageId=u[0].getId(),d.current.nextMessageId=u[u.length-1].getId())}),[u])}(ve,Fe,Lt,$t,U,Ue.current,Re.current,sn,ke,Te,te,Qe,ne,re,Oe,Ge,Ie),d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"cc-message-list__wrapper",style:il(K,He),children:[d.jsx("div",{className:"cc-message-list__header-view",style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:"auto"},children:Fn()}),d.jsxs("div",{className:"cc-message-list",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",boxSizing:"border-box"},children:[d.jsx(T,{scrolledUpCallback:st,title:"",hideSearch:!0,showSectionHeader:!1,list:te,listItem:Mn,onScrolledToBottom:en,onScrolledToTop:tn,listItemKey:"getMuid",state:Bn(),loadingView:Ye,loadingIconURL:v,hideError:J,errorStateView:_e,errorStateText:C,emptyStateView:We,emptyStateText:void 0,scrollToBottom:oe,theme:He,listStyle:new r.ListStyle({height:"100%",width:"100%",background:"inherit"})}),Ae&&Me.current&&Me.current.length>0&&!Ge.current?d.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"fit-content",width:"100%"},className:"cc-message-list__message-indicator",children:d.jsx(el,{ref:Ee,text:Be.current,buttonStyle:ll(He),buttonClick:on})}):null]}),d.jsx("div",{className:"cc-message-list__footer-view",style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:"auto"},children:Sn()})]}),ae?he:null,ue&&Le.current?Le.current:null,ce&&null!==de&&d.jsx(Ol,{message:de,bubbleView:Y?.bubbleView||In,onClose:Y?.onClose||(()=>{Ce(!1)}),template:(Ln=de,Xe[Ln?.getCategory()+"_"+Ln?.getType()]),loadingStateView:Y?.loadingStateView,errorStateView:Y?.errorStateView,listItemStyle:Y?.listItemStyle,emptyStateView:Y?.emptyStateView,loadingIconURL:Y?.loadingIconURL,readIcon:Y?.readIcon,deliveredIcon:Y?.deliveredIcon,onError:Y?.onError,subtitleView:Y?.subtitleView,listItemView:Y?.listItemView,messageInformationStyle:Y?.messageInformationStyle,closeIconURL:Y?.closeIconURL||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",receiptDatePattern:Y?.receiptDatePattern,backdropStyle:ee})]});var Ln};Hl.defaultProps=Gl;const Ql=e=>({height:"36px",padding:"8px 16px",boxSizing:"border-box",border:`1px solid ${e.palette.getAccent100()}`}),Nl=e=>({height:"100%",width:"100%",border:"0 none",borderRadius:"0",background:`${e.palette.getBackground()}`,buttonTextFont:`${n.fontHelper(e.typography.subtitle1)}`,buttonTextColor:`${e.palette.getAccent600()}`});var Kl="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const zl={width:"100%",height:"100%",background:"white",borderRadius:"none",border:"1px solid rgba(20, 20, 20, 0.1)",titleColor:"rgba(20, 20, 20)",titleFont:"700 22px Inter",closeIconTint:"#3399FF"},Jl={textFont:"700 22px Inter",textColor:"black",background:"transparent"},Yl={height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:"#7dbfff"},_l=e=>{const{parentMessage:o,title:i=n.localize("THREAD"),closeIconURL:a=Kl,bubbleView:l=null,messageActionView:c=null,onError:C,onClose:g=(()=>{}),threadedMessagesStyle:u=zl,messageListConfiguration:p=new r.MessageListConfiguration({}),messageComposerConfiguration:h=new r.MessageComposerConfiguration({}),messageComposerView:m,messageListView:A,hideMessageComposer:x}=e,{theme:y}=t.useContext(R),[w,f]=t.useState(o),[D,E]=t.useState(0),v=t.useRef(u);let I=new r.ThreadedMessagesStyle({width:"100%",height:"100%",background:y.palette.getBackground(),borderRadius:"none",border:"none",titleColor:y.palette.getAccent(),titleFont:n.fontHelper(y.typography.title1),closeIconTint:y.palette.getPrimary()});v.current={...I,...u},Jl.textFont=v?.current?.titleFont||n.fontHelper(y.typography.title1),Jl.textColor=v?.current?.titleColor||y.palette.getAccent(),Jl.background="transparent",Yl.buttonIconTint=v?.current?.closeIconTint||y.palette.getPrimary();const[S,F]=t.useState(null),k=b(C),T=t.useMemo((()=>{if(S&&o?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user)return o?.getSender()?.getUid()===S?.getUid()?o?.getReceiver():o?.getSender()}),[o,S]),M=t.useMemo((()=>{if(S&&o?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group)return o?.getReceiver()}),[S,o]),B=w.getId(),L=t.useMemo((()=>(new s.CometChat.MessagesRequestBuilder).setCategories(De.getDataSource().getAllMessageCategories()).setTypes(De.getDataSource().getAllMessageTypes()).hideReplies(!0).setLimit(20).setParentMessageId(B)),[B]),U=t.useCallback((e=>{try{Number(e?.getMessageId())===B&&(e?.getReadAt()?f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getReadAt()),n})):e?.getDeliveredAt()&&f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getDeliveredAt()),n})))}catch(e){k(e)}}),[B,f,k]),P=t.useCallback((e=>{try{B===e?.getId()&&f((t=>r.CometChatUIKitUtility.clone(e)))}catch(e){k(e)}}),[B,f,k]),O=t.useCallback((()=>{const e=n.CometChatMessageEvents.onMessagesDelivered.subscribe((e=>{U(e)})),t=n.CometChatMessageEvents.onMessagesRead.subscribe((e=>{U(e)})),r=n.CometChatMessageEvents.onMessageDeleted.subscribe((e=>{P(e)})),s=n.CometChatMessageEvents.onMessageEdited.subscribe((e=>{P(e)})),i=n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),a=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),l=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),c=n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),C=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),d=n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),g=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))}));return()=>{e?.unsubscribe(),t?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe(),g?.unsubscribe()}}),[U,P,o]),j=t.useCallback((()=>{try{const e=n.CometChatMessageEvents.ccMessageSent.subscribe((({status:e,message:t})=>{e===n.MessageStatus.success&&t?.getParentMessageId()===w?.getId()&&E((e=>e+1))})),t=n.CometChatMessageEvents.ccMessageEdited.subscribe((({status:e,message:t})=>{e===n.MessageStatus.success&&t?.getId()===w?.getId()&&f((e=>r.CometChatUIKitUtility.clone(t)))})),o=n.CometChatMessageEvents.ccMessageDeleted.subscribe((e=>{e?.getId()===w?.getId()&&f((t=>r.CometChatUIKitUtility.clone(e)))})),s=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{e?.getId()===w?.getId()&&f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getReadAt()),n}))}));return()=>{try{o?.unsubscribe(),t?.unsubscribe(),s?.unsubscribe(),e?.unsubscribe()}catch(e){k(e)}}}catch(e){k(e)}}),[w,f,k]),V=t.useCallback((()=>{g()}),[g]),G=t.useCallback((()=>{try{const e=D||0;return`${e} ${1===e?n.localize("REPLY"):n.localize("REPLIES")}`}catch(e){k(e)}}),[k,D]),H=t.useCallback((()=>l&&w?l(w):null),[w,l]);return function(e,n,o,r,i,a,l){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{if(e){const e=o(),t=r();return()=>{e(),t()}}}),[e,o,r]),t.useEffect((()=>{void 0===a?.getReplyCount()?l(0):l(a?.getReplyCount())}),[a,l])}(S,F,O,j,k,o,E),d.jsxs("div",{className:"cc-threaded-messages__wrapper",style:{background:v?.current?.background||y.palette.getBackground(),height:v?.current?.height,width:v?.current?.width,border:v?.current?.border,borderRadius:v?.current?.borderRadius,display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box"},children:[d.jsxs("div",{className:"cc-threaded-messages__header",style:{padding:"16px",width:"100%",display:"flex",boxSizing:"border-box"},children:[d.jsx("div",{className:"cc-threaded-messages__title",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"calc(100% - 24px)"},children:d.jsx("cometchat-label",{text:i,labelStyle:JSON.stringify(Jl)})}),d.jsx("div",{className:"cc-threaded-messages__close",style:{display:"flex",alignItems:"center",width:"24px"},children:d.jsx("cometchat-button",{iconURL:a,buttonStyle:JSON.stringify(Yl),onClick:V})})]}),d.jsxs("div",{className:"cc-threaded-messages",style:{width:"100%",height:"calc(100% - 156px)",display:"flex",flexDirection:"column"},children:[d.jsx("div",{className:"cc-threaded-messages__bubbleview",style:{display:"flex",width:"100%",height:"fit-content",padding:"8px 16px",boxSizing:"border-box",maxHeight:"20em",overflow:"hidden scroll"},children:H()}),d.jsx("div",{className:"cc-threaded-messages__actionview",style:Ql(y),children:c||d.jsx("cometchat-button",{text:G(),buttonStyle:JSON.stringify(Nl(y))})}),A?T||M?A(T,M,o):null:d.jsx("div",{className:"cc-threaded-messages__list",style:{height:"100%",overflow:"hidden",width:"100%"},children:d.jsx(Hl,{parentMessageId:w?.getId(),user:T,group:M,emptyStateView:p?.emptyStateView,loadingStateView:p?.loadingStateView,errorStateView:p?.errorStateView,disableReceipt:p?.disableReceipt,readIcon:p?.readIcon,deliveredIcon:p?.deliveredIcon,sentIcon:p?.sentIcon,waitIcon:p?.waitIcon,errorIcon:p?.errorIcon,alignment:p?.alignment,showAvatar:p?.showAvatar,datePattern:p?.datePattern,timestampAlignment:p?.timestampAlignment,DateSeparatorPattern:p?.DateSeparatorPattern,templates:p?.templates,messagesRequestBuilder:p?.messagesRequestBuilder||L,thresholdValue:p?.thresholdValue,onThreadRepliesClick:p?.onThreadRepliesClick,headerView:p?.headerView,footerView:p?.footerView,avatarStyle:p?.avatarStyle,dateSeparatorStyle:p?.dateSeparatorStyle,messageListStyle:p?.messageListStyle,onError:p?.onError,disableMentions:p?.disableMentions,hideDateSeparator:p?.hideDateSeparator,reactionsConfiguration:p?.reactionsConfiguration,disableReactions:p?.disableReactions,emojiKeyboardStyle:p?.emojiKeyboardStyle,threadIndicatorIcon:p?.threadIndicatorIcon,textFormatters:p?.textFormatters})})]}),x||m?null:d.jsx("div",{className:"cc-threaded-messages__composer",style:{height:"fit-content",width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",minHeight:"90px"},children:d.jsx(Qa,{sendButtonIconURL:h?.sendButtonIconURL,parentMessageId:w?.getId(),user:T,group:M,text:h?.text,headerView:h?.headerView?h.headerView(T,M):null,onTextChange:h?.onTextChange,attachmentIconURL:h?.attachmentIconURL,attachmentOptions:h?.attachmentOptions,secondaryButtonView:h?.secondaryButtonView,auxiliaryButtonView:h?.auxilaryButtonView,auxiliaryButtonAlignment:h?.auxiliaryButtonsAlignment,sendButtonView:h?.sendButtonView,hideLiveReaction:h?.hideLiveReaction,LiveReactionIconURL:h?.LiveReactionIconURL,messageComposerStyle:h?.messageComposerStyle,onSendButtonClick:h?.onSendButtonClick,onError:h?.onError,hideVoiceRecording:h?.hideVoiceRecording,voiceRecordingStartIconURL:h?.voiceRecordingStartIconURL,voiceRecordingCloseIconURL:h?.voiceRecordingCloseIconURL,voiceRecordingStopIconURL:h?.voiceRecordingStopIconURL,voiceRecordingSubmitIconURL:h?.voiceRecordingSubmitIconURL,AIOptionsStyle:h?.AIOptionsStyle,AIIconURL:h?.AIIconURL,userMemberWrapperConfiguration:h?.userMemberWrapperConfiguration,textFormatters:h?.textFormatters||[],disableMentions:h?.disableMentions,mentionsWarningText:h?.mentionsWarningText,mentionsWarningStyle:h?.mentionsWarningStyle,emojiIconURL:h?.emojiIconURL,hideLayoutMode:h?.hideLayoutMode,actionSheetStyle:h?.actionSheetStyle})}),!x&&m&&(T||M)?m(T,M,o):null]})};const Wl={user:void 0,group:void 0,hideMessageComposer:!1,disableTyping:!1,messageHeaderConfiguration:new r.MessageHeaderConfiguration({}),messageListConfiguration:new r.MessageListConfiguration({}),messageComposerConfiguration:new r.MessageComposerConfiguration({}),threadedMessagesConfiguration:new r.ThreadedMessagesConfiguration({}),detailsConfiguration:new r.DetailsConfiguration({}),customSoundForIncomingMessages:"",customSoundForOutgoingMessages:"",disableSoundForMessages:!1,messagesStyle:new r.MessagesStyle({width:"100%",height:"100%",background:"white",borderRadius:"none",border:"1px solid rgba(20, 20, 20, 0.1)"}),messageHeaderView:null,messageComposerView:null,messageListView:null,hideMessageHeader:!1,hideDetails:!1,auxiliaryMenu:null},Zl=e=>{const{theme:o}=t.useContext(R),{user:r,group:i,hideMessageComposer:a,disableTyping:l,messageHeaderConfiguration:c,messageListConfiguration:C,messageComposerConfiguration:g,threadedMessagesConfiguration:u,detailsConfiguration:p,customSoundForIncomingMessages:h,customSoundForOutgoingMessages:m,disableSoundForMessages:A,messagesStyle:x,messageHeaderView:b,messageComposerView:y,messageListView:w,hideMessageHeader:f,hideDetails:D,auxiliaryMenu:E}=e,[v,I]=t.useState(null),[S,F]=t.useState(r),[k,T]=t.useState(i),M=t.useRef(null),B=t.useRef(null),L=t.useRef(null),[U,P]=t.useState(!1),[O,j]=t.useState(!1),[V,G]=t.useState(!1),[H,Q]=t.useState(!1),N=t.useRef(null);t.useMemo((()=>r?(new s.CometChat.MessagesRequestBuilder).setUID(r.getUid()).setCategories(De.getDataSource().getAllMessageCategories()).setTypes(De.getDataSource().getAllMessageTypes()).setLimit(20).hideReplies(!0):i?(new s.CometChat.MessagesRequestBuilder).setGUID(i.getGuid()).setCategories(De.getDataSource().getAllMessageCategories()).setTypes(De.getDataSource().getAllMessageTypes()).setLimit(20).hideReplies(!0):void 0),[r,i]);let K=g?.LiveReactionIconURL||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAFAAAAAAnxZisAAACpElEQVQ4Ea1VzUsVURQ/5868UrEg/AMy0NTMRQRBJfIQszKxgh5ByzbVIooiiDbZBwUtXAWJtGgRJW0MQsxnxfhRIbgpsqcQtajoA8uITGfu3Hs6Z+zJU3pq+n4wc+fee87vd+bcM2cQ5mB0Z+0WMuERQNiNgO+UgtYAgs7K7uffM01fVlevyc9391iAo5bsOkT1gPdvlvd4Q5l2mJ68bahdG2rTwvMmB9HV1gKP0WWA3oSWzlc86rsj9qm6mkOuwgsKsMQSgeErxpEYS5oQOpSLp0u7vA9iGwmkdsWLlaGuPKXKJw3TyU4GYizEYG+OFglXAt7gOWomzoRY5TsO+Na+8pEaqpJ97/FeIuFUjX++X+C4jb+ZPBsUi3C0Wvb5OSaRZ0MBi0xY01GxvfYApuprtjkE/ZZAZXeZpkrnczF2Ek9oaKtCi2c4ogXJRUKIFyJP2zmolHLUSZeAGjWXQq4RcpHwMTVxIeCwVEuuIWfGSPGIl/9OcqohnA7QVWUCeMg1PyJ1nCsIl7ZmVIcqqSo97xen6aK8UC4SleZB5VwS7ijs8p7e9sDQLflIlos8R4FPdLs9Gb8rXJEAq5K7YurEpLHeckTEd8rYp77G483QHNXmTOJLuwZ/ukof9I0dWIqI+PjWDFqHEps870c6EzMCslCSfPYVQtzvG9MpDos5E7GZJrc9gfX3buju/5Qml3GWgCyUed7YtwmdYJHrLqqom8r6vyDfT0whsG3bqrzV+6oeD36ZazdvkCN1NYe5nq8xSRHndpYvd14Igca5dZxdn+xtm7WZMZlXQOxe18c3ukQtLLJDc0cUSPsOiJ6AMqfKugdeRItZbgsKiN/Q5s2xwqLCYw7hOWl3/FO5oj+OtVYODwdZeJe2LD+mVDxe/D/efwCuAQs2cnkFkQAAAABJRU5ErkJggg==",z="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const J=t.useCallback((e=>{U?P(!1):(P(!0),setTimeout((()=>{P(!1)}),1500))}),[U,P]),Y=t.useCallback((()=>{try{const e=n.CometChatMessageEvents.ccLiveReaction.subscribe((e=>{!V&&e&&"heart"===e&&J(e)})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{k&&k.getGuid()===i?.getGuid()&&(j(!1),G(!1),T(e))})),o=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{k?.getGuid()===e.leftGroup.getGuid()&&(v?.getUid()===e?.userLeft.getUid()&&(j(!1),G(!1)),T(e.leftGroup))})),r=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{S?.getUid()===e.getUid()&&(e.setBlockedByMe(!0),F(e))})),s=n.CometChatUserEvents.ccUserUnblocked.subscribe((e=>{S?.getUid()===e.getUid()&&(e.setBlockedByMe(!1),F(e))})),a=n.CometChatUIEvents.ccShowPanel.subscribe((e=>{e.position===n.PanelAlignment.messages&&(N.current=e.child,Q(!0))})),l=n.CometChatUIEvents.ccHidePanel.subscribe((e=>{e===n.PanelAlignment.messages&&(N.current=null,Q(!1))}));return()=>{try{e?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe()}catch(e){console.log("error",e)}}}catch(e){console.log("error",e)}}),[V,J,j,G,k,S,v,i]),_=(e,t)=>{B.current=e,L.current=t,G(!0)},W=()=>j(!0),Z=()=>{j(!1)},X=()=>{B.current=null,L.current=null,G(!1)};function q(){if(e.detailsConfiguration?.data)return e.detailsConfiguration?.data(e.user,e.group)}const $=t.useCallback((()=>{if(c?.menu)return c.menu(S,k);const e=De.getDataSource().getAuxiliaryHeaderMenu(S,k);return d.jsxs(d.Fragment,{children:[E||e.map((e=>e)),D?null:d.jsx("div",{className:"cc-messages__header-menu-wrapper",style:{height:"100%",width:"100%",border:"none",background:"transparent",borderRadius:0,marginLeft:"16px"},children:d.jsx("cometchat-button",{iconURL:z,buttonStyle:JSON.stringify(xi(o)),ref:M,onClick:W})})]})}),[c,S,k,E,D,z]);return function(e,n,o,r,i,a,l,c,C,d,g){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}))}),[n]),t.useEffect((()=>{const e=r.current;if(!e)return;const t=e=>{i(!0)};return a?.menu?e.removeEventListener("cc-menu-clicked",t):e.addEventListener("cc-menu-clicked",t),()=>{e.removeEventListener("cc-menu-clicked",t)}}),[a,r,i]),t.useEffect((()=>{l&&(d(null),c((e=>(e?.getUid()!==l?.getUid()&&(i(!1),g(!1)),l))))}),[l,c,d,i,g]),t.useEffect((()=>{C&&(c(null),d((e=>(e?.getGuid()!==C?.getGuid()&&(i(!1),g(!1)),C))))}),[C,c,d,i,g]),t.useEffect((()=>{let t;return e&&(t=o()),()=>{t?.()}}),[e,o])}(v,I,Y,M,j,C,r??null,F,i??null,T,G),S||k?d.jsxs("div",{className:"cc-messages-wrapper",style:ci(x,o),children:[H&&N.current?d.jsxs("div",{className:"cc-messages-wrapper__panel",style:bi,children:[N.current," "]}):null,d.jsxs("div",{className:"cc-messages",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",position:"relative",boxSizing:"border-box",justifyContent:"space-between",borderRadius:"inherit"},children:[f?null:d.jsx("div",{className:"cc-messages__header",style:gi,children:b||d.jsx(Za,{user:S,group:k,subtitleView:c?.subtitleView?c.subtitleView(S,k):null,disableUsersPresence:c?.disableUsersPresence,protectedGroupIcon:c?.protectedGroupIcon,passwordGroupIcon:c?.passwordGroupIcon,privateGroupIcon:c?.privateGroupIcon,menu:$(),avatarStyle:c?.avatarStyle,statusIndicatorStyle:c?.statusIndicatorStyle,messageHeaderStyle:pi(c),listItemStyle:c?.listItemStyle,backButtonIconURL:c?.backButtonIconURL,hideBackButton:c?.hideBackButton,listItemView:c?.listItemView?c.listItemView(S,k):null,onError:c?.onError,onBack:c?.onBack,disableTyping:l})}),w||d.jsx("div",{className:"cc-messages__list",style:ui,children:d.jsx(Hl,{loadingIconURL:C?.loadingIconURL,user:S,group:k,emptyStateView:C?.emptyStateView,errorStateView:C?.errorStateView,loadingStateView:C?.loadingStateView,disableSoundForMessages:A,customSoundForMessages:h,disableReceipt:C?.disableReceipt,readIcon:C?.readIcon,deliveredIcon:C?.deliveredIcon,sentIcon:C?.sentIcon,waitIcon:C?.waitIcon,errorIcon:C?.errorIcon,alignment:C?.alignment,showAvatar:C?.showAvatar,scrollToBottomOnNewMessages:C?.scrollToBottomOnNewMessages,datePattern:C?.datePattern,timestampAlignment:C?.timestampAlignment,DateSeparatorPattern:C?.DateSeparatorPattern,templates:C?.templates,messagesRequestBuilder:C?.messagesRequestBuilder,thresholdValue:C?.thresholdValue,onThreadRepliesClick:C?.onThreadRepliesClick||_,headerView:C?.headerView,footerView:C?.footerView,avatarStyle:C?.avatarStyle,dateSeparatorStyle:C?.dateSeparatorStyle,messageListStyle:hi(C),onError:C?.onError,disableMentions:C?.disableMentions,hideDateSeparator:C?.hideDateSeparator,reactionsConfiguration:C?.reactionsConfiguration,disableReactions:C?.disableReactions,emojiKeyboardStyle:C?.emojiKeyboardStyle,threadIndicatorIcon:C?.threadIndicatorIcon,textFormatters:C?.textFormatters,messageInformationConfiguration:C?.messageInformationConfiguration,backdropStyle:C?.backdropStyle,hideError:C?.hideError})}),a?null:y||d.jsx("div",{className:"cc-messages__composer",style:{width:"100%",display:"flex"},children:a?null:d.jsx(Qa,{sendButtonIconURL:g?.sendButtonIconURL,user:S,group:k,text:g?.text,headerView:g?.headerView?g.headerView(S,k):null,onTextChange:g?.onTextChange,attachmentIconURL:g?.attachmentIconURL,attachmentOptions:g?.attachmentOptions,secondaryButtonView:g?.secondaryButtonView,auxiliaryButtonView:g?.auxilaryButtonView,auxiliaryButtonAlignment:g?.auxiliaryButtonsAlignment,sendButtonView:g?.sendButtonView,emojiIconURL:g?.emojiIconURL,hideLiveReaction:g?.hideLiveReaction,LiveReactionIconURL:g?.LiveReactionIconURL,hideLayoutMode:g?.hideLayoutMode,actionSheetStyle:g?.actionSheetStyle,messageComposerStyle:mi(g),onSendButtonClick:g?.onSendButtonClick,onError:g?.onError,disableSoundForMessages:A,customSoundForMessage:m,hideVoiceRecording:g?.hideVoiceRecording,voiceRecordingStartIconURL:g?.voiceRecordingStartIconURL,voiceRecordingCloseIconURL:g?.voiceRecordingCloseIconURL,voiceRecordingStopIconURL:g?.voiceRecordingStopIconURL,voiceRecordingSubmitIconURL:g?.voiceRecordingSubmitIconURL,AIOptionsStyle:g?.AIOptionsStyle,AIIconURL:g?.AIIconURL,userMemberWrapperConfiguration:g?.userMemberWrapperConfiguration,textFormatters:g?.textFormatters||[],disableMentions:g?.disableMentions,mentionsWarningText:g?.mentionsWarningText,mentionsWarningStyle:g?.mentionsWarningStyle,mediaRecorderStyle:g?.mediaRecorderStyle})})]}),V&&B.current?d.jsx("div",{className:"cc-messages__threaded",style:Ci,children:V&&B.current?d.jsx(_l,{parentMessage:B.current,onClose:u?.onClose||X,onError:u?.onError,closeIconURL:u?.closeIconURL,bubbleView:u?.bubbleView||L.current,messageActionView:u?.messageActionView?u.messageActionView(B.current):null,messageListConfiguration:u?.messageListConfiguration,messageComposerConfiguration:u?.messageComposerConfiguration,threadedMessagesStyle:u?.threadedMessagesStyle,hideMessageComposer:u?.hideMessageComposer,messageComposerView:u?.messageComposerView,messageListView:u?.messageListView}):null}):null,U?d.jsx("div",{className:"cc-messages__live-reaction",style:{position:"absolute",bottom:"50px",right:"20px",width:"50%",height:"100%"},children:d.jsx("cometchat-live-reaction",{reactionIconURL:K,liveReactionStyle:JSON.stringify({height:"20px",width:"25px",background:g?.messageComposerStyle?.liveReactionIconTint||"red"})})}):null,O?d.jsx("div",{className:"cc-messages__details",style:di,children:d.jsx(Xi,{user:S,group:k,closeButtonIconURL:p?.closeButtonIconURL||"./assets/close2x.svg",hideProfile:p?.hideProfile,subtitleView:p?.subtitleView,customProfileView:p?.customProfileView,data:q(),disableUsersPresence:p?.disableUsersPresence,privateGroupIcon:p?.privateGroupIcon,protectedGroupIcon:p?.protectedGroupIcon,passwordGroupIcon:p?.passwordGroupIcon,onError:p?.onError,onClose:p?.onClose||Z,leaveDialogStyle:p?.leaveDialogStyle,statusIndicatorStyle:p?.statusIndicatorStyle,avatarStyle:p?.avatarStyle,detailsStyle:Ai(p),listItemStyle:p?.listItemStyle,groupMembersConfiguration:p?.groupMembersConfiguration,addMembersConfiguration:p?.addMembersConfiguration,bannedMembersConfiguration:p?.bannedMembersConfiguration,transferOwnershipConfiguration:p?.transferOwnershipConfiguration})}):null]}):null};Zl.defaultProps=Wl;const Xl={user:void 0,group:void 0,isMobileView:!1,messageText:"",conversationsWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),conversationsConfiguration:new r.ConversationsConfiguration({}),onError:e=>{console.log(e)},startConversationConfiguration:new r.ContactsConfiguration({}),startConversationIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FNew%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FNew%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9288822%2C11.8990317%20L7.62932866%2C12.3710104%20L8.10043948%2C9.07071466%20L16.5857676%2C0.585763632%20C17.3668205%2C-0.195254544%2018.6331574%2C-0.195254544%2019.4142103%2C0.585763632%20C20.1952632%2C1.36678181%2020.1952632%2C2.63306247%2019.4142103%2C3.41408064%20L10.9288822%2C11.8990317%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2215.6426571%22%20y1%3D%221.52883225%22%20x2%3D%2218.4710998%22%20y2%3D%224.35714926%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C12.0003604%20L16%2C18.6667267%20C16%2C19.4030732%2015.4030369%2C20%2014.6666577%2C20%20L1.33333252%2C20%20C0.596953301%2C20%200%2C19.4030732%200%2C18.6667267%20L0%2C5.33399414%20C0%2C4.59764765%200.596953301%2C4.00072088%201.33333252%2C4.00072088%20L8%2C4.00072088%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"},ql=e=>{const{theme:o}=t.useContext(R),{user:i,group:a,isMobileView:l,messageText:c,conversationsWithMessagesStyle:C,messagesConfiguration:g,conversationsConfiguration:u,startConversationConfiguration:p,onError:h,startConversationIconURL:m}=e,[A,y]=t.useState(null),[w,f]=t.useState(null),[D,E]=t.useState(i??null),[v,I]=t.useState(a??null),[S,F]=t.useState(!1),k=t.useRef(null),T=b(h);k.current=w;const[M,B]=x(null),L=t.useCallback((async()=>{try{let e=D?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,t=D?D?.getUid():v?.getGuid();"string"==typeof t&&f(await s.CometChat.getConversation(t,e))}catch(e){T(e)}}),[D,v,f,T]),U=()=>{E(null),I(null),f(null)},P=e=>{try{if(k.current=e,f(e),e.getConversationType()&&e.getConversationType()===n.CometChatUIKitConstants.MessageReceiverType.user)I(null),E(e.getConversationWith());else{if(!e.getConversationType()||e.getConversationType()!==n.CometChatUIKitConstants.MessageReceiverType.group)return;E(null),I(e.getConversationWith())}}catch(e){T(e)}},O=t.useCallback(((e,t,n)=>{const o=k.current,r=A||n,i=r?.getUid()===t.getUid(),a=e.getActionFor()instanceof s.CometChat.Group;if(i&&o&&o.getConversationWith()instanceof s.CometChat.Group){let t=o.getConversationWith();if(a){e.getActionFor().getGuid()===t.getGuid()&&(f(null),I(null),E(null))}}}),[A,y,D,v,k]),j=t.useCallback((e=>{try{const t=e.getConversationType(),o=e.getConversationWith();if(t===n.CometChatUIKitConstants.MessageReceiverType.user&&D&&D.getUid()===o.getUid())E(null);else{if(t!==n.CometChatUIKitConstants.MessageReceiverType.group||!v||v.getGuid()!==o.getGuid())return;I(null)}}catch(e){T(e)}}),[v,I,D,E,T]),V=t.useCallback((()=>{try{const e=n.CometChatConversationEvents.ccConversationDeleted.subscribe((e=>{j(e)})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{v&&v.getGuid()===e.getGuid()&&(f(null),I(null))})),o=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{v&&v.getGuid()===e?.userAddedIn.getGuid()&&I(e?.userAddedIn)})),i=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{v&&v.getGuid()===e?.kickedFrom.getGuid()&&I(e?.kickedFrom)})),a=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{v&&v.getGuid()===e?.joinedGroup.getGuid()&&I(e?.joinedGroup)})),l=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{v&&v.getGuid()===e?.kickedFrom.getGuid()&&I(e?.kickedFrom)})),c=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{v&&v.getGuid()===e?.group.getGuid()&&(I(e?.group),f((t=>{if(t){let n=r.CometChatUIKitUtility.clone(t);return n.setConversationWith(e?.group),n}return t})))})),C=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{v&&v.getGuid()===e?.leftGroup.getGuid()&&A?.getUid()===e?.userLeft?.getUid()&&(I(null),f(null))})),d=n.CometChatUIEvents.ccOpenChat.subscribe((e=>{const t=e.user?.getUid();t&&s.CometChat.getConversation(t,n.CometChatUIKitConstants.MessageReceiverType.user).then((e=>{P(e)}))}));return()=>{try{e?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe()}catch(e){T(e)}}}catch(e){T(e)}}),[v,f,I,j,T,A]),G=()=>F(!1),H=S?null:d.jsx("cometchat-button",{ref:B,iconURL:m,buttonStyle:JSON.stringify(Qs(S,o)),children:" "}),Q=(e,t)=>{e?(I(null),E(e),G()):t&&(E(null),I(t),G())};return function(e,n,o,r,i,a,l,c,C,d,g,u,p,h){t.useEffect((()=>{let e;s.CometChat.getLoggedinUser().then((t=>(h&&(e=h(t)),n(t),()=>{e&&e()})),(e=>{r(e)}))}),[n,r]),t.useEffect((()=>{let t;return e&&(t=o(),i()),()=>{t?.()}}),[e,a,l,i,o]),t.useEffect((()=>{if(!c)return;async function e(){d?g():C()}const t="cc-button-clicked";return c.addEventListener(t,e),()=>{c.removeEventListener(t,e)}}),[c,C,g,d]),t.useEffect((()=>{u(a)}),[a,u]),t.useEffect((()=>{p(l)}),[l,p])}(A,y,V,T,L,i,a,M,(()=>F(!0)),S,G,E,I,(e=>{const t="ConversationWithMessages_Group_"+String(Date.now());return s.CometChat.addGroupListener(t,new s.CometChat.GroupListener({onGroupMemberKicked:(t,n)=>{O(t,n,e)},onGroupMemberBanned:(t,n)=>{O(t,n,e)}})),()=>s.CometChat.removeGroupListener(t)})),d.jsxs("div",{className:"cc-conversations-with-messages__wrapper",style:Fs(C,o),children:[d.jsx("div",{className:"cc-conversations-with-messages__sidebar",style:ks(C,o,l,D,v),children:d.jsx(ws,{activeConversation:w??void 0,onItemClick:u?.onItemClick||P,conversationsStyle:Ps(u),subtitleView:u?.subtitleView,options:u?.options??void 0,disableUsersPresence:u?.disableUsersPresence,disableReceipt:u?.disableReceipt,disableTyping:u?.disableTyping,deliveredIcon:u?.deliveredIcon,readIcon:u?.readIcon,waitIcon:u?.waitIcon,errorIcon:u?.errorIcon,datePattern:u?.datePattern,receiptStyle:u?.receiptStyle,sentIcon:u?.sentIcon,privateGroupIcon:u?.privateGroupIcon,protectedGroupIcon:u?.protectedGroupIcon,passwordGroupIcon:u?.passwordGroupIcon,customSoundForMessages:u?.customSoundForMessages,conversationsRequestBuilder:u?.conversationsRequestBuilder,emptyStateView:u?.emptyStateView,onSelect:u?.onSelect,loadingIconURL:u?.loadingIconURL,errorStateView:u?.errorStateView,loadingStateView:u?.loadingStateView,titleAlignment:u?.titleAlignment,listItemView:u?.listItemView,menus:u?.menu||H,hideSeparator:u?.hideSeparator,hideError:u?.hideError,selectionMode:u?.selectionMode,disableSoundForMessages:u?.disableSoundForMessages,deleteConversationDialogStyle:u?.deleteConversationDialogStyle,avatarStyle:u?.avatarStyle,statusIndicatorStyle:u?.statusIndicatorStyle,badgeStyle:u?.badgeStyle,dateStyle:u?.dateStyle,listItemStyle:u?.listItemStyle,backdropStyle:Hs(C,u),disableMentions:u?.disableMentions,textFormatters:u?.textFormatters})}),S||!D&&!v?null:d.jsx("div",{className:"cc-conversations-with-messages__main",style:Bs(C,l,D,v),children:d.jsx(Zl,{auxiliaryMenu:g?.messageHeaderConfiguration.menu,user:D??void 0,group:v??void 0,messageHeaderConfiguration:{...g?.messageHeaderConfiguration,onBack:g?.messageHeaderConfiguration?.onBack||U,hideBackButton:!l,messageHeaderStyle:{...Os(C,g,l),...g?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:g?.messageListConfiguration,messageComposerConfiguration:{...g?.messageComposerConfiguration,messageComposerStyle:{...js(C,g,l),...g?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:Vs(g?.messagesStyle,C),customSoundForIncomingMessages:g?.customSoundForIncomingMessages,customSoundForOutgoingMessages:g?.customSoundForOutgoingMessages,detailsConfiguration:g?.detailsConfiguration,disableSoundForMessages:g?.disableSoundForMessages,disableTyping:g?.disableTyping,hideMessageComposer:g?.hideMessageComposer,hideMessageHeader:g?.hideMessageHeader,messageComposerView:g?.messageComposerView?g?.messageComposerView(D,v):null,messageHeaderView:g?.messageHeaderView?g?.messageHeaderView(D,v):null,messageListView:g?.messageListView?g?.messageListView(D,v):null,hideDetails:g?.hideDetails,threadedMessagesConfiguration:g?.threadedMessageConfiguration})}),S||D||v?null:(()=>{const e=c||n.localize("NO_CHATS_SELECTED");return d.jsx("div",{className:"cc-decorator-message--empty",style:Gs(l,D,v),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(Rs(C,o))})})})(),S&&d.jsx(li,{title:n.localize("NEW_CHAT"),usersTabTitle:n.localize("USERS"),groupsTabTitle:n.localize("GROUPS"),closeIconURL:p?.closeIconURL?p?.closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onItemClick:Q,onClose:p?.onClose?p?.onClose:G,tabVisibility:p?.tabVisibility,usersConfiguration:p?.usersConfiguration,groupsConfiguration:p?.groupsConfiguration,contactsStyle:p?.contactsStyle,hideSubmitButton:p?.hideSubmitButton,selectionLimit:p?.selectionLimit,selectionMode:p?.selectionMode})]})};ql.defaultProps=Xl;const $l={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},ec={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},tc={width:"calc(100% - 280px)",height:"100%"},nc={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},oc={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},rc={width:"280px",height:"100%",position:"relative"},sc=(e,t)=>({...ec,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),ic=(e,t,n,o)=>n?ac(o):lc(e,t),ac=e=>({...e?{visibility:"hidden"}:{visibility:"visible"},...nc,borderRadius:"inherit"}),lc=(e,t)=>{const n=e?.borderRadius||0;return{...rc,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},cc=(e,t,n)=>t?Cc(n):dc(e),Cc=e=>({...e?{visibility:"visible"}:{visibility:"hidden"},...nc,borderRadius:"inherit"}),dc=e=>{const t=e?.borderRadius||0;return{...tc,borderRadius:`0 ${t} ${t} 0`}},gc=(e,t)=>({...$l,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),uc=e=>{const t=e?.groupsStyle;return{width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...t}},pc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},hc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},mc=(e,t)=>{let n={visibility:"hidden"};return t||e||(n={visibility:"visible"}),{...oc,...n,width:"calc(100% - 280px)"}},Ac=e=>e?{...nc,background:"inherit",borderRadius:"inherit"}:{width:"calc(100% - 280px)",background:"inherit",borderRadius:"inherit"},xc=(e,t)=>{const o=e?.joinGroupStyle;return{width:o?.width||"100%",height:o?.height||"100%",boxShadow:o?.boxShadow||"none",background:o?.background||"transparent",border:o?.border||"0",borderRadius:o?.borderRadius||"inherit",titleTextFont:o?.titleTextFont||n.fontHelper(t.typography.heading),titleTextColor:o?.titleTextFont||t.palette.getAccent700(),passwordInputPlaceholderTextFont:o?.passwordInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),passwordInputPlaceholderTextColor:o?.passwordInputPlaceholderTextColor||t.palette.getAccent600(),passwordInputBackground:o?.passwordInputBackground||t.palette.getAccent50(),passwordInputBorder:o?.passwordInputBorder||"none",passwordInputBorderRadius:o?.passwordInputBorderRadius||"8px",passwordInputBoxShadow:o?.passwordInputBoxShadow||`${t.palette.getAccent50()} 0 0 0 1px`,passwordInputTextFont:o?.passwordInputTextFont||n.fontHelper(t.typography.subtitle1),passwordInputTextColor:o?.passwordInputTextColor||t.palette.getAccent(),joinButtonTextFont:o?.joinButtonTextFont||n.fontHelper(t.typography.title2),joinButtonTextColor:o?.joinButtonTextColor||t.palette.getBackground(),joinButtonBackground:o?.joinButtonBackground||t.palette.getPrimary(),joinButtonBorderRadius:o?.joinButtonBorderRadius||"8px",joinButtonBorder:o?.joinButtonBorder||"none",errorTextFont:o?.errorTextFont||n.fontHelper(t.typography.subtitle1),errorTextColor:o?.errorTextFont||t.palette.getError()}},bc=(e,t,o)=>{const r=t?.messageHeaderStyle;return{background:r?.background||"inherit",border:"none",borderRadius:r?.borderRadius||e?.borderRadius||"inherit",onlineStatusColor:r?.onlineStatusColor||o.palette.getSuccess(),privateGroupIconBackground:r?.privateGroupIconBackground||o.palette.getSuccess(),passwordGroupIconBackground:r?.passwordGroupIconBackground||"RGB(247, 165, 0)",backButtonIconTint:r?.backButtonIconTint||o.palette.getPrimary(),subtitleTextColor:r?.subtitleTextColor||o.palette.getAccent600(),subtitleTextFont:r?.subtitleTextFont||n.fontHelper(o.typography.subtitle2),typingIndicatorTextColor:r?.typingIndicatorTextColor||o.palette.getPrimary(),typingIndicatorTextFont:r?.typingIndicatorTextFont||n.fontHelper(o.typography.subtitle1)}},yc=(e,t)=>{const o=e?.listItemStyle;return{width:o?.width||"100%",height:o?.height||"45px",background:o?.background||"inherit",hoverBackground:o?.hoverBackground||"transparent",activeBackground:o?.activeBackground||"transparent",borderRadius:o?.borderRadius||"0",titleFont:o?.titleFont||n.fontHelper(t.typography.title2),titleColor:o?.titleColor||t.palette.getAccent(),border:o?.border||"none",separatorColor:o?.separatorColor||""}},wc=e=>({height:e?.height,width:e?.width,position:"absolute"}),fc=e=>{if(e)return{...nc,background:"inherit",borderRadius:"inherit"}},Dc=(e,t,o)=>{let r="360px",s="500px";o&&(r="100%",s="100%");const i=e?.createGroupStyle;return{width:i?.width||r,height:i?.height||s,border:i?.border||"0 none",borderRadius:i?.borderRadius||"0",background:i?.background||t.palette.getBackground(),boxShadow:i?.boxShadow||`${t.palette.getAccent100()} 4px 16px 32px 4px`,titleTextFont:i?.titleTextFont||n.fontHelper(t.typography.heading),titleTextColor:i?.titleTextColor||t.palette.getAccent(),groupTypeTextFont:i?.groupTypeTextFont||n.fontHelper(t.typography.text3),groupTypeBorder:i?.groupTypeBorder||"0 none",groupTypeBorderRadius:i?.groupTypeBorderRadius||"0px",groupTypeTextColor:i?.groupTypeTextColor||t.palette.getAccent(),groupTypeTextBackground:i?.groupTypeTextBackground||"inherit",groupTypeBackground:i?.groupTypeBackground||t.palette.getAccent100(),groupTypeBoxShadow:i?.groupTypeBoxShadow||"",activeGroupTypeTextFont:i?.activeGroupTypeTextFont||n.fontHelper(t.typography.text3),activeGroupTypeTextColor:i?.activeGroupTypeTextColor||t.palette.getAccent(),activeGroupTypeBackground:i?.activeGroupTypeBackground||t.palette.getAccent900(),activeGroupTypeBoxShadow:i?.activeGroupTypeBoxShadow||`${t.palette.getAccent200()} 0 3px 8px 0`,activeGroupTypeBorderRadius:i?.activeGroupTypeBorderRadius||"8px",activeGroupTypeBorder:i?.activeGroupTypeBorder||"none",groupTypeTextBoxShadow:i?.groupTypeTextBoxShadow||"none",groupTypeTextBorderRadius:i?.groupTypeTextBorderRadius||"7px",closeIconTint:i?.closeIconTint||t.palette.getPrimary(),errorTextFont:i?.errorTextFont||n.fontHelper(t.typography.text2),errorTextBackground:i?.errorTextBackground||t.palette.getError(),errorTextBorderRadius:i?.errorTextBorderRadius||"8px",errorTextBorder:i?.errorTextBorder||"none",errorTextColor:i?.errorTextColor||t.palette.getError(),nameInputPlaceholderTextFont:i?.nameInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),nameInputPlaceholderTextColor:i?.nameInputPlaceholderTextColor||t.palette.getAccent600(),nameInputBackground:i?.nameInputBackground||t.palette.getAccent100(),nameInputTextFont:i?.nameInputTextFont||n.fontHelper(t.typography.subtitle1),nameInputTextColor:i?.nameInputTextColor||t.palette.getAccent(),nameInputBorder:i?.nameInputBorder||"none",nameInputBorderRadius:i?.nameInputBorderRadius||"8px",nameInputBoxShadow:i?.nameInputBoxShadow||`${t.palette.getAccent100()} 0 0 0 1px`,passwordInputPlaceholderTextFont:i?.passwordInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),passwordInputPlaceholderTextColor:i?.passwordInputPlaceholderTextColor||t.palette.getAccent600(),passwordInputBackground:i?.passwordInputBackground||t.palette.getAccent100(),passwordInputBorder:i?.passwordInputBorder||"none",passwordInputBorderRadius:i?.passwordInputBorderRadius||"8px",passwordInputBoxShadow:i?.passwordInputBoxShadow||`${t.palette.getAccent100()} 0 0 0 1px`,passwordInputTextFont:i?.passwordInputTextFont||n.fontHelper(t.typography.subtitle1),passwordInputTextColor:i?.passwordInputTextColor||t.palette.getAccent(),createGroupButtonTextFont:i?.createGroupButtonTextFont||n.fontHelper(t.typography.title2),createGroupButtonTextColor:i?.createGroupButtonTextColor||t.palette.getAccent("dark"),createGroupButtonBackground:i?.createGroupButtonBackground||t.palette.getPrimary(),createGroupButtonBorderRadius:i?.createGroupButtonBorderRadius||"8px",createGroupButtonBorder:i?.createGroupButtonBorder||"none"}},Ec=e=>({height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:`${e.palette.getPrimary()}`,padding:"0"});const vc=de({tagName:"cometchat-create-group",elementClass:o.CometChatCreateGroup,react:t}),Ic={group:void 0,isMobileView:!1,messageText:"",groupsWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),groupsConfiguration:new r.GroupsConfiguration({}),createGroupConfiguration:new r.CreateGroupConfiguration({}),joinGroupConfiguration:new r.JoinGroupConfiguration({}),onError:e=>{console.log(e)}},Sc=e=>{const{theme:r}=t.useContext(R),{group:i,isMobileView:a,messageText:l,groupsWithMessagesStyle:c,messagesConfiguration:C,groupsConfiguration:g,createGroupConfiguration:u,joinGroupConfiguration:p,onError:h}=e,m=u?.createClick,A=p?.onError,y=p?.joinClick,[w,f]=t.useState(null),[D,E]=x(null),[v,I]=x(null),S=t.useRef(null),[F,k]=t.useState(!1),[T,M]=t.useState(!1),B=t.useRef(void 0),[L,U]=t.useState(i??void 0),[P,O]=t.useState(null),j=b(h),V=de({tagName:"cometchat-join-group",elementClass:o.CometChatJoinGroup,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),G=t.useCallback((()=>{k(!1)}),[]),H=()=>{B.current=void 0,M(!1)},Q=e=>{try{if(O(null),M(!1),e.getHasJoined())return void U(e);if(e.getType()===n.CometChatUIKitConstants.GroupTypes.password)return U(void 0),B.current=e,void M(!0);s.CometChat.joinGroup(e).then((e=>{U(e)}),(e=>{j(e)}))}catch(e){j(e)}},N=t.useCallback((e=>{try{let t=e?.detail?.response;M(!1),B.current=void 0,t&&U(t)}catch(e){j(e)}}),[U,B,M,j]),K=t.useCallback((()=>{try{const e=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{L&&L.getGuid()===e.getGuid()&&U(void 0)})),t=n.CometChatGroupEvents.ccGroupCreated.subscribe((e=>{e&&(U(e),k(!1))})),o=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{L&&L.getGuid()===e?.userAddedIn.getGuid()&&(U(e?.userAddedIn),k(!1))})),r=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{L&&L.getGuid()===e?.kickedFrom.getGuid()&&U(e?.kickedFrom)})),s=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{B.current&&B.current.getGuid()===e?.joinedGroup.getGuid()&&(H(),U(e?.joinedGroup))})),i=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{L&&L.getGuid()===e?.kickedFrom.getGuid()&&U(e?.kickedFrom)})),a=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{L&&L.getGuid()===e?.group.getGuid()&&U(e?.group)})),l=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{L&&L.getGuid()===e?.leftGroup.getGuid()&&w?.getUid()===e?.userLeft?.getUid()&&U(void 0)})),c=n.CometChatUIEvents.ccOpenChat.subscribe((e=>{const t=e.user;t&&(U(void 0),O(t))}));return()=>{e.unsubscribe(),o.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),t.unsubscribe(),c.unsubscribe()}}catch(e){j(e)}}),[L,U,B,O,k,j,w]),z=t.useCallback((e=>{if(!a)return null;let t=p?.messageHeaderConfiguration;return d.jsx("div",{slot:"headerView",style:{position:"absolute",top:"0",left:"0"},children:d.jsx(Za,{group:e,subtitleView:t?.subtitleView?t?.subtitleView(null,e):null,disableUsersPresence:t?.disableUsersPresence,protectedGroupIcon:t?.protectedGroupIcon,passwordGroupIcon:t?.passwordGroupIcon,privateGroupIcon:t?.privateGroupIcon,menu:t?.menu,messageHeaderStyle:bc(c,t,r),backButtonIconURL:t?.backButtonIconURL,hideBackButton:t?.hideBackButton||!1,onError:t?.onError,onBack:t?.onBack||H,listItemStyle:yc(t,r),statusIndicatorStyle:t?.statusIndicatorStyle,avatarStyle:t?.avatarStyle})})}),[c,a,p?.messageHeaderConfiguration,r]),J=()=>d.jsx(vc,{createGroupStyle:Dc(u,r,a),closeButtonIconURL:u?.closeButtonIconURL,ref:E,hideCloseButton:u?.hideCloseButton||!1});const Y=t.useCallback((()=>d.jsx("cometchat-icon-button",{iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%229%22%20y1%3D%220%22%20x2%3D%229%22%20y2%3D%2218%22%20id%3D%22Path-10%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%229%22%20x2%3D%2218%22%20y2%3D%229%22%20id%3D%22Path-11%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",hoverText:n.localize("CREATE_GROUP"),buttonStyle:JSON.stringify(Ec(r)),ref:S})),[r]);return function(e,n,o,r,i,a,l,c,C,d,g,u,p,h,m,A,x,b,y){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{n(e)}),(e=>{r(e)}))}),[n,r]),t.useEffect((()=>{if(e)return o()}),[e,o]),t.useEffect((()=>{const e=u.current;if(!e)return;const t=()=>{p()};return e.addEventListener("cc-button-clicked",t),()=>{e.removeEventListener("cc-button-clicked",t)}}),[p,u]),t.useEffect((()=>{i?(C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.hideBackButton=!1),a?.messageHeaderConfiguration&&(a.messageHeaderConfiguration.hideBackButton=!1)):(C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.hideBackButton=!0),a?.messageHeaderConfiguration&&(a.messageHeaderConfiguration.hideBackButton=!0))}),[i,a,C]),t.useEffect((()=>{c(l)}),[l,c]),t.useEffect((()=>{C?.messageHeaderConfiguration?.onBack||C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.onBack=d)}),[C,d]),t.useEffect((()=>{if(!m)return;const e="cc-joingroup-joined",t=e=>A(e);return m.addEventListener(e,t),()=>{m.removeEventListener(e,t)}}),[m,A]),t.useEffect((()=>{if(!g)return;const e="cc-creategroup-close-clicked",t=()=>h();return g.addEventListener(e,t),()=>{g.removeEventListener(e,t)}}),[g,h]),t.useEffect((()=>{if(g)return x?(g.createClick=x,()=>{g.createClick=null}):void 0}),[x,g]),t.useEffect((()=>{if(m)return y?(m.joinClick=y,()=>{m.joinClick=null}):void 0}),[y,m]),t.useEffect((()=>{if(m)return b?(m.onError=b,()=>{m.onError=null}):void 0}),[b,m])}(w,f,K,j,a,p,i,U,C,(()=>{O(null),U(void 0)}),D,S,(()=>k(!0)),G,v,N,m,A,y),d.jsx(d.Fragment,{children:d.jsxs("div",{className:"cc-groups-with-messages__wrapper",style:sc(c,r),children:[d.jsx("div",{className:"cc-groups-with-messages__sidebar",style:ic(c,r,a,L),children:d.jsx(ii,{activeGroup:L??void 0,hideSearch:g?.hideSearch,searchIconURL:g?.searchIconURL,searchRequestBuilder:g?.searchRequestBuilder,onItemClick:g?.onItemClick||Q,groupsStyle:uc(g),subtitleView:g?.subtitleView,options:g?.options??void 0,privateGroupIcon:g?.privateGroupIcon,passwordGroupIcon:g?.passwordGroupIcon,groupsRequestBuilder:g?.groupsRequestBuilder,emptyStateView:g?.emptyStateView,onSelect:g?.onSelect,loadingIconURL:g?.loadingIconURL,errorStateView:g?.errorStateView,loadingStateView:g?.loadingStateView,titleAlignment:g?.titleAlignment,listItemView:g?.listItemView,menus:g?.menu||Y(),hideSeparator:g?.hideSeparator,hideError:g?.hideError,selectionMode:g?.selectionMode,listItemStyle:g?.listItemStyle,avatarStyle:g?.avatarStyle,statusIndicatorStyle:g?.statusIndicatorStyle})}),L||P?d.jsx("div",{className:"cc-groups-with-messages__main",style:cc(c,a,L),children:d.jsx(Zl,{user:P||void 0,group:L||void 0,messageHeaderConfiguration:{...C?.messageHeaderConfiguration,onBack:C?.messageHeaderConfiguration?.onBack||H,hideBackButton:C?.messageHeaderConfiguration?.hideBackButton||!a,messageHeaderStyle:{...pc(c,C,a),...C?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:C?.messageListConfiguration,messageComposerConfiguration:{...C?.messageComposerConfiguration,messageComposerStyle:{...hc(c,C,a),...C?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:(_=C?.messagesStyle,W=c,{background:W?.background,..._}),customSoundForIncomingMessages:C?.customSoundForIncomingMessages,customSoundForOutgoingMessages:C?.customSoundForOutgoingMessages,detailsConfiguration:C?.detailsConfiguration,disableSoundForMessages:C?.disableSoundForMessages,disableTyping:C?.disableTyping,hideMessageComposer:C?.hideMessageComposer,hideMessageHeader:C?.hideMessageHeader,messageComposerView:C?.messageComposerView?C?.messageComposerView(P,L):null,messageHeaderView:C?.messageHeaderView?C?.messageHeaderView(P,L):null,messageListView:C?.messageListView?C?.messageListView(P,L):null,hideDetails:C?.hideDetails,threadedMessagesConfiguration:C?.threadedMessageConfiguration})}):null,L||P||T||B.current?null:(()=>{const e=l||n.localize("SELECT__GROUP");return d.jsx("div",{className:"cc-decorator-message--empty",style:mc(a,L),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(gc(c,r))})})})(),T&&!P&&!L&&B.current?d.jsx("div",{className:"cc-withmessages__joingroup",style:Ac(a),children:d.jsx(V,{group:B.current,joinGroupStyle:xc(p,r),children:z(B.current)})}):null,F?a?d.jsx("div",{className:"cc-withmessages__creategroup",style:fc(a),children:J()}):d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(wc(c)),children:J()}):null]})});var _,W};Sc.defaultProps=Ic;const Fc={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},kc={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},Tc={width:"calc(100% - 280px)",height:"100%"},Mc={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},Bc={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},Lc={width:"280px",height:"100%",position:"relative"},Uc=(e,t)=>({...kc,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),Rc=(e,t,n,o)=>n?Pc(o):Oc(e,t),Pc=e=>({...e?{visibility:"hidden"}:{visibility:"visible"},...Mc,borderRadius:"inherit"}),Oc=(e,t)=>{const n=e?.borderRadius||0;return{...Lc,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},jc=(e,t,n)=>t?Vc(n):Gc(e),Vc=e=>({...e?{visibility:"visible"}:{visibility:"hidden"},...Mc,borderRadius:"inherit"}),Gc=e=>{const t=e?.borderRadius||0;return{...Tc,borderRadius:`0 ${t} ${t} 0`}},Hc=(e,t)=>({...Fc,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),Qc=e=>{const t=e?.usersStyle;return{width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...t}},Nc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},Kc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},zc=(e,t)=>{let n={visibility:"hidden"};return t||e||(n={visibility:"visible"}),{...Bc,...n,width:"calc(100% - 280px)"}},Jc=(e,t)=>{const n=e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.width||"320px",o=e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.height||"620px";return{...e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle,width:t?"100vw":n,height:t?"100vh":o}};const Yc={user:void 0,isMobileView:!1,messageText:"",usersWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),usersConfiguration:new r.UsersConfiguration({}),onError:e=>{console.log(e)}},_c=e=>{const{theme:o}=t.useContext(R),{user:r,isMobileView:i,messageText:a,usersWithMessagesStyle:l,messagesConfiguration:c,usersConfiguration:C,onError:g}=e,[u,p]=t.useState(r??void 0),h=()=>p(void 0),m=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)g(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);g(n)}}),[g]),A=e=>p(e),x=t.useCallback((()=>{try{const e=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{u&&u.getUid()===e.getUid()&&p(e)})),t=n.CometChatUserEvents.ccUserUnblocked.subscribe((e=>{u&&u.getUid()===e.getUid()&&p(e)}));return()=>{try{e?.unsubscribe(),t?.unsubscribe()}catch(e){m(e)}}}catch(e){m(e)}}),[u,p,m]);return function(e,n,o){t.useEffect((()=>e()),[e]),t.useEffect((()=>{o(n)}),[n,o])}(x,r,p),d.jsxs("div",{className:"cc-users-with-messages__wrapper",style:Uc(l,o),children:[d.jsx("div",{className:"cc-users-with-messages__sidebar",style:Rc(l,o,i,u),children:d.jsx(G,{activeUser:u??void 0,hideSearch:C?.hideSearch,searchIconURL:C?.searchIconURL,searchRequestBuilder:C?.searchRequestBuilder,onItemClick:C?.onItemClick||A,usersStyle:Qc(C),subtitleView:C?.subtitleView,options:C?.options??void 0,usersRequestBuilder:C?.usersRequestBuilder,emptyStateView:C?.emptyStateView,onSelect:C?.onSelect,loadingIconURL:C?.loadingIconURL,errorStateView:C?.errorStateView,loadingStateView:C?.loadingStateView,tileAlignment:C?.titleAlignment,showSectionHeader:C?.showSectionHeader,listItemView:C?.listItemView,menus:C?.menu,hideSeparator:C?.hideSeparator,hideError:C?.hideError,selectionMode:C?.selectionMode,listItemStyle:C?.listItemStyle,disableUsersPresence:C?.disableUsersPresence,statusIndicatorStyle:C?.statusIndicatorStyle,avatarStyle:C?.avatarStyle})}),u?d.jsx("div",{className:"cc-users-with-messages__main",style:jc(l,i,u),children:d.jsx(Zl,{user:u,messageHeaderConfiguration:{...c?.messageHeaderConfiguration,onBack:c?.messageHeaderConfiguration?.onBack||h,hideBackButton:c?.messageHeaderConfiguration?.hideBackButton||!i,messageHeaderStyle:{...Nc(l,c,i),...c?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:{...c?.messageListConfiguration,messageInformationConfiguration:{messageInformationStyle:{...Jc(c,i)}}},messageComposerConfiguration:{...c?.messageComposerConfiguration,messageComposerStyle:{...Kc(l,c,i),...c?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:(b=c?.messagesStyle,y=l,{background:y?.background,...b}),customSoundForIncomingMessages:c?.customSoundForIncomingMessages,customSoundForOutgoingMessages:c?.customSoundForOutgoingMessages,detailsConfiguration:c?.detailsConfiguration,disableSoundForMessages:c?.disableSoundForMessages,disableTyping:c?.disableTyping,hideMessageComposer:c?.hideMessageComposer,hideMessageHeader:c?.hideMessageHeader,messageComposerView:c?.messageComposerView?c?.messageComposerView(u):void 0,messageHeaderView:c?.messageHeaderView?c?.messageHeaderView(u):void 0,messageListView:c?.messageListView?c?.messageListView(u):void 0,hideDetails:c?.hideDetails,threadedMessagesConfiguration:c?.threadedMessageConfiguration})}):null,d.jsx(d.Fragment,{children:u?null:(()=>{const e=a||n.localize("SELECT__USER");return d.jsx("div",{className:"cc-decorator-message--empty",style:zc(i,u),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(Hc(l,o))})})})()})]});var b,y};_c.defaultProps=Yc;class Wc extends r.BaseStyle{constructor(e){super({}),this.tabListHeight="100%",this.tabListWidth="100%",this.tabListBorder="0 none",this.tabListBorderRadius="0",this.tabListBackground="transparent",this.tabListBoxShadow="0",this.tabListPadding="0",this.tabPaneWidth="100%",this.tabPaneHeight="100%",Object.assign(this,e)}}Object.defineProperty(exports,"ActionSheetStyle",{enumerable:!0,get:function(){return o.ActionSheetStyle}}),Object.defineProperty(exports,"AvatarStyle",{enumerable:!0,get:function(){return o.AvatarStyle}}),Object.defineProperty(exports,"BackdropStyle",{enumerable:!0,get:function(){return o.BackdropStyle}}),Object.defineProperty(exports,"BadgeStyle",{enumerable:!0,get:function(){return o.BadgeStyle}}),Object.defineProperty(exports,"ButtonGroupStyle",{enumerable:!0,get:function(){return o.ButtonGroupStyle}}),Object.defineProperty(exports,"CallscreenStyle",{enumerable:!0,get:function(){return o.CallscreenStyle}}),Object.defineProperty(exports,"CardStyle",{enumerable:!0,get:function(){return o.CardStyle}}),Object.defineProperty(exports,"ChangeScopeStyle",{enumerable:!0,get:function(){return o.ChangeScopeStyle}}),Object.defineProperty(exports,"CheckboxStyle",{enumerable:!0,get:function(){return o.CheckboxStyle}}),Object.defineProperty(exports,"CometChatActionItem",{enumerable:!0,get:function(){return o.CometChatActionItem}}),Object.defineProperty(exports,"CometChatActionSheet",{enumerable:!0,get:function(){return o.CometChatActionSheet}}),Object.defineProperty(exports,"CometChatAvatar",{enumerable:!0,get:function(){return o.CometChatAvatar}}),Object.defineProperty(exports,"CometChatBackdrop",{enumerable:!0,get:function(){return o.CometChatBackdrop}}),Object.defineProperty(exports,"CometChatBadge",{enumerable:!0,get:function(){return o.CometChatBadge}}),Object.defineProperty(exports,"CometChatButton",{enumerable:!0,get:function(){return o.CometChatButton}}),Object.defineProperty(exports,"CometChatButtonGroup",{enumerable:!0,get:function(){return o.CometChatButtonGroup}}),Object.defineProperty(exports,"CometChatCallscreenWrapper",{enumerable:!0,get:function(){return o.CometChatCallscreenWrapper}}),Object.defineProperty(exports,"CometChatCard",{enumerable:!0,get:function(){return o.CometChatCard}}),Object.defineProperty(exports,"CometChatChangeScope",{enumerable:!0,get:function(){return o.CometChatChangeScope}}),Object.defineProperty(exports,"CometChatCheckbox",{enumerable:!0,get:function(){return o.CometChatCheckbox}}),Object.defineProperty(exports,"CometChatConfirmDialog",{enumerable:!0,get:function(){return o.CometChatConfirmDialog}}),Object.defineProperty(exports,"CometChatContextMenu",{enumerable:!0,get:function(){return o.CometChatContextMenu}}),Object.defineProperty(exports,"CometChatCreateGroup",{enumerable:!0,get:function(){return o.CometChatCreateGroup}}),Object.defineProperty(exports,"CometChatDate",{enumerable:!0,get:function(){return o.CometChatDate}}),Object.defineProperty(exports,"CometChatDivider",{enumerable:!0,get:function(){return o.CometChatDivider}}),Object.defineProperty(exports,"CometChatDocumentBubble",{enumerable:!0,get:function(){return o.CometChatDocumentBubble}}),Object.defineProperty(exports,"CometChatDraggable",{enumerable:!0,get:function(){return o.CometChatDraggable}}),Object.defineProperty(exports,"CometChatDropdown",{enumerable:!0,get:function(){return o.CometChatDropdown}}),Object.defineProperty(exports,"CometChatEmoji",{enumerable:!0,get:function(){return o.CometChatEmoji}}),Object.defineProperty(exports,"CometChatEmojiKeyboard",{enumerable:!0,get:function(){return o.CometChatEmojiKeyboard}}),Object.defineProperty(exports,"CometChatFullScreenViewer",{enumerable:!0,get:function(){return o.CometChatFullScreenViewer}}),Object.defineProperty(exports,"CometChatIcon",{enumerable:!0,get:function(){return o.CometChatIcon}}),Object.defineProperty(exports,"CometChatIconButton",{enumerable:!0,get:function(){return o.CometChatIconButton}}),Object.defineProperty(exports,"CometChatInput",{enumerable:!0,get:function(){return o.CometChatInput}}),Object.defineProperty(exports,"CometChatJoinGroup",{enumerable:!0,get:function(){return o.CometChatJoinGroup}}),Object.defineProperty(exports,"CometChatLabel",{enumerable:!0,get:function(){return o.CometChatLabel}}),Object.defineProperty(exports,"CometChatListItem",{enumerable:!0,get:function(){return o.CometChatListItem}}),Object.defineProperty(exports,"CometChatLiveReaction",{enumerable:!0,get:function(){return o.CometChatLiveReaction}}),Object.defineProperty(exports,"CometChatLoader",{enumerable:!0,get:function(){return o.CometChatLoader}}),Object.defineProperty(exports,"CometChatMediaRecorder",{enumerable:!0,get:function(){return o.CometChatMediaRecorder}}),Object.defineProperty(exports,"CometChatMenuList",{enumerable:!0,get:function(){return o.CometChatMenuList}}),Object.defineProperty(exports,"CometChatMessageInput",{enumerable:!0,get:function(){return o.CometChatMessageInput}}),Object.defineProperty(exports,"CometChatModal",{enumerable:!0,get:function(){return o.CometChatModal}}),Object.defineProperty(exports,"CometChatPopover",{enumerable:!0,get:function(){return o.CometChatPopover}}),Object.defineProperty(exports,"CometChatPreview",{enumerable:!0,get:function(){return o.CometChatPreview}}),Object.defineProperty(exports,"CometChatQuickView",{enumerable:!0,get:function(){return o.CometChatQuickView}}),Object.defineProperty(exports,"CometChatRadioButton",{enumerable:!0,get:function(){return o.CometChatRadioButton}}),Object.defineProperty(exports,"CometChatReceipt",{enumerable:!0,get:function(){return o.CometChatReceipt}}),Object.defineProperty(exports,"CometChatSearchInput",{enumerable:!0,get:function(){return o.CometChatSearchInput}}),Object.defineProperty(exports,"CometChatSingleSelect",{enumerable:!0,get:function(){return o.CometChatSingleSelect}}),Object.defineProperty(exports,"CometChatStatusIndicator",{enumerable:!0,get:function(){return o.CometChatStatusIndicator}}),Object.defineProperty(exports,"CometChatTextInput",{enumerable:!0,get:function(){return o.CometChatTextInput}}),Object.defineProperty(exports,"ConfirmDialogStyle",{enumerable:!0,get:function(){return o.ConfirmDialogStyle}}),Object.defineProperty(exports,"ContextMenuStyle",{enumerable:!0,get:function(){return o.ContextMenuStyle}}),Object.defineProperty(exports,"CreateGroupStyle",{enumerable:!0,get:function(){return o.CreateGroupStyle}}),Object.defineProperty(exports,"DateStyle",{enumerable:!0,get:function(){return o.DateStyle}}),Object.defineProperty(exports,"DocumentBubbleStyle",{enumerable:!0,get:function(){return o.DocumentBubbleStyle}}),Object.defineProperty(exports,"DropdownStyle",{enumerable:!0,get:function(){return o.DropdownStyle}}),Object.defineProperty(exports,"EmojiKeyboardStyle",{enumerable:!0,get:function(){return o.EmojiKeyboardStyle}}),Object.defineProperty(exports,"Emojis",{enumerable:!0,get:function(){return o.Emojis}}),Object.defineProperty(exports,"FileBubbleStyle",{enumerable:!0,get:function(){return o.FileBubbleStyle}}),Object.defineProperty(exports,"FullScreenViewerStyle",{enumerable:!0,get:function(){return o.FullScreenViewerStyle}}),Object.defineProperty(exports,"IconStyle",{enumerable:!0,get:function(){return o.IconStyle}}),Object.defineProperty(exports,"ImageBubbleStyle",{enumerable:!0,get:function(){return o.ImageBubbleStyle}}),Object.defineProperty(exports,"InputStyle",{enumerable:!0,get:function(){return o.InputStyle}}),Object.defineProperty(exports,"JoinGroupStyle",{enumerable:!0,get:function(){return o.JoinGroupStyle}}),Object.defineProperty(exports,"LabelStyle",{enumerable:!0,get:function(){return o.LabelStyle}}),Object.defineProperty(exports,"ListItemStyle",{enumerable:!0,get:function(){return o.ListItemStyle}}),Object.defineProperty(exports,"LoaderStyle",{enumerable:!0,get:function(){return o.LoaderStyle}}),Object.defineProperty(exports,"MediaRecorderStyle",{enumerable:!0,get:function(){return o.MediaRecorderStyle}}),Object.defineProperty(exports,"MenuListStyle",{enumerable:!0,get:function(){return o.MenuListStyle}}),Object.defineProperty(exports,"MessageInputStyle",{enumerable:!0,get:function(){return o.MessageInputStyle}}),Object.defineProperty(exports,"ModalStyle",{enumerable:!0,get:function(){return o.ModalStyle}}),Object.defineProperty(exports,"PopoverStyle",{enumerable:!0,get:function(){return o.PopoverStyle}}),Object.defineProperty(exports,"PreviewStyle",{enumerable:!0,get:function(){return o.PreviewStyle}}),Object.defineProperty(exports,"QuickViewStyle",{enumerable:!0,get:function(){return o.QuickViewStyle}}),Object.defineProperty(exports,"RadioButtonStyle",{enumerable:!0,get:function(){return o.RadioButtonStyle}}),Object.defineProperty(exports,"ReceiptStyle",{enumerable:!0,get:function(){return o.ReceiptStyle}}),Object.defineProperty(exports,"SearchInputStyle",{enumerable:!0,get:function(){return o.SearchInputStyle}}),Object.defineProperty(exports,"SingleSelectStyle",{enumerable:!0,get:function(){return o.SingleSelectStyle}}),Object.defineProperty(exports,"TextBubbleStyle",{enumerable:!0,get:function(){return o.TextBubbleStyle}}),Object.defineProperty(exports,"TextInputStyle",{enumerable:!0,get:function(){return o.TextInputStyle}}),Object.defineProperty(exports,"auxiliaryButtonAlignmentEnum",{enumerable:!0,get:function(){return o.auxiliaryButtonAlignmentEnum}}),Object.defineProperty(exports,"layoutType",{enumerable:!0,get:function(){return o.layoutType}}),exports.AIAssistBotDecorator=dt,exports.AIAssistBotExtension=gt,exports.AIConversationStarterDecorator=ft,exports.AIConversationStarterExtension=Dt,exports.AIConversationSummaryDecorator=Tt,exports.AIConversationSummaryExtension=Mt,exports.AIExtensionDataSource=Ee,exports.AISmartRepliesDecorator=Ht,exports.AISmartRepliesExtension=Qt,exports.CallingExtension=dn,exports.CallingExtensionDecorator=cn,exports.ChatConfigurator=De,exports.CollaborativeDocumentConfiguration=class{constructor(e){let{style:t,iconURL:n,optionIconURL:o,optionStyle:r}=e;this.style=t,this.iconURL=n,this.optionIconURL=o,this.optionStyle=r}getDocumentBubbleStyle(){return this.style}getIconURL(){return this.iconURL}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.CollaborativeDocumentExtension=hn,exports.CollaborativeDocumentExtensionDecorator=pn,exports.CollaborativeWhiteBoardExtensionDecorator=xn,exports.CollaborativeWhiteboardConfiguration=class{constructor(e){let{style:t,iconURL:n,optionIconURL:o,optionStyle:r}=e;this.style=t,this.iconURL=n,this.optionIconURL=o,this.optionStyle=r}getWhiteboardBubbleStyle(){return this.style}getIconURL(){return this.iconURL}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.CollaborativeWhiteboardExtension=bn,exports.CometChatAddMembers=Br,exports.CometChatAvatarView=rl,exports.CometChatBannedMembers=Wr,exports.CometChatButtonView=el,exports.CometChatCallButtons=sn,exports.CometChatCallLogDetails=xr,exports.CometChatCallLogHistory=Zo,exports.CometChatCallLogParticipants=ir,exports.CometChatCallLogRecordings=mr,exports.CometChatCallLogs=Lo,exports.CometChatCallLogsWithDetails=fr,exports.CometChatContacts=li,exports.CometChatConversations=ws,exports.CometChatConversationsWithMessages=ql,exports.CometChatDateView=tl,exports.CometChatDetails=Xi,exports.CometChatEmojiKeyboardView=qa,exports.CometChatGroupMembers=ie,exports.CometChatGroups=ii,exports.CometChatGroupsWithMessages=Sc,exports.CometChatIconButtonView=$a,exports.CometChatIncomingCall=e=>{const{call:o,disableSoundForCalls:i=!1,customSoundForCalls:a="",onAccept:l,onDecline:c,acceptButtonText:C=n.localize("ACCEPT"),declineButtonText:g=n.localize("DECLINE"),subtitleView:u=null,listItemStyle:p={height:"100%",width:"100%"},avatarStyle:h={borderRadius:"16px",width:"38px",height:"38px"},incomingCallStyle:m={width:"fit-content",height:"fit-content"},onError:A=(e=>{console.log(e)})}=e,{theme:x}=t.useContext(R),[b,y]=t.useState(null),[w,f]=t.useState(!1),[D,E]=t.useState(!1),[v,I]=t.useState(!1),S=t.useRef(null),F=t.useRef(null),k=t.useRef(null),T=t.useRef(null),M=t.useRef(""),B=t.useRef(null),L=t.useRef(null);F.current={...po(x),...h},k.current={...ho(x),...m},S.current={...mo(k?.current,x),...p};const U=t.useRef({});U.current=(e=>({border:e?.acceptButtonBorder,borderRadius:e?.acceptButtonBorderRadius,background:e?.acceptButtonBackground,buttonTextFont:e?.acceptButtonTextFont,buttonTextColor:e?.acceptButtonTextColor,...uo}))(k?.current);const P=t.useRef({});P.current=(e=>({border:e?.declineButtonBorder,borderRadius:e?.declineButtonBorderRadius,background:e?.declineButtonBackground,buttonTextFont:e?.declineButtonTextFont,buttonTextColor:e?.declineButtonTextColor,...uo}))(k?.current);const O=t.useRef({});O.current={...Ao(x)};const j=t.useRef(null);j.current=(e=>({height:"16px",width:"16px",iconTint:e?.subtitleTextColor||"RGBA(20, 20, 20, 0.68)"}))(k?.current);let V="incomingcall_"+(new Date).getTime(),G=n.localize("INCOMING_CALL");const H=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)A(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);A(n)}}),[A]),Q=t.useCallback((()=>{try{a?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall,a):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall)}catch(e){H(e)}}),[a,H]),N=t.useCallback((e=>{let t=!1;try{if(r.StorageUtils.getItem(n.CometChatUIKitConstants.calls.activecall)){let o=r.StorageUtils.getItem(n.CometChatUIKitConstants.calls.activecall);t=!(!o||o.sessionId!==e.getSessionId())}else t=!1;return t}catch(e){return H(e),t}}),[H]),K=t.useCallback(((e=n.CometChatUIKitConstants.calls.rejected)=>{try{r.CometChatSoundManager.pause(),c?c():"string"==typeof T?.current?.getSessionId()&&s.CometChat.rejectCall(T?.current?.getSessionId(),e).then((e=>{r.StorageUtils.setItem(n.CometChatUIKitConstants.calls.activecall,e),n.CometChatCallEvents.ccCallRejected.next(e),f(!1),T.current=null}),(e=>{H(e)}))}catch(e){H(e)}}),[c,H]),z=t.useCallback((e=>{try{if(!N(e)&&b?.getUid()!==e?.getSender()?.getUid()&&T.current)i||D||v||setTimeout((()=>{Q()}),100),D||v?(D||v)&&(r.CometChatSoundManager.pause(),K(n.CometChatUIKitConstants.calls.busy),n.CometChatCallEvents.ccCallRejected.next(e)):f(!0);else{if(b?.getUid()===e?.getSender()?.getUid())return void r.CometChatSoundManager.pause();r.CometChatSoundManager.pause(),K(n.CometChatUIKitConstants.calls.busy)}}catch(e){H(e)}}),[N,i,Q,K,H,b,D,v]),J=t.useCallback((e=>{if(e?.key===n.CometChatUIKitConstants.calls.activecall&&(e.newValue||e.oldValue)){let t;e.newValue?t=JSON.parse(e.newValue):e.oldValue&&(t=JSON.parse(e.oldValue)),T.current?.getSessionId()===t?.sessionId&&(r.CometChatSoundManager.pause(),T.current=null,f(!1))}}),[]),Y=()=>{E(!1),I(!1),T.current=null,M.current=""},_=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{Y()})),t=n.CometChatCallEvents.ccOutgoingCall.subscribe((()=>{I(!0)}));return()=>{try{e?.unsubscribe(),t?.unsubscribe()}catch(e){H(e)}}}catch(e){H(e)}}),[H]),W=t.useCallback((()=>{try{r.StorageUtils.attachChangeDetection(J),s.CometChat.addCallListener(V,new s.CometChat.CallListener({onIncomingCallReceived:e=>{T.current?.getSender()?.getUid()!==e.getSender()?.getUid()&&(T.current=e,z(e))},onIncomingCallCancelled:e=>{r.CometChatSoundManager.pause(),T.current=null,f(!1)},onOutgoingCallAccepted:e=>{r.CometChatSoundManager.pause(),e.getSender()?.getUid()===b?.getUid()&&(T.current=null,f(!1))},onOutgoingCallRejected:e=>{r.CometChatSoundManager.pause(),e.getSender()?.getUid()===b?.getUid()&&(T.current=null,f(!1))}}))}catch(e){H(e)}}),[J,z,H,V,b]),Z=t.useCallback((()=>{try{r.StorageUtils.detachChangeDetection(J),s.CometChat.removeCallListener(V)}catch(e){H(e)}}),[J,H,V]),X=t.useCallback((()=>{try{let e=s.CometChat.getActiveCall();return new Promise(((t,n)=>{if(!e)return t({success:!0});let o=e?.getSessionId();s.CometChat.endCall(o).then((e=>t(e)),(e=>n(e)))}))}catch(e){H(e)}}),[H]),q=t.useCallback((()=>{try{r.CometChatSoundManager.pause(),l?l():X()?.then((e=>{s.CometChat.acceptCall(T.current.getSessionId()).then((e=>{n.CometChatCallEvents.ccCallAccepted.next(e),r.StorageUtils.setItem(n.CometChatUIKitConstants.calls.activecall,e),E(!0),T.current=e,M.current=e?.getSessionId(),f(!1)}),(e=>{H(e)}))}),(e=>{H(e)}))}catch(e){}}),[X,H,l]);return function(e,o,r,i,a,l,c,C,d,g,u,p,h){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&o(e)}))}),[o]),t.useEffect((()=>{let t;return e&&(t=i(),a()),()=>{l(),t?.()}}),[e,a,l,i]),t.useEffect((()=>{r&&(g.current=r,d(g.current))}),[r,g,d]),t.useEffect((()=>{const e=c?.current,t=C?.current;if(!e&&!t)return;const o=()=>{u()},r=()=>{p(n.CometChatUIKitConstants.calls.rejected)};return h?(e?.addEventListener("cc-button-clicked",o),t?.addEventListener("cc-button-clicked",r)):(e?.removeEventListener("cc-button-clicked",o),t?.removeEventListener("cc-button-clicked",r)),()=>{e?.removeEventListener("cc-button-clicked",o),t?.removeEventListener("cc-button-clicked",r)}}),[h,u,p,c,C])}(b,y,o,_,W,Z,L,B,z,T,q,K,w),d.jsxs(d.Fragment,{children:[T.current&&w?d.jsxs("div",{className:"cc-incomingcall__wrapper",style:io(k?.current),children:[d.jsx("div",{className:"cc-incomingcall__listitem",style:co,children:d.jsxs("cometchat-list-item",{title:T.current?.getSender()?.getName(),listItemStyle:JSON.stringify(S.current),hideSeparator:!0,children:[u?d.jsx("div",{slot:"subtitleView",className:"cc-incomingcall__subtitleview",children:u}):d.jsxs("div",{slot:"subtitleView",className:"cc-incomingcall__subtitleview",style:ao,children:[d.jsx("div",{className:"cc-call__icon",children:d.jsx("cometchat-icon",{iconStyle:JSON.stringify(j.current),URL:T.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio?"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E":"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"})}),d.jsx("cometchat-label",{className:"cc-call__type",text:G,labelStyle:JSON.stringify(lo(k?.current))})]}),d.jsx("div",{slot:"tailView",className:"cc-incomingcall__tailview",style:Co,children:d.jsx("div",{className:"tail__view",children:d.jsx("div",{className:"cc-incomingcall__avatar",children:d.jsx("cometchat-avatar",{avatarStyle:JSON.stringify(F.current),image:T.current?.getSender()?.getAvatar(),name:T.current?.getSender()?.getName()})})})})]})}),d.jsxs("div",{className:"cc-incomingcall-buttons",style:go,children:[d.jsx("cometchat-button",{ref:B,buttonStyle:JSON.stringify(P.current),text:g}),d.jsx("cometchat-button",{ref:L,buttonStyle:JSON.stringify(U.current),text:C})]})]}):null,D&&T.current&&!w?d.jsx(Kt,{ongoingCallStyle:O.current,sessionID:M.current,callSettingsBuilder:function(){let e=T.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio;if(T.current?.getType()===n.CometChatUIKitConstants.calls.meeting)return;const t=(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{T.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&s.CometChat.endCall(M.current).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null),Y()})).catch((e=>{}))},onCallEndButtonPressed:()=>{s.CometChat.endCall(M.current).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e)})).catch((e=>{}))},onError:e=>{H(e)}})).build();return t}()}):null]})},exports.CometChatLabelView=nl,exports.CometChatList=T,exports.CometChatLoaderView=ol,exports.CometChatMessageBubble=at,exports.CometChatMessageComposer=Qa,exports.CometChatMessageHeader=Za,exports.CometChatMessageInformation=Ol,exports.CometChatMessageList=Hl,exports.CometChatMessages=Zl,exports.CometChatOngoingCall=Kt,exports.CometChatOutgoingCall=on,exports.CometChatReactionsView=Xa,exports.CometChatReceiptView=sl,exports.CometChatTabs=ro,exports.CometChatThemeContext=R,exports.CometChatThreadedMessages=_l,exports.CometChatTransferOwnership=_i,exports.CometChatUIKit=Zn,exports.CometChatUserMemberWrapper=ae,exports.CometChatUsers=G,exports.CometChatUsersWithMessages=_c,exports.DataSource=class{},exports.DataSourceDecorator=ve,exports.ExtensionsDataSource=Cn,exports.ImageModerationConfiguration=class{constructor(e){this.style=e.style,this.confirmDialogStyle=e.confirmDialogStyle,this.backDropStyle=e.backDropStyle}getImageModerationStyle(){return this.style}getConfirmDialogSyle(){return this.confirmDialogStyle}getBackDropStyle(){return this.backDropStyle}},exports.ImageModerationExtension=In,exports.ImageModerationExtensionDecorator=vn,exports.LinkPreviewConfiguration=class{constructor(e){this.style=e.style}getLinkPreviewStyle(){return this.style}},exports.LinkPreviewExtension=Tn,exports.LinkPreviewExtensionDecorator=kn,exports.MessageTranslationConfiguration=class{constructor(e){let{style:t,optionIconURL:n,optionStyle:o}=e;this.style=t,this.optionIconURL=n,this.optionStyle=o}getMessageTranslationStyle(){return this.style}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.MessageTranslationExtension=Un,exports.MessageTranslationExtensionDecorator=Ln,exports.MessagesDataSource=fe,exports.PollsConfiguration=so,exports.PollsExtension=jn,exports.PollsExtensionDecorator=On,exports.SmartRepliesConfiguration=class{constructor(e){this.style=e.style}getSmartRepliesStyle(){return this.style}},exports.SmartReplyExtension=Hn,exports.SmartReplyExtensionDecorator=Gn,exports.StickersConfiguration=class{constructor(e){let{style:t,stickerIconURL:n,closeIconURL:o}=e;this.style=t,this.stickerIconURL=n,this.closeIconURL=o}getStickersStyle(){return this.style}getStickerIconURL(){return this.stickerIconURL}getCloseIconURL(){return this.closeIconURL}},exports.StickersExtension=zn,exports.StickersExtensionDecorator=Kn,exports.TabsStyle=Wc,exports.TextModeratorExtension=Yn,exports.TextModeratorExtensionDecorator=Jn,exports.ThumbnailGenerationExtension=Wn,exports.ThumbnailGenerationExtensionDecorator=_n,Object.keys(n).forEach((function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),Object.keys(r).forEach((function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})})); +const ye=new Set(["children","localName","ref","style","className"]),we=new WeakMap,fe=(e,t,n,o,r)=>{const s=null==r?void 0:r[t];void 0===s||n===o?null==n&&t in HTMLElement.prototype?e.removeAttribute(t):e[t]=n:((e,t,n)=>{let o=we.get(e);void 0===o&&we.set(e,o=new Map);let r=o.get(t);void 0!==n?void 0===r?(o.set(t,r={handleEvent:n}),e.addEventListener(t,r)):r.handleEvent=n:void 0!==r&&(o.delete(t),e.removeEventListener(t,r))})(e,s,n)};function De(e=window.React,t,n,o,r){let s,i,a;if(void 0===t){const t=e;({tagName:i,elementClass:a,events:o,displayName:r}=t),s=t.react}else s=e,a=n,i=t;const l=s.Component,c=s.createElement,C=new Set(Object.keys(null!=o?o:{}));class d extends l{constructor(){super(...arguments),this.o=null}t(e){if(null!==this.o)for(const t in this.i)fe(this.o,t,this.props[t],e?e[t]:void 0,o)}componentDidMount(){var e;this.t(),null===(e=this.o)||void 0===e||e.removeAttribute("defer-hydration")}componentDidUpdate(e){this.t(e)}render(){const{_$Gl:e,...t}=this.props;this.h!==e&&(this.u=t=>{null!==e&&((e,t)=>{"function"==typeof e?e(t):e.current=t})(e,t),this.o=t,this.h=e}),this.i={};const n={ref:this.u};for(const[e,o]of Object.entries(t))ye.has(e)?n["className"===e?"class":e]=o:C.has(e)||e in a.prototype?this.i[e]=o:n[e]=o;return n.suppressHydrationWarning=!0,c(i,n)}}d.displayName=null!=r?r:a.name;const g=s.forwardRef(((e,t)=>c(d,{...e,_$Gl:t},null==e?void 0:e.children)));return g.displayName=d.displayName,g}const Ee=De({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t}),ve=De({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t,events:{ccImageClicked:"cc-image-clicked"}}),Ie=De({tagName:"cometchat-audio-bubble",elementClass:o.CometChatAudioBubble,react:t}),Se=De({tagName:"cometchat-video-bubble",elementClass:o.CometChatVideoBubble,react:t}),Fe=De({tagName:"cometchat-file-bubble",elementClass:o.CometChatFileBubble,react:t}),ke=De({tagName:"cometchat-form-bubble",elementClass:r.CometChatFormBubble,react:t,events:{ccSubmitClicked:"cc-submit-clicked"}}),Te=De({tagName:"cometchat-scheduler-bubble",elementClass:r.CometChatSchedulerBubble,react:t}),Me=De({tagName:"cometchat-card-bubble",elementClass:r.CometChatCardBubble,react:t}),Be=De({tagName:"cometchat-full-screen-viewer",elementClass:o.CometChatFullScreenViewer,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),Le=new n.CometChatTheme({});class Ue{constructor(){this.getSchedulerBubbleStyle=e=>{let t=new o.AvatarStyle({borderRadius:"50%",width:"48px",height:"48px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),s=new o.ListItemStyle({height:"auto",width:"100%",background:"inherit",activeBackground:"transparent",borderRadius:"0",titleFont:n.fontHelper(e.typography.text1),titleColor:e.palette.getAccent(),border:"none",separatorColor:"",hoverBackground:"transparent"}),i=new r.CalendarStyle({height:"100%",width:"100%",border:"none",borderRadius:"0",background:"transparent",dateTextFont:n.fontHelper(e.typography.subtitle2),dateTextColor:e.palette.getAccent(),dayTextFont:n.fontHelper(e.typography.text2),dayTextColor:e.palette.getAccent(),monthYearTextFont:n.fontHelper(e.typography.text2),monthYearTextColor:e.palette.getAccent(),defaultDateTextBackground:"transparent",disabledDateTextColor:e.palette.getAccent400(),disabledDateTextFont:n.fontHelper(e.typography.subtitle2),disabledDateTextBackground:"transparent",titleTextFont:n.fontHelper(e.typography.text1),titleTextColor:e.palette.getAccent(),timezoneTextFont:n.fontHelper(e.typography.caption2),timezoneTextColor:e.palette.getAccent(),arrowButtonTextColor:e.palette.getAccent(),arrowButtonTextFont:n.fontHelper(e.typography.title2)}),a=new r.TimeSlotStyle({background:"transparent",height:"fit-content",width:"100%",border:"none",borderRadius:"0",calendarIconTint:e.palette.getAccent(),timezoneIconTint:e.palette.getAccent(),emptySlotIconTint:e.palette.getAccent500(),emptySlotTextColor:e.palette.getAccent500(),emptySlotTextFont:n.fontHelper(e.typography.subtitle1),dateTextColor:e.palette.getAccent(),dateTextFont:n.fontHelper(e.typography.subtitle1),seperatorTint:e.palette.getAccent100(),slotBackground:e.palette.getAccent900(),slotBorder:"none",slotBorderRadius:"8px",slotTextColor:e.palette.getAccent(),slotTextFont:n.fontHelper(e.typography.caption2),timezoneTextColor:e.palette.getAccent(),timezoneTextFont:n.fontHelper(e.typography.caption2),titleTextColor:e.palette.getAccent(),titleTextFont:n.fontHelper(e.typography.text1)}),l=new o.QuickViewStyle({background:e.palette.getAccent50(),height:"fit-content",width:"100%",titleFont:n.fontHelper(e.typography.subtitle2),titleColor:e.palette.getAccent(),subtitleFont:n.fontHelper(e.typography.subtitle2),subtitleColor:e.palette.getAccent600(),leadingBarTint:e.palette.getPrimary(),leadingBarWidth:"4px",borderRadius:"8px"});return new r.SchedulerBubbleStyle({avatarStyle:t,listItemStyle:s,quickViewStyle:l,dateSelectorStyle:i,timeSlotSelectorStyle:a,backButtonIconTint:e.palette.getPrimary(),background:"transparent",height:"100%",width:"100%",border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"8px",loadingIconTint:e.palette.getAccent600(),suggestedTimeBackground:e.palette.getAccent900(),suggestedTimeBorder:`1px solid ${e.palette.getPrimary()}`,suggestedTimeBorderRadius:"8px",suggestedTimeDisabledBackground:e.palette.getAccent50(),suggestedTimeDisabledBorder:`1px solid ${e.palette.getAccent200()}`,suggestedTimeDisabledBorderRadius:"8px",suggestedTimeDisabledTextColor:e.palette.getAccent700(),suggestedTimeDisabledTextFont:n.fontHelper(e.typography.text3),suggestedTimeTextColor:e.palette.getPrimary(),suggestedTimeTextFont:n.fontHelper(e.typography.text3),moreButtonDisabledTextBackground:"transparent",moreButtonDisabledTextBorder:"none",moreButtonDisabledTextBorderRadius:"0",moreButtonDisabledTextColor:e.palette.getAccent600(),moreButtonDisabledTextFont:n.fontHelper(e.typography.caption2),moreButtonTextBackground:"transparent",moreButtonTextBorder:"none",moreButtonTextBorderRadius:"0",moreButtonTextColor:e.palette.getPrimary(),moreButtonTextFont:n.fontHelper(e.typography.caption2),goalCompletionTextColor:e.palette.getAccent(),goalCompletionTextFont:n.fontHelper(e.typography.text3),errorTextColor:e.palette.getError(),errorTextFont:n.fontHelper(e.typography.text3),scheduleButtonStyle:{iconHeight:"16px",iconWidth:"16px",buttonIconTint:e.palette.getAccent(),buttonTextFont:n.fontHelper(e.typography.name),buttonTextColor:e.palette.getAccent("dark"),border:"none",borderRadius:"8px",background:e.palette.getPrimary(),width:"100%",display:"flex",justifyContent:"center",padding:"8px"},seperatorTint:e.palette.getAccent200(),subtitleTextColor:e.palette.getAccent400(),subtitleTextFont:n.fontHelper(e.typography.name),summaryTextColor:e.palette.getAccent(),summaryTextFont:n.fontHelper(e.typography.subtitle1),timezoneTextColor:e.palette.getAccent600(),timezoneTextFont:n.fontHelper(e.typography.caption2),titleTextColor:e.palette.getAccent(),titleTextFont:n.fontHelper(e.typography.title1),timezoneIconTint:e.palette.getAccent(),calendarIconTint:e.palette.getAccent(),clockIconTint:e.palette.getAccent()})}}getEditOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.editMessage,title:n.localize("EDIT"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fediticon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FEdit%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.8666667%2C0.883555287%20C17.2934403%2C0.312679329%2016.5158214%2C-0.00540815756%2015.7068357%2C0%20C14.8978501%2C0.00554734575%2014.1246099%2C0.334135909%2013.5591667%2C0.912721954%20L1.47583333%2C12.9960553%20L0%2C18.750222%20L5.75416667%2C17.2743886%20L17.8375%2C5.19105529%20C18.416086%2C4.6256121%2018.7446746%2C3.8523719%2018.750222%2C3.04338623%20C18.7556301%2C2.23440057%2018.4375426%2C1.45678164%2017.8666667%2C0.883555287%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2213.2133333%22%20y1%3D%221.25855529%22%20x2%3D%2217.4916667%22%20y2%3D%225.53688862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211.4683333%22%20y1%3D%223.00355529%22%20x2%3D%2215.7466667%22%20y2%3D%227.28188862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%221.47583333%22%20y1%3D%2212.9960553%22%20x2%3D%225.75833333%22%20y2%3D%2217.270222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getDeleteOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.deleteMessage,title:n.localize("DELETE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fdeleteicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getReactionOption(e){return new n.CometChatActionsView({id:n.CometChatUIKitConstants.MessageOption.reactToMessage,title:n.localize("REACT"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FReactions%20Add%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FReactions-Add%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C1.25%20C13.2547515%2C1.25%2014.4810955%2C1.46534515%2015.6383943%2C1.88154366%20C16.0281686%2C2.02171794%2016.2305095%2C2.45132619%2016.0903352%2C2.84110054%20C15.9501609%2C3.2308749%2015.5205527%2C3.43321574%2015.1307783%2C3.29304146%20C14.1357379%2C2.9351958%2013.0810879%2C2.75%2012%2C2.75%20C6.89136606%2C2.75%202.75%2C6.89136606%202.75%2C12%20C2.75%2C17.1086339%206.89136606%2C21.25%2012%2C21.25%20C17.1086339%2C21.25%2021.25%2C17.1086339%2021.25%2C12%20C21.25%2C11.2729266%2021.1662576%2C10.5573695%2021.0020875%2C9.8629795%20C20.906785%2C9.45987863%2021.1563049%2C9.05584287%2021.5594058%2C8.96054036%20C21.9625066%2C8.86523784%2022.3665424%2C9.11475771%2022.4618449%2C9.51785857%20C22.6527043%2C10.3251362%2022.75%2C11.1565032%2022.75%2C12%20C22.75%2C17.9370611%2017.9370611%2C22.75%2012%2C22.75%20C6.06293894%2C22.75%201.25%2C17.9370611%201.25%2C12%20C1.25%2C6.06293894%206.06293894%2C1.25%2012%2C1.25%20Z%20M17.6586667%2C13.25%20C18.1185754%2C13.25%2018.5498402%2C13.4733153%2018.8153335%2C13.8488361%20C19.0808092%2C14.2243322%2019.1475058%2C14.7053253%2018.9944111%2C15.1383417%20C17.9483179%2C18.1044405%2015.1451634%2C20.0881971%2012%2C20.0881971%20C8.85483662%2C20.0881971%206.05168206%2C18.1044405%205.00578211%2C15.1388889%20C4.85249421%2C14.7053253%204.91919084%2C14.2243322%205.18466653%2C13.8488361%20C5.45015977%2C13.4733153%205.88142461%2C13.25%206.34133333%2C13.25%20L6.34133333%2C13.25%20Z%20M17.558%2C14.695%20L17.538%2C14.749%20L6.461%2C14.749%20L6.50827179%2C14.8734156%20C7.3732069%2C17.0322917%209.42640021%2C18.4853104%2011.750045%2C18.5829516%20L11.750045%2C18.5829516%20L12%2C18.5881971%20C14.5090629%2C18.5881971%2016.7452873%2C17.0056497%2017.5800043%2C14.6388889%20L17.558%2C14.695%20Z%20M8.11422222%2C8.58288148%20C9.2798673%2C8.58288148%2010.3188817%2C9.31776232%2010.7071667%2C10.4168361%20C10.8451443%2C10.8073935%2010.6403879%2C11.2358557%2010.2498306%2C11.3738333%20C9.89181964%2C11.5003128%209.50195808%2C11.3388005%209.33318946%2C11.0101749%20L9.29283333%2C10.9164972%20C9.11634015%2C10.4169182%208.6440609%2C10.0828815%208.11422222%2C10.0828815%20C7.62853677%2C10.0828815%207.19121722%2C10.3635651%206.98575875%2C10.7951488%20L6.93561111%2C10.9164972%20C6.79763351%2C11.3070546%206.36917126%2C11.5118109%205.97861389%2C11.3738333%20C5.58805653%2C11.2358557%205.38330017%2C10.8073935%205.52127778%2C10.4168361%20C5.90956279%2C9.31776232%206.94857714%2C8.58288148%208.11422222%2C8.58288148%20Z%20M15.8857778%2C8.58288148%20C17.0514229%2C8.58288148%2018.0904372%2C9.31776232%2018.4787222%2C10.4168361%20C18.6166998%2C10.8073935%2018.4119435%2C11.2358557%2018.0213861%2C11.3738333%20C17.6633752%2C11.5003128%2017.2735136%2C11.3388005%2017.104745%2C11.0101749%20L17.0643889%2C10.9164972%20C16.8878957%2C10.4169182%2016.4156165%2C10.0828815%2015.8857778%2C10.0828815%20C15.4000923%2C10.0828815%2014.9627728%2C10.3635651%2014.7573143%2C10.7951488%20L14.7071667%2C10.9164972%20C14.5691891%2C11.3070546%2014.1407268%2C11.5118109%2013.7501694%2C11.3738333%20C13.3596121%2C11.2358557%2013.1548557%2C10.8073935%2013.2928333%2C10.4168361%20C13.6811183%2C9.31776232%2014.7201327%2C8.58288148%2015.8857778%2C8.58288148%20Z%20M19.5%2C0.25%20C19.8796958%2C0.25%2020.193491%2C0.532153882%2020.2431534%2C0.898229443%20L20.25%2C1%20L20.25%2C4.25%20L23%2C4.25%20C23.4142136%2C4.25%2023.75%2C4.58578644%2023.75%2C5%20C23.75%2C5.37969577%2023.4678461%2C5.69349096%2023.1017706%2C5.74315338%20L23%2C5.75%20L20.25%2C5.75%20L20.25%2C9%20C20.25%2C9.41421356%2019.9142136%2C9.75%2019.5%2C9.75%20C19.1203042%2C9.75%2018.806509%2C9.46784612%2018.7568466%2C9.10177056%20L18.75%2C9%20L18.75%2C5.75%20L16%2C5.75%20C15.5857864%2C5.75%2015.25%2C5.41421356%2015.25%2C5%20C15.25%2C4.62030423%2015.5321539%2C4.30650904%2015.8982294%2C4.25684662%20L16%2C4.25%20L18.75%2C4.25%20L18.75%2C1%20C18.75%2C0.585786438%2019.0857864%2C0.25%2019.5%2C0.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",customView:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getReplyInThreadOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.replyInThread,title:n.localize("REPLY"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fthreadicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FThread%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.6578236%2C0%20C7.2733682%2C-0.00487001799%204.15271669%2C1.82840041%202.50707282%2C4.78828665%20C0.861428952%2C7.74817289%200.949909343%2C11.3686229%202.73817252%2C14.2444485%20L0%2C20%20L5.74989584%2C17.2595575%20C9.11259725%2C19.3520226%2013.4289699%2C19.0910325%2016.5155083%2C16.6086132%20C19.6020468%2C14.1261939%2020.7857069%2C9.9636565%2019.4677154%2C6.22668649%20C18.1497239%2C2.48971647%2014.6174794%2C-0.00681020874%2010.6578236%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%226.66667597%22%20x2%3D%2214.6527312%22%20y2%3D%226.66667597%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%225.3271355%22%20y1%3D%229.33334078%22%20x2%3D%2215.9849591%22%20y2%3D%229.33334078%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%2212.0000056%22%20x2%3D%2214.6527312%22%20y2%3D%2212.0000056%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getSendMessagePrivatelyOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.sendMessagePrivately,title:n.localize("MESSAGE_PRIVATELY"),iconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.8%2015.0099H21V21H13.8V15.0099Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.4%2011.4158C16.7635%2011.4158%2016.153%2011.6682%2015.7029%2012.1176C15.2529%2012.5669%2015%2013.1764%2015%2013.8118V15.0099H19.8V13.8118C19.8%2013.1764%2019.5471%2012.5669%2019.0971%2012.1176C18.647%2011.6682%2018.0365%2011.4158%2017.4%2011.4158Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.3995%2017.7286C17.3402%2017.7286%2017.2823%2017.7461%2017.2331%2017.7791C17.1838%2017.812%2017.1454%2017.8587%2017.1228%2017.9135C17.1001%2017.9682%2017.0942%2018.0284%2017.1057%2018.0865C17.1173%2018.1446%2017.1458%2018.198%2017.1877%2018.2399C17.2296%2018.2818%2017.283%2018.3103%2017.3411%2018.3218C17.3992%2018.3334%2017.4594%2018.3275%2017.5141%2018.3048C17.5688%2018.2821%2017.6156%2018.2437%2017.6485%2018.1945C17.6814%2018.1452%2017.699%2018.0873%2017.699%2018.0281C17.699%2017.9486%2017.6674%2017.8725%2017.6113%2017.8163C17.5551%2017.7601%2017.4789%2017.7286%2017.3995%2017.7286%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%2010.8503C20.9168%209.57663%2020.5439%208.33868%2019.9096%207.23051C19.2753%206.12235%2018.3962%205.17314%2017.3393%204.45503C16.2824%203.73692%2015.0754%203.26882%2013.8101%203.0863C12.5448%202.90378%2011.2545%203.01164%2010.0372%203.4017C8.81989%203.79176%207.70769%204.45374%206.78512%205.33732C5.86254%206.22091%205.15388%207.30285%204.71298%208.5009C4.27209%209.69895%204.11057%2010.9816%204.24071%2012.2513C4.37084%2013.521%204.78921%2014.7444%205.464%2015.8285L3%2021L8.1768%2018.5368C9.14753%2019.1412%2010.2319%2019.5408%2011.3632%2019.7109%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getCopyOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.copyMessage,title:n.localize("COPY"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCopy%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCopy%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6%2C6.00000118%20L15.6%2C3.60000142%20C15.6%2C2.93725978%2015.0627417%2C2.40000154%2014.4%2C2.40000154%20L11.2%2C2.40000154%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.4%2C2.40000154%20L1.2%2C2.40000154%20C0.5372583%2C2.40000154%200%2C2.93725978%200%2C3.60000142%20L0%2C16.8000001%20C0%2C17.4627418%200.5372583%2C18%201.2%2C18%20L6%2C18%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9368%2C3.18960146%20C10.8549236%2C3.43464248%2010.625558%2C3.59990166%2010.3672%2C3.60000142%20L5.2328%2C3.60000142%20C4.97444201%2C3.59990166%204.74507642%2C3.43464248%204.6632%2C3.18960146%20L3.8632%2C0.789601696%20C3.80186075%2C0.606570139%203.8324564%2C0.405197059%203.94539051%2C0.248643741%20C4.05832463%2C0.0920904237%204.23976415%2C-0.000467229348%204.4328%2C0%20L11.1672%2C0%20C11.3602359%2C-0.000467229348%2011.5416754%2C0.0920904237%2011.6546095%2C0.248643741%20C11.7675436%2C0.405197059%2011.7981392%2C0.606570139%2011.7368%2C0.789601696%20L10.9368%2C3.18960146%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolygon%20id%3D%22Path%22%20points%3D%228.4%208.40000095%2018%208.40000095%2018%2018%208.4%2018%22%3E%3C%2Fpolygon%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2210.8000007%22%20x2%3D%2215.6%22%20y2%3D%2210.8000007%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2213.2000005%22%20x2%3D%2215.6%22%20y2%3D%2213.2000005%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2215.6000002%22%20x2%3D%2212.6%22%20y2%3D%2215.6000002%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}getMessageInfoOption(e){return new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.messageInformation,title:n.localize("INFO"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:void 0,iconTint:e.palette.getAccent600(),backgroundColor:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent600()})}isSentByMe(e,t){return!t.getSender()||e.getUid()===t.getSender().getUid()}getTextMessageOptions(e,t,o,r){let s=this.isSentByMe(e,t),i=!1;r?.getScope()===n.CometChatUIKitConstants.groupMemberScope.participant&&(i=!0);let a=[];return a.push(this.getReactionOption(o)),t.getParentMessageId()||a.push(this.getReplyInThreadOption(o)),a.push(this.getCopyOption(o)),(s||!i&&r)&&a.push(this.getEditOption(o)),s&&a.push(this.getMessageInfoOption(o)),(s||!i&&r)&&a.push(this.getDeleteOption(o)),r&&!s&&a.push(this.getSendMessagePrivatelyOption(o)),a}getImageMessageOptions(e,t,n,o){let r=[];return r=Re.getDataSource().getCommonOptions(e,t,n,o),r}getVideoMessageOptions(e,t,n,o){let r=[];return r=Re.getDataSource().getCommonOptions(e,t,n,o),r}getAudioMessageOptions(e,t,n,o){let r=[];return r=Re.getDataSource().getCommonOptions(e,t,n,o),r}getFileMessageOptions(e,t,n,o){let r=[];return r=Re.getDataSource().getCommonOptions(e,t,n,o),r}getBottomView(e,t){return null}getTextMessageTemplate(e,t){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.text,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(n,o)=>{let r=n;return null!=r.getDeletedAt()?this.getDeleteMessageBubble(r,e):Re.getDataSource().getTextMessageContentView(r,o,e,t)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getAudioMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.audio,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getAudioMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getVideoMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.video,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getVideoMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getImageMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.image,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getImageMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getGroupActionTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.groupMember,category:n.CometChatUIKitConstants.MessageCategory.action,contentView:(t,n)=>this.getGroupActionBubble(t,e)})}getFileMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.file,category:n.CometChatUIKitConstants.MessageCategory.message,contentView:(t,n)=>{let o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getFileMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getFormMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.form,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getFormMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getSchedulerMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.scheduler,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getSchedulerMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getCardMessageTemplate(e){return new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.card,category:n.CometChatUIKitConstants.MessageCategory.interactive,contentView:(t,n)=>{const o=t;return null!=o.getDeletedAt()?this.getDeleteMessageBubble(t,e):Re.getDataSource().getCardMessageContentView(o,n,e)},options:Re.getDataSource().getMessageOptions,bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getAllMessageTemplates(e,t){let n=e??Le;return t||(t={disableMentions:!1}),[Re.getDataSource().getTextMessageTemplate(n,t),Re.getDataSource().getImageMessageTemplate(n),Re.getDataSource().getVideoMessageTemplate(n),Re.getDataSource().getAudioMessageTemplate(n),Re.getDataSource().getFileMessageTemplate(n),Re.getDataSource().getGroupActionTemplate(n),Re.getDataSource().getFormMessageTemplate(n),Re.getDataSource().getSchedulerMessageTemplate(n),Re.getDataSource().getCardMessageTemplate(n)]}getMessageTemplate(e,t,o,r){let s=o??Le;r||(r={disableMentions:!1});let i=null;if(t!==n.CometChatUIKitConstants.MessageCategory.call)switch(e){case n.CometChatUIKitConstants.MessageTypes.text:i=Re.getDataSource().getTextMessageTemplate(s,r);break;case n.CometChatUIKitConstants.MessageTypes.image:i=Re.getDataSource().getImageMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.video:i=Re.getDataSource().getVideoMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.groupMember:i=Re.getDataSource().getGroupActionTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.file:i=Re.getDataSource().getFileMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.audio:i=Re.getDataSource().getAudioMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.form:i=Re.getDataSource().getFormMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.scheduler:i=Re.getDataSource().getSchedulerMessageTemplate(s);break;case n.CometChatUIKitConstants.MessageTypes.card:i=Re.getDataSource().getCardMessageTemplate(s)}return i}getMessageOptions(e,t,o,r){let s=[];if(t.getCategory()===n.CometChatUIKitConstants.MessageCategory.message)switch(t.getType()){case n.CometChatUIKitConstants.MessageTypes.text:s=Re.getDataSource().getTextMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.image:s=Re.getDataSource().getImageMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.video:s=Re.getDataSource().getVideoMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.groupMember:s=[];break;case n.CometChatUIKitConstants.MessageTypes.file:s=Re.getDataSource().getFileMessageOptions(e,t,o,r);break;case n.CometChatUIKitConstants.MessageTypes.audio:s=Re.getDataSource().getAudioMessageOptions(e,t,o,r);break;default:s=Re.getDataSource().getCommonOptions(e,t,o,r)}return s}getCommonOptions(e,t,o,r){let s=this.isSentByMe(e,t),i=!1;r?.getScope()===n.CometChatUIKitConstants.groupMemberScope.participant&&(i=!0);let a=[];return a.push(this.getReactionOption(o)),t?.getParentMessageId()||a.push(this.getReplyInThreadOption(o)),s&&a.push(this.getMessageInfoOption(o)),(s||!i&&r)&&a.push(this.getDeleteOption(o)),r?.getGuid()&&!s&&a.push(this.getSendMessagePrivatelyOption(o)),a}getAllMessageTypes(){return[n.CometChatUIKitConstants.MessageTypes.text,n.CometChatUIKitConstants.MessageTypes.image,n.CometChatUIKitConstants.MessageTypes.audio,n.CometChatUIKitConstants.MessageTypes.video,n.CometChatUIKitConstants.MessageTypes.file,n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageTypes.form,n.CometChatUIKitConstants.MessageTypes.scheduler,n.CometChatUIKitConstants.MessageTypes.card]}addList(){return""}getAllMessageCategories(){return[n.CometChatUIKitConstants.MessageCategory.message,n.CometChatUIKitConstants.MessageCategory.action,n.CometChatUIKitConstants.MessageCategory.interactive]}getAuxiliaryOptions(e,t,n,o){return[]}getId(){return"messageUtils"}getTextMessageContentView(e,t,n,o){return Re.getDataSource().getTextMessageBubble(e.getText(),e,t,n,void 0,o)}getAudioMessageContentView(e,t,n){return Re.getDataSource().getAudioMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n,e?.getAttachments()[0]?.getName())}getFileMessageContentView(e,t,n){return Re.getDataSource().getFileMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n,e?.getAttachments()[0]?.getName())}getFormMessageContentView(e,t,n){return Re.getDataSource().getFormMessageBubble(e,n)}getSchedulerMessageContentView(e,t,n){return Re.getDataSource().getSchedulerMessageBubble(e,n)}getCardMessageContentView(e,t,n){return Re.getDataSource().getCardMessageBubble(e,n)}getImageMessageContentView(e,t,n){let o=e?.getAttachments()[0]?.getUrl()||"";return Re.getDataSource().getImageMessageBubble(o,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBzT/hUrxDQf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lBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=",e,n)}getVideoMessageContentView(e,t,n){return Re.getDataSource().getVideoMessageBubble(e?.getAttachments()[0]?.getUrl(),e,n)}getActionMessage(e){let t="";if(!1===e.hasOwnProperty("actionBy")||!1===e.hasOwnProperty("actionOn"))return t;if(e.action!==n.CometChatUIKitConstants.groupMemberAction.JOINED&&e.action!==n.CometChatUIKitConstants.groupMemberAction.LEFT&&(!1===e.actionBy.hasOwnProperty("name")||!1===e.actionOn.hasOwnProperty("name")))return t;if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE){if(!e.hasOwnProperty("data")||!e.data.hasOwnProperty("extras"))return t;if(!e.data.extras.hasOwnProperty("scope"))return t;if(!1===e.data.extras.scope.hasOwnProperty("new"))return t}if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE&&!1===e.data.extras.hasOwnProperty("scope"))return t;if(e.action===n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE&&!1===e.data.extras.scope.hasOwnProperty("new"))return t;const o=e.actionBy,r=e.actionOn,s=o.name,i=e.action!==n.CometChatUIKitConstants.groupMemberAction.JOINED&&e.action!==n.CometChatUIKitConstants.groupMemberAction.LEFT?r.name:"";switch(e.action){case n.CometChatUIKitConstants.groupMemberAction.ADDED:t=`${s} ${n.localize("ADDED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.JOINED:t=`${s} ${n.localize("JOINED")}`;break;case n.CometChatUIKitConstants.groupMemberAction.LEFT:t=`${s} ${n.localize("LEFT")}`;break;case n.CometChatUIKitConstants.groupMemberAction.KICKED:t=`${s} ${n.localize("KICKED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.BANNED:t=`${s} ${n.localize("BANNED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.UNBANNED:t=`${s} ${n.localize("UNBANNED")} ${i}`;break;case n.CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE:{const o=e.data.extras.scope.new;t=`${s} ${n.localize("MADE")} ${i} ${o}`;break}}return t}getDeleteMessageBubble(e,t,o){let r=o,s=n.localize("MESSAGE_IS_DELETED");return r||(r={textFont:n.fontHelper(t.typography.text2),textColor:t.palette.getAccent400()||"",border:`1px dashed ${t.palette.getAccent400()}`,borderRadius:"12px"}),d.jsx(Ee,{text:s,textStyle:r})}getGroupActionBubble(e,t,o){let r=o,s=this.getActionMessage(e);return r||(r={textFont:n.fontHelper(t.typography.subtitle2),textColor:t.palette.getAccent600()||""}),d.jsx(Ee,{text:s,textStyle:r})}getTextMessageBubbleStyle(e,t){return e!==n.MessageBubbleAlignment.left?{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent900("light")||""}:{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent()||""}}getFormMessageBubbleStyle(e){const t=new o.InputStyle({width:"100%",height:"30px",border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"6px",padding:"0px 0px 0px 5px",placeholderTextColor:e.palette.getAccent400(),placeholderTextFont:n.fontHelper(e.typography.subtitle2),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),background:e.palette.getBackground()}),s=new o.LabelStyle({textFont:n.fontHelper(e.typography.subtitle1),textColor:e.palette.getAccent(),background:"transparent"}),i=new o.RadioButtonStyle({height:"16px",width:"16px",border:"none",labelTextFont:n.fontHelper(e.typography.subtitle2),labelTextColor:e.palette.getAccent600(),borderRadius:"4px",background:""}),a=new o.CheckboxStyle({height:"16px",width:"16px",border:"none",borderRadius:"4px",background:"",labelTextFont:n.fontHelper(e.typography.subtitle2),labelTextColor:e.palette.getAccent()}),l=new o.DropdownStyle({height:"35px",width:"100%",background:e.palette.getBackground(),border:`1px solid ${e.palette.getAccent100()}`,borderRadius:"6px",activeTextFont:n.fontHelper(e.typography.subtitle2),activeTextColor:e.palette.getAccent(),arrowIconTint:e.palette.getAccent700(),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),optionBackground:e.palette.getBackground(),optionBorder:`1px solid ${e.palette.getAccent100()}`,optionHoverBorder:`1px solid ${e.palette.getAccent100()}`,hoverTextFont:n.fontHelper(e.typography.subtitle2),hoverTextColor:e.palette.getAccent(),hoverTextBackground:e.palette.getAccent100()}),c={height:"40px",width:"100%",background:e.palette.getPrimary(),border:"none",borderRadius:"6px",buttonTextFont:n.fontHelper(e.typography.subtitle2),buttonTextColor:e.palette.getBackground(),justifyContent:"center"},C=new o.SingleSelectStyle({height:"100%",width:"100%",background:e.palette.getBackground(),border:"none",borderRadius:"12px",activeTextFont:n.fontHelper(e.typography.subtitle2),activeTextColor:e.palette.getAccent(),activeTextBackground:e.palette.getAccent100(),textFont:n.fontHelper(e.typography.subtitle2),textColor:e.palette.getAccent(),optionBackground:e.palette.getBackground(),optionBorder:`1px solid ${e.palette.getAccent100()}`,optionBorderRadius:"3px",hoverTextFont:n.fontHelper(e.typography.subtitle2),hoverTextColor:e.palette.getAccent(),hoverTextBackground:e.palette.getAccent100()}),d=new o.QuickViewStyle({background:"transparent",height:"fit-content",width:"100%",titleFont:n.fontHelper(e.typography.subtitle2),titleColor:e.palette.getPrimary(),subtitleFont:n.fontHelper(e.typography.subtitle2),subtitleColor:e.palette.getAccent600(),leadingBarTint:e.palette.getPrimary(),leadingBarWidth:"4px",borderRadius:"8px"});return new r.FormBubbleStyle({width:"300px",height:"fit-content",border:"none",background:"transparent",wrapperBackground:e.palette.getBackground(),borderRadius:"8px",wrapperBorderRadius:"8px",textInputStyle:t,labelStyle:s,radioButtonStyle:i,checkboxStyle:a,dropdownStyle:l,buttonStyle:c,singleSelectStyle:C,quickViewStyle:d,titleColor:e.palette.getAccent(),titleFont:n.fontHelper(e.typography.title1),goalCompletionTextColor:e.palette.getAccent(),goalCompletionTextFont:n.fontHelper(e.typography.subtitle1),wrapperPadding:"2px",datePickerBorder:`1px solid ${e.palette.getAccent100()}`,datePickerBorderRadius:"6px",datePickerFont:n.fontHelper(e.typography.subtitle2),datePickerFontColor:e.palette.getAccent()})}getCardMessageBubbleStyle(e){const t={height:"40px",width:"100%",background:"transparent",border:"none",borderRadius:"0px",buttonTextFont:n.fontHelper(e.typography.subtitle2),buttonTextColor:`${e.palette.getPrimary()}`,justifyContent:"center"};return new r.CardBubbleStyle({background:"transparent",borderRadius:"8px",height:"fit-content",width:"300px",imageHeight:"auto",imageWidth:"100%",imageRadius:"8px",imageBackgroundColor:"transparent",descriptionFontColor:e.palette.getAccent(),descriptionFont:n.fontHelper(e.typography.subtitle2),buttonStyle:t,dividerTintColor:e.palette.getAccent100(),wrapperBackground:e.palette.getBackground(),wrapperBorderRadius:"8px",wrapperPadding:"2px",disabledButtonColor:e.palette.getAccent600()})}getTextMessageBubble(e,t,n,o,s,i){let a,l={...i,textFormatters:i?.textFormatters&&i?.textFormatters.length?[...i.textFormatters]:this.getAllTextFormatters({theme:o,alignment:n,disableMentions:i.disableMentions})},c=l.textFormatters;if(l&&!l.disableMentions){let e;for(let n=0;n{o&&o(e.detail)},hasCustomCallback:s})}getSchedulerMessageBubble(e,t,n,o){let r=n;return r||(r=this.getSchedulerBubbleStyle(t)),d.jsx(Te,{style:this.getSchedulerWrapperStyle(),schedulerMessage:e,schedulerBubbleStyle:r,onScheduleClick:o||void 0})}getSchedulerWrapperStyle(){return{height:"inherit",width:"inherit",display:"block"}}getCardMessageBubble(e,t,n){let o=n;return o||(o=this.getCardMessageBubbleStyle(t)),d.jsx(Me,{message:e,cardBubbleStyle:o})}getImageMessageBubble(e,t,r,s,i,a){a||(a=new o.ImageBubbleStyle({height:"auto",maxHeight:"500px",maxWidth:"400px",border:"none",borderRadius:"8px",background:"transparent"}));const l=d.jsx(Be,{URL:r?.getAttachments()[0]?.getUrl()??e,closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",fullScreenViewerStyle:{closeIconTint:"blue"},ccCloseClicked:()=>{n.CometChatUIEvents.ccHideDialog.next()}});return d.jsx(ve,{src:e,placeholderImage:t,imageStyle:a,ccImageClicked:()=>{n.CometChatUIEvents.ccShowDialog.next({child:l,confirmCallback:null})}})}getVideoMessageBubble(e,t,n,r,s,i){return i||(i=new o.BaseStyle({height:"130px",width:"100%",border:"none",borderRadius:"8px 8px",background:"transparent"})),d.jsx(Se,{src:e,poster:r,videoStyle:i})}imageAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.image,title:n.localize("ATTACH_IMAGE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPhoto%20Library%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPhoto-Library%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C2.25%20C9.0543618%2C2.25%209.91816512%2C3.06587779%209.99451426%2C4.10073766%20L10%2C4.25%20L10%2C4.749%20L19.25%2C4.75%20C20.3043618%2C4.75%2021.1681651%2C5.56587779%2021.2445143%2C6.60073766%20L21.25%2C6.75%20L21.25%2C8.647%20L21.3090595%2C8.67075883%20C21.560776%2C8.78204037%2021.7890445%2C8.94502905%2021.9776884%2C9.15176047%20L22.0859904%2C9.28098473%20C22.4268417%2C9.7243264%2022.5648157%2C10.2875838%2022.4792305%2C10.8049438%20L20.599742%2C19.7646666%20C20.3801645%2C20.5892111%2019.6644249%2C21.1776759%2018.8253479%2C21.243794%20L18.6666667%2C21.25%20L4.41416667%2C21.25%20C4.34513107%2C21.25%204.27827401%2C21.2406726%204.21478696%2C21.2232093%20L4.198%2C21.217%20L4.13447967%2C21.2119882%20C3.12077897%2C21.0788944%202.34585208%2C20.2581085%202.25808253%2C19.244849%20L2.25%2C19.0833333%20L2.25%2C4.25%20C2.25%2C3.1956382%203.06587779%2C2.33183488%204.10073766%2C2.25548574%20L4.25%2C2.25%20L8%2C2.25%20Z%20M20.5%2C9.9999998%20L8.94041369%2C9.9999998%20C8.7494078%2C9.99989301%208.57810253%2C10.1081415%208.50251018%2C10.2403227%20L8.47304199%2C10.3080169%20L6.50183631%2C19.6519318%20L6.47%2C19.749%20L18.6669246%2C19.7500001%20C18.8652457%2C19.7500001%2019.0419017%2C19.6334019%2019.1157978%2C19.483767%20L19.1409396%2C19.4178635%20L20.9835913%2C10.6286666%20C21.0235655%2C10.4785581%2020.991501%2C10.3183966%2020.8968201%2C10.1952461%20C20.8210754%2C10.0967258%2020.71214%2C10.0308462%2020.5919295%2C10.0084626%20L20.5%2C9.9999998%20Z%20M8%2C3.75%20L4.25%2C3.75%20C4.00454011%2C3.75%203.80039163%2C3.92687516%203.75805567%2C4.16012437%20L3.7499284%2C4.25%20L3.7499284%2C19.0729701%20C3.75450399%2C19.4040804%204.00142215%2C19.6816449%204.32974627%2C19.7247522%20C4.62158992%2C19.7630698%204.89911328%2C19.6058121%205.0118617%2C19.3809093%20L5.04612468%2C19.2936497%20L7.01858631%2C9.94533345%20C7.25034003%2C9.14246197%207.95397669%2C8.57422367%208.77513888%2C8.50674095%20L8.94083333%2C8.5%20L19.75%2C8.5%20L19.75%2C6.75%20C19.75%2C6.50454011%2019.5731248%2C6.30039163%2019.3398756%2C6.25805567%20L19.25%2C6.25%20L9.25%2C6.25%20C8.87030423%2C6.25%208.55650904%2C5.96784612%208.50684662%2C5.60177056%20L8.5%2C5.5%20L8.5%2C4.25%20C8.5%2C4.00454011%208.32312484%2C3.80039163%208.08987563%2C3.75805567%20L8%2C3.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.5%2C11.3125%20L10.6157711%2C11.3187346%20C11.1481147%2C11.3764201%2011.5625%2C11.8273176%2011.5625%2C12.375%20C11.5625%2C12.9618025%2011.0868025%2C13.4375%2010.5%2C13.4375%20C9.91319745%2C13.4375%209.4375%2C12.9618025%209.4375%2C12.375%20C9.4375%2C11.8273176%209.85188534%2C11.3764201%2010.3842289%2C11.3187346%20L10.5%2C11.3125%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.7615505%2C13.3341733%20C15.1650281%2C13.339062%2015.5432492%2C13.5206846%2015.7989971%2C13.8261321%20L15.8889717%2C13.9463759%20L18.3148051%2C17.5838759%20C18.5446241%2C17.928486%2018.4515675%2C18.3941527%2018.1069574%2C18.6239717%20C17.7936756%2C18.8328981%2017.3803468%2C18.7749852%2017.1351188%2C18.5038182%20L17.0668616%2C18.4161241%20L14.742%2C14.93%20L13.1806552%2C17.1565514%20C12.9524338%2C17.481881%2012.5156848%2C17.5682521%2012.1842442%2C17.371143%20L12.096698%2C17.3103241%20L11.179%2C16.572%20L9.94871059%2C18.4165154%20C9.73958776%2C18.7296662%209.33567986%2C18.8347993%209.00516806%2C18.6784976%20L8.90848458%2C18.6237106%20C8.59533381%2C18.4145878%208.49020073%2C18.0106799%208.64650244%2C17.6801681%20L8.70128941%2C17.5834846%20L10.0076608%2C15.6272604%20C10.2213273%2C15.3068138%2010.5595979%2C15.0906712%2010.9401624%2C15.0314258%20C11.2731564%2C14.9795861%2011.6118179%2C15.0520295%2011.8942272%2C15.2330124%20L12.0116353%2C15.3171759%20L12.412%2C15.639%20L13.6194632%2C13.9191131%20C13.8512845%2C13.5888451%2014.2147222%2C13.3792001%2014.6114213%2C13.3405523%20L14.7615505%2C13.3341733%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}videoAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.video,title:n.localize("ATTACH_VIDEO"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}audioAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.audio,title:n.localize("ATTACH_AUDIO"),iconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M1%205C1%203.89543%201.89543%203%203%203H21.5C22.6046%203%2023.5%203.89543%2023.5%205V19C23.5%2020.1046%2022.6046%2021%2021.5%2021H3C1.89543%2021%201%2020.1046%201%2019V5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%2015.5C9%2015.8978%209.15803%2016.2794%209.43934%2016.5607C9.72064%2016.842%2010.1022%2017%2010.5%2017C10.8978%2017%2011.2794%2016.842%2011.5607%2016.5607C11.842%2016.2794%2012%2015.8978%2012%2015.5C12%2015.1022%2011.842%2014.7206%2011.5607%2014.4393C11.2794%2014.158%2010.8978%2014%2010.5%2014C10.1022%2014%209.72064%2014.158%209.43934%2014.4393C9.15803%2014.7206%209%2015.1022%209%2015.5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%2015V7L14.7141%209.27566C15.3657%209.82133%2015.7957%2010.5251%2015.9433%2011.2871C16.0909%2012.0491%2015.9486%2012.8307%2015.5365%2013.5211%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}fileAttachmentOption(e){return new n.CometChatMessageComposerAction({id:n.CometChatUIKitConstants.MessageTypes.file,title:n.localize("ATTACH_FILE"),iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FAttachment%20File%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FAttachment-File%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.33333333%2C14.6666667%20C9.33333333%2C17.6121853%2011.721148%2C20%2014.6666667%2C20%20C17.6121853%2C20%2020%2C17.6121853%2020%2C14.6666667%20C20%2C11.721148%2017.6121853%2C9.33333333%2014.6666667%2C9.33333333%20C11.721148%2C9.33333333%209.33333333%2C11.721148%209.33333333%2C14.6666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2214.6666667%22%20y1%3D%2212%22%20x2%3D%2214.6666667%22%20y2%3D%2217.3333333%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212%22%20y1%3D%2214.6666667%22%20x2%3D%2217.3333333%22%20y2%3D%2214.6666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6%2C17.3333333%20L1.33333333%2C17.3333333%20C0.596953667%2C17.3333333%200%2C16.7363797%200%2C16%20L0%2C1.33333333%20C0%2C0.596953667%200.596953667%2C0%201.33333333%2C0%20L10.7813333%2C0%20C11.1347086%2C0%2011.4736014%2C0.140428224%2011.7235556%2C0.390222222%20L14.2764444%2C2.94311111%20C14.5262384%2C3.19306523%2014.6666667%2C3.53195804%2014.6666667%2C3.88533333%20L14.6666667%2C6%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:null,iconTint:e.palette.getAccent700(),titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent700(),borderRadius:"8px",background:e.palette.getAccent100()})}getAttachmentOptions(e,t){return[this.imageAttachmentOption(e),this.videoAttachmentOption(e),this.audioAttachmentOption(e),this.fileAttachmentOption(e)]}getLastConversationMessage(e,t,o){let i={...o,textFormatters:o?.textFormatters&&o?.textFormatters.length?[...o.textFormatters]:[this.getMentionsTextFormatter({theme:o.theme,disableMentions:o.disableMentions})]},a=r.ConversationUtils.getLastConversationMessage(e,t,i),l=e.getLastMessage();if(l){let e=i.textFormatters;if(i&&!i.disableMentions){let t;for(let n=0;n/g;let s=e.getText(),i=t,a=r.exec(s),l=[],c=e.getMentionedUsers();for(;null!==a;){let e;for(let t=0;te===t.getId()))||(this.dataSource=t,this.names.push(this.dataSource.getId()))}static getDataSource(){return this.dataSource}}Re.names=["message utils"];class Pe{enable(){s.CometChat.isAIFeatureEnabled(this.getExtensionId()).then((e=>{e&&this.addExtension()}))}}class Oe{constructor(e){this.dataSource=e}getTextMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getTextMessageOptions(e,t,n,o)}getImageMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getImageMessageOptions(e,t,n,o)}getVideoMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getVideoMessageOptions(e,t,n,o)}getAudioMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getAudioMessageOptions(e,t,n,o)}getFileMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getFileMessageOptions(e,t,n,o)}getBottomView(e,t){return(this.dataSource??new Ue).getBottomView(e,t)}getTextMessageContentView(e,t,n,o){return(this.dataSource??new Ue).getTextMessageContentView(e,t,n,o)}getImageMessageContentView(e,t,n){return(this.dataSource??new Ue).getImageMessageContentView(e,t,n)}getVideoMessageContentView(e,t,n){return(this.dataSource??new Ue).getVideoMessageContentView(e,t,n)}getAudioMessageContentView(e,t,n){return(this.dataSource??new Ue).getAudioMessageContentView(e,t,n)}getFileMessageContentView(e,t,n){return(this.dataSource??new Ue).getFileMessageContentView(e,t,n)}getFormMessageContentView(e,t,n){return(this.dataSource??new Ue).getFormMessageContentView(e,t,n)}getSchedulerMessageContentView(e,t,n){return(this.dataSource??new Ue).getSchedulerMessageContentView(e,t,n)}getCardMessageContentView(e,t,n){return(this.dataSource??new Ue).getCardMessageContentView(e,t,n)}getTextMessageTemplate(e,t){return(this.dataSource??new Ue).getTextMessageTemplate(e,t)}getImageMessageTemplate(e){return(this.dataSource??new Ue).getImageMessageTemplate(e)}getVideoMessageTemplate(e){return(this.dataSource??new Ue).getVideoMessageTemplate(e)}getAudioMessageTemplate(e){return(this.dataSource??new Ue).getAudioMessageTemplate(e)}getFileMessageTemplate(e){return(this.dataSource??new Ue).getFileMessageTemplate(e)}getGroupActionTemplate(e){return(this.dataSource??new Ue).getGroupActionTemplate(e)}getFormMessageTemplate(e){return(this.dataSource??new Ue).getFormMessageTemplate(e)}getSchedulerMessageTemplate(e){return(this.dataSource??new Ue).getSchedulerMessageTemplate(e)}getCardMessageTemplate(e){return(this.dataSource??new Ue).getCardMessageTemplate(e)}getAllMessageTemplates(e,t){return(this.dataSource??new Ue).getAllMessageTemplates(e,t)}getMessageTemplate(e,t,n){return(this.dataSource??new Ue).getMessageTemplate(e,t,n)}getMessageOptions(e,t,n,o){return(this.dataSource??new Ue).getMessageOptions(e,t,n,o)}getCommonOptions(e,t,n,o){return(this.dataSource??new Ue).getCommonOptions(e,t,n,o)}getAttachmentOptions(e,t){return(this.dataSource??new Ue).getAttachmentOptions(e,t)}getAllMessageTypes(){return(this.dataSource??new Ue).getAllMessageTypes()}getAllMessageCategories(){return(this.dataSource??new Ue).getAllMessageCategories()}getAuxiliaryOptions(e,t,n,o){return(this.dataSource??new Ue).getAuxiliaryOptions(e,t,n,o)}getId(){return(this.dataSource??new Ue).getId()}getDeleteMessageBubble(e,t,n){return(this.dataSource??new Ue).getDeleteMessageBubble(e,t,n)}getGroupActionBubble(e,t,n){return(this.dataSource??new Ue).getGroupActionBubble(e,t,n)}getTextMessageBubble(e,t,n,o,r,s){return(this.dataSource??new Ue).getTextMessageBubble(e,t,n,o,r,s)}getVideoMessageBubble(e,t,n,o,r,s){return(this.dataSource??new Ue).getVideoMessageBubble(e,t,n,o,r,s)}getImageMessageBubble(e,t,n,o,r,s){return(this.dataSource??new Ue).getImageMessageBubble(e,t,n,o,r,s)}getAudioMessageBubble(e,t,n,o,r){return(this.dataSource??new Ue).getAudioMessageBubble(e,t,n,o,r)}getFileMessageBubble(e,t,n,o,r){return(this.dataSource??new Ue).getFileMessageBubble(e,t,n,o,r)}getFormMessageBubble(e,t,n,o){return(this.dataSource??new Ue).getFormMessageBubble(e,t,n,o)}getSchedulerMessageBubble(e,t,n,o){return(this.dataSource??new Ue).getSchedulerMessageBubble(e,t,n,o)}getCardMessageBubble(e,t,n){return(this.dataSource??new Ue).getCardMessageBubble(e,t,n)}getLastConversationMessage(e,t,n){return(this.dataSource??new Ue).getLastConversationMessage(e,t,n)}getDefaultDetailsTemplate(e,t,n,o){return(this.dataSource??new Ue).getDefaultDetailsTemplate(e,t,n,o)}getAuxiliaryHeaderMenu(e,t){return(this.dataSource??new Ue).getAuxiliaryHeaderMenu(e,t)}getAIOptions(e,t,n,o,r){return(this.dataSource??new Ue).getAIOptions(e,t,n,o,r)}getAllTextFormatters(e){let t=[];const n=e.disableMentions?null:(this.dataSource??new Ue).getMentionsTextFormatter(e),o=(this.dataSource??new Ue).getUrlTextFormatter(e);return n&&t.push(n),o&&t.push(o),t}getMentionsTextFormatter(e={}){return(this.dataSource??new Ue).getMentionsTextFormatter(e)}getUrlTextFormatter(e={}){return(this.dataSource??new Ue).getUrlTextFormatter(e)}getMentionsFormattedText(e,t,n){return(this.dataSource??new Ue).getMentionsFormattedText(e,t,n)}}const je=De({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t}),Ve=(e,t)=>e.sender.getUid()===t.getUid()?n.MessageBubbleAlignment.right:n.MessageBubbleAlignment.left,Ge=(e,t,o,r)=>{let s={};s=o===n.MessageBubbleAlignment.right?r?.senderMessageBubbleStyle||{}:r?.botMessageBubbleStyle||{};const i={textFont:s?.textFont||n.fontHelper(t.typography.text3)};return o===n.MessageBubbleAlignment.right?i.textColor=s?.textColor||t.palette.getAccent900():i.textColor=s?.textColor||t.palette.getAccent(),d.jsx(je,{text:e.getText(),textStyle:i})},He=(e,t,o)=>{let r,s=!1;return"send"!==e.getStatus()&&"wait"!==e.getStatus()&&"error"!==e.getStatus()||("wait"===e.getStatus()?r=n.Receipts.wait:"sent"===e.getStatus()?r=n.Receipts.sent:"error"===e.getStatus()&&(r=n.Receipts.error),s=!0),d.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[d.jsx("div",{style:{display:"inline-block"},children:d.jsx("cometchat-date",{timestamp:e.getSentAt(),dateStyle:JSON.stringify(tt(o)),pattern:n.DatePatterns.time})}),s?d.jsx("div",{style:{position:"relative",height:"20px",width:"20px"},children:d.jsx("cometchat-receipt",{receipt:r,waitIcon:t?.loadingIconURL,errorIcon:t?.errorIconURL,receiptStyle:JSON.stringify(nt(t?.assistBotStyle,o))})}):null]})},Qe=(e,t)=>({display:"flex",width:e?.width||"100%",height:e?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px",background:e?.background||t?.palette?.getBackground(),borderRadius:e?.borderRadius||"8px"}),Ne=(e,t)=>({display:"flex",justifyContent:"space-between",alignItems:"center",font:e?.optionTitleFont||t&&n.fontHelper(t?.typography?.text2),color:e?.optionTitleColor||t?.palette?.getAccent()}),Ke=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.backIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),ze=(e,t)=>new o.ActionSheetStyle({ActionSheetSeparatorTint:t?.palette?.getAccent400(),background:e?.buttonBackground||t?.palette?.getBackground(),titleColor:e?.buttonTextColor||t?.palette?.getAccent(),titleFont:e?.buttonTextFont||t&&n.fontHelper(t?.typography?.text2),listItemBackground:"transparent",height:"100%",width:"100%",border:"none"}),Je=e=>({display:"flex",justifyContent:"flex-end",height:"100%",width:"100%",background:e?.palette?.getAccent600()}),Ye=(e,t)=>({display:"flex",flexDirection:"column",width:"40%",minWidth:"350px",maxWidth:"100%",height:"100%",overflow:"hidden",boxSizing:"border-box",background:e?.background||t?.palette.getBackground()}),_e=e=>({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:"40px",padding:"10px",boxSizing:"border-box",background:e?.palette.getAccent200(),marginBottom:"10px"}),We=(e={},t)=>({font:e.titleFont||n.fontHelper(t.typography.subtitle1),color:e.titleColor||t.palette.getAccent()}),Ze=(e={},t)=>({font:e.subtitleFont||n.fontHelper(t.typography.caption2),color:e.subtitleColor||t.palette.getAccent500()}),Xe=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.closeIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),qe=(e,t,n,o)=>{if(e.sender.getUid()===n.getUid()){const e=o?.senderMessageBubbleStyle||{};return{background:e.background||t.palette.getPrimary(),borderRadius:e.borderRadius||"12px",border:e.border||"none"}}{const e=o?.botMessageBubbleStyle||{};return{background:e.background||t.palette.getAccent100(),borderRadius:e.borderRadius||"12px",border:e.border||"none"}}},$e=(e,t)=>e||new o.MessageInputStyle({height:"40px",width:"100%",maxHeight:"40px",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"12px",background:t.palette.getAccent50(),textFont:n.fontHelper(t.typography.text2),textColor:t.palette.getAccent(),dividerColor:t.palette.getAccent100(),inputBorder:"none",inputBorderRadius:"0px",inputBackground:"transparent"}),et=(e,t)=>({height:"24px",width:"24px",buttonIconTint:e?.sendIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}),tt=e=>({textColor:e?.palette?.getAccent600(),textFont:n.fontHelper(e?.typography?.caption2),padding:"0px"}),nt=(e,t)=>new o.ReceiptStyle({waitIconTint:e?.loadingIconTint||t?.palette?.getAccent700(),errorIconTint:e?.errorIconTint||t?.palette?.getError()}),ot=(e,t)=>{const o=Ve(e,t);return{flex:"1 1 0",display:"flex",flexDirection:"column",borderRadius:"inherit",justifyContent:o===n.MessageBubbleAlignment.left?"flex-start":"flex-end",alignItems:o===n.MessageBubbleAlignment.left?"flex-start":"flex-end",position:"relative"}};var rt="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const st={title:void 0,bots:void 0,closeCallback:void 0,backCallback:void 0,configuration:void 0},it=De({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t,events:{onClick:"cc-actionsheet-clicked"}}),at=e=>{const{theme:n}=t.useContext(R);return d.jsx("div",{className:"slideable-container",style:Qe(e.configuration?.assistBotStyle,n),children:d.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",padding:"10px",boxSizing:"border-box"},children:[d.jsxs("div",{style:Ne(e.configuration?.assistBotStyle,n),children:[d.jsx("div",{children:d.jsx("cometchat-button",{iconURL:e.configuration?.backIconURL||rt,onClick:()=>e.backCallback?e.backCallback():null,buttonStyle:JSON.stringify(Ke(e.configuration?.assistBotStyle,n))})}),d.jsx("div",{children:e.title}),d.jsx("div",{style:{flex:.2}})]}),d.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",boxSizing:"border-box"},children:d.jsx(it,{actions:e.bots,hideLayoutMode:!0,actionSheetStyle:ze(e.configuration?.assistBotStyle,n),onClick:t=>{const n=t?.detail?.action;n.onClick&&n.onClick(),e.closeCallback&&e.closeCallback()}})})]})})};at.defaultProps=st;var lt="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const ct={bot:void 0,sender:void 0,messageSendCallBack:void 0,closeCallback:void 0,configuration:void 0},Ct=De({tagName:"cometchat-text-input",elementClass:o.CometChatTextInput,react:t,events:{ccTextInputChanged:"cc-text-input-changed",ccTextInputEntered:"cc-text-input-entered"}}),dt=e=>{const i=t.useRef(!0),a=n.localize("COMETCHAT_ASK_BOT_SUBTITLE"),l=t.useRef(n.localize("COMETCHAT_BOT_FIRST_MESSAGE")),c=t.useRef(null),C=t.useRef(""),[g,u]=t.useState([]),{theme:p}=t.useContext(R),h=e.sender,m=e.bot;t.useEffect((()=>{A()}),[]);const A=t.useCallback((()=>{e.configuration?.botFirstMessageText&&(l.current=e.configuration.botFirstMessageText(m));const t=new s.CometChat.TextMessage(h.getUid(),l.current,n.CometChatUIKitConstants.MessageReceiverType.user);t.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t.setMuid(r.CometChatUIKitUtility.ID()),t.setSender(m),u([t])}),[g,u]),x=t.useCallback((e=>{C.current=e}),[C]),b=t.useCallback((t=>{e.messageSendCallBack&&e.messageSendCallBack(C.current,m).then((e=>{const o=new s.CometChat.TextMessage(h.getUid(),e,n.CometChatUIKitConstants.MessageReceiverType.user);o.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),o.setMuid(r.CometChatUIKitUtility.ID()),o.setSender(m),o.setStatus("sent"),u((e=>{const n=e.map((e=>(e.getMuid()===t&&e.setStatus("sent"),e)));return n.push(o),n}))})).catch((e=>{u((e=>e.map((e=>(e.getMuid()===t&&e.setStatus("error"),e)))))}))}),[g,u,C]),y=t.useCallback((()=>{if(!C.current)return;const e=r.CometChatUIKitUtility.ID(),t=new s.CometChat.TextMessage(m.getUid(),C.current,n.CometChatUIKitConstants.MessageReceiverType.user);t.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t.setMuid(e),t.setSender(h),t.setStatus("wait"),u((e=>[...e,t])),c?.current?.emptyInputField(),b(e)}),[g,u,b,C]),w=t.useMemo((()=>function(t,n){return d.jsx("div",{style:ot(t,h),children:d.jsx(Z,{id:t?.id,messageBubbleStyle:qe(t,p,h,e.configuration),alignment:Ve(t,h),contentView:Ge(t,p,Ve(t,h),e.configuration),footerView:He(t,e.configuration,p),leadingView:void 0,headerView:void 0,replyView:void 0,bottomView:void 0,threadView:void 0,statusInfoView:void 0,options:[]})})}),[qe,Ve,Ge,He]);return d.jsx("div",{style:Je(p),children:d.jsxs("div",{style:Ye(e.configuration?.assistBotStyle,p),children:[d.jsxs("div",{style:_e(p),children:[d.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[d.jsx("cometchat-avatar",{name:m?.getName(),avatarStyle:JSON.stringify((f=e.configuration?.avatarStyle,f||new o.AvatarStyle({borderRadius:"16px",width:"28px",height:"28px"}))),image:m?.getAvatar()}),d.jsxs("div",{children:[d.jsx("div",{style:We(e.configuration?.assistBotStyle,p),children:m?.getName()}),d.jsx("div",{style:Ze(e.configuration?.assistBotStyle,p),children:a})]})]}),d.jsx("div",{children:d.jsx("cometchat-button",{iconURL:e.configuration?.closeIconURL||lt,onClick:()=>{e.closeCallback&&e.closeCallback()},buttonStyle:JSON.stringify(Xe(e.configuration?.assistBotStyle,p))})})]}),d.jsx(T,{listStyle:{height:"calc(100% - 90px)"},list:g,listItem:w,listItemKey:"getMuid",state:n.States.loaded,hideSearch:!0,showSectionHeader:!1,title:"",scrollToBottom:i?.current}),d.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"40px",padding:"5px",boxSizing:"border-box"},children:[d.jsx(Ct,{style:{flex:.99},ref:c,textInputStyle:$e(e.configuration?.textInputStyle,p),ccTextInputChanged:e=>x(e?.detail?.value),ccTextInputEntered:()=>y()}),d.jsx("cometchat-button",{iconURL:e.configuration?.sendIconURL||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:()=>y(),buttonStyle:JSON.stringify(et(e.configuration?.assistBotStyle,p))})]})]})});var f};dt.defaultProps=ct;class gt extends Oe{constructor(e,t){super(e),this.bots=[],this.theme=new n.CometChatTheme({}),this.onMessageSent=async(e,t)=>new Promise((async(o,r)=>{try{let r,i=this.user?this.user?.getUid():this.group?.getGuid(),a=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(r=await(this.configuration?.apiConfiguration(t,this.user,this.group)));return o(await s.CometChat.askBot(i,a,t.getUid(),e,r||{}))}catch(e){r(e)}})),this.closeChat=()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messages)},this.onOptionClick=e=>{n.CometChatUIEvents.ccShowPanel.next({child:d.jsx(dt,{bot:e,sender:this.loggedInUser,configuration:this.configuration,messageSendCallBack:this.onMessageSent,closeCallback:this.closeChat}),position:n.PanelAlignment.messages})},this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener(),this.getAllBots()}),1e3)}getId(){return"aiassistbot"}getAIOptions(e,t,o,r,s){this.user=e,this.group=t;const i=n.localize("COMETCHAT_ASK_AI_BOT"),a=n.localize("COMETCHAT_ASK_BOT"),l=this.bots?.length,c=l>1?i:`${a} ${this.bots[0]?.getName()}`;if(r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.assistBotStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.assistBotStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.assistBotStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);if(1===l){const e=new n.CometChatMessageComposerAction({title:c,onClick:()=>{this.onOptionClick(this.bots[0])},id:"ai-assist-bot",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});a.push(e)}else if(l>1){const e=this.bots.map((e=>new n.CometChatMessageComposerAction({title:e.getName(),onClick:()=>{this.onOptionClick(e)},id:e.getUid()}))),t=new n.CometChatActionsView({title:c,customView:t=>d.jsx(at,{title:c,configuration:this.configuration,backCallback:t?.backAction,closeCallback:t?.closePopover,bots:e}),id:"ai-assist-bot",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});a.push(t)}return a}}getAllBots(){(new s.CometChat.UsersRequestBuilder).setLimit(30).setTags(["aibot"]).build().fetchNext().then((e=>{this.bots=e}))}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((()=>{this.closeChat()}))}}class ut extends Pe{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new gt(e,this.configuration)))}getExtensionId(){return"bots"}}const pt={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"hidden"},ht=(e,t)=>({replyTextFont:t?.textFont||n.fontHelper(e.typography.caption1),replyTextColor:t?.textColor||e?.palette.getAccent(),replyBackground:t?.textBackground||"inherit",boxShadow:`0px 0px 1px ${e?.palette.getAccent600()}`,background:t?.background||"inherit",width:t?.width||"100%",height:t?.height||"100%",border:t?.textBorder||"none",borderRadius:t?.textBorderRadius||"8px",display:"flex",justifyContent:"flex-start"});var mt="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%2020010904%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2F2001%2FREC-SVG-20010904%2FDTD%2Fsvg10.dtd%22%3E%3Csvg%20version%3D%221.0%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100.000000pt%22%20height%3D%22100.000000pt%22%20viewBox%3D%220%200%20100.000000%20100.000000%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cg%20transform%3D%22translate%280.000000%2C100.000000%29%20scale%280.100000%2C-0.100000%29%22fill%3D%22%23000000%22%20stroke%3D%22none%22%3E%3Cpath%20d%3D%22M375%20847%20c-221%20-73%20-326%20-269%20-254%20-472%20l22%20-62%20-25%20-74%20c-14%20-41-23%20-80%20-21%20-86%206%20-17%2042%20-15%20138%206%2077%2017%2082%2017%20138%20-1%2072%20-22%20199%20-25%20216%20-46%207%209%2021%205%2030%20-5%2013%20-21%2016%20-79%2016%20-44%200%20-98%208%20-136%2019%20-58%2018%20-67%2019%20-123%206-89%20-21%20-88%20-23%20-65%2042%20l20%2058%20-26%2056%20c-52%20116%20-25%20240%2069%20327%2077%2071%20123%2087246%2087%20123%200%20169%20-16%20245%20-86%2064%20-59%2088%20-108%2094%20-199%205%20-68%208%20-75%2028%20-78%2036-5%2048%2038%2033%20118%20-22%20125%20-94%20215%20-218%20273%20-59%2028%20-79%2032%20-167%2034%20-63%202%20-115-2%20-140%20-10z%22%2F%3E%3Cpath%20d%3D%22M687%20313%20c-16%20-15%20-4%20-42%2038%20-83%20l45%20-44%20-45%20-46%20c-47%20-48%20-56%20-74-28%20-84%2011%20-5%2031%208%2064%2040%20l48%2047%2050%20-46%20c54%20-50%2061%20-53%2079%20-35%2018%2018%2015%2025-35%2079%20l-46%2050%2048%2049%20c41%2042%2046%2051%2035%2065%20-19%2023%20-30%2019%20-80%20-30%20l-46%20-45%20-4445%20c-41%2042%20-68%2054%20-83%2038z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",At="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABqxJREFUeF7tnY2x5DQMgHUdcBUAFXBUAFQAVABXAVABUAFQAVDBQQVABRwVABUAFcB8MzEsef6RbHmjl9gzO%2B%2FmNnFkfZIs%2F6zzRFYJpYEnoaRZwsgCEswIFpAFJJgGgomzPGQBCaaBYOIsD1lAgmkgmDjLQxaQYBoIJs7ykAUkmAaCifMYPeQVEXlt%2B%2FDvXPlt%2B8%2BXIvJnMJ1XxYkOBMW%2FJyJviMizBoRSQwECID4%2FiciPIgKokCUaECz%2BbRF5dwNR8oBRZQIJMN9vf5NHjdY7fH8UIED4YDKEmrK%2BE5FvRYS%2Fh5YjgWD9hCNAACRCwVM%2B38Ac0vccBeRDEflCRGaFpFG4gPlKRL4crch6%2F72B4Alfb52zVdZ0PZb7101HnauHZADYrw5CTx7zTa%2Bw1vvuBQTlYG2EJ2shMyIrStmRtQPm2WRoGAOft6wCiAhACGXWZ5sfdQ8gVq%2FAA8h%2B6GCBMCOWIxNhk2xOGzaR45MNjlnR2htmA%2FlURD5TCoMnAAFrnAGhJAZg%2BGg9B08HzJQyCwhW90KZPQECaHjDkQWvQQ4NGELo%2BzNC2AwgdKjAIG7XCvEYSzs8998JSSpOBkg7WvK%2F4w3FG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yuQgK5crgKB%2BTq4SocEI9wBVQm5viJA289oPCDH%2FZ4uU3StUbEA9%2BHyrKs4Sq97SC9biLNkOb0wXwQYNie6jJRN6D02q1hgLTCFUrE6pPlo%2FzWyZ6lhtPo28OUPXWLfBygjGwcWa7eM7UJEQZI7dCABMNTcamu9K6PX27WHrQehNLTi2A4jzfnoSiYny1rz4IMM7lYClczIGjqTG%2FO2SsyeaXFOy1LBrkFOrcZCu1sb%2BsoP40CI19j%2FVnF7Uy3et%2BuRgFaIGxuSGecaA%2BvLz0fi%2F795m0H6e06GnlnXdOz%2BxI98HHNDLVAkpuiTCuQW%2BWzXYgG5MIMYNjKn1LhWcrf18urjugfQxQtkNrJabcNQdG3b0LreW1dejMbXqk5GL9HkUlGDKT7BNGeB7fu0QKhnn1nhvJT5pNeuOLqvpvwaRCZMiY8SOulKTwi3%2B1Hm1G19Of%2BvQUID09KQfHa1NNd6K3C9FqjPZxkFDOMY1Zb%2Fq3XCmS6QFd%2FwALSbwFhNsr1N%2BEcd4bcKHcO1fa1IuRGub6mnOOuMHNZ51DneCtKc3qm42BLYqxO3Q4oN0hWHSyjedQCotHSw2vS79AZA6V3L%2FbVtLtrAXFRo18lC4ifLl1qWkBc1OhXyQLip0uXmhYQFzX6VfIP%2BqZ1dOfAgekAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E",xt="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Icons%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20viewBox%3D%220%200%2032%2032%22%20style%3D%22enable-background%3Anew%200%200%2032%2032%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%20.st0%7Bfill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A10%3B%7D%3C%2Fstyle%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%223%22%20x2%3D%2216%22%20y2%3D%228%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%226.8%22%20x2%3D%2210.3%22%20y2%3D%2210.3%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%223%22%20y1%3D%2216%22%20x2%3D%228%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%2225.2%22%20x2%3D%2210.3%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%2229%22%20x2%3D%2216%22%20y2%3D%2224%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%2225.2%22%20x2%3D%2221.7%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2229%22%20y1%3D%2216%22%20x2%3D%2224%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%226.8%22%20x2%3D%2221.7%22%20y2%3D%2210.3%22%2F%3E%3C%2Fsvg%3E";const bt={getConversationStarterCallback:void 0,editReplyCallback:void 0,configuration:void 0},yt=De({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}}),wt=De({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),ft=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_ICEBREAKERS");return t.useEffect((()=>{r(n.States.loading),e&&e.getConversationStarterCallback&&e.getConversationStarterCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=d.jsx(yt,{smartReplyStyle:ht(a,e.configuration?.conversationStarterStyle),replies:t,ccReplyClicked:t=>{e&&e.editReplyCallback&&e.editReplyCallback(t?.detail?.reply)},closeIconURL:""},"conversation-starter");return n(o)}e.configuration?.customView(t).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:{...(g=e.configuration?.conversationStarterStyle,{display:"flex",overflow:"hidden",width:g?.width||"100%",height:g?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px"}),minHeight:"50px",width:"100%"},children:d.jsx("div",{style:pt,children:d.jsx("div",{style:{height:"100%",width:"100%",marginTop:"12px",overflow:"hidden auto"},children:o===n.States.loaded?s:function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(wt,{state:n.States.loading,style:e.configuration?.conversationStarterStyle,loadingIconURL:e.configuration?.loadingIconURL||xt,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(wt,{state:n.States.error,style:e.configuration?.conversationStarterStyle,errorIconURL:e.configuration?.errorIconURL||At,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(wt,{state:n.States.empty,style:e.configuration?.conversationStarterStyle,emptyIconURL:e.configuration?.emptyIconURL||mt,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}()})})});var g};ft.defaultProps=bt;class Dt extends Oe{constructor(e,t){super(e),this.currentMessage=null,this.theme=new n.CometChatTheme({}),this.getConversationStarter=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getConversationStarter(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aiconversationstarter"}editReply(e){n.CometChatUIEvents.ccComposeMessage.next(e),n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)}closeIfMessageReceived(e){e?.getReceiverId()!==this.loggedInUser?.getUid()||this.currentMessage||n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)}loadConversationStarter(){n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:d.jsx(ft,{configuration:this.configuration,getConversationStarterCallback:this.getConversationStarter,editReplyCallback:this.editReply}),position:n.PanelAlignment.messageListFooter})}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.user=e.user,this.group=e.group,this.currentMessage||this.loadConversationStarter()})),n.CometChatMessageEvents.ccMessageSent.subscribe((()=>{this.currentMessage||(n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null)}))}}class Et extends Pe{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Dt(e,this.configuration)))}getExtensionId(){return"conversation-starter"}}const vt={width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"hidden"},It=(e,t)=>new o.PanelStyle({width:"100%",height:"fit-content",border:`1px solid ${e.palette.getPrimary()}`,borderRadius:"8px",background:e.palette.getBackground(),textColor:t?.textColor||e.palette.getAccent600(),titleColor:t?.titleTextColor||e.palette.getAccent(),textFont:t?.textFont||n.fontHelper(e.typography.text2),titleFont:t?.titleTextFont||n.fontHelper(e.typography.text1)}),St={getConversationSummaryCallback:void 0,editReplyCallback:void 0,closeCallback:void 0,configuration:void 0};De({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}});const Ft=De({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),kt=De({tagName:"cometchat-panel",elementClass:o.CometChatPanel,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),Tt=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_SUMMARY"),g=n.localize("CONVERSATION_SUMMARY");return t.useEffect((()=>{r(n.States.loading),e&&e.getConversationSummaryCallback&&e.getConversationSummaryCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=d.jsx(kt,{panelStyle:It(a,e.configuration?.conversationSummaryStyle),title:g,text:t,closeIconUrl:e.configuration?.closeIconURL||lt,ccCloseClicked:()=>e.closeCallback()});return n(o)}e.configuration?.customView(t,e?.closeCallback).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:{...(u=e.configuration?.conversationSummaryStyle,{display:"flex",overflow:"hidden",width:u?.width||"100%",height:u?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px"}),minHeight:"50px",width:"100%"},children:d.jsx("div",{style:vt,children:d.jsx("div",{style:{height:"100%",width:"95%",marginTop:"12px",overflow:"hidden auto"},children:o===n.States.loaded?s:function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(Ft,{state:n.States.loading,style:e.configuration?.conversationSummaryStyle,loadingIconURL:e.configuration?.loadingIconURL||xt,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(Ft,{state:n.States.error,style:e.configuration?.conversationSummaryStyle,errorIconURL:e.configuration?.errorIconURL||At,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(Ft,{state:n.States.empty,style:e.configuration?.conversationSummaryStyle,emptyIconURL:e.configuration?.emptyIconURL||mt,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}()})})});var u};Tt.defaultProps=St;class Mt extends Oe{constructor(e,t){super(e),this.currentMessage=null,this.unreadMessageCount=0,this.theme=new n.CometChatTheme({}),this.LISTENER_ID="aiconversationsummary__listener",this.closePanel=()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter)},this.getConversationSummary=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getConversationSummary(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aiconversationsummary"}loadConversationSummary(){n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:d.jsx(Tt,{configuration:this.configuration,getConversationSummaryCallback:this.getConversationSummary,closeCallback:this.closePanel}),position:n.PanelAlignment.messageListFooter})}getAIOptions(e,t,o,r,s){if(this.user=e,this.group=t,r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.conversationSummaryStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.conversationSummaryStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.conversationSummaryStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);let l=new n.CometChatMessageComposerAction({title:n.localize("CONVERSATION_SUMMARY"),onClick:()=>{this.loadConversationSummary()},id:"ai-conversation-summary",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});return a.push(l),a}}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.user=e.user,this.group=e.group,this.unreadMessageCount=e.unreadMessageCount??0,this.unreadMessageCount>(this.configuration?.unreadMessageThreshold??30)&&this.loadConversationSummary()}))}}class Bt extends Pe{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Mt(e,this.configuration)))}getExtensionId(){return"conversation-summary"}}const Lt=(e,t)=>({display:"flex",width:e?.width||"100%",height:e?.height||"100%",justifyContent:"center",alignItems:"center",minHeight:"50px",background:e?.background||t?.palette.getBackground(),borderRadius:e?.borderRadius||"8px"}),Ut={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",overflow:"auto",height:"100%"},Rt=(e,t)=>({replyTextFont:t?.textFont||n.fontHelper(e.typography.caption1),replyTextColor:t?.textColor||e?.palette.getAccent(),replyBackground:t?.textBackground||"inherit",boxShadow:`0px 0px 1px ${e?.palette.getAccent600()}`,background:t?.background||"inherit",border:t?.textBorder||"none",borderRadius:t?.textBorderRadius||"8px",display:"flex",justifyContent:"flex-start"});function Pt(e,t){return{height:"24px",width:"24px",buttonIconTint:e?.backIconTint||t?.palette.getPrimary()||"",border:"none",borderRadius:"8px",background:"transparent",display:"flex",justifyContent:"flex-start"}}function Ot(e,t){return{display:"flex",justifyContent:"space-between",alignItems:"center",font:e?.titleFont||n.fontHelper(t.typography.text2),color:e?.titleColor||t?.palette.getAccent()}}const jt={title:n.localize("SUGGEST_A_REPLY"),getSmartRepliesCallback:void 0,editReplyCallback:void 0,closeCallback:void 0,backCallback:void 0,configuration:void 0},Vt=De({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}}),Gt=De({tagName:"cometchat-ai-card",elementClass:r.CometChatAICard,react:t}),Ht=e=>{const[o,r]=t.useState(n.States.loading),[s,i]=t.useState(null),{theme:a}=t.useContext(R),l=n.localize("SOMETHING_WRONG"),c=n.localize("NO_MESSAGES_FOUND"),C=n.localize("GENERATING_REPLIES");return t.useEffect((()=>{r(n.States.loading),e&&e.getSmartRepliesCallback&&e.getSmartRepliesCallback(a).then((async t=>{t?(r(n.States.loaded),i(await async function(t){return new Promise(((n,o)=>{try{let r=e.configuration?.customView;if(!r){let o=[];Object.keys(t).forEach((e=>{t[e]&&""!==t[e]&&o.push(t[e])}));let r=d.jsxs("div",{style:{display:"flex",flexDirection:"column",padding:"10px",boxSizing:"border-box"},children:[d.jsxs("div",{style:Ot(e.configuration?.smartRepliesStyle,a),children:[d.jsx("div",{children:d.jsx(Y,{iconURL:rt,onClick:()=>e.backCallback?e.backCallback():null,buttonStyle:Pt(e.configuration?.smartRepliesStyle,a)})}),d.jsx("div",{children:e.title}),d.jsx("div",{style:{flex:.2}})]}),d.jsx(Vt,{smartReplyStyle:Rt(a,e.configuration?.smartRepliesStyle),replies:o,ccReplyClicked:t=>{e&&e.editReplyCallback&&e.editReplyCallback(t?.detail?.reply),e&&e.closeCallback&&e.closeCallback()},closeIconURL:""},"smart-replies")]});return n(r)}e.configuration?.customView(t,e?.closeCallback,e?.backCallback).then((e=>n(e))).catch((e=>o(e)))}catch(e){o(e)}}))}(t))):r(n.States.empty)})).catch((e=>{r(n.States.error)}))}),[]),d.jsx("div",{className:"slideable-container",style:Lt(e?.configuration?.smartRepliesStyle,a),children:d.jsxs("div",{style:Ut,children:[o===n.States.loaded?d.jsx("div",{style:{height:"100%"},children:s}):null,o!==n.States.loaded?function(){let t=null;switch(o){case n.States.loading:t=function(){let t=e.configuration?.loadingStateView;return d.jsx(Gt,{state:n.States.loading,style:e.configuration?.smartRepliesStyle,loadingIconURL:e.configuration?.loadingIconURL||xt,loadingStateText:C,children:t?d.jsx("div",{slot:"loadingView",children:d.jsx(t,{})}):null})}();break;case n.States.error:t=function(){let t=e.configuration?.errorStateView;return d.jsx(Gt,{state:n.States.error,style:e.configuration?.smartRepliesStyle,errorIconURL:e.configuration?.errorIconURL||At,errorStateText:l,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();break;case n.States.empty:t=function(){let t=e.configuration?.emptyStateView;return d.jsx(Gt,{state:n.States.empty,style:e.configuration?.smartRepliesStyle,emptyIconURL:e.configuration?.emptyIconURL||mt,emptyStateText:c,children:t?d.jsx("div",{slot:"errorView",children:d.jsx(t,{})}):null})}();case n.States.loaded:}return t}():null]})})};Ht.defaultProps=jt;class Qt extends Oe{constructor(e,t){super(e),this.theme=new n.CometChatTheme({}),this.isModalClosed=!0,this.childRefCallback=e=>{this.buttonRef=e},this.getSmartReplies=e=>(this.theme=e??new n.CometChatTheme({}),new Promise((async(e,t)=>{try{let t,o=this.user?this.user?.getUid():this.group?.getGuid(),r=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group;this.configuration?.apiConfiguration&&(t=await(this.configuration?.apiConfiguration(this.user,this.group)));return e(await s.CometChat.getSmartReplies(o,r,t||{}))}catch(e){t(e)}}))),this.newDataSource=e,this.configuration=t,setTimeout((()=>{this.addMessageListener()}),1e3)}getId(){return"aismartreplies"}editReply(e){n.CometChatUIEvents.ccComposeMessage.next(e)}closeIfMessageReceived(e){e?.getReceiverId()===this.loggedInUser?.getUid()&&this.closeCallback&&(this.isModalClosed||(this.closeCallback(),this.isModalClosed=!0))}getAIOptions(e,t,o,r,s){if(this.user=e,this.group=t,r?.parentMessageId)return super.getAIOptions(e,t,o,r,s);{let i;s&&(i={titleColor:this.configuration?.smartRepliesStyle?.buttonTextColor||s?.listItemTextColor,titleFont:this.configuration?.smartRepliesStyle?.buttonTextFont||s?.listItemTextFont,background:this.configuration?.smartRepliesStyle?.buttonBackground||s?.listItemBackground});const a=super.getAIOptions(e,t,o,r,s);let l=new n.CometChatActionsView({title:n.localize("SUGGEST_A_REPLY"),customView:e=>(this.isModalClosed=!1,this.closeCallback=e?.closePopover,d.jsx(Ht,{title:n.localize("SUGGEST_A_REPLY"),configuration:this.configuration,getSmartRepliesCallback:this.getSmartReplies,editReplyCallback:this.editReply,closeCallback:e.closePopover,backCallback:e.backAction})),id:"ai-smart-replies",iconURL:"",iconTint:"",titleColor:i?.titleColor,titleFont:i?.titleFont,background:i?.background});return a.push(l),a}}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)})),n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{this.closeIfMessageReceived(e)}))}}class Nt extends Pe{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Qt(e,this.configuration)))}getExtensionId(){return"smart-replies"}}const Kt={resizeIconHoverText:n.localize("RESIZE"),sessionID:"",minimizeIconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2019.2V13.8H4.80005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.8%204.8V10.2H19.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",maximizeIconURL:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%208.4V3H15.6%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3%2015.6V21H8.4%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",callSettingsBuilder:void 0,ongoingCallStyle:{maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"grey",minHeight:"400px",minWidth:"400px",minimizeIconTint:"white",maximizeIconTint:"white"},onError:e=>{console.log(e)},callWorkflow:n.CallWorkflow.defaultCalling},zt=e=>{const[o,i]=t.useState(null),a=t.useRef(null),{resizeIconHoverText:l,sessionID:c,minimizeIconURL:C,maximizeIconURL:g,ongoingCallStyle:u,callSettingsBuilder:p,onError:h,callWorkflow:m}=e,A=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)h?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);h?.(n)}}),[h]),x=t.useCallback((()=>{if(p)return p;{let e=!1;return(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{m===n.CallWorkflow.defaultCalling&&(r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null))},onCallEndButtonPressed:()=>{m===n.CallWorkflow.defaultCalling?s.CometChat.endCall(c).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e)})).catch((e=>{A(e)})):(n.CometChatCallEvents.ccCallEnded.next(null),r.CometChatUIKitCalls.endSession())},onError:e=>{A(e)}})).build()}}),[p,m,A,c]),b=t.useCallback((()=>{if(o){const e=o.getAuthToken();r.CometChatUIKitCalls.generateToken(c,e).then((e=>{r.CometChatUIKitCalls.startSession(e?.token,x(),a.current)}),(e=>{A(e)}))}else s.CometChat.getLoggedinUser().then((e=>{const t=e.getAuthToken();r.CometChatUIKitCalls.generateToken(c,t).then((e=>{r.CometChatUIKitCalls.startSession(e?.token,x(),a.current)}),(e=>{A(e)}))}))}),[c,x,o,A]);return function(e,n,o){t.useEffect((()=>{Xn.getLoggedinUser().then((t=>{t&&e(t)}))}),[e]),t.useEffect((()=>{""!==n&&o()}),[n,o])}(i,c,b),""!==c?d.jsx("cometchat-callscreen-wrapper",{callscreenStyle:JSON.stringify(u),resizeIconHoverText:l,minimizeIconURL:C,maximizeIconURL:g,sessionID:c,children:d.jsx("div",{id:"cc-callscreen_ref",style:{width:"100%",height:"100%",inset:"0"},className:"cc-callscreen__view",ref:a})}):d.jsx(d.Fragment,{})};zt.defaultProps=Kt;const Jt=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius,display:"flex",justifyContent:"center"}),Yt={width:"360px",height:"581px",titleTextFont:"700 22px Inter",titleTextColor:"RGB(20, 20, 20)",subtitleTextFont:"400 15px Inter",subtitleTextColor:"RGBA(20, 20, 20, 0.58)",borderRadius:"8px"},_t={height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},Wt=e=>new r.CallButtonsStyle({width:"100%",height:"100%",background:"transparent",border:"none",borderRadius:"0",voiceCallIconTint:e.palette.getPrimary(),videoCallIconTint:e.palette.getPrimary(),voiceCallIconTextFont:n.fontHelper(e.typography.caption1),videoCallIconTextFont:n.fontHelper(e.typography.caption1),voiceCallIconTextColor:e.palette.getPrimary(),videoCallIconTextColor:e.palette.getPrimary(),buttonPadding:"8px 32px",buttonBackground:e.palette.getAccent100(),buttonBorder:"0",buttonBorderRadius:"8px"}),Zt=e=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:e.palette.getAccent900(),maximizeIconTint:e.palette.getAccent900()});const Xt=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius}),qt=e=>({textFont:e?.subtitleTextFont,textColor:e?.subtitleTextColor}),$t={height:"fit-content",width:"fit-content",buttonTextFont:"400 12px Inter",buttonTextColor:"RGBA(20, 20, 20, 0.58)",borderRadius:"8px",border:"none",buttonIconTint:"white",background:"",iconBackground:"red"},en={height:"100%",width:"100%",border:"inherite",borderRadius:"inherite",background:"transparent",titleFont:"700 22px Inter",titleColor:"black"},tn=e=>new o.AvatarStyle({borderRadius:"50%",width:"180px",height:"180px",border:`1px solid ${e.palette.getAccent100()}`,backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),nn=e=>new r.OutgoingCallStyle({width:"100%",height:"100%",background:e.palette.getBackground(),border:"none",borderRadius:"0",titleTextFont:n.fontHelper(e.typography.title1),titleTextColor:e.palette.getAccent(),subtitleTextFont:n.fontHelper(e.typography.subtitle1),subtitleTextColor:e.palette.getAccent600(),declineButtonTextFont:n.fontHelper(e.typography.caption1),declineButtonTextColor:e.palette.getAccent600(),declineButtonIconTint:e.palette.getAccent("dark"),declineButtonIconBackground:e.palette.getError()});var on="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const rn=e=>{const{call:i,disableSoundForCalls:a=!1,customSoundForCalls:l="",declineButtonText:c=n.localize("CANCEL"),declineButtonIconURL:C=on,customView:g=null,onError:u=(e=>{console.log(e)}),avatarStyle:p=new o.AvatarStyle({borderRadius:"50%",width:"180px",height:"180px"}),outgoingCallStyle:h=new r.OutgoingCallStyle({width:"100%",height:"100%",titleTextFont:"700 22px Inter",titleTextColor:"RGB(20, 20, 20)",subtitleTextFont:"400 15px Inter",subtitleTextColor:"RGBA(20, 20, 20, 0.58)",declineButtonTextFont:"400 12px Inter",declineButtonTextColor:"RGBA(20, 20, 20, 0.58)",declineButtonIconTint:"white",declineButtonIconBackground:"red"}),onCloseClicked:m=(()=>{})}=e,{theme:A}=t.useContext(R),x=n.IconButtonAlignment.top,b=t.useRef(p),y=t.useRef(h),w=t.useRef($t),f=t.useRef(null),D=t.useRef(null);f.current=i,b.current={...tn(A),...b?.current},y.current={...nn(A),...y?.current},w.current=(e=>({height:"fit-content",width:"fit-content",buttonTextFont:e?.declineButtonTextFont,buttonTextColor:e?.declineButtonTextColor,borderRadius:"8px",border:"none",buttonIconTint:e?.declineButtonIconTint,background:"",iconBackground:e?.declineButtonIconBackground}))(y?.current),en.titleColor=y?.current?.titleTextColor,en.titleFont=y?.current?.titleTextFont;let E=n.localize("CALLING");const v=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)u(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);u(n)}}),[u]),I=t.useCallback((()=>{try{r.CometChatSoundManager.pause(),m&&m()}catch(e){v(e)}}),[m,v]),S=t.useCallback((()=>{try{a||(l?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall,l):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall))}catch(e){v(e)}}),[a,l,v]);return function(e,n,o,s){t.useEffect((()=>()=>{r.CometChatSoundManager.pause()}),[]),t.useEffect((()=>(setTimeout((()=>{e()})),()=>{r.CometChatSoundManager.pause()})),[n,e]),t.useEffect((()=>{const e=s.current;if(e)return e.addEventListener("cc-button-clicked",o),()=>{e.removeEventListener("cc-button-clicked",o)}}),[o,s])}(S,i,I,D),d.jsx(d.Fragment,{children:d.jsx("div",{className:"cc-outgoingcall__wrapper",style:Xt(y?.current),children:g?d.jsx("div",{className:"cc-outgoingcall__custom-view",children:g}):f.current?d.jsxs("cometchat-card",{title:f.current?.getReceiver()?.getName(),cardStyle:JSON.stringify(en),avatarName:f.current?.getReceiver()?.getName(),avatarURL:f.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user?f.current?.getReceiver()?.getAvatar():f.current?.getReceiver()?.getIcon(),avatarStyle:JSON.stringify(b?.current),children:[d.jsx("cometchat-label",{slot:"subtitleView",labelStyle:JSON.stringify(qt(y?.current)),text:E,children:" "}),d.jsx("div",{slot:"bottomView",children:d.jsx("cometchat-icon-button",{ref:D,text:c,iconURL:C,alignment:x,buttonStyle:JSON.stringify(w?.current)})})]}):null})})};const sn={voiceCallIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",voiceCallIconText:n.localize("VOICE_CALL"),voiceCallIconHoverText:n.localize("VOICE_CALL"),videoCallIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",videoCallIconText:n.localize("VIDEO_CALL"),videoCallIconHoverText:n.localize("VIDEO_CALL"),callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent"},onVoiceCallClick:void 0,onVideoCallClick:void 0,onError:e=>{console.log(e)}},an=e=>{const{user:o,group:i,voiceCallIconURL:a,voiceCallIconText:l,voiceCallIconHoverText:c,videoCallIconURL:C,videoCallIconText:g,videoCallIconHoverText:u,callButtonsStyle:p,onVoiceCallClick:h,onVideoCallClick:m,onError:x}=e,{theme:b}=t.useContext(R),[y,w]=t.useState(null),f=t.useRef(null);f.current={...Wt(b),...p};const D=t.useRef(null);var E;D.current=(E=f?.current,{buttonIconTint:E?.voiceCallIconTint??"RGB(51, 153, 255)",buttonTextFont:E?.voiceCallIconTextFont??"400 12px Inter",buttonTextColor:E?.voiceCallIconTextColor??"RGB(51, 153, 255)",padding:E?.buttonPadding??"8px 32px",background:E?.buttonBackground??"transparent",border:E?.border??"none",borderRadius:E?.buttonBorderRadius??"0",..._t});const v=t.useRef(null);v.current=(e=>({buttonIconTint:e?.videoCallIconTint??"RGB(51, 153, 255)",buttonTextFont:e?.videoCallIconTextFont??"400 12px Inter",buttonTextColor:e?.videoCallIconTextColor??"RGB(51, 153, 255)",padding:e?.buttonPadding??"8px 32px",background:e?.buttonBackground??"transparent",border:e?.border??"none",borderRadius:e?.buttonBorderRadius??"0",..._t}))(f?.current);const[I,S]=t.useState(o),[F,k]=t.useState(i),[T,M]=t.useState(!1),[B,L]=t.useState(!1),[U,P]=t.useState(!1),O=t.useRef(null),j=t.useRef(null),V=t.useRef(null),G=t.useRef(""),H=A(h),Q=A(m);let N="callbuttons_"+(new Date).getTime();const K=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)x?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);x?.(n)}}),[x]),z=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallRejected.subscribe((()=>{P(!1)})),t=n.CometChatCallEvents.ccOutgoingCall.subscribe((()=>{P(!0)})),o=n.CometChatCallEvents.ccCallEnded.subscribe((()=>{P(!1),V.current=null,G.current="",M(!1),L(!1)}));return()=>{try{o?.unsubscribe(),e?.unsubscribe(),t?.unsubscribe()}catch(e){K(e)}}}catch(e){K(e)}}),[K]),J=t.useCallback((()=>{try{s.CometChat.addCallListener(N,new s.CometChat.CallListener({onIncomingCallReceived:()=>{P(!0)},onIncomingCallCancelled:()=>{P(!1)},onOutgoingCallRejected:()=>{L(!1),P(!1),V.current=null,G.current=""},onOutgoingCallAccepted:e=>{if(e.getSender()?.getUid()===y?.getUid()||e.getSessionId()!==V.current?.getSessionId())return L(!1),P(!1),V.current=null,void(G.current="");L(!1),M(!0),P(!0),V.current=e,G.current=e.getSessionId()}}))}catch(e){K(e)}}),[K,N]),Y=t.useCallback((()=>{try{s.CometChat.removeCallListener(N)}catch(e){K(e)}}),[K,N]),_=()=>{P(!1),V.current=null,G.current="",M(!1),L(!1)};const W=t.useCallback((e=>{try{const t=I?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,o=I?I?.getUid():F?.getGuid(),r=new s.CometChat.Call(o,e,t);s.CometChat.initiateCall(r).then((e=>{V.current=e,L(!0),n.CometChatCallEvents.ccOutgoingCall.next(e)}),(e=>{K(e)}))}catch(e){K(e)}}),[I,F,K]),Z=t.useCallback((()=>{try{I&&W(n.CometChatUIKitConstants.MessageTypes.audio)}catch(e){K(e)}}),[I,W,K]),X=t.useCallback((()=>{try{const e=I?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,t=I?I?.getUid():F?.getGuid(),o=G.current,i={sessionID:o,sessionId:o,callType:n.CometChatUIKitConstants.MessageTypes.video},a=n.CometChatUIKitConstants.calls.meeting,l=`group_${o}`,c=new s.CometChat.CustomMessage(t,e,a,i);c.setMetadata({incrementUnreadCount:!0}),c.shouldUpdateConversation(!0),c.setSender(y),c.setConversationId(l),c.sentAt=r.CometChatUIKitUtility.getUnixTimestamp(),c.muid=r.CometChatUIKitUtility.ID(),n.CometChatMessageEvents.ccMessageSent.next({message:c,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(c).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(e=>{K(e)}))}catch(e){K(e)}}),[I,F,y,K]),q=t.useCallback((()=>{try{I&&W(n.CometChatUIKitConstants.MessageTypes.video),F&&(G.current=F?.getGuid(),X(),M(!0))}catch(e){K(e)}}),[I,F,X,K,W]),$=t.useCallback((()=>{const e=V.current;if(e)try{r.CometChatSoundManager.pause(),s.CometChat.rejectCall(e.getSessionId(),n.CometChatUIKitConstants.calls.cancelled).then((e=>{P(!1),L(!1),n.CometChatCallEvents.ccCallRejected.next(e),V.current=null}),(e=>{K(e)})),L(!1)}catch(e){K(e)}}),[K]),ee=t.useCallback((()=>{if(D.current)return D.current.buttonIconTint=((e,t,n)=>e?n.palette.getAccent600():t?.voiceCallIconTint)(U,f.current??void 0,b),D.current}),[U,b]),te=t.useCallback((()=>{if(v.current)return v.current.buttonIconTint=((e,t,n)=>e?n.palette.getAccent600():t?.videoCallIconTint)(U,f.current??void 0,b),v.current}),[U,b]);!function(e,n,o,r,i,a,l,c,C,d,g,u,p,h,m,A,x){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}),(e=>{a(e)}))}),[n,a]),t.useEffect((()=>{let t;return e&&(t=i(),l()),()=>{t?.(),c()}}),[e,l,c,i]),t.useEffect((()=>{o&&(C(o),d(null))}),[o,C,d]),t.useEffect((()=>{r&&(C(null),d(r))}),[r,C,d]),t.useEffect((()=>{const e=g.current,t=u.current;if(!e&&!t)return;const n=()=>{const e=A.current;e?e():p()},o=()=>{const e=x.current;e?e():h()};return m?(e?.removeEventListener("cc-button-clicked",n),t?.removeEventListener("cc-button-clicked",o)):(e?.addEventListener("cc-button-clicked",n),t?.addEventListener("cc-button-clicked",o)),()=>{e?.removeEventListener("cc-button-clicked",n),t?.removeEventListener("cc-button-clicked",o)}}),[m,p,h,A,x,g,u])}(y,w,o,i,z,K,J,Y,S,k,O,j,Z,q,U,H,Q);const ne=U?{disabled:!0}:{};return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"cc-call-buttons__wrapper",style:Jt(f.current),children:d.jsxs("div",{className:"cc-call-buttons",style:{display:"flex",gap:"16px"},children:[I?d.jsx("cometchat-button",{...ne,buttonStyle:JSON.stringify(ee()),text:l,hoverText:c,iconURL:a,ref:O}):null,I||F?d.jsx("cometchat-button",{...ne,buttonStyle:JSON.stringify(te()),text:g,hoverText:u,iconURL:C,ref:j}):null]})}),T&&null!=G.current?d.jsx(zt,{ongoingCallStyle:Zt(b),sessionID:G.current,callSettingsBuilder:function(){let e=V.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio;const t=G.current;return(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{V.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&(r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null),_())},onCallEndButtonPressed:()=>{V.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user?s.CometChat.endCall(t).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e),_()})).catch((e=>{K(e)})):_()},onError:e=>{K(e)}})).build()}()}):null,B&&V.current?d.jsx("cometchat-backdrop",{children:d.jsx(rn,{onCloseClicked:$,outgoingCallStyle:Yt,call:V.current})}):null]})};an.defaultProps=sn;const ln=Object.freeze({meeting:"meeting",ongoing:"ongoing",ended:"ended",initiated:"initiated",cancelled:"cancelled",rejected:"rejected",unanswered:"unanswered"}),cn=De({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t});class Cn extends Oe{constructor(e){super(e),this.loggedInUser=null,this.addLoginListener(),this.getLoggedInUser()}addLoginListener(){s.CometChat.addLoginListener("login_listener",new s.CometChat.LoginListener({logoutSuccess:()=>{try{let e=s.CometChat.getActiveCall();e&&s.CometChat.endCall(e.getSessionId())}catch(e){console.log("error in endCall on logout",e)}}}))}async getLoggedInUser(){this.loggedInUser=await s.CometChat.getLoggedinUser()}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(ln.meeting)||e.push(ln.meeting),e.includes(n.CometChatUIKitConstants.MessageTypes.audio)||e.push(n.CometChatUIKitConstants.MessageTypes.audio),e.includes(n.CometChatUIKitConstants.MessageTypes.video)||e.push(n.CometChatUIKitConstants.MessageTypes.video),e}getId(){return"calling"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.call)||e.push(n.CometChatUIKitConstants.MessageCategory.call),e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateTypeExist(e,t){return e.some((e=>e.type===t))}checkIfTemplateCategoryExist(e,t){return e.some((e=>e.category===t))}getAllMessageTemplates(e,t){this.theme=e;const o=super.getAllMessageTemplates(e,t);return this.checkIfTemplateTypeExist(o,ln.meeting)||o.push(this.getDirectCallTemplate(this.theme)),this.checkIfTemplateCategoryExist(o,n.CometChatUIKitConstants.MessageCategory.call)||o.push(...this.getDefaultCallTemplate(this.theme)),o}getDirectCallTemplate(e){return new n.CometChatMessageTemplate({type:ln.meeting,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>t.getDeletedAt()?super.getDeleteMessageBubble(t,this.theme):this.getDirectCallMessageBubble(t,n,e),options:(e,t,n,o)=>Re.getDataSource().getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getDefaultCallTemplate(e){return[new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.audio,category:n.CometChatUIKitConstants.MessageCategory.call,contentView:(t,n)=>this.getDefaultAudioCallMessageBubble(t,n,e),bottomView:(e,t)=>super.getBottomView(e,t)}),new n.CometChatMessageTemplate({type:n.CometChatUIKitConstants.MessageTypes.video,category:n.CometChatUIKitConstants.MessageCategory.call,contentView:(t,n)=>this.getDefaultVideoCallMessageBubble(t,n,e),bottomView:(e,t)=>super.getBottomView(e,t)})]}getCallBubbleStyle(e,t){return e===n.MessageBubbleAlignment.left?{titleFont:n.fontHelper(t.typography.text2),titleColor:t.palette.getAccent(),iconTint:t.palette.getPrimary(),buttonTextFont:n.fontHelper(t.typography.text2),buttonTextColor:t.palette.getAccent("dark"),buttonBackground:t.palette.getPrimary(),width:"240px",borderRadius:"12px"}:{titleFont:n.fontHelper(t.typography.text2),titleColor:t.palette.getAccent("dark"),iconTint:t.palette.getAccent("dark"),buttonTextFont:n.fontHelper(t.typography.text2),buttonTextColor:t.palette.getPrimary(),buttonBackground:t.palette.getAccent("dark"),width:"240px",background:t.palette.getPrimary(),borderRadius:"12px"}}getSessionId(e){let t=e.getData();return t?.customData?.sessionID}getCallBubbleTitle(e){return e.getSender()&&e.getSender().getUid()!==this.loggedInUser?.getUid()?`${e.getSender().getName()} ${n.localize("INITIATED_GROUP_CALL")}`:n.localize("YOU_INITIATED_GROUP_CALL")}getDirectCallMessageBubble(e,r,s){let i=n.DocumentIconAlignment.left,a=this.getCallBubbleStyle(r,s),l=this.getSessionId(e),c=this.getCallBubbleTitle(e),C=n.localize("JOIN");const g=De({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});return d.jsx(g,{hideSeparator:!0,iconAlignment:i,documentStyle:a,URL:l,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",title:c,buttonText:C,ccClicked:()=>{this.startDirectCall(l,this.theme||s)}})}startDirectCall(e,t){const r=new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:t.palette.getAccent900(),maximizeIconTint:t.palette.getAccent900()}),s=d.jsx(zt,{ongoingCallStyle:r,sessionID:e,callWorkflow:n.CallWorkflow.directCalling});n.CometChatUIEvents.ccShowOngoingCall.next({child:s})}callStatusStyle(e,t){return this.loggedInUser?{buttonTextFont:n.fontHelper(t.typography.subtitle2),buttonTextColor:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?t.palette.getError():t.palette.getAccent600(),borderRadius:"10px",border:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?"1px solid RGBA(255, 59, 48, 0.2)":`1px solid ${t.palette.getAccent100()}`,buttonIconTint:r.CallingDetailsUtils.isMissedCall(e,this.loggedInUser)?t.palette.getError():t.palette.getAccent600(),background:"transparent",iconBackground:"transparent",padding:"2px 12px 2px 0",gap:"0",height:"25px",justifyContent:"center"}:{}}getCallActionMessage(e){return r.CallingDetailsUtils.getCallStatus(e,this.loggedInUser)}getDefaultAudioCallMessageBubble(e,t,n){const o=this.callStatusStyle(e,n),r=this.getCallActionMessage(e);return d.jsx(cn,{disabled:!0,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:o,text:r})}getDefaultVideoCallMessageBubble(e,t,n){const o=this.callStatusStyle(e,n),r=this.getCallActionMessage(e);return d.jsx(cn,{disabled:!0,iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:o,text:r})}getLastConversationMessage(e,t,o){let i="";if(e.getLastMessage()&&e.getLastMessage().category==n.CometChatUIKitConstants.MessageCategory.call){let n=e.getLastMessage();i=r.CallingDetailsUtils.getCallStatus(n,t)}else if(e?.getLastMessage()&&e.getLastMessage().type==n.CometChatUIKitConstants.calls.meeting){let r=e.getLastMessage();i=r.getSender()&&r?.getSender()?.getUid()!=t.getUid()?`${r.getSender().getName()} ${n.localize("INITIATED_GROUP_CALL")}`:n.localize("YOU_INITIATED_GROUP_CALL");let a=e.getLastMessage();a&&a.getMentionedUsers().length&&a instanceof s.CometChat.TextMessage&&o&&!o.disableMentions&&(i=this.getMentionsFormattedText(a,i,o))}else i=super.getLastConversationMessage(e,t,o);return i}getAuxiliaryHeaderMenu(e,t){let n=[],o=d.jsx(an,{user:e,group:t,callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent",buttonPadding:"0",buttonBackground:"transparent",buttonBorder:"0 4px",buttonBorderRadius:"8px"},voiceCallIconText:"",videoCallIconText:""},"callbuttons");return n.push(o),n}}class dn{enable(){s.CometChat.isExtensionEnabled(this.getExtensionId()).then((e=>{e&&this.addExtension()}),(e=>{}))}}class gn extends dn{enable(){Re.enable((e=>new Cn(e)))}addExtension(){Re.enable((e=>new Cn(e)))}getExtensionId(){return"calling"}}var un="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Document%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Document%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.019664%2C11.0497498%20C20.2968766%2C11.0497498%2019.6037718%2C11.3372517%2019.0931699%2C11.8488579%20L11.9722287%2C18.9696649%20C11.8675218%2C19.07437%2011.7961523%2C19.207727%2011.7671152%2C19.3529288%20L11.0671938%2C22.8529288%20C10.9622469%2C23.3777219%2011.4249469%2C23.8404018%2011.9497354%2C23.7354323%20L15.4493424%2C23.0354323%20C15.5945931%2C23.0063789%2015.7279879%2C22.9349647%2015.8327036%2C22.830196%20L22.9504376%2C15.7088627%20C24.0147495%2C14.6469387%2024.0170552%2C12.9221237%2022.9548584%2C11.8566265%20L22.9136114%2C11.8181375%20C22.4355563%2C11.3372517%2021.7424514%2C11.0497498%2021.019664%2C11.0497498%20Z%20M21.019664%2C12.5497498%20C21.2977603%2C12.5497498%2021.5660731%2C12.6445675%2021.7814054%2C12.816289%20L21.9254022%2C12.9466625%20L22.00838%2C13.0404351%20C22.3677898%2C13.4966868%2022.3370963%2C14.2018865%2021.890239%2C14.6477416%20L14.931%2C21.609%20L12.758%2C22.043%20L13.193%2C19.869%20L20.1543459%2C12.9090017%20C20.3840891%2C12.6788071%2020.6952184%2C12.5497498%2021.019664%2C12.5497498%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.3982707%2C1.25%20C18.5339913%2C1.25%2019.463993%2C2.13072139%2019.5427157%2C3.24645803%20L19.5481135%2C3.4%20L19.5481135%2C9.7%20C19.5481135%2C10.1142136%2019.2123271%2C10.45%2018.7981135%2C10.45%20C18.4184177%2C10.45%2018.1046226%2C10.1678461%2018.0549601%2C9.80177056%20L18.0481135%2C9.7%20L18.0481135%2C3.4%20C18.0481135%2C3.07363278%2017.8076479%2C2.80347042%2017.4942955%2C2.75704724%20L17.3982707%2C2.75%20L3.39984279%2C2.75%20C3.07358878%2C2.75%202.80346372%2C2.99049261%202.75704639%2C3.30394351%20L2.75%2C3.4%20L2.75%2C18.8%20C2.75%2C19.1263672%202.99046561%2C19.3965296%203.30381804%2C19.4429528%20L3.39984279%2C19.45%20L8.99921396%2C19.45%20C9.41342753%2C19.45%209.74921396%2C19.7857864%209.74921396%2C20.2%20C9.74921396%2C20.5796958%209.46706008%2C20.893491%209.10098452%2C20.9431534%20L8.99921396%2C20.95%20L3.39984279%2C20.95%20C2.26412221%2C20.95%201.33412057%2C20.0692786%201.25539778%2C18.953542%20L1.25%2C18.8%20L1.25%2C3.4%20C1.25%2C2.26423244%202.13062249%2C1.33412985%203.24630755%2C1.25539838%20L3.39984279%2C1.25%20L17.3982707%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C5.45%20C15.0127987%2C5.45%2015.3485851%2C5.78578644%2015.3485851%2C6.2%20C15.3485851%2C6.57969577%2015.0664313%2C6.89349096%2014.7003557%2C6.94315338%20L14.5985851%2C6.95%20L8.99921396%2C6.95%20C8.5850004%2C6.95%208.24921396%2C6.61421356%208.24921396%2C6.2%20C8.24921396%2C5.82030423%208.53136785%2C5.50650904%208.89744341%2C5.45684662%20L8.99921396%2C5.45%20L14.5985851%2C5.45%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C9.65%20C15.0127987%2C9.65%2015.3485851%2C9.98578644%2015.3485851%2C10.4%20C15.3485851%2C10.7796958%2015.0664313%2C11.093491%2014.7003557%2C11.1431534%20L14.5985851%2C11.15%20L6.19952838%2C11.15%20C5.78531482%2C11.15%205.44952838%2C10.8142136%205.44952838%2C10.4%20C5.44952838%2C10.0203042%205.73168226%2C9.70650904%206.09775782%2C9.65684662%20L6.19952838%2C9.65%20L14.5985851%2C9.65%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.1987423%2C13.85%20C13.6129559%2C13.85%2013.9487423%2C14.1857864%2013.9487423%2C14.6%20C13.9487423%2C14.9796958%2013.6665885%2C15.293491%2013.3005129%2C15.3431534%20L13.1987423%2C15.35%20L6.19952838%2C15.35%20C5.78531482%2C15.35%205.44952838%2C15.0142136%205.44952838%2C14.6%20C5.44952838%2C14.2203042%205.73168226%2C13.906509%206.09775782%2C13.8568466%20L6.19952838%2C13.85%20L13.1987423%2C13.85%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const pn=De({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});class hn extends Oe{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(r.CollaborativeDocumentConstants.extension_document)||e.push(r.CollaborativeDocumentConstants.extension_document),e}getId(){return"collaborativedocument"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.CollaborativeDocumentConstants.extension_document)||n.push(this.getDocumentTemplate(this.theme)),n}getDocumentTemplate(e){return new n.CometChatMessageTemplate({type:r.CollaborativeDocumentConstants.extension_document,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getDocumentContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getDocumentContentView(e,t){let o=n.DocumentIconAlignment.right,r=this.configuration?.getDocumentBubbleStyle(),s={titleFont:r?.titleFont||n.fontHelper(this.theme.typography.text2),titleColor:r?.titleColor||this.theme.palette.getAccent(),subtitleFont:r?.subtitleFont||n.fontHelper(this.theme.typography.subtitle2),subtitleColor:r?.subtitleColor||this.theme.palette.getAccent600(),iconTint:r?.iconTint||this.theme.palette.getAccent700(),buttonTextFont:r?.buttonTextFont||n.fontHelper(this.theme.typography.text2),buttonTextColor:r?.buttonTextColor||this.theme.palette.getPrimary(),buttonBackground:r?.buttonBackground||"transparent",separatorColor:r?.separatorColor||this.theme.palette.getAccent200()};const i=this.getDocumentURL(e),a=n.localize("COLLABORATIVE_DOCUMENT"),l=n.localize("OPEN_DOCUMENT"),c=n.localize("DRAW_DOCUMENT_TOGETHER");return d.jsx(pn,{iconURL:this.configuration?.getIconURL()?this.configuration?.getIconURL():un,title:a,URL:i,subtitle:c,buttonText:l,documentStyle:s,hideSeparator:!1,iconAlignment:o,ccClicked:this.launchCollaborativeDocument})}launchCollaborativeDocument(e){window.open(e,"","fullscreen=yes, scrollbars=auto")}getDocumentURL(e){try{if(e?.getData()){const t=e.getData();if(t?.metadata){const e=t?.metadata;if(r.CometChatUIKitUtility.checkHasOwnProperty(e,"@injected")){const t=e["@injected"];if(t?.extensions){const e=t.extensions;return e[r.CollaborativeDocumentConstants.document]?e[r.CollaborativeDocumentConstants.document].document_url:e[r.CollaborativeDocumentConstants.document].board_url}}}}}catch(e){console.log("error in fetching document url",e)}}getAttachmentOptions(e,t){if(t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle(),i=!!t?.user,a=i?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,l=i?t.user:t.group;const c=super.getAttachmentOptions(e,t);let C=new n.CometChatMessageComposerAction({id:r.CollaborativeDocumentConstants.document,title:n.localize("COLLABORATIVE_DOCUMENT"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():un,iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:()=>{s.CometChat.callExtension(r.CollaborativeDocumentConstants.document,r.CollaborativeDocumentConstants.post,r.CollaborativeDocumentConstants.v1_create,{receiver:l,receiverType:a}).then((e=>{}),(e=>{}))}});return c.push(C),c}}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.CollaborativeDocumentConstants.extension_document&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_DOCUMENT"):super.getLastConversationMessage(e,t,o)}}class mn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new hn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.document}}var An="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Whiteboard%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Whiteboard%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C1.25%20C4.2473527%2C1.25%202.65%2C2.77128829%202.65%2C4.66666667%20C2.65%2C6.56204505%204.2473527%2C8.08333333%206.2%2C8.08333333%20C8.1526473%2C8.08333333%209.75%2C6.56204505%209.75%2C4.66666667%20C9.75%2C2.77128829%208.1526473%2C1.25%206.2%2C1.25%20Z%20M6.2%2C2.75%20C7.3401473%2C2.75%208.25%2C3.61652638%208.25%2C4.66666667%20C8.25%2C5.71680695%207.3401473%2C6.58333333%206.2%2C6.58333333%20C5.0598527%2C6.58333333%204.15%2C5.71680695%204.15%2C4.66666667%20C4.15%2C3.61652638%205.0598527%2C2.75%206.2%2C2.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666667%20C6.57969577%2C7.91666667%206.89349096%2C8.19882055%206.94315338%2C8.56489611%20L6.95%2C8.66666667%20L6.95%2C14%20C6.95%2C14.4142136%206.61421356%2C14.75%206.2%2C14.75%20C5.82030423%2C14.75%205.50650904%2C14.4678461%205.45684662%2C14.1017706%20L5.45%2C14%20L5.45%2C8.66666667%20C5.45%2C8.2524531%205.78578644%2C7.91666667%206.2%2C7.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666673%20C3.47415406%2C7.91666673%201.25%2C10.0349087%201.25%2C12.6666667%20L1.25%2C15.3333333%20L1.25684662%2C15.4351039%20C1.30650904%2C15.8011795%201.62030423%2C16.0833333%202%2C16.0833333%20L2.725%2C16.083%20L3.3541005%2C22.0783194%20C3.39418895%2C22.4601142%203.71610639%2C22.75%204.1%2C22.75%20L8.3%2C22.75%20L8.40299648%2C22.7429615%20C8.74009489%2C22.6965339%209.00945546%2C22.4254056%209.0458995%2C22.0783194%20L9.674%2C16.083%20L10.4%2C16.0833333%20C10.8142136%2C16.0833333%2011.15%2C15.7475469%2011.15%2C15.3333333%20L11.15%2C12.6666667%20C11.15%2C10.0349087%208.92584594%2C7.91666673%206.2%2C7.91666673%20Z%20M6.39003599%2C9.42150275%20C8.21408216%2C9.514591%209.65%2C10.9396974%209.65%2C12.6666667%20L9.649%2C14.583%20L9%2C14.5833333%20L8.89700352%2C14.5903718%20C8.55990511%2C14.6367994%208.29054454%2C14.9079278%208.2541005%2C15.2550139%20L7.624%2C21.25%20L4.775%2C21.25%20L4.1458995%2C15.2550139%20L4.12814397%2C15.1533155%20C4.04676841%2C14.8229084%203.74899419%2C14.5833333%203.4%2C14.5833333%20L2.75%2C14.583%20L2.75%2C12.6666667%20C2.75%2C10.8801468%204.28665405%2C9.41666673%206.2%2C9.41666673%20L6.39003599%2C9.42150275%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.6%2C1.25%20C22.7281683%2C1.25%2023.6652093%2C2.09570502%2023.7445585%2C3.18354707%20L23.75%2C3.33333333%20L23.75%2C14.6666667%20C23.75%2C15.7752741%2022.8620097%2C16.6691795%2021.7525939%2C16.7448147%20L21.6%2C16.75%20L13.2%2C16.75%20C12.7857864%2C16.75%2012.45%2C16.4142136%2012.45%2C16%20C12.45%2C15.6203042%2012.7321539%2C15.306509%2013.0982294%2C15.2568466%20L13.2%2C15.25%20L21.6%2C15.25%20C21.9335897%2C15.25%2022.1978428%2C15.0272126%2022.2431318%2C14.7509728%20L22.25%2C14.6666667%20L22.25%2C3.33333333%20C22.25%2C3.04809641%2022.0160733%2C2.79937841%2021.6978472%2C2.75651429%20L21.6%2C2.75%20L11.8%2C2.75%20C11.3857864%2C2.75%2011.05%2C2.41421356%2011.05%2C2%20C11.05%2C1.62030423%2011.3321539%2C1.30650904%2011.6982294%2C1.25684662%20L11.8%2C1.25%20L21.6%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const xn=De({tagName:"cometchat-document-bubble",elementClass:o.CometChatDocumentBubble,react:t});class bn extends Oe{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getAllMessageTypes(){let e=super.getAllMessageTypes();return e.some((e=>e===r.CollaborativeWhiteboardConstants.extension_whiteboard))||e.push(r.CollaborativeWhiteboardConstants.extension_whiteboard),e}getId(){return"collaborativewhiteboard"}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.CollaborativeWhiteboardConstants.extension_whiteboard)||n.push(this.getWhiteBoardTemplate(this.theme)),n}getWhiteBoardTemplate(e){return new n.CometChatMessageTemplate({type:r.CollaborativeWhiteboardConstants.extension_whiteboard,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getWhiteboardContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>super.getBottomView(e,t)})}getWhiteboardContentView(e,t){let o=n.DocumentIconAlignment.right,r=this.configuration?.getWhiteboardBubbleStyle(),s={titleFont:r?.titleFont||n.fontHelper(this.theme.typography.text2),titleColor:r?.titleColor||this.theme.palette.getAccent(),subtitleFont:r?.subtitleFont||n.fontHelper(this.theme.typography.subtitle2),subtitleColor:r?.subtitleColor||this.theme.palette.getAccent600(),iconTint:r?.iconTint||this.theme.palette.getAccent700(),buttonTextFont:r?.buttonTextFont||n.fontHelper(this.theme.typography.text2),buttonTextColor:r?.buttonTextColor||this.theme.palette.getPrimary(),buttonBackground:r?.buttonBackground||"transparent",separatorColor:r?.separatorColor||this.theme.palette.getAccent200()};const i=this.getWhiteboardDocument(e),a=n.localize("COLLABORATIVE_WHITEBOARD"),l=n.localize("OPEN_WHITEBOARD"),c=n.localize("DRAW_WHITEBOARD_TOGETHER");return d.jsx(xn,{hideSeparator:!1,iconAlignment:o,iconURL:this.configuration?.getIconURL()?this.configuration?.getIconURL():An,title:a,URL:i,subtitle:c,buttonText:l,documentStyle:s,ccClicked:this.launchCollaborativeWhiteboardDocument})}launchCollaborativeWhiteboardDocument(e){window.open(e,"","fullscreen=yes, scrollbars=auto")}getWhiteboardDocument(e){try{if(e?.getData()){const t=e.getData();if(t?.metadata){const e=t?.metadata;if(r.CometChatUIKitUtility.checkHasOwnProperty(e,"@injected")){const t=e["@injected"];if(t?.extensions){const e=t.extensions;return e[r.CollaborativeWhiteboardConstants.whiteboard]?e[r.CollaborativeWhiteboardConstants.whiteboard].board_url:e[r.CollaborativeWhiteboardConstants.whiteboard].document_url}}}}}catch(e){console.log("error in getting whiteboard details",e)}}getAttachmentOptions(e,t){if(t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle(),i=!!t?.user,a=i?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,l=i?t.user:t.group;const c=super.getAttachmentOptions(e,t);let C=new n.CometChatMessageComposerAction({id:r.CollaborativeWhiteboardConstants.whiteboard,title:n.localize("COLLABORATIVE_WHITEBOARD"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():An,iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:()=>{s.CometChat.callExtension(r.CollaborativeWhiteboardConstants.whiteboard,r.CollaborativeWhiteboardConstants.post,r.CollaborativeWhiteboardConstants.v1_create,{receiver:l,receiverType:a}).then((e=>{}),(e=>{console.log("error in sending whiteboard",e)}))}});return c.push(C),c}}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.CollaborativeWhiteboardConstants.extension_whiteboard&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_WHITEBOARD"):super.getLastConversationMessage(e,t,o)}}class yn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new bn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.whiteboard}}const wn=De({tagName:"image-moderation",elementClass:r.ImageModeration,react:t,events:{CCShowDialog:"cc-show-dialog"}}),fn=De({tagName:"cometchat-backdrop",elementClass:o.CometChatBackdrop,react:t}),Dn=De({tagName:"cometchat-confirm-dialog",elementClass:o.CometChatConfirmDialog,react:t,events:{ccCancelClicked:"cc-cancel-clicked",ccConfirmClicked:"cc-confirm-clicked"}}),En=De({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t,events:{ccImageClicked:"cc-image-clicked"}}),vn=De({tagName:"cometchat-full-screen-viewer",elementClass:o.CometChatFullScreenViewer,react:t,events:{ccCloseClicked:"cc-close-clicked"}});class In extends Oe{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t,s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})).catch((e=>{console.error(e)}))}getId(){return"imagemoderation"}getImageMessageContentView(e,t,o){if(void 0!==this.loggedInUser?.getUid()&&this.loggedInUser?.getUid()===e?.getSender()?.getUid())return super.getImageMessageContentView(e,t,o);this.theme=o;let r=e.getMetadata();const s=this.getImageModerationStyle(o);let i=e.getAttachments()[0]?.getUrl()||"";Re.names.includes("thumbnailgeneration")&&r&&"object"==typeof r&&r.hasOwnProperty("@injected")&&r["@injected"].hasOwnProperty("extensions")&&r["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&r["@injected"].extensions["thumbnail-generation"].url_small&&(i=e.getMetadata()["@injected"].extensions["thumbnail-generation"].url_small);const a=d.jsx(vn,{URL:i,closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",fullScreenViewerStyle:{closeIconTint:"blue"},ccCloseClicked:()=>{n.CometChatUIEvents.ccHideDialog.next()}});return d.jsx(wn,{message:e,imageModerationStyle:s,CCShowDialog:e=>{this.showDialog(e)},children:d.jsx(En,{src:i,placeholderImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOU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zQxPnQCQ7mExyQEBzQxPnQvcF3xDdQF99wMB7BAU2cD7Co+IaD8QgOaOJ8gEXFNxyMR3BAE+cDLCq+4WA8ggOaOB9gUfENB+MRHNDE+QCLim84GI/ggCbOB1hUfMPBeAQHNHE+wKLiGw7GIzigifMBFhXfcDAewQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=",ccImageClicked:()=>{n.CometChatUIEvents.ccShowDialog.next({child:a,confirmCallback:null})}})})}showDialog(e){const t=this.getConfirmationModal(e);n.CometChatUIEvents.ccShowDialog.next({confirmCallback:e?.detail?.onConfirm,child:t})}getConfirmationModal(e){let t=this.configuration?.getBackDropStyle(),o=this.configuration?.getConfirmDialogSyle(),r={height:t?.height||"100%",width:t?.width||"100%",background:t?.background||"rgba(0, 0, 0, 0.5)",border:t?.border,borderRadius:t?.borderRadius},s=n.localize("SHOW_UNSAFE_CONTENT"),i=n.localize("YES"),a=n.localize("NO"),l={confirmButtonBackground:o?.confirmButtonBackground||this.theme.palette.getError(),cancelButtonBackground:o?.cancelButtonBackground||this.theme.palette.getSecondary(),confirmButtonTextColor:o?.confirmButtonTextColor||this.theme.palette.getAccent900("light"),confirmButtonTextFont:o?.confirmButtonTextFont||n.fontHelper(this.theme.typography.text2),cancelButtonTextColor:o?.cancelButtonTextColor||this.theme.palette.getAccent900("dark"),cancelButtonTextFont:o?.cancelButtonTextFont||n.fontHelper(this.theme.typography.text2),titleFont:o?.titleFont||n.fontHelper(this.theme.typography.title1),titleColor:o?.titleColor||this.theme.palette.getAccent(),messageTextFont:o?.messageTextFont||n.fontHelper(this.theme.typography.subtitle2),messageTextColor:o?.messageTextColor||this.theme.palette.getAccent600(),background:o?.background||this.theme.palette.getBackground(),height:o?.height||"100%",width:o?.width||"100%",border:o?.border||`1px solid ${this.theme.palette.getAccent100()}`,borderRadius:o?.borderRadius||"8px"};return d.jsx(fn,{backdropStyle:r,children:d.jsx(Dn,{title:"",messageText:s,cancelButtonText:a,confirmButtonText:i,confirmDialogStyle:l,ccCancelClicked:this.onCancelClicked,ccConfirmClicked:()=>{this.onConfirmClicked(e)}})})}onConfirmClicked(e){e?.detail?.onConfirm&&e?.detail?.onConfirm(),n.CometChatUIEvents.ccHideDialog.next()}onCancelClicked(){n.CometChatUIEvents.ccHideDialog.next()}getImageModerationStyle(e){let t=this.configuration?.getImageModerationStyle();return{filterColor:t?.filterColor||e.palette.getPrimary(),height:t?.height||"100%",width:t?.width||"100%",border:t?.border||"none",borderRadius:t?.borderRadius||"8px",warningTextColor:t?.warningTextColor||e.palette.getAccent("dark"),warningTextFont:t?.warningTextFont||n.fontHelper(e.typography.title2)}}}class Sn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new In(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.imageModeration}}const Fn=De({tagName:"link-preview",elementClass:r.LinkPreview,react:t,events:{ccLinkClicked:"cc-link-clicked"}}),kn=De({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t});class Tn extends Oe{constructor(e,t){super(e),this.newDataSource=e,this.configuration=t}getId(){return"linkpreview"}getTextMessageContentView(e,t,o,s){const i=this.getLinkPreview(e);if(i&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember){let n,a={...s,textFormatters:s?.textFormatters&&s?.textFormatters.length?[...s.textFormatters]:this.getAllTextFormatters({theme:o,alignment:t,disableMentions:s.disableMentions})},l=a.textFormatters;if(a&&!a.disableMentions){let s;for(let t=0;t0?e[t]:""}}class Mn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Tn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.linkPreview}}const Bn=De({tagName:"message-translation-bubble",elementClass:r.MessageTranslationBubble,react:t}),Ln=De({tagName:"cometchat-text-bubble",elementClass:o.CometChatTextBubble,react:t});class Un extends Oe{constructor(e,t){super(e),this.getTranslationStyle=(e,t)=>{let o=this.configuration?.getMessageTranslationStyle();return e!==n.MessageBubbleAlignment.left?new r.MessageTranslationStyle({translatedTextFont:o?.translatedTextFont||n.fontHelper(t.typography.text3),translatedTextColor:o?.translatedTextColor||t.palette.getAccent("dark"),helpTextColor:o?.helpTextColor||t.palette.getAccent700("dark"),helpTextFont:o?.helpTextFont||n.fontHelper(t.typography.caption2),background:o?.background||"transparent"}):new r.MessageTranslationStyle({translatedTextFont:o?.translatedTextFont||n.fontHelper(t.typography.text3),translatedTextColor:o?.translatedTextColor||t.palette.getAccent(),helpTextColor:o?.helpTextColor||t.palette.getAccent700(),helpTextFont:o?.helpTextFont||n.fontHelper(t.typography.caption2),background:o?.background||"transparent"})},this.newDataSource=e,this.configuration=t}getTextMessageOptions(e,t,o,r){let i=this.configuration?.getOptionStyle(),a=super.getTextMessageOptions(e,t,o,r);if(!this.checkIfOptionExist(a,n.CometChatUIKitConstants.MessageOption.translateMessage)){let e=new n.CometChatActionsIcon({id:n.CometChatUIKitConstants.MessageOption.translateMessage,title:n.localize("TRANSLATE"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FMessage%20Translation%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FMessage-Translation%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.66666667%2C4.91666667%20C7.7672341%2C4.91666667%208.66848034%2C5.77006215%208.74476911%2C6.85121684%20L8.75%2C7%20L8.75%2C9.66666667%20C8.75%2C10.0808802%208.41421356%2C10.4166667%208%2C10.4166667%20C7.62030423%2C10.4166667%207.30650904%2C10.1345128%207.25684662%2C9.76843722%20L7.25%2C9.66666667%20L7.25%2C7%20C7.25%2C6.6778339%206.98883277%2C6.41666667%206.66666667%2C6.41666667%20C6.37671717%2C6.41666667%206.13617677%2C6.62821212%206.09096818%2C6.9053803%20L6.08333333%2C7%20L6.08333333%2C9.66666667%20C6.08333333%2C10.0808802%205.7475469%2C10.4166667%205.33333333%2C10.4166667%20C4.95363757%2C10.4166667%204.63984237%2C10.1345128%204.59017995%2C9.76843722%20L4.58333333%2C9.66666667%20L4.58333333%2C7%20C4.58333333%2C5.84940677%205.51607344%2C4.91666667%206.66666667%2C4.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C7.58333333%20C8.41421356%2C7.58333333%208.75%2C7.91911977%208.75%2C8.33333333%20C8.75%2C8.7130291%208.46784612%2C9.02682429%208.10177056%2C9.07648672%20L8%2C9.08333333%20L5.33333333%2C9.08333333%20C4.91911977%2C9.08333333%204.58333333%2C8.7475469%204.58333333%2C8.33333333%20C4.58333333%2C7.95363757%204.86548721%2C7.63984237%205.23156278%2C7.59017995%20L5.33333333%2C7.58333333%20L8%2C7.58333333%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C10.9166667%20C16.3796958%2C10.9166667%2016.693491%2C11.1988205%2016.7431534%2C11.5648961%20L16.75%2C11.6666667%20L16.75%2C13%20C16.75%2C13.4142136%2016.4142136%2C13.75%2016%2C13.75%20C15.6203042%2C13.75%2015.306509%2C13.4678461%2015.2568466%2C13.1017706%20L15.25%2C13%20L15.25%2C11.6666667%20C15.25%2C11.2524531%2015.5857864%2C10.9166667%2016%2C10.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M18.6666667%2C12.25%20C19.0808802%2C12.25%2019.4166667%2C12.5857864%2019.4166667%2C13%20C19.4166667%2C13.3796958%2019.1345128%2C13.693491%2018.7684372%2C13.7431534%20L18.6666667%2C13.75%20L13.3333333%2C13.75%20C12.9191198%2C13.75%2012.5833333%2C13.4142136%2012.5833333%2C13%20C12.5833333%2C12.6203042%2012.8654872%2C12.306509%2013.2315628%2C12.2568466%20L13.3333333%2C12.25%20L18.6666667%2C12.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.6218209%2C12.7628292%20C16.7528067%2C12.3698717%2017.1775467%2C12.1575017%2017.5705042%2C12.2884875%20C17.9634616%2C12.4194734%2018.1758316%2C12.8442133%2018.0448458%2C13.2371708%20L17.9816285%2C13.4141354%20L17.8896351%2C13.6471999%20L17.768692%2C13.9296038%20C17.5442054%2C14.4346986%2017.2746722%2C14.9400735%2016.9573711%2C15.4160251%20C15.999232%2C16.8532338%2014.8035437%2C17.75%2013.3333333%2C17.75%20C12.9191198%2C17.75%2012.5833333%2C17.4142136%2012.5833333%2C17%20C12.5833333%2C16.6203042%2012.8654872%2C16.306509%2013.2315628%2C16.2568466%20L13.3333333%2C16.25%20C14.1964563%2C16.25%2015.000768%2C15.6467662%2015.7092956%2C14.5839749%20C15.9753278%2C14.1849265%2016.2057946%2C13.7528014%2016.3979747%2C13.3203962%20L16.4992538%2C13.0842816%20L16.6012322%2C12.8221175%20C16.6092157%2C12.7998646%2016.6160798%2C12.7800523%2016.6218209%2C12.7628292%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.5822706%2C14.8366574%20C15.9262877%2C14.6059518%2016.3921926%2C14.697809%2016.6228982%2C15.0418261%20C17.0961654%2C15.7475396%2017.8695647%2C16.1943066%2018.717337%2C16.2517136%20C19.1306041%2C16.279698%2019.4429375%2C16.6374031%2019.4149531%2C17.0506703%20C19.3869686%2C17.4639375%2019.0292635%2C17.7762708%2018.6159964%2C17.7482864%20C17.3049794%2C17.6595107%2016.1089745%2C16.9686186%2015.3771018%2C15.877285%20C15.1463962%2C15.5332678%2015.2382534%2C15.067363%2015.5822706%2C14.8366574%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20.6666667%2C8.91666667%20L11.3333333%2C8.91666667%20C10.1827401%2C8.91666667%209.25%2C9.84940677%209.25%2C11%20L9.25%2C17.6666667%20L9.25523089%2C17.8154498%20C9.33151966%2C18.8966045%2010.2327659%2C19.75%2011.3333333%2C19.75%20L15.022%2C19.749%20L18.8030032%2C23.5303301%20L18.8802248%2C23.598293%20C19.3582766%2C23.9666561%2020.0833333%2C23.6330113%2020.0833333%2C23%20L20.083%2C19.749%20L20.6666667%2C19.75%20C21.8172599%2C19.75%2022.75%2C18.8172599%2022.75%2C17.6666667%20L22.75%2C11%20C22.75%2C9.84940677%2021.8172599%2C8.91666667%2020.6666667%2C8.91666667%20Z%20M11.3333333%2C10.4166667%20L20.6666667%2C10.4166667%20C20.9888328%2C10.4166667%2021.25%2C10.6778339%2021.25%2C11%20L21.25%2C17.6666667%20C21.25%2C17.9888328%2020.9888328%2C18.25%2020.6666667%2C18.25%20L19.3333333%2C18.25%20L19.2315628%2C18.2568466%20C18.8654872%2C18.306509%2018.5833333%2C18.6203042%2018.5833333%2C19%20L18.583%2C21.189%20L15.8636634%2C18.4696699%20C15.7230111%2C18.3290176%2015.5322457%2C18.25%2015.3333333%2C18.25%20L11.3333333%2C18.25%20C11.0111672%2C18.25%2010.75%2C17.9888328%2010.75%2C17.6666667%20L10.75%2C11%20C10.75%2C10.6778339%2011.0111672%2C10.4166667%2011.3333333%2C10.4166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.6666667%2C2.25%20C13.7672341%2C2.25%2014.6684803%2C3.10339548%2014.7447691%2C4.18455017%20L14.75%2C4.33333333%20L14.75%2C7%20C14.75%2C7.41421356%2014.4142136%2C7.75%2014%2C7.75%20C13.6203042%2C7.75%2013.306509%2C7.46784612%2013.2568466%2C7.10177056%20L13.25%2C7%20L13.25%2C4.33333333%20C13.25%2C4.04338384%2013.0384545%2C3.80284343%2012.7612864%2C3.75763485%20L12.6666667%2C3.75%20L3.33333333%2C3.75%20C3.04338384%2C3.75%202.80284343%2C3.96154546%202.75763485%2C4.23871364%20L2.75%2C4.33333333%20L2.75%2C11%20C2.75%2C11.2899495%202.96154546%2C11.5304899%203.23871364%2C11.5756985%20L3.33333333%2C11.5833333%20L4.66666667%2C11.5833333%20C5.04636243%2C11.5833333%205.36015763%2C11.8654872%205.40982005%2C12.2315628%20L5.41666667%2C12.3333333%20L5.416%2C14.523%20L6.80300325%2C13.1363366%20C7.06926981%2C12.87007%207.48593349%2C12.845864%207.77954499%2C13.0637184%20L7.86366342%2C13.1363366%20C8.12992998%2C13.4026031%208.15413603%2C13.8192668%207.93628157%2C14.1128783%20L7.86366342%2C14.1969968%20L5.19699675%2C16.8636634%20C4.74939014%2C17.31127%204.00077515%2C17.0344999%203.92321348%2C16.4359943%20L3.91666667%2C16.3333333%20L3.916%2C13.083%20L3.33333333%2C13.0833333%20C2.2327659%2C13.0833333%201.33151966%2C12.2299379%201.25523089%2C11.1487832%20L1.25%2C11%20L1.25%2C4.33333333%20C1.25%2C3.2327659%202.10339548%2C2.33151966%203.18455017%2C2.25523089%20L3.33333333%2C2.25%20L12.6666667%2C2.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onClick:function(){s.CometChat.callExtension("message-translation","POST","v2/translate",{msgId:t.getId(),text:t.getText(),languages:navigator.languages}).then((e=>{if(e&&e.hasOwnProperty("translations")){let o=e.translations?.[0]?.message_translated;if(o&&o.trim()){let e=t.getMetadata()||{};e.translated_message=o,t.setMetadata(e),n.CometChatMessageEvents.ccMessageTranslated.next({message:t,status:n.MessageStatus.success})}}})).catch((e=>{console.log("error",e)}))},iconTint:i?.iconTint||o.palette.getAccent600(),titleColor:i?.titleColor||o.palette.getAccent600(),titleFont:i?.titleFont||n.fontHelper(o.typography.subtitle1),backgroundColor:i?.background||"transparent"});a.push(e)}return a}getTextMessageStyle(e,t){return e!==n.MessageBubbleAlignment.left?{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent900("light")||""}:{textFont:n.fontHelper(t.typography.text3),textColor:t.palette.getAccent()||""}}getTextMessageContentView(e,t,o,s){const i=e.getMetadata();if(i&&Object.prototype.hasOwnProperty.call(i,"translated_message")&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember){const n=i.translated_message;let a,l={...s,textFormatters:s?.textFormatters&&s?.textFormatters.length?[...s.textFormatters]:this.getAllTextFormatters({theme:o,alignment:t,disableMentions:s.disableMentions})},c=l.textFormatters;if(l&&!l.disableMentions){let n;for(let t=0;te.id===t))}getId(){return"messagetranslation"}}class Rn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Un(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.messageTranslation}}const Pn=De({tagName:"polls-bubble",elementClass:r.PollsBubble,react:t}),On=De({tagName:"create-poll",elementClass:r.CreatePoll,react:t,events:{ccCloseClicked:"cc-close-clicked"}});class jn extends Oe{constructor(e,t){super(e),this.loggedInUser=null,this.getLoggedInUser(),this.newDataSource=e,this.configuration=t}async getLoggedInUser(){this.loggedInUser=await s.CometChat.getLoggedinUser()}getId(){return"polls"}getAllMessageTypes(){const e=super.getAllMessageTypes();return e.includes(r.PollsConstants.extension_poll)||e.push(r.PollsConstants.extension_poll),e}getAllMessageCategories(){const e=super.getAllMessageCategories();return e.includes(n.CometChatUIKitConstants.MessageCategory.custom)||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageTemplates(e,t){this.theme=e;const n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.PollsConstants.extension_poll)||n.push(this.getPollsTemplate(this.theme)),n}getPollsTemplate(e){return new n.CometChatMessageTemplate({type:r.PollsConstants.extension_poll,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getPollsContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}getPollsContentView(e,t){let o=this.configuration?.getPollsBubbleStyle(),r={borderRadius:o?.borderRadius||"8px",background:o?.background||"transparent",votePercentTextFont:o?.votePercentTextFont||n.fontHelper(t.typography.subtitle2),votePercentTextColor:o?.votePercentTextColor||t.palette.getAccent600(),pollQuestionTextFont:o?.pollQuestionTextFont||n.fontHelper(t.typography.subtitle1),pollQuestionTextColor:o?.pollQuestionTextColor||t.palette.getAccent(),pollOptionTextFont:o?.pollOptionTextFont||n.fontHelper(t.typography.text2),pollOptionTextColor:o?.pollOptionTextColor||t.palette.getAccent(),pollOptionBackground:o?.pollOptionBackground||"transparent",optionsIconTint:o?.optionsIconTint||t.palette.getAccent600(),totalVoteCountTextFont:o?.totalVoteCountTextFont||n.fontHelper(t.typography.subtitle2),totalVoteCountTextColor:o?.totalVoteCountTextColor||t.palette.getAccent600(),selectedPollOptionBackground:o?.selectedPollOptionBackground||t.palette.getAccent200(),userSelectedOptionBackground:o?.userSelectedOptionBackground||t.palette.getPrimary(),pollOptionBorder:o?.pollOptionBorder||`1px solid ${t.palette.getAccent100()}`,pollOptionBorderRadius:o?.pollOptionBorderRadius||"8px"};return d.jsx(Pn,{pollStyle:r,pollQuestion:this.getPollBubbleData(e,"question"),pollId:this.getPollBubbleData(e,"id"),senderUid:this.getPollBubbleData(e),loggedInUser:this.loggedInUser??void 0,metadata:e?.getMetadata()})}getPollBubbleData(e,t){let n=e.getCustomData();return t?"options"===t?Object.values(n[t]):n[t]:e.getSender().getUid()}getAttachmentOptions(e,t){if(this.theme=e,t?.parentMessageId)return super.getAttachmentOptions(e,t);{let o=this.configuration?.getOptionStyle();const s=super.getAttachmentOptions(e,t);let i=new n.CometChatMessageComposerAction({id:r.PollsConstants.extension_poll,title:n.localize("POLLS"),iconURL:this.configuration?.getOptionIconURL()?this.configuration?.getOptionIconURL():"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPolls%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPolls%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.779983%2C1.25%20C14.2709124%2C1.25043259%2014.7438187%2C1.42418565%2015.1167078%2C1.73706699%20L15.2516928%2C1.86085235%20L20.4715927%2C7.08218001%20C20.8991636%2C7.51561025%2021.1196388%2C8.11205589%2021.0768145%2C8.71941733%20C21.0476811%2C9.13260508%2020.689109%2C9.44394267%2020.2759212%2C9.41480928%20C19.8971658%2C9.38810367%2019.6039928%2C9.08457801%2019.580201%2C8.71591608%20L19.5805293%2C8.613916%20C19.5905393%2C8.47194719%2019.5513165%2C8.33202895%2019.4730888%2C8.21873863%20L19.4072645%2C8.13914765%20L14.1905599%2C2.92103945%20C14.1031809%2C2.83352807%2013.9908865%2C2.77665655%2013.8706878%2C2.75733888%20L13.7793226%2C2.75%20L4.33297476%2C2.75%20C4.04324415%2C2.75%203.80281908%2C2.96150888%203.75763137%2C3.23870267%20L3.75%2C3.33333333%20L3.75%2C20.6666667%20C3.75%2C20.9566568%203.961452%2C21.1971647%204.2384242%2C21.2423664%20L4.33297476%2C21.25%20L9.6648738%2C21.25%20C10.0790874%2C21.25%2010.4148738%2C21.5857864%2010.4148738%2C22%20C10.4148738%2C22.3796958%2010.1327199%2C22.693491%209.76664435%2C22.7431534%20L9.6648738%2C22.75%20L4.33297476%2C22.75%20C3.23255355%2C22.75%202.33150187%2C21.8965632%202.25522974%2C20.8154444%20L2.25%2C20.6666667%20L2.25%2C3.33333333%20C2.25%2C2.23280908%203.10320728%2C1.33152341%204.18421182%2C1.25523113%20L4.33297476%2C1.25%20L13.779983%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.6637981%2C1.25%20C14.0434938%2C1.25%2014.357289%2C1.53215388%2014.4069515%2C1.89822944%20L14.4137981%2C2%20L14.4137981%2C7.33333333%20C14.4137981%2C7.62332346%2014.6252501%2C7.86383136%2014.9022223%2C7.90903304%20L14.9967728%2C7.91666667%20L20.3286719%2C7.91666667%20C20.7428854%2C7.91666667%2021.0786719%2C8.2524531%2021.0786719%2C8.66666667%20C21.0786719%2C9.04636243%2020.796518%2C9.36015763%2020.4304424%2C9.40982005%20L20.3286719%2C9.41666667%20L14.9967728%2C9.41666667%20C13.8963516%2C9.41666667%2012.9952999%2C8.56322987%2012.9190278%2C7.4821111%20L12.9137981%2C7.33333333%20L12.9137981%2C2%20C12.9137981%2C1.58578644%2013.2495845%2C1.25%2013.6637981%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C9.420279%20C9.24921801%2C9.09111393%209.71989329%2C9.02810717%2010.0490584%2C9.27954946%20C10.3482993%2C9.50813337%2010.4275748%2C9.91790155%2010.2506031%2C10.2378223%20L10.1897879%2C10.3308321%20L8.25879925%2C12.8586842%20C8.01208284%2C13.1778547%207.64305532%2C13.3791966%207.21567496%2C13.4156509%20C6.86419538%2C13.4339623%206.52012946%2C13.3223779%206.23838713%2C13.0959918%20L6.12161623%2C12.9919845%20L5.12632841%2C11.9608734%20C4.838658%2C11.6628489%204.84705165%2C11.1880493%205.14507615%2C10.9003789%20C5.41600752%2C10.6388603%205.83303397%2C10.6220228%206.1227489%2C10.845033%20L6.20557062%2C10.9191266%20L7.125%2C11.871%20L8.99777572%2C9.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C15.420279%20C9.24921801%2C15.0911139%209.71989329%2C15.0281072%2010.0490584%2C15.2795495%20C10.3482993%2C15.5081334%2010.4275748%2C15.9179016%2010.2506031%2C16.2378223%20L10.1897879%2C16.3308321%20L8.25879925%2C18.8586842%20C8.01208284%2C19.1778547%207.64305532%2C19.3791966%207.21567496%2C19.4156509%20C6.86419538%2C19.4339623%206.52012946%2C19.3223779%206.23838713%2C19.0959918%20L6.12161623%2C18.9919845%20L5.12632841%2C17.9608734%20C4.838658%2C17.6628489%204.84705165%2C17.1880493%205.14507615%2C16.9003789%20C5.41600752%2C16.6388603%205.83303397%2C16.6220228%206.1227489%2C16.845033%20L6.20557062%2C16.9191266%20L7.125%2C17.871%20L8.99777572%2C15.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6632602%2C11.9166667%20C16.0774738%2C11.9166667%2016.4132602%2C12.2524531%2016.4132602%2C12.6666667%20C16.4132602%2C13.0463624%2016.1311063%2C13.3601576%2015.7650308%2C13.4098201%20L15.6632602%2C13.4166667%20L12.3308233%2C13.4166667%20C11.9166098%2C13.4166667%2011.5808233%2C13.0808802%2011.5808233%2C12.6666667%20C11.5808233%2C12.2869709%2011.8629772%2C11.9731757%2012.2290528%2C11.9235133%20L12.3308233%2C11.9166667%20L15.6632602%2C11.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.1106837%2C10.5779533%20C20.4095395%2C10.5779533%2019.7375424%2C10.8584991%2019.2444627%2C11.3570467%20L12.4669093%2C18.1364079%20C12.3622379%2C18.2411074%2012.2908946%2C18.3744435%2012.2618676%2C18.5196176%20L11.5953802%2C21.8529509%20C11.4904492%2C22.3777472%2011.953163%2C22.8404132%2012.4779485%2C22.7354279%20L15.8103854%2C22.0687612%20C15.9555979%2C22.0397109%2016.0889603%2C21.9683215%2016.1936616%2C21.8635921%20L22.9740599%2C15.0813699%20C23.4695748%2C14.5910412%2023.75%2C13.9189715%2023.75%2C13.2177778%20C23.75%2C12.516584%2023.4695748%2C11.8445143%2022.9711997%2C11.35134%20L22.8310414%2C11.2210775%20C22.3327458%2C10.7984458%2021.7321255%2C10.5779533%2021.1106837%2C10.5779533%20Z%20M21.1106837%2C12.0779533%20C21.3769595%2C12.0779533%2021.6343527%2C12.1724444%2021.8371937%2C12.3440921%20L21.9342889%2C12.4349375%20C22.129767%2C12.628969%2022.25%2C12.9171205%2022.25%2C13.2177778%20L22.242717%2C13.345678%20C22.2137413%2C13.5991981%2022.0992456%2C13.8367894%2021.9161173%2C14.0180067%20L15.293%2C20.642%20L13.287%2C21.043%20L13.688%2C19.035%20L20.3081104%2C12.4147032%20C20.5222805%2C12.1981735%2020.8102464%2C12.0779533%2021.1106837%2C12.0779533%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",iconTint:o?.iconTint||e.palette.getAccent700(),titleColor:o?.titleColor||e.palette.getAccent600(),titleFont:o?.titleFont||n.fontHelper(e.typography.subtitle1),background:o?.background||e.palette.getAccent100(),onClick:(...t)=>{this.onPollsButtonClicked(e,...t)}});return s.push(i),s}}onPollsButtonClicked(e,...t){const[o]=t;let r=o[0],s=o[1],i=this.configuration?.getCreatePollStyle(),a={placeholderTextFont:i?.placeholderTextFont||n.fontHelper(e.typography.subtitle1),placeholderTextColor:i?.placeholderTextColor||e.palette.getAccent600(),deleteIconTint:i?.deleteIconTint||e.palette.getAccent600(),titleFont:i?.titleFont||n.fontHelper(e.typography.title1),titleColor:i?.titleColor||e.palette.getAccent(),closeIconTint:i?.closeIconTint||e.palette.getPrimary(),questionInputBackground:i?.questionInputBackground||e.palette.getAccent100(),optionInputBackground:i?.optionInputBackground||e.palette.getAccent100(),answerHelpTextFont:i?.answerHelpTextFont||n.fontHelper(e.typography.caption1),answerHelpTextColor:i?.answerHelpTextColor||e.palette.getAccent400(),addAnswerIconTint:i?.addAnswerIconTint||e.palette.getPrimary(),createPollButtonTextFont:i?.createPollButtonTextFont||n.fontHelper(e.typography.text2),createPollButtonTextColor:i?.createPollButtonTextColor||e.palette.getAccent("dark"),createPollButtonBackground:i?.createPollButtonBackground||e.palette.getPrimary(),addAnswerTextFont:i?.addAnswerTextFont||n.fontHelper(e.typography.text2),addAnswerTextColor:i?.addAnswerTextColor||e.palette.getPrimary(),errorTextFont:i?.errorTextFont||n.fontHelper(e.typography.subtitle1),errorTextColor:i?.errorTextColor||e.palette.getError(),optionPlaceholderTextFont:i?.optionPlaceholderTextFont||n.fontHelper(e.typography.subtitle1),optionPlaceholderTextColor:i?.optionPlaceholderTextColor||e.palette.getAccent600(),questionInputTextFont:i?.questionInputTextFont||n.fontHelper(e.typography.subtitle2),questionInputTextColor:i?.questionInputTextColor||e.palette.getAccent600(),optionInputTextFont:i?.optionInputTextFont||n.fontHelper(e.typography.subtitle2),optionInputTextColor:i?.optionInputTextColor||e.palette.getAccent600(),width:i?.width||"360px",height:i?.height||"440px",border:i?.border||"",borderRadius:i?.borderRadius||"8px",background:i?.background||e.palette.getAccent900(),position:"absolute",zIndex:1};n.CometChatUIEvents.ccShowModal.next({child:this.getPollView(r,s,a)})}getPollView(e,t,n){return d.jsx("cometchat-backdrop",{children:d.jsx(On,{user:e,group:t,ccCloseClicked:this.triggerCloseEvent,createPollStyle:n,deleteIconURL:this.configuration?.getDeleteIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDelete%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",closeIconURL:this.configuration?.getCloseIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",addAnswerIconURL:this.configuration?.getAddAnswerIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"})})}triggerCloseEvent(){n.CometChatUIEvents.ccHideModal.next()}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.PollsConstants.extension_poll&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_POLL"):super.getLastConversationMessage(e,t,o)}}class Vn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new jn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.polls}}const Gn=De({tagName:"smart-replies",elementClass:r.SmartReplies,react:t,events:{ccReplyClicked:"cc-reply-clicked",ccCloseClicked:"cc-close-clicked"}});class Hn extends Oe{constructor(e,t,o){super(e),this.LISTENER_ID="smartreply__listener",this.currentMessage=null,this.configuration=t,this.theme=o||new n.CometChatTheme({}),this.addMessageListener()}addMessageListener(){s.CometChat.getLoggedinUser().then((e=>{e&&(this.loggedInUser=e)})),n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{null!=e&&this.loggedInUser&&this.loggedInUser?.getUid()!=e.getSender().getUid()&&(this.currentMessage=e,e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&null!=this.activeUser?null!==e.getSender()&&null!==e.getSender().getUid()&&this.activeUser.getUid()===e.getSender().getUid()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:e,child:this.getSmartReplyView(e),position:n.PanelAlignment.messageListFooter}):e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&null!=this.activeGroup&&null!==this.activeGroup.getGuid()&&this.activeGroup.getGuid()===e.getReceiverId()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:e,child:this.getSmartReplyView(e),position:n.PanelAlignment.messageListFooter}))})),n.CometChatUIEvents.ccActiveChatChanged.subscribe((e=>{this.currentMessage=e.message,this.activeUser=e.user,this.activeGroup=e.group,this.currentMessage instanceof s.CometChat.TextMessage&&null!==this.currentMessage&&null!==this.currentMessage.getSender()&&null!==this.loggedInUser&&null!==this.currentMessage.getSender().getUid()&&this.currentMessage.getSender().getUid()!==this.loggedInUser.getUid()&&n.CometChatUIEvents.ccShowPanel.next({configuration:this.configuration,message:this.currentMessage,child:this.getSmartReplyView(this.currentMessage)})})),n.CometChatMessageEvents.ccMessageSent.subscribe((()=>{n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null}))}getReplies(e){let t=e;const n=t?.metadata?.[r.SmartRepliesConstants.injected]?.extensions?.[r.SmartRepliesConstants.smart_reply];if(n?.reply_positive&&n?.reply_neutral&&n?.reply_negative){const{reply_positive:e,reply_neutral:t,reply_negative:o}=n;return[e,t,o]}return null}getSmartReplyStyle(){const e=this.configuration?.getSmartRepliesStyle();return{replyTextFont:e?.replyTextFont||n.fontHelper(this.theme.typography.caption1),replyTextColor:e?.replyTextColor||this.theme?.palette.getAccent(),replyBackground:e?.replyBackground||"inherit",boxShadow:e?.boxShadow||`0px 0px 1px ${this.theme?.palette.getAccent600()}`,closeIconTint:e?.closeIconTint||this.theme?.palette.getAccent600(),background:e?.background||"inherit",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",display:"flex",justifyContent:"flex-start"}}sendSmartReply(e){let t=this.activeUser?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,o=e?.detail?.reply,i=this.currentMessage;if(o&&o.trim().length>0&&i){let e;if(i.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user)e=new s.CometChat.TextMessage(i.getSender().getUid(),o.trim(),t),e.setReceiver(this.activeUser);else{const n=i.getReceiver();e=new s.CometChat.TextMessage(n.getGuid(),o.trim(),t),e.setReceiver(this.activeGroup)}i.getParentMessageId()>0&&e.setParentMessageId(i.getParentMessageId()),e.setCategory(n.CometChatUIKitConstants.MessageCategory.message),e.setSender(this.loggedInUser),e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMessage(e).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(t=>{e.setMetadata({error:!0}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}}closeSmartReply(){n.CometChatUIEvents.ccHidePanel.next(n.PanelAlignment.messageListFooter),this.currentMessage=null}getSmartReplyButtonStyle(){return{background:"inherit"}}getSmartReplyView(e){return this.getReplies(e)?d.jsx("div",{className:"cc-messagelist__smartreplies",style:{width:"100%",display:"flex",justifyContent:"flex-start",alignItems:"flex-end"},children:d.jsx(Gn,{smartReplyStyle:this.getSmartReplyStyle(),replies:this.getReplies(e)??void 0,ccReplyClicked:t=>{t.msg=e,this.sendSmartReply(t)},ccCloseClicked:this.closeSmartReply})}):null}getId(){return"smartreply"}}class Qn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new Hn(e,this.configuration,this.theme)))}getExtensionId(){return r.ExtensionsId.smartReply}}const Nn=De({tagName:"stickers-keyboard",elementClass:r.StickersKeyboard,react:t,events:{ccStickerClicked:"cc-sticker-clicked"}}),Kn=De({tagName:"cometchat-image-bubble",elementClass:o.CometChatImageBubble,react:t});class zn extends Oe{constructor(e,t){super(e),this.showStickerKeyboard=!1,this.newDataSource=e,this.configuration=t}getDataSource(){return this.newDataSource}getAllMessageTemplates(e,t){this.theme=e;let n=super.getAllMessageTemplates(this.theme,t);return this.checkIfTemplateExist(n,r.StickersConstants.sticker)||n.push(this.getStickerTemplate(this.theme)),n}getAuxiliaryOptions(e,t,n,o){this.id=e,this.user=n,this.group=o;let r=super.getAuxiliaryOptions(e,t,n,o);return r.push(this.getStickerAuxiliaryButton(e,t,n,o)),r}getStickerAuxiliaryButton(e,t,r,s){let i=this.configuration?.getStickersStyle(),a={height:i?.sticketButtonHeight||"24px",width:i?.stickerButtonWidth||"24px",border:"none",borderRadius:"0",buttonIconTint:i?.stickerButtonIconTint||t.palette.getAccent500(),background:"transparent"},l=new o.PopoverStyle({width:i?.width||"300px",height:i?.height||"400px",background:t?.palette?.getBackground(),borderRadius:"12px",boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"}),c={width:i?.width||"300px",height:i?.height||"400px",border:i?.border||"none",emptyStateTextFont:i?.emptyStateTextFont||n.fontHelper(t.typography.title1),emptyStateTextColor:i?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:i?.errorStateTextFont||n.fontHelper(t.typography.title1),errorStateTextColor:i?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:i?.loadingIconTint||t.palette.getAccent600(),background:i?.background||t.palette.getBackground(),borderRadius:i?.borderRadius||"12px"},C=this.configuration?.getStickerIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FStickers%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FStickers%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.67349142%2C7.33338221%20C5.86012572%2C7.33338221%206.01142272%2C7.48460989%206.01142272%2C7.67115869%20C6.01142272%2C7.85770748%205.86012572%2C8.00893516%205.67349142%2C8.00893516%20C5.48685711%2C8.00893516%205.33556012%2C7.85770748%205.33556012%2C7.67115869%20C5.33556012%2C7.58157479%205.37116349%2C7.49566003%205.4345379%2C7.43231465%20C5.49791231%2C7.36896927%205.58386646%2C7.33338221%205.67349142%2C7.33338221%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.23283692%2C13.0400269%20C5.36112225%2C15.1816508%207.58282264%2C16.5229567%2010.0043478%2C16.5244579%20C10.2778756%2C16.5227578%2010.5510655%2C16.5049493%2010.8224973%2C16.4711247%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20%2C9.57337357%20C19.7666207%2C4.11103074%2015.187631%2C-0.151378825%209.72001617%2C0.00412271646%20C4.25240139%2C0.159624258%20-0.0767041446%2C4.67538425%200.00103066029%2C10.1421537%20C0.0787654651%2C15.6089231%204.5345202%2C20%2010.0043478%2C20%20L10.4489943%2C20%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.1831154%2C7.92004661%20C12.559175%2C7.32283168%2013.215699%2C6.96047481%2013.921683%2C6.96047481%20C14.6276671%2C6.96047481%2015.2841911%2C7.32283168%2015.6602507%2C7.92004661%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2220%22%20y1%3D%229.57337357%22%20x2%3D%2210.4489943%22%20y2%3D%2219.9911111%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.4489943%2C19.9911111%20L10.4489943%2C19.1022257%20C10.4588042%2C13.8367116%2014.7320632%2C9.57337357%2020%2C9.57337357%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",g=this.configuration?.getCloseIconURL()||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";return d.jsxs("cometchat-popover",{placement:n.Placement.top,popoverStyle:JSON.stringify(l),children:[d.jsx("div",{slot:"children",children:d.jsx("cometchat-button",{hoverText:n.localize("STICKER"),iconURL:this.showStickerKeyboard?g:C,buttonStyle:JSON.stringify(a)})}),d.jsx("div",{slot:"content",children:d.jsx(Nn,{stickerStyle:c,ccStickerClicked:e=>this.sendSticker(e)})})]},"stickers-extension-popover")}sendSticker(e){try{let t=e?.detail,o={name:t?.stickerName,URL:t?.stickerURL};const i=this.user?.getUid()||this.group?.getGuid(),a=this.user?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,{parentMessageId:l}=this.id,c={sticker_url:o.URL,sticker_name:o.name},C=r.StickersConstants.sticker,d=new s.CometChat.CustomMessage(i,a,C,c);l&&d.setParentMessageId(l),d.setMetadata({incrementUnreadCount:!0}),d.shouldUpdateConversation(!0),d.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),d.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:d,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(d).then((e=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success})}),(e=>{d.setMetadata({error:!0}),n.CometChatMessageEvents.ccMessageSent.next({message:d,status:n.MessageStatus.error})}))}catch(e){console.log("error in sending sticker",e)}}getSticker(e){let t;return r.CometChatUIKitUtility.checkHasOwnProperty(e,r.StickersConstants.data)&&r.CometChatUIKitUtility.checkHasOwnProperty(e.getData(),r.StickersConstants.custom_data)?(t=e.getCustomData(),r.CometChatUIKitUtility.checkHasOwnProperty(t,r.StickersConstants.sticker_url)?t?.sticker_url:""):""}getStickerMessageContentView(e,t){return d.jsx(Kn,{src:this.getSticker(e),imageStyle:{height:"128px",width:"128px",border:"none",borderRadius:"0",background:"transparent"}})}getStickerTemplate(e){return new n.CometChatMessageTemplate({type:r.StickersConstants.sticker,category:n.CometChatUIKitConstants.MessageCategory.custom,contentView:(t,n)=>{let o=t;return o.getDeletedAt()?super.getDeleteMessageBubble(o,e):this.getStickerMessageContentView(o,e)},options:(e,t,n,o)=>super.getCommonOptions(e,t,n,o),bottomView:(e,t)=>Re.getDataSource().getBottomView(e,t)})}checkIfTemplateExist(e,t){return e.some((e=>e.type===t))}getAllMessageCategories(){let e=super.getAllMessageCategories();return e.some((e=>e===n.CometChatUIKitConstants.MessageCategory.custom))||e.push(n.CometChatUIKitConstants.MessageCategory.custom),e}getAllMessageTypes(){let e=super.getAllMessageTypes();return e.some((e=>e===r.StickersConstants.sticker))||e.push(r.StickersConstants.sticker),e}getId(){return"stickers"}getLastConversationMessage(e,t,o){const s=e.getLastMessage();return null!=s&&s.getType()===r.StickersConstants.sticker&&s.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom?n.localize("CUSTOM_MESSAGE_STICKER"):super.getLastConversationMessage(e,t,o)}}class Jn extends dn{constructor(e){super(),this.configuration=e}addExtension(){Re.enable((e=>new zn(e,this.configuration)))}getExtensionId(){return r.ExtensionsId.stickers}}class Yn extends Oe{getId(){return"textmoderator"}getModeratedtext(e){let t=r.CometChatUIKitUtility.getExtensionData(e);return t?.trim()?.length>0?t:e.getText()}getLastConversationMessage(e,t,o){const i=e.getLastMessage();if(i&&!i.getDeletedAt()&&i.getType()===n.CometChatUIKitConstants.MessageTypes.text&&i.getCategory()===n.CometChatUIKitConstants.MessageCategory.message){let t=this.getModeratedtext(i),a=e.getLastMessage(),l={...o,textFormatters:o?.textFormatters&&o?.textFormatters.length?[...o.textFormatters]:[this.getMentionsTextFormatter({theme:o.theme,disableMentions:o.disableMentions})]},c=l.textFormatters;if(l&&!l.disableMentions){let e;for(let t=0;tnew Yn(e)))}getExtensionId(){return r.ExtensionsId.profanityFilter}enable(){const e=s.CometChat.isExtensionEnabled(r.ExtensionsId.profanityFilter),t=s.CometChat.isExtensionEnabled(r.ExtensionsId.dataMasking);Promise.all([e,t]).then((e=>{e.includes(!0)&&this.addExtension()})).catch((e=>{}))}}class Wn extends Oe{getId(){return"thumbnailgeneration"}getImageMessageBubble(e,t,n,o,r,s){if(Re.names.includes("imagemoderation"))return super.getImageMessageBubble(e,t,n,o);{let e=n.getAttachments()[0].getUrl(),t=n.getMetadata();return t&&t.hasOwnProperty("@injected")&&t["@injected"].hasOwnProperty("extensions")&&t["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&t["@injected"].extensions["thumbnail-generation"].url_small&&(e=t["@injected"].extensions["thumbnail-generation"].url_small),super.getImageMessageBubble(e,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAuYAAAOBCAYAAAC9H2UFAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAAzdEVYdENyZWF0aW9uIFRpbWUAVGh1cnNkYXkgMjkgRGVjZW1iZXIgMjAyMiAxMjowOTowNyBBTdfo3bUAACAASURBVHic7N13lN/1fef790gyGNk4FBcwZu3cOLH3nHVs7NhJNjY2JomdbJzdzSab3b33nrjhhgkdGwxISEJCBWGKwCAQ1SDRexFdGFOEkQChAio0IUZtRprRjDTl971/4HCTUNRmfp/37zePxzHngDT6/V545qCnvvMtLZ/69AFVAAAARQ0rPQAAABDmAACQgjAHAIAEhDkAACQgzAEAIAFhD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zAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgIlsjTWURiJ80AAAAASUVORK5CYII=",n,o)}}getVideoMessageBubble(e,t,n,o,r,s){let i=t.getMetadata(),a=o;return i&&i.hasOwnProperty("@injected")&&i["@injected"].hasOwnProperty("extensions")&&i["@injected"].extensions.hasOwnProperty("thumbnail-generation")&&i["@injected"].extensions["thumbnail-generation"].url_small&&(a=i["@injected"].extensions["thumbnail-generation"].url_small),super.getVideoMessageBubble(e,t,n,a)}}class Zn extends dn{addExtension(){Re.enable((e=>new Wn(e)))}getExtensionId(){return r.ExtensionsId.thumbnailGeneration}}class Xn{static init(e){if(Xn.uiKitSettings=e,!Xn.checkAuthSettings())return;const t=new s.CometChat.AppSettingsBuilder;e.getRoles()?t.subscribePresenceForRoles(e.getRoles()):"ALL_USERS"===e.getSubscriptionType()?t.subscribePresenceForAllUsers():"FRIENDS"===e.getSubscriptionType()&&t.subscribePresenceForFriends(),t.autoEstablishSocketConnection(e.isAutoEstablishSocketConnection()),t.setRegion(e.getRegion()),t.overrideAdminHost(e.getAdminHost()),t.overrideClientHost(e.getClientHost());const n=t.build();return s.CometChat.setSource&&s.CometChat.setSource("uikit-v4","web","reactjs"),r.CometChatUIKitSharedSettings.uikitSettings=Xn.uiKitSettings,new Promise(((t,o)=>{window.CometChatUiKit={name:"@cometchat/chat-uikit-react",version:"4.3.17"},s.CometChat.init(e?.appId,n).then((()=>{s.CometChat.getLoggedinUser().then((e=>(e&&(r.CometChatUIKitLoginListener.setLoggedInUser(e),Re.init(),this.initiateAfterLogin()),t(e)))).catch((e=>(console.log(e),o(e))))})).catch((e=>o(e)))}))}static enableCalling(){try{if(r.CometChatUIKitCalls){const e=(new r.CometChatUIKitCalls.CallAppSettingsBuilder).setAppId(Xn.uiKitSettings?.appId).setRegion(Xn.uiKitSettings?.region).build();r.CometChatUIKitCalls.init(e).then((()=>{(new gn).enable()}),(e=>{console.log("CometChatCalls initialization failed with error:",e)}))}}catch(e){console.log(e)}}static initiateAfterLogin(){if(null!=Xn.uiKitSettings){s.CometChat.getConversationUpdateSettings().then((e=>{this.conversationUpdateSettings=e}));let e=this.uiKitSettings?.extensions||this.defaultExtensions;n.ChatSdkEventInitializer.attachListeners(),r.CometChatUIKitLoginListener.attachListener();let t=this.uiKitSettings?.aiFeatures||this.defaultAIFeatures;e.length>0&&e.forEach((e=>{e?.enable()})),t.length>0&&t.forEach((e=>{e.enable()})),this.enableCalling()}}static login(e){return new Promise(((t,n)=>{if(!Xn.checkAuthSettings())return n("uiKitSettings not available");Xn.getLoggedinUser()?.then((o=>{if(o)return r.CometChatUIKitLoginListener.setLoggedInUser(o),this.initiateAfterLogin(),t(o);s.CometChat.login(e,Xn.uiKitSettings.authKey).then((e=>(r.CometChatUIKitLoginListener.setLoggedInUser(e),Re.init(),r.CometChatUIKitLoginListener.setLoggedInUser(e),this.initiateAfterLogin(),t(e)))).catch((e=>n(e)))}))}))}static loginWithAuthToken(e){return new Promise(((t,n)=>{if(!Xn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.login(e).then((e=>(r.CometChatUIKitLoginListener.setLoggedInUser(e),Re.init(),this.initiateAfterLogin(),t(e)))).catch((e=>n(e)))}))}static getLoggedinUser(){return new Promise(((e,t)=>{if(!Xn.checkAuthSettings())return t("uiKitSettings not available");s.CometChat.getLoggedinUser().then((t=>(t&&r.CometChatUIKitLoginListener.setLoggedInUser(t),e(t)))).catch((e=>t(e)))}))}static createUser(e){return new Promise(((t,n)=>{if(!Xn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.createUser(e,Xn.uiKitSettings.authKey).then((e=>t(e))).catch((e=>n(e)))}))}static updateUser(e){return new Promise(((t,n)=>{if(!Xn.checkAuthSettings())return n("uiKitSettings not available");s.CometChat.updateUser(e,Xn.uiKitSettings.authKey).then((e=>t(e))).catch((e=>n(e)))}))}static logout(){return new Promise(((e,t)=>{if(!Xn.checkAuthSettings()){return t({code:"ERROR_UIKIT_NOT_INITIALISED",message:"UIKItSettings not available"})}s.CometChat.logout().then((t=>(r.CometChatUIKitLoginListener.removeLoggedInUser(),e(t)))).catch((e=>t(e)))}))}static checkAuthSettings(){return null!=Xn.uiKitSettings&&null!=Xn.uiKitSettings.appId}static sendFormMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCardMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCustomInteractiveMessage(e,t=!1){e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let o=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.success})})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error})}))}static sendCustomMessage(e){return new Promise(((t,o)=>{e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendCustomMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendTextMessage(e){return new Promise(((t,o)=>{e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendMediaMessage(e){return e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),new Promise(((t,o)=>{n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendMediaMessage(e).then((e=>(n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.success}),t(e)))).catch((t=>(e.setMetadata({error:t}),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),o(t))))}))}static sendSchedulerMessage(e,t=!1){return new Promise(((o,i)=>{e?.getMuid()||e.setMuid(r.CometChatUIKitUtility.ID()),e.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress}),s.CometChat.sendInteractiveMessage(e).then((e=>{let s=r.InteractiveMessageUtils.convertInteractiveMessage(e);t||n.CometChatMessageEvents.ccMessageSent.next({message:s,status:n.MessageStatus.success}),o(e)})).catch((o=>{e.setMetadata({error:o}),t||n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.error}),i(o)}))}))}static getDataSource(){return Re.getDataSource()}}Xn.SoundManager=r.CometChatSoundManager,Xn.Localize=n.CometChatLocalize,Xn.defaultExtensions=[new Jn,new Qn,new yn,new mn,new Rn,new _n,new Zn,new Mn,new Vn,new Sn],Xn.defaultAIFeatures=[new Nt,new Et,new Bt,new ut];const qn=(e,t)=>{let o;return o=t===n.TabAlignment.top||t===n.TabAlignment.left?{top:"0",left:"0"}:t===n.TabAlignment.bottom?{bottom:"2px",left:"2px"}:{top:"0",right:"0"},{...o,position:"absolute",zIndex:"2",height:e?.tabListHeight||"100%",width:e?.tabListWidth||"100%",border:e?.tabListBorder||"0 none",borderRadius:e?.tabListBorderRadius||"0",background:e?.tabListBackground||"transparent",boxShadow:e?.tabListBoxShadow||"0",padding:e?.tabListPadding||"0",boxSizing:"border-box"}};function $n(e){return{height:e?.tabPaneHeight||"100%",width:e?.tabPaneWidth||"100%",display:"flex",position:"absolute",bottom:"0"}}const eo=(e,t,o,r,s)=>{let i=o?.id===t?.id,a=t?.style,l=e===n.TabAlignment.top||e===n.TabAlignment.bottom?"row":"column",c=a?.borderRadius,C="first"===r?`${c} 0 0 ${c}`:"last"===r?`0 ${c} ${c} 0`:"0";i&&a.activeBorderRadius&&(C=a.activeBorderRadius);let d="0";return i&&a?.boxShadow&&(d=a.boxShadow),{display:"flex",flexDirection:l,justifyContent:"center",width:a?.width,height:a?.height,backgroundColor:i?a?.activeBackground??a?.background:a?.background,borderRadius:C,boxShadow:d}},to=e=>{let{borderRadius:t}=e??{};return{height:"100%",width:"100%",borderRadius:t}};function no(e,t){return e.id!==t?.id?{display:"none"}:{display:"flex",height:"100%",width:"100%"}}const oo={tabAlignment:n.TabAlignment.bottom,tabsStyle:{},tabs:[],keepAlive:!1,tabIconAlignment:n.IconButtonAlignment.top},ro=De({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t,events:{ccButtonClicked:"cc-button-clicked"}}),so=e=>{const{tabAlignment:n,tabIconAlignment:o,tabsStyle:r,tabs:s,keepAlive:i}=e,[a,l]=t.useState(null),[c,C]=t.useState(""),g=t.useRef(null),u=t.useCallback((e=>{if(s&&s.length>0){g.current=null;let t=s.findIndex((t=>t.id===e.id));t>-1&&(l(e),C(e.id),g.current=s[t].childView)}}),[g,s]);t.useEffect((()=>{if(c){const e=s?.find((e=>e.id===c));e&&u(e)}else{const e=s?.find((e=>e.isActive));e&&u(e)}}),[c,u,s]);const p=t.useCallback((e=>{const{style:t,iconURL:n}=e||{},{id:o}=a||{};return((e,t,n)=>({background:"inherit",buttonTextFont:t?e?.activeTitleTextFont??e?.titleTextFont:e?.titleTextFont,buttonTextColor:t?e?.activeTitleTextColor??e?.titleTextColor:e?.titleTextColor,buttonIconTint:t?e?.activeIconTint??e?.iconTint:e?.iconTint,height:"100%",width:"100%",border:e?.border,borderRadius:e?.borderRadius,gap:"8px",padding:"0",justifyContent:n?"":"center"}))(t,o===e?.id,n)}),[a]),h=t.useCallback((()=>s?.map(((e,t)=>{const r=0===t?"first":t===s.length-1?"last":"";let i=`${e.id}-${Math.floor(10*Math.random()+1)}`;return d.jsx("div",{className:"cc-tab-item",style:eo(n,e,a,r),children:d.jsx(ro,{alignment:o,iconURL:e.iconURL,text:e.title,buttonStyle:p(e),ccButtonClicked:t=>u(e)})},i)}))),[a]),m=t.useCallback((()=>i?s.map((e=>d.jsx("div",{className:"cc-tab-pane-content",style:no(e,a),children:e?.childView?d.jsx("div",{className:"cc-tab-pane-content-view",style:to(r),children:e?.childView}):null},e.id))):g?.current?d.jsx("div",{className:"cc-tab-pane-content",style:to(r),children:g?.current}):null),[a]);return d.jsxs("div",{className:"cc-tabs",style:(A=r,{height:A?.height||"100%",width:A?.width||"100%",borderRadius:A?.borderRadius||"0",border:A?.border||"0 none",background:A?.background||"transparent",display:"flex",flexDirection:"row",justifyContent:"flex-start",position:"relative"}),children:[d.jsx("div",{className:"cc-tab-list",style:qn(r,n),children:d.jsx("div",{className:"cc-tab-item__wrapper",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:h()})}),d.jsx("div",{className:"cc-tab-pane",style:$n(r),children:m()})]});var A};so.defaultProps=oo;class io{constructor(e){let{style:t,createPollStyle:n,createPollIconURL:o,deleteIconURL:r,closeIconURL:s,optionIconURL:i,addAnswerIconURL:a,optionStyle:l}=e;this.style=t,this.createPollStyle=n,this.createPollIconURL=o,this.deleteIconURL=r,this.closeIconURL=s,this.optionIconURL=i,this.addAnswerIconURL=a,this.optionStyle=l}getPollsBubbleStyle(){return this.style}getCreatePollStyle(){return this.createPollStyle}getCreatePollIconURL(){return this.createPollIconURL}getDeleteIconURL(){return this.deleteIconURL}getCloseIconURL(){return this.closeIconURL}getOptionIconURL(){return this.optionIconURL}getAddAnswerIconURL(){return this.addAnswerIconURL}getOptionStyle(){return this.optionStyle}}const ao=e=>({height:e?.height,width:e?.width,background:e?.background,border:e?.border,borderRadius:e?.borderRadius,padding:"8px",position:"absolute",left:"8px",top:"8px",minHeight:"95px",minWidth:"230px",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"8px",alignItems:"flex-start"}),lo={display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"6px"},co=e=>({textFont:e?.subtitleTextFont,textColor:e?.subtitleTextColor}),Co={width:"100%",marginLeft:"-4px"},go={position:"relative"},uo={display:"flex",gap:"8px",paddingLeft:"8px",paddingRight:"8px"},po={height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"8px 28px"},ho=e=>new o.AvatarStyle({borderRadius:"16px",width:"38px",height:"38px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1)}),mo=e=>new r.IncomingCallStyle({width:"fit-content",height:"fit-content",background:e.palette.getAccent800(),border:"none",borderRadius:"8px",titleTextFont:n.fontHelper(e.typography.title2),titleTextColor:e.palette.getAccent("dark"),subtitleTextFont:n.fontHelper(e.typography.subtitle2),subtitleTextColor:e.palette.getAccent("dark"),acceptButtonTextFont:n.fontHelper(e.typography.text2),acceptButtonTextColor:e.palette.getAccent("dark"),acceptButtonBackground:e.palette.getPrimary(),acceptButtonBorderRadius:"8px",acceptButtonBorder:"none",declineButtonTextFont:n.fontHelper(e.typography.text2),declineButtonTextColor:e.palette.getAccent("dark"),declineButtonBackground:e.palette.getError(),declineButtonBorderRadius:"8px",declineButtonBorder:"none"}),Ao=(e,t)=>new o.ListItemStyle({height:"100%",width:"100%",background:"transparent",activeBackground:"transparent",borderRadius:"0",titleFont:e?.titleTextFont,titleColor:e?.titleTextColor,border:"none",separatorColor:t.palette.getAccent200(),hoverBackground:"transparent"}),xo=e=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:e.palette.getAccent900(),maximizeIconTint:e.palette.getAccent900()});function bo(e,t){const n=e.getInitiator()?.getUid();return!n||n===t?.getUid()}function yo(e,t){const o=e.getStatus(),r=bo(e,t);if(r&&o===n.CometChatUIKitConstants.calls.unanswered)return!1;const s=[n.CometChatUIKitConstants.calls.unanswered,n.CometChatUIKitConstants.calls.cancelled,n.CometChatUIKitConstants.calls.busy,n.CometChatUIKitConstants.calls.rejected];return!r&&s.includes(o)}function wo(e,t){return e.getInitiator().getUid()===t.getUid()?e.getReceiver():e.getInitiator()}function fo(e,t,o=!1){if(!e||!t)return"";let r="";const s=e.getStatus(),i=bo(e,t),a="_";if(yo(e,t))r=`MISSED${a}CALL`;else switch(s){case n.CometChatUIKitConstants.calls.initiated:r=i?`OUTGOING${a}CALL`:`INCOMING${a}CALL`;break;case n.CometChatUIKitConstants.calls.ongoing:r=`ONGOING${a}CALL`;break;case n.CometChatUIKitConstants.calls.ended:r=i?`OUTGOING${a}CALL`:`INCOMING${a}CALL`;break;case n.CometChatUIKitConstants.calls.unanswered:r=i?`UNANSWERED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.cancelled:r=i?`CANCELLED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.rejected:r=i?`REJECTED${a}CALL`:`MISSED${a}CALL`;break;case n.CometChatUIKitConstants.calls.busy:r=i?`UNANSWERED${a}CALL`:`MISSED${a}CALL`;break;default:r=`INCOMING${a}CALL`}return n.localize(r)}function Do(e){const t=Math.floor(e/60),n=Math.floor(e%60),o=Math.floor(60*(e-Math.floor(e)));let r="",s="",i="";return t>0&&(r=`${t}h`),n>0&&(s=`${n}m`),o>=0&&(i=`${o}s`),`${r} ${s} ${i}`}function Eo(e,t){return{display:"flex",color:t?.callStatusTextColor||e.palette.getAccent600(),font:t?.callStatusTextFont||n.fontHelper(e.typography.caption1),alignItems:"center",gap:"4px"}}function vo(e,t){return new o.AvatarStyle({borderRadius:t?.borderRadius||"24px",width:t?.width||"36px",height:t?.height||"36px",border:t?.border||"none",backgroundColor:t?.backgroundColor||e.palette.getAccent700(),nameTextColor:t?.nameTextColor||e.palette.getAccent900(),backgroundSize:t?.backgroundSize||"cover",nameTextFont:t?.nameTextFont||n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:t?.outerViewBorderWidth||"",outerViewBorderSpacing:t?.outerViewBorderSpacing||"",outerViewBorderColor:t?.outerViewBorderColor||"",outerViewBorderRadius:t?.outerViewBorderRadius||""})}function Io(e,t,r,s){const i=yo(e,s)?t.palette.getError():t.palette.getAccent();return new o.ListItemStyle({height:r?.height||"50px",width:r?.width||"100%",background:r?.background||t.palette.getBackground(),activeBackground:r?.activeBackground||t.palette.getAccent100(),borderRadius:r?.borderRadius||"0",titleFont:r?.titleFont||n.fontHelper(t.typography.title2),titleColor:r?.titleColor||i,border:r?.border||"none",separatorColor:r?.separatorColor||t.palette.getAccent200(),hoverBackground:r?.hoverBackground||t.palette.getAccent50(),padding:r?.padding||"0"})}function So(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function Fo(e,t){return new r.ListStyle({height:"100%",titleTextFont:t.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t.titleColor||e.palette.getAccent(),emptyStateTextColor:t.emptyStateTextColor||e.palette.getAccent600(),emptyStateTextFont:t.emptyStateTextFont||n.fontHelper(e.typography.caption1),errorStateTextColor:t.errorStateTextColor||e.palette.getAccent600(),errorStateTextFont:t.errorStateTextFont||n.fontHelper(e.typography.caption1),loadingIconTint:t.loadingIconTint||e.palette.getAccent600()})}function ko(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),background:"transparent"}}function To(e,t,n,o){let r;return r=yo(e,o)?n?.missedCallIconTint||t.palette.getAccent600():e.getInitiator().getUid()===o.getUid()?n?.outgoingCallIconTint||t.palette.getAccent600():n?.incomingCallIconTint||t.palette.getAccent600(),{height:"18px",width:"18px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:r}}function Mo(e,t){return{height:"20px",width:"20px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.infoIconTint||e.palette.getPrimary()}}function Bo(e,t){return{textFont:t?.dateSeparatorTextFont||n.fontHelper(e.typography.text2),textColor:t?.dateSeparatorTextColor||e.palette.getAccent700(),background:"transparent",padding:"0"}}const Lo={title:n.localize("CALLS"),titleAlignment:n.TitleAlignment.left,listItemView:null,subtitleView:null,tailView:null,emptyStateView:null,errorStateView:null,loadingStateView:null,emptyStateText:n.localize("NO_CALLS_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",incomingAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34856%209.89458C4.64141%2010.1873%205.03856%2010.3518%205.45265%2010.3518C5.86675%2010.3518%206.2639%2010.1873%206.55675%209.89458L7.38496%209.06639C7.45752%208.99388%207.51508%208.90778%207.55435%208.81301C7.59362%208.71825%207.61383%208.61667%207.61383%208.51409C7.61383%208.41151%207.59362%208.30993%207.55435%208.21517C7.51508%208.1204%207.45752%208.0343%207.38496%207.96179L5.77488%206.35123C5.69603%206.27169%205.601%206.21005%205.49623%206.17048C5.39146%206.13091%205.27941%206.11434%205.16767%206.1219C5.05593%206.12945%204.94713%206.16095%204.84864%206.21426C4.75015%206.26757%204.66428%206.34145%204.59686%206.43087C2.90974%208.72127%203.93211%2011.1335%206.00548%2013.2073C8.07886%2015.2812%2010.4927%2016.3025%2012.7847%2014.6154C12.8739%2014.5477%2012.9475%2014.4617%2013.0005%2014.3631C13.0536%2014.2645%2013.0848%2014.1556%2013.092%2014.0439C13.0993%2013.9322%2013.0824%2013.8202%2013.0426%2013.7155C13.0028%2013.6109%2012.9409%2013.516%2012.8612%2013.4374L11.2506%2011.8268C11.1781%2011.7543%2011.092%2011.6967%2010.9972%2011.6574C10.9025%2011.6182%2010.8009%2011.598%2010.6983%2011.598C10.5957%2011.598%2010.4941%2011.6182%2010.3994%2011.6574C10.3046%2011.6967%2010.2185%2011.7543%2010.146%2011.8268L9.31778%2012.655C9.17274%2012.8%209.05768%2012.9722%208.97918%2013.1617C8.90068%2013.3512%208.86028%2013.5543%208.86028%2013.7594C8.86028%2013.9645%208.90068%2014.1676%208.97918%2014.357C9.05768%2014.5465%209.17274%2014.7187%209.31778%2014.8637L9.89039%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3872%208.82531L15.4626%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.5105%208.82517H10.3872V5.7019%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",incomingVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.41384%2012.5186H5.1875V9.29224%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3776%207.31396L5.28149%2012.41%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",outgoingAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4623%203.75L10.387%208.82531%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.3391%203.75H15.4624V6.87327%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",outgoingVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M7.15111%207.31395H10.3774V10.5403%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M5.18738%2012.5186L10.2834%207.42248%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",missedAudioCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4622%204.53082L12.3389%207.65409L8.43481%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.43481%206.09245V3.75H10.7773%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",missedVideoCallIconUrl:"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.1573%2011.9539C13.907%2011.8167%2013.7515%2011.5541%2013.7515%2011.2687V8.73221C13.7515%208.44682%2013.907%208.18413%2014.1573%208.04701L16.9757%206.50318C17.4963%206.21798%2018.1322%206.59473%2018.1322%207.18836V12.8125C18.1322%2013.4061%2017.4963%2013.7829%2016.9757%2013.4977L14.1573%2011.9539Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M11.3834%209.1351L8.17601%2012.3425L4.16675%208.33325%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.16675%2010.7388V8.33325H6.5723%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.22925%2015.883C2.3663%2015.883%201.66675%2015.1834%201.66675%2014.3205V5.729C1.66675%204.86606%202.3663%204.1665%203.22925%204.1665H11.9874C12.8503%204.1665%2013.5499%204.86606%2013.5499%205.729V14.3205C13.5499%2015.1834%2012.8503%2015.883%2011.9874%2015.883H3.22925Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",infoIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",callLogRequestBuilder:void 0,onItemClick:void 0,onInfoClick:void 0,onError:e=>{console.log(e)},hideSeparator:!0,activeCall:void 0,datePattern:n.DatePatterns.time,dateSeparatorPattern:n.DatePatterns.DayDate,callLogsStyle:{},avatarStyle:{},listItemStyle:{},outgoingCallConfiguration:{}},Uo=e=>{const{title:i,titleAlignment:a,listItemView:l,subtitleView:c,tailView:C,errorStateView:g,emptyStateView:u,loadingStateView:p,emptyStateText:h,errorStateText:m,loadingIconURL:A,incomingAudioCallIconUrl:x,incomingVideoCallIconUrl:b,outgoingAudioCallIconUrl:y,outgoingVideoCallIconUrl:w,missedAudioCallIconUrl:f,missedVideoCallIconUrl:D,infoIconUrl:E,activeCall:v,callLogRequestBuilder:I,onItemClick:S,onInfoClick:F,onError:k,hideSeparator:M,datePattern:L,dateSeparatorPattern:U,callLogsStyle:P,avatarStyle:O,listItemStyle:j,outgoingCallConfiguration:V}=e,{theme:G}=t.useContext(R),[H,Q]=t.useState([]),[N,K]=t.useState(null),[z,J]=t.useState(n.States.loading),[_,W]=t.useState(!1),[Z,X]=t.useState(void 0),[q,$]=t.useState(void 0),[ee,te]=t.useState(null),[ne,oe]=t.useState(!1),re="callLogsScreen_"+(new Date).getTime(),se=t.useRef(null),ie=t.useRef(void 0);ie.current=Z;const ae=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)k?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);k?.(n)}}),[k]),le=t.useCallback((()=>{try{if(I)return I.build();{const e=N.getAuthToken();return(new r.CometChatUIKitCalls.CallLogRequestBuilder).setLimit(30).setCallCategory("call").setAuthToken(e).build()}}catch(e){ae(e)}}),[I,N,ae]),ce=t.useCallback((async()=>{try{return await(se?.current?.fetchNext())}catch(e){throw ae(e),e}}),[se,ae]),Ce=t.useCallback((async()=>{try{const e=await ce();e&&e.length?(Q((t=>[...t,...e])),J(n.States.loaded)):0===H.length&&J(n.States.empty)}catch(e){0===H.length&&J(n.States.error),ae(e)}}),[ce,H,Q,J,ae]),de=t.useCallback((()=>{s.CometChat.rejectCall(q?.getSessionId(),n.CometChatUIKitConstants.calls.cancelled).then((()=>{$(void 0),W(!1),n.CometChatMessageEvents.ccMessageSent.next({message:q,status:n.MessageStatus.success})})).catch((e=>{W(!1),ae(e)}))}),[q,$,W,ae]),ge=t.useCallback(((e,t)=>{const o=n.CometChatUIKitConstants.MessageReceiverType.user,r=t;let i="";i=e===s.CometChat.CALL_TYPE.AUDIO?s.CometChat.CALL_TYPE.AUDIO:s.CometChat.CALL_TYPE.VIDEO;const a=new s.CometChat.Call(r,i,o);s.CometChat.initiateCall(a).then((e=>{X(e),$(e),W(!0),n.CometChatMessageEvents.ccMessageSent.next({message:e,status:n.MessageStatus.inprogress})})).catch((e=>{ae(e)}))}),[$,W,ae,X]),ue=t.useCallback((e=>{try{if(S)S(e);else{const t=wo(e,N);t.uid&&ge(e?.type,t.uid)}}catch(e){ae(e)}}),[S,N,ge,ae]),pe=t.useCallback((e=>{try{F&&F(e)}catch(e){ae(e)}}),[F,ae]),he=t.useCallback((e=>{try{return!(!v||v.getSessionID()!==e.getSessionID())}catch(e){return ae(e),!1}}),[v,ae]),me=t.useCallback((e=>{try{const t=yo(e,N);let n,o=e.getType();return o=e.getType()===s.CometChat.CALL_TYPE.AUDIO?s.CometChat.CALL_TYPE.AUDIO:s.CometChat.CALL_TYPE.VIDEO,n=t?o===s.CometChat.CALL_TYPE.AUDIO?f:D:bo(e,N)?o===s.CometChat.CALL_TYPE.AUDIO?y:w:o===s.CometChat.CALL_TYPE.AUDIO?x:b,n}catch(e){ae(e)}}),[N,f,D,y,w,x,b,ae]),Ae=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){ae(e)}}),[ae]),xe=t.useCallback(((e,t)=>{try{return 0===t||Ae(H[t-1]?.getInitiatedAt(),e.getInitiatedAt())?d.jsx("div",{style:{margin:"5px 0",display:"flex"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:U,dateStyle:JSON.stringify(Bo(G,P))})}):null}catch(e){return ae(e),null}}),[U,P,Ae,H,G,ae]),be=t.useCallback((()=>new r.OutgoingCallStyle({background:V?.outgoingCallStyle?.background||G.palette.getBackground(),border:V?.outgoingCallStyle?.border||"none",borderRadius:V?.outgoingCallStyle?.borderRadius||"8px",declineButtonIconBackground:V?.outgoingCallStyle?.declineButtonIconBackground||G.palette.getError(),declineButtonIconTint:V?.outgoingCallStyle?.declineButtonIconTint||G.palette.getBackground(),declineButtonTextColor:V?.outgoingCallStyle?.declineButtonTextColor||G.palette.getAccent600(),declineButtonTextFont:V?.outgoingCallStyle?.declineButtonTextFont||n.fontHelper(G.typography.caption2),height:V?.outgoingCallStyle?.height||"580px",width:V?.outgoingCallStyle?.width||"320px",subtitleTextColor:V?.outgoingCallStyle?.subtitleTextColor||G.palette.getAccent600(),subtitleTextFont:V?.outgoingCallStyle?.subtitleTextFont||n.fontHelper(G.typography.subtitle1),titleTextColor:V?.outgoingCallStyle?.titleTextColor||G.palette.getAccent(),titleTextFont:V?.outgoingCallStyle?.titleTextFont||n.fontHelper(G.typography.heading)})),[V,G]),ye=t.useCallback((()=>new o.CallscreenStyle({maxHeight:"100%",maxWidth:"100%",border:"none",borderRadius:"0",background:"#1c2226",minHeight:"400px",minWidth:"400px",minimizeIconTint:G.palette.getAccent900(),maximizeIconTint:G.palette.getAccent900()})),[G]),we=t.useCallback((e=>{W(!1),$(e),te(e?.getSessionId()),oe(!0)}),[W,$,te,oe]),fe=t.useCallback((()=>{try{s.CometChat.addCallListener(re,new s.CometChat.CallListener({onOutgoingCallRejected:e=>{ie.current&&e.getSessionId()==ie.current.getSessionId()&&($(void 0),W(!1),oe(!1),X(void 0))},onOutgoingCallAccepted:e=>{ie.current&&e.getSessionId()==ie.current.getSessionId()&&($(void 0),we(e),W(!1),X(void 0))}}))}catch(e){ae(e)}}),[re,we,ae]),De=t.useCallback((()=>{oe(!1),te(null),$(void 0)}),[oe,te,$]),Ee=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallEnded.subscribe((()=>{De()}));return()=>{try{e?.unsubscribe()}catch(e){ae(e)}}}catch(e){ae(e)}}),[De,ae]),ve=t.useCallback((()=>{try{s.CometChat.removeCallListener(re)}catch(e){ae(e)}}),[re,ae]),Ie=t.useCallback((e=>null!==c?d.jsx(d.Fragment,{children:c(e)}):d.jsx(d.Fragment,{children:d.jsxs("div",{style:Eo(G,P),children:[d.jsx("cometchat-icon",{URL:me(e),buttonStyle:JSON.stringify(To(e,G,P,N))}),fo(e,N)]})})),[c,P,N,G,me]),Se=t.useCallback((e=>null!==C?d.jsx(d.Fragment,{children:C(e)}):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex",alignItems:"center",marginRight:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(ko(G,P)),pattern:L,timestamp:e?.getInitiatedAt()}),F?d.jsx(Y,{iconURL:E,buttonStyle:Mo(G,P),onClick:()=>pe(e)}):null]})})),[C,G,P,L,F,E,pe]),Fe=t.useMemo((()=>function(e,t){return l?l(e):d.jsxs(d.Fragment,{children:[xe(e,t)?xe(e,t):null,d.jsx(B,{title:wo(e,N)?.getName(),avatarURL:wo(e,N)?.avatar||wo(e,N)?.icon,avatarName:wo(e,N)?.getName(),listItemStyle:Io(e,G,j,N),avatarStyle:vo(G,O),hideSeparator:M,loadingIconURL:A,isActive:he(e),onClick:t=>ue?.(e),subtitleView:Ie(e),tailView:Se(e)})]})}),[l,xe,N,G,j,O,M,A,he,Ie,Se,ue]);return function(e,n,o,r,s,i,a,l,c){t.useEffect((()=>{Xn.getLoggedinUser().then((e=>{n(e)}),(e=>{c(e)}))}),[n,c]),t.useEffect((()=>{let t;return e&&(t=a?.(),o.current=r(),s?.(),i?.(),a?.()),()=>{l?.(),t?.()}}),[e])}(N,K,se,le,Ce,fe,Ee,ve,ae),d.jsxs("div",{style:So(G,P),children:[_?d.jsx("cometchat-backdrop",{children:d.jsx(rn,{onCloseClicked:V?.onDeclineButtonClicked||de,outgoingCallStyle:be(),call:q,avatarStyle:V?.avatarStyle,customSoundForCalls:V?.customSoundForCalls,customView:V?.customView,declineButtonIconURL:V?.declineButtonIconURL,disableSoundForCalls:V?.disableSoundForCalls,onError:V?.onError})}):null,ne&&!v?d.jsx(zt,{sessionID:ee,callWorkflow:n.CallWorkflow.defaultCalling,ongoingCallStyle:ye()}):null,d.jsx(T,{hideSearch:!0,list:H,onScrolledToBottom:Ce,listItemKey:"getSessionID",listItem:Fe,title:i,titleAlignment:a,loadingIconURL:A,emptyStateText:h,errorStateText:m,emptyStateView:u,errorStateView:g,loadingView:p,listStyle:Fo(G,P),state:z,showSectionHeader:!1})]})};function Ro(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function Po(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none",position:"relative"}}function Oo(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}function jo(e,t){const{backgroundColor:r,titleColor:s,titleFont:i}=t;return new o.ListItemStyle({background:r||"transparent",activeBackground:r||"transparent",border:"none",hoverBackground:r||"transparent",titleColor:s||e.palette.getAccent(),borderRadius:"0",titleFont:i||n.fontHelper(e.typography.text1),separatorColor:e.palette.getAccent200()})}Uo.defaultProps=Lo;class Vo{static getDefaultCallTemplate(e,t,n){return[this.getPrimaryDetailsTemplate(e,t,n),this.getSecondaryDetailsTemplate(e,t,n)]}static getCallButtons(e,t){return d.jsx(an,{user:e,group:t,callButtonsStyle:{width:"100%",height:"100%",border:"none",borderRadius:"0",background:"transparent",buttonPadding:"8px 32px",buttonBackground:"RGBA(20, 20, 20, 0.04)",buttonBorder:"0 4px",buttonBorderRadius:"10px"},voiceCallIconText:n.localize("AUDIO_CALL"),videoCallIconText:n.localize("VIDEO_CALL")},"callbuttons")}static getPrimaryDetailsTemplate(e,t,o){return new n.CometChatCallDetailsTemplate({id:"callControls",hideSectionSeparator:!0,options:(n,r)=>this.getPrimaryOptions(n??void 0,r??void 0,e??void 0,t??void 0,o??void 0)})}static getSecondaryDetailsTemplate(e,t,o){return new n.CometChatCallDetailsTemplate({id:"callOptions",hideSectionSeparator:!0,options:()=>this.getSecondaryOptions(e??void 0,o??void 0)})}static getPrimaryOptions(e,t,o,r,s){let i=[];return e&&i.push(new n.CometChatCallDetailsOption({id:"callControls",customView:this.getCallButtons(e,t)})),i.push(new n.CometChatCallDetailsOption({id:"callStatus",customView:this.generateCallDetailsHTML(o,o?.getInitiatedAt(),r,s)})),i}static getSecondaryOptions(e,t){const o=[];if(e?.participants&&e?.participants.length>0){const r=(e?.participants||[])?.length;o.push(new n.CometChatCallDetailsOption({id:"participants",customView:this.generateCallOptionsHTML("Participants",r,t)}))}if(e?.hasRecording){const r=(e?.getRecordings()||[])?.length;o.push(new n.CometChatCallDetailsOption({id:"recordings",customView:this.generateCallOptionsHTML("Recordings",r,t)}))}return o.push(new n.CometChatCallDetailsOption({id:"callHistory",customView:this.generateCallOptionsHTML("History",0,t)})),o}static generateCallDetailsHTML(e,t,r,s){const i=new o.ListItemStyle({height:"auto",width:"100%",background:s?.palette?.getAccent100(),hoverBackground:s?.palette?.getAccent100(),borderRadius:"8px",border:"none",padding:"10px"}),a=new o.DateStyle({textColor:s?.palette?.getAccent600(),textFont:n.fontHelper(s?.typography?.text3),padding:"0px",background:"transparent"}),l=new o.DateStyle({textColor:s?.palette?.getAccent600(),textFont:n.fontHelper(s?.typography?.subtitle2),padding:"0px",background:"transparent"}),c=fo(e,r,!0),C=d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(a),pattern:n.DatePatterns.DayDate,timestamp:t}),d.jsxs("div",{style:{display:"flex",gap:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(l),pattern:n.DatePatterns.time,timestamp:t}),d.jsx("div",{style:{font:n.fontHelper(s?.typography?.text2),color:s.palette.getAccent()},children:c})]})]}),g=d.jsx("div",{style:{font:n.fontHelper(s?.typography?.text3),color:s?.palette?.getAccent600(),marginRight:"15px",marginTop:"15px"},children:Do(e?.getTotalDurationInMinutes())});return d.jsx("div",{style:{marginTop:"25px",marginBottom:"25px",width:"100%",paddingLeft:"10px",paddingRight:"10px",boxSizing:"border-box"},children:d.jsx(B,{hideSeparator:!0,listItemStyle:i,subtitleView:C,tailView:g},t)})}static generateCallOptionsHTML(e,t,o){const r={iconHeight:"18px",iconWidth:"18px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:o.palette.getAccent600()},s={margin:"10px",marginBottom:"5px",padding:"10px",boxSizing:"border-box",background:o?.palette?.getAccent100(),borderRadius:"8px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",width:"100%"},i={font:n.fontHelper(o?.typography?.text2),color:o?.palette?.getAccent()},a={display:"flex",alignItems:"center",gap:"5px",font:n.fontHelper(o?.typography?.text3),color:o?.palette?.getAccent600()};return d.jsxs("div",{style:s,children:[d.jsx("span",{style:i,children:e}),d.jsxs("span",{style:a,children:[t>0?t:"",d.jsx(Y,{iconURL:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%28-1%200%200%20-1%2024%2024%29%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%280%201%20-1%200%2024%20-0%29%22%3E%3Ctitle%3EIcons%2F24%2FClose%20Chat%3C%2Ftitle%3E%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20id%3D%22Icons%2F24%2FClose-Chat%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.700000%2C%208.000000%29%22%3E%3Cpath%20d%3D%22M20.625%2C0%20L10.7983333%2C9.82575%20C10.669546%2C9.9547209%2010.4947627%2C10.0271915%2010.3125%2C10.0271915%20C10.1302373%2C10.0271915%209.95545401%2C9.9547209%209.82666667%2C9.82575%20L0%2C0%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E",buttonStyle:r})]})]})}}function Go(e,t){return{background:"transparent",textColor:t?.dateTextColor||e.palette.getAccent600(),textFont:t?.dateTextFont||n.fontHelper(e.typography.subtitle2)}}function Ho(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function Qo(e,t){return{font:t?.callStatusTextFont||n.fontHelper(e.typography.text2),color:t?.callStatusTextColor||e.palette.getAccent()}}function No(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function Ko(e,t){return new r.ListStyle({height:"90%",emptyStateTextColor:t?.emptyStateTextColor||e.palette.getAccent600(),emptyStateTextFont:t?.emptyStateTextFont||n.fontHelper(e.typography.caption1),errorStateTextColor:t?.errorStateTextColor||e.palette.getAccent600(),errorStateTextFont:t?.errorStateTextFont||n.fontHelper(e.typography.caption1),loadingIconTint:t?.loadingIconTint||e.palette.getAccent600()})}function zo(e,t){return{font:t?.callDurationTextColor||n.fontHelper(e.typography.caption1),color:t?.callDurationTextColor||e.palette.getAccent500()}}function Jo(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function Yo(e,t){return{textFont:t?.dateSeparatorTextFont||n.fontHelper(e.typography.text3),textColor:t?.dateSeparatorTextColor||e.palette.getAccent700(),background:"transparent"}}function _o(e,t){return{height:"1px",width:"100%",background:t?.dividerColor||e.palette.getAccent200()}}function Wo(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}const Zo={title:n.localize("CALL_HISTORY"),emptyStateText:n.localize("NO_CALLS_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",emptyStateView:null,loadingStateView:null,errorStateView:null,subtitleView:null,tailView:null,callLogRequestBuilder:void 0,callUser:void 0,callGroup:void 0,onItemClick:void 0,onBackClick:void 0,onError:()=>{},datePattern:n.DatePatterns.time,dateSeparatorPattern:n.DatePatterns.DayDate,listItemStyle:{},callLogHistoryStyle:{}},Xo=e=>{const{title:o,emptyStateText:i,errorStateText:a,backIconUrl:l,loadingIconURL:c,emptyStateView:C,errorStateView:g,loadingStateView:u,subtitleView:p,tailView:h,callLogRequestBuilder:m,callUser:A,callGroup:x,onItemClick:b,onBackClick:y,onError:w,datePattern:f,dateSeparatorPattern:D,listItemStyle:E,callLogHistoryStyle:v}=e,{theme:I}=t.useContext(R),[S,F]=t.useState([]),[k,M]=t.useState(null),[L,U]=t.useState(n.States.loading),P=t.useRef(null),O=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)w?.(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);w?.(n)}}),[w]),j=t.useCallback((()=>{try{let e;if(m)e=m;else{const t=k.getAuthToken()||"";e=(new r.CometChatUIKitCalls.CallLogRequestBuilder).setLimit(30).setCallCategory("call").setAuthToken(t)}return x?e=e.setGuid(x?.getGuid()):A&&(e=e.setUid(A?.getUid())),e.build()}catch(e){O(e)}}),[m,x,A,k,O]),V=t.useCallback((async()=>{try{return await(P?.current?.fetchNext())}catch(e){throw O(e),new Error("Error while fetching call list")}}),[P,O]),G=t.useCallback((async()=>{try{const e=await V();e&&e.length>0?(F((t=>[...t,...e])),U(n.States.loaded)):0===S.length&&U(n.States.empty)}catch(e){0===S.length&&U(n.States.error),O(e)}}),[V,F,U,S,O]),H=t.useCallback((e=>{try{b&&b(e)}catch(e){O(e)}}),[b,O]),Q=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){return O(e),!1}}),[O]),N=t.useCallback(((e,t)=>{try{return 0===t?d.jsx("div",{style:{margin:"4px 0 0 8px"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:D,dateStyle:JSON.stringify(Yo(I,v))})}):Q(S[t-1]?.getInitiatedAt(),e.getInitiatedAt())?d.jsxs(d.Fragment,{children:[d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(_o(I,v))}),d.jsx("div",{style:{margin:"4px 0 0 8px"},children:d.jsx("cometchat-date",{timestamp:e.getInitiatedAt(),pattern:D,dateStyle:JSON.stringify(Yo(I,v))})})]}):null}catch(e){return O(e),null}}),[D,I,v,Q,S,O]),K=t.useCallback((e=>{try{return!!e?.getTotalDurationInMinutes()&&Do(e?.getTotalDurationInMinutes())}catch(e){return O(e),!1}}),[O]),z=t.useCallback((e=>p?p(e):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(Go(I,v)),pattern:f,timestamp:e?.getInitiatedAt()}),d.jsx("div",{style:Qo(I,v),children:fo(e,k,!0)})]})})),[p,I,v,f,k]),J=t.useCallback((e=>h?h(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:zo(I,v),children:K(e)?K(e):"00:00"})})),[h,I,v,K]),_=t.useMemo((()=>function(e,t){return d.jsxs(d.Fragment,{children:[N(e,t)?d.jsx("div",{children:N(e,t)}):null,d.jsx(B,{loadingIconURL:c,listItemStyle:Ho(I,E),onClick:t=>H?.(e),subtitleView:z(e),tailView:J(e),hideSeparator:!0})]})}),[N,c,I,E,z,J,H]);return function(e,n,o,r,s,i){t.useEffect((()=>{Xn.getLoggedinUser().then((e=>{n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{e&&(o.current=r(),s?.())}),[e])}(k,M,P,j,G,O),d.jsx(d.Fragment,{children:d.jsxs("div",{style:No(I,v),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 30px",alignItems:"center",marginBottom:"10px"},children:[y?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(Y,{iconURL:l,buttonStyle:Jo(I,v),onClick:y?.()})}):null,d.jsx("div",{style:Wo(I,v),children:o})]}),d.jsx(T,{hideSearch:!0,list:S,onScrolledToBottom:G,listItemKey:"getSessionID",listItem:_,loadingIconURL:c,emptyStateText:i,errorStateText:a,loadingView:u,emptyStateView:C,errorStateView:g,listStyle:Ko(I,v),state:L,showSectionHeader:!1})]})})};Xo.defaultProps=Zo;function qo(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function $o(e,t){return new r.ListStyle({height:"90%",titleTextFont:t?.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t?.titleColor||e.palette.getAccent()})}function er(e,t){return new o.AvatarStyle({borderRadius:t?.borderRadius||"24px",width:t?.width||"36px",height:t?.height||"36px",border:t?.border||"none",backgroundColor:t?.backgroundColor||e.palette.getAccent700(),nameTextColor:t?.nameTextColor||e.palette.getAccent900(),backgroundSize:t?.backgroundSize||"cover",nameTextFont:t?.nameTextFont||n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:t?.outerViewBorderWidth||"",outerViewBorderSpacing:t?.outerViewBorderSpacing||"",outerViewBorderColor:t?.outerViewBorderColor||"",outerViewBorderRadius:t?.outerViewBorderRadius||""})}function tr(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",titleFont:t?.titleFont||n.fontHelper(e.typography.title2),titleColor:t?.titleColor||e.palette.getAccent(),border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function nr(e,t){return{display:"flex",color:t?.callStatusColor||e.palette.getAccent600(),font:t?.callStatusFont||n.fontHelper(e.typography.caption1)}}function or(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),font:t?.dateTextFont||n.fontHelper(e.typography.caption1),color:t?.dateTextColor||e.palette.getAccent500(),background:"transparent",padding:"3px 10px"}}function rr(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function sr(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}const ir={title:n.localize("PARTICIPANTS"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",call:void 0,datePattern:n.DatePatterns.time,avatarStyle:{},listItemStyle:{},callLogParticipantsStyle:{},listItemView:null,subtitleView:null,tailView:null,onBackClick:void 0,onItemClick:void 0},ar=e=>{const{title:o,backIconUrl:r,call:s,datePattern:i,avatarStyle:a,listItemStyle:l,callLogParticipantsStyle:c,listItemView:C,subtitleView:g,tailView:u,onBackClick:p,onItemClick:h}=e,{theme:m}=t.useContext(R),A=t.useCallback((e=>{h&&h(e)}),[h]),x=t.useCallback((()=>s?.getParticipants()),[s]),b=t.useCallback((()=>s?.getInitiatedAt()),[s]),y=e=>e?.getHasJoined()||e?.getJoinedAt()?Do(e?.getTotalDurationInMinutes()):Do(0),w=t.useCallback((e=>g?g(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:nr(m,c),children:y(e)})})),[g,m,c]),f=t.useCallback((e=>u?u(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:d.jsx("cometchat-date",{dateStyle:JSON.stringify(or(m,c)),pattern:i,timestamp:b()})})})),[u,m,c,i,b]),D=t.useMemo((()=>function(e,t){return C?C(e):d.jsx(d.Fragment,{children:d.jsx(B,{title:e?.getName(),avatarURL:e?.getAvatar(),avatarName:e?.getName(),listItemStyle:tr(m,l),avatarStyle:er(m,a),hideSeparator:!0,onClick:t=>A?.(e),subtitleView:w(e),tailView:f(e)})})}),[C,m,l,a,w,f,A]);return d.jsx(d.Fragment,{children:d.jsxs("div",{style:rr(m,c),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 20px",alignItems:"center",marginBottom:"10px"},children:[p?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(Y,{iconURL:r,buttonStyle:qo(m,c),onClick:p?.()})}):null,d.jsx("div",{style:sr(m,c),children:o})]}),d.jsx(T,{hideSearch:!0,list:x()||[],listItem:D,listItemKey:"getUid",listStyle:$o(m,c),state:n.States.loaded,showSectionHeader:!1})]})})};function lr(e,t){return new r.ListStyle({height:"90%",titleTextFont:t?.titleFont||n.fontHelper(e.typography.title1),titleTextColor:t?.titleColor||e.palette.getAccent()})}function cr(e,t){return new o.ListItemStyle({height:t?.height||"45px",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),activeBackground:t?.activeBackground||e.palette.getAccent100(),borderRadius:t?.borderRadius||"0",titleFont:t?.titleFont||n.fontHelper(e.typography.title2),titleColor:t?.titleColor||e.palette.getAccent(),border:t?.border||"none",separatorColor:t?.separatorColor||e.palette.getAccent200(),hoverBackground:t?.hoverBackground||e.palette.getAccent50(),padding:t?.padding||"0"})}function Cr(e,t){return{display:"flex",color:t?.recordingDurationColor||e.palette.getAccent600(),font:t?.recordingDurationFont||n.fontHelper(e.typography.caption1)}}function dr(e,t){return{textColor:t?.dateTextColor||e.palette.getAccent500(),textFont:t?.dateTextFont||n.fontHelper(e.typography.caption1),background:"transparent"}}function gr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.backIconTint||e.palette.getPrimary()}}function ur(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:t?.downloadIconTint||e.palette.getPrimary()}}function pr(e,t){return{height:t?.height||"100%",width:t?.width||"100%",background:t?.background||e.palette.getBackground(),borderRadius:t?.borderRadius||"0",border:t?.border||"none"}}function hr(e,t){return{font:t?.titleFont||n.fontHelper(e.typography.text1),color:t?.titleColor||e.palette.getAccent(),background:"transparent"}}ar.defaultProps=ir;const mr={title:n.localize("RECORDING"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",downloadIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",hideDownloadButton:!1,call:void 0,datePattern:n.DatePatterns.time,listItemStyle:{},callLogRecordingsStyle:{},onBackClick:void 0,onItemClick:void 0,onDownloadClick:void 0,listItemView:null,subtitleView:null,tailView:null},Ar=e=>{const{title:o,backIconUrl:r,downloadIconUrl:s,hideDownloadButton:i,call:a,datePattern:l,listItemStyle:c,callLogRecordingsStyle:C,onBackClick:g,onItemClick:u,onDownloadClick:p,listItemView:h,subtitleView:m,tailView:A}=e,{theme:x}=t.useContext(R),b=t.useCallback((e=>{u&&u(e)}),[u]),y=t.useCallback((e=>{var t;p?p(e):(t=e?.getRecordingURL(),fetch(t).then((e=>e.blob())).then((e=>{const t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download="recording.mp4",document.body.appendChild(n),n.click()})).catch((e=>console.error(e))))}),[p]),w=t.useCallback((()=>{try{return a?.getRecordings()}catch(e){console.log(e)}}),[a]),f=e=>{try{return e?.getStartTime()}catch(e){console.log(e)}},D=e=>{try{return function(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.floor(e%3600%60);let r="",s="",i="";return t>0&&(r=`${t}h`),n>0&&(s=`${n}m`),o>=0&&(i=`${o}s`),`${r} ${s} ${i}`}(e?.getDuration())}catch(e){console.log(e)}},E=t.useCallback((e=>m?m(e):d.jsx(d.Fragment,{children:d.jsx("div",{style:Cr(x,C),children:D(e)})})),[m,x,C]),v=t.useCallback((e=>A?A(e):d.jsx(d.Fragment,{children:d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[d.jsx("cometchat-date",{dateStyle:JSON.stringify(dr(x,C)),pattern:l,timestamp:f(e)}),i?null:d.jsx(Y,{iconURL:s,buttonStyle:ur(x,C),onClick:()=>y(e)})]})})),[A,x,C,l,i,s,y]),I=t.useMemo((()=>function(e,t){return h?h(e):d.jsx(d.Fragment,{children:d.jsx(B,{title:e?.getRid(),listItemStyle:cr(x,c),hideSeparator:!0,onClick:t=>b?.(e),subtitleView:E(e),tailView:v(e)})})}),[h,x,c,E,v,b]);return d.jsx(d.Fragment,{children:d.jsxs("div",{style:pr(x,C),children:[d.jsxs("div",{style:{display:"flex",padding:"10px 20px",alignItems:"center",marginBottom:"10px"},children:[g?d.jsx("div",{style:{marginRight:"15px"},children:d.jsx(Y,{iconURL:r,buttonStyle:gr(x,C),onClick:g?.()})}):null,d.jsx("div",{style:hr(x,C),children:o})]}),d.jsx(T,{hideSearch:!0,list:w()||[],listItem:I,listItemKey:"getRid",listStyle:lr(x,C),state:n.States.loaded,showSectionHeader:!1})]})})};Ar.defaultProps=mr;const xr={title:n.localize("CALL_DETAIL"),backIconUrl:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onBackClick:void 0,avatarStyle:{},data:(e,t,n)=>[],callLogHistoryConfiguration:{},callLogParticipantsConfiguration:{},callLogRecordingsConfiguration:{},callLogDetailsStyle:{}},br=e=>{const{title:r,backIconUrl:s,call:i,onBackClick:a,avatarStyle:l,data:c,callLogHistoryConfiguration:C,callLogParticipantsConfiguration:g,callLogRecordingsConfiguration:u,callLogDetailsStyle:p}=e,{theme:h}=t.useContext(R),[m,A]=t.useState(null),[x,b]=t.useState([]),[y,w]=t.useState(!1),[f,D]=t.useState(!1),[E,v]=t.useState(!1),I=t.useCallback((()=>({...new o.AvatarStyle(S(h)),...l})),[l,h]),S=e=>({borderRadius:"24px",width:"50px",height:"50px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorder:"",outerViewBorderSpacing:""}),F=t.useCallback((()=>{let e=c?.(i,m,h);e&&e.length||(e=Vo.getDefaultCallTemplate(i,m,h)),b([...e])}),[b,i,m,h]),k=t.useCallback((e=>{const{options:t,id:n}=e;let o=[];if(t&&void 0!==n){const e=wo(i,m);o=e?.getUid?t(e,null,n):t(null,e,n)}return o}),[i,m]),T=t.useCallback((e=>{if(e?.onClick)e.onClick(i);else switch(e.id){case"participants":w(!0);break;case"recordings":D(!0);break;case"callHistory":v(!0)}}),[i,w,D,v]),M=t.useCallback((()=>m&&!y&&!f&&!E),[m,y,f,E]),L=t.useCallback((()=>m&&y&&!f&&!E),[m,y,f,E]),U=t.useCallback((()=>m&&!y&&f&&!E),[m,y,f,E]),P=t.useCallback((()=>m&&!y&&!f&&E),[m,y,f,E]),O=t.useCallback((()=>{w(!1),D(!1),v(!1)}),[w,D,v]),j=t.useCallback((()=>{const e=wo(i,m);return e?.getUid?e:void 0}),[i,m]),V=t.useCallback((()=>{const e=wo(i,m);return e?.getGuid?e:void 0}),[i,m]),G=t.useCallback((()=>d.jsx(d.Fragment,{children:x.map((e=>d.jsxs("div",{children:[k(e).map((t=>{const n={backgroundColor:t.backgroundColor,titleColor:t.titleColor,titleFont:t.titleFont};return d.jsx("div",{children:d.jsx("div",{style:{width:"100%"},className:"cc-call-details__options",children:t.customView?d.jsx("div",{className:"cc-call-details__option-content",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},onClick:()=>T(t),children:t.customView}):d.jsx(B,{title:t.title,avatarURL:t.iconURL,onClick:()=>T(t),listItemStyle:jo(h,n),hideSeparator:e.hideItemSeparator,avatarStyle:new o.AvatarStyle({backgroundColor:t.iconTint}),id:t.id,tailView:t.tail},t.id)},t?.id)})})),e.title]})))})),[x,k,T]);return function(e,n,o,r){t.useEffect((()=>{Xn.getLoggedinUser().then((e=>{n(e)}))}),[n]),t.useEffect((()=>{e&&r?.()}),[e,o])}(m,A,i,F),d.jsx(d.Fragment,{children:d.jsxs("div",{style:Po(h,p),children:[M()?d.jsxs("div",{children:[a?d.jsxs("div",{style:{position:"absolute",top:"15px",left:"15px",display:"flex",gap:"8px",justifyContent:"center"},children:[d.jsx(Y,{iconURL:s,buttonStyle:Ro(h,p),onClick:a?.()}),d.jsx("div",{style:Oo(h,p),children:r})]}):null,d.jsxs("div",{style:{height:"auto",width:"100%",minHeight:"150px",padding:"16px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",boxSizing:"border-box",gap:"8px"},children:[d.jsx("cometchat-avatar",{avatarStyle:JSON.stringify(I()),image:wo(i,m).avatar,name:wo(i,m).name}),d.jsx("span",{style:((e,t)=>({color:t?.nameTextColor||e.palette.getAccent(),font:t?.nameTextFont||n.fontHelper(e.typography.title1)}))(h,p),children:wo(i,m).name})]}),G()]}):null,L()?d.jsx(ar,{call:i,title:n.localize("PARTICIPANTS"),backIconUrl:g?.backIconUrl||s,avatarStyle:g?.avatarStyle||l,onBackClick:()=>g?.onBackClick||O,onItemClick:g?.onItemClick||void 0,datePattern:g?.datePattern||void 0,listItemStyle:g?.listItemStyle||void 0,callLogParticipantsStyle:g?.callLogParticipantsStyle||void 0,listItemView:g?.listItemView||null,subtitleView:g?.subtitleView||null,tailView:g?.tailView||null}):null,U()?d.jsx(Ar,{call:i,title:n.localize("RECORDING"),backIconUrl:u?.backIconUrl||s,onBackClick:()=>u?.onBackClick||O,onItemClick:u?.onItemClick||void 0,datePattern:u?.datePattern||void 0,listItemStyle:u?.listItemStyle||void 0,callLogRecordingsStyle:u?.callLogRecordingsStyle||void 0,downloadIconUrl:u?.downloadIconUrl||void 0,hideDownloadButton:u?.hideDownloadButton||void 0,onDownloadClick:u?.onDownloadClick||void 0,listItemView:u?.listItemView||null,subtitleView:u?.subtitleView||null,tailView:u?.tailView||null}):null,P()?d.jsx(Xo,{callUser:j(),callGroup:V(),title:n.localize("CALL_HISTORY"),backIconUrl:C?.backIconUrl||s,listItemStyle:C?.listItemStyle||void 0,emptyStateView:C?.emptyStateView||null,errorStateView:C?.errorStateView||null,loadingIconURL:C?.loadingIconURL||void 0,loadingStateView:C?.loadingStateView||null,subtitleView:C?.subtitleView||void 0,tailView:C?.tailView||null,callLogRequestBuilder:C?.callLogRequestBuilder||null,onItemClick:C?.onItemClick||void 0,onBackClick:()=>C?.onBackClick||O,datePattern:C?.datePattern||void 0,dateSeparatorPattern:C?.dateSeparatorPattern||void 0,callLogHistoryStyle:C?.callLogHistoryStyle||void 0,onError:C?.onError||void 0}):null]})})};function yr(e,t){return{height:t?.height||"100%",width:t?.width||"100%",border:t?.border||"none",borderRadius:t?.borderRadius||"0px",background:t?.background||e.palette.getBackground(),display:"flex",boxSizing:"border-box",position:"relative"}}function wr(e,t){return new o.LabelStyle({background:"transparent",textFont:t?.messageTextFont||n.fontHelper(e.typography.heading),textColor:t?.messageTextColor||e.palette.getAccent700()})}br.defaultProps=xr;const fr={isMobileView:!1,messageText:n.localize("NO_CALLS_SELECTED"),withDetailsStyle:{},callLogDetailsConfiguration:{},callLogsConfiguration:{}},Dr=e=>{const{isMobileView:o,messageText:r,withDetailsStyle:s,callLogDetailsConfiguration:i,callLogsConfiguration:a}=e,{theme:l}=t.useContext(R),[c,C]=t.useState(null),g=t.useCallback((e=>{C(e)}),[C]),u=t.useCallback((()=>o?{width:"100%",display:c?"none":"block"}:{width:"280px",minWidth:"max(25%, 280px)"}),[o,c]),p=t.useCallback((()=>o?{width:"100%",display:c?"block":"none"}:{width:"calc(100% - 280px)"}),[o,c]),h=t.useCallback((()=>{C(null)}),[C]);return function(e,n,o,r,s){t.useEffect((()=>{if(e.callLogDetailsStyle={...e.callLogDetailsStyle,border:`1px solid ${s?.palette?.getAccent100()}`},r){const t=()=>{o(null)};e.onBackClick=t}}),[e,r,o]),t.useEffect((()=>{n.callLogsStyle={...n.callLogsStyle,border:`1px solid ${s?.palette?.getAccent100()}`}}),[n])}(i,a,C,o,l),d.jsxs("div",{style:yr(l,s),children:[d.jsx("div",{style:u(),children:d.jsx(Uo,{title:n.localize("CALLS"),onInfoClick:a?.onInfoClick||g,activeCall:c,titleAlignment:a?.titleAlignment,listItemView:a?.listItemView,subtitleView:a?.subtitleView,tailView:a?.tailView,emptyStateView:a?.emptyStateView,errorStateView:a?.errorStateView,loadingIconURL:a?.loadingIconURL,loadingStateView:a?.loadingStateView,callLogRequestBuilder:a?.callLogRequestBuilder,onItemClick:a?.onItemClick||void 0,onError:a?.onError||void 0,listItemStyle:a?.listItemStyle,infoIconUrl:a?.infoIconUrl,datePattern:a?.datePattern,dateSeparatorPattern:a?.dateSeparatorPattern,incomingAudioCallIconUrl:a?.incomingAudioCallIconUrl,incomingVideoCallIconUrl:a?.incomingVideoCallIconUrl,outgoingAudioCallIconUrl:a?.outgoingAudioCallIconUrl,outgoingVideoCallIconUrl:a?.outgoingVideoCallIconUrl,missedAudioCallIconUrl:a?.missedAudioCallIconUrl,missedVideoCallIconUrl:a?.missedVideoCallIconUrl,callLogsStyle:a?.callLogsStyle,avatarStyle:a?.avatarStyle,hideSeparator:a?.hideSeparator,outgoingCallConfiguration:a?.outgoingCallConfiguration})}),d.jsx("div",{style:p(),children:c?d.jsx(br,{title:n.localize("CALL_DETAIL"),call:c,onBackClick:()=>i?.onBackClick||h,backIconUrl:i?.backIconUrl,avatarStyle:i?.avatarStyle,data:i?.data||void 0,callLogHistoryConfiguration:i?.callLogHistoryConfiguration,callLogParticipantsConfiguration:i?.callLogParticipantsConfiguration,callLogRecordingsConfiguration:i?.callLogRecordingsConfiguration,callLogDetailsStyle:i?.callLogDetailsStyle}):d.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%"},children:d.jsx("cometchat-label",{text:r,labelStyle:JSON.stringify(wr(l,s))})})})]})};function Er(e,t){return{position:"relative",width:e?.width||"100%",height:e?.height||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"0",boxShadow:e?.boxShadow,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:e?.padding||"0",overflow:"hidden"}}function vr(e,t){return new r.UsersStyle({width:"100%",height:"100%",border:"none",borderRadius:"0",background:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.title1),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.title1),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),onlineStatusColor:e?.onlineStatusColor||t.palette.getSuccess(),separatorColor:e?.separatorColor||t.palette.getAccent50(),searchIconTint:e?.searchIconTint||t.palette.getAccent400(),searchBorder:e?.searchBorder||`1px solid ${t.palette.getAccent50()}`,searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent400(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),sectionHeaderTextFont:e?.sectionHeaderTextFont,sectionHeaderTextColor:e?.sectionHeaderTextColor})}function Ir(e,t){return{background:e?.addMembersButtonBackground||t.palette.getPrimary(),buttonTextColor:e?.addMembersButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.addMembersButtonTextFont||n.fontHelper(t.typography.title2),width:"100%",border:"none",borderRadius:"8px",padding:"16px 0",display:"flex",justifyContent:"center",textAlign:"center"}}function Sr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",left:"19px",top:"19px"}}function Fr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",top:"19px",right:"19px"}}Dr.defaultProps=fr;var kr="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",Tr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Mr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Br="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Lr(e){const{backButtonIconURL:o=Mr,showBackButton:i=!1,onBack:a,title:l=n.localize("ADD_MEMBERS"),titleAlignment:c=n.TitleAlignment.center,hideSearch:C=!1,searchIconURL:g=kr,searchPlaceholder:u=n.localize("SEARCH"),showSectionHeader:p=!1,sectionHeaderField:h="getName",loadingIconURL:m=Tr,loadingStateView:x,emptyStateText:y=n.localize("NO_USERS_FOUND"),emptyStateView:w,errorStateText:f=n.localize("SOMETHING_WRONG"),errorStateView:D,hideError:E=!1,disableUsersPresence:v=!1,hideSeparator:I=!1,onError:S,menus:F,options:k,selectionMode:T=n.SelectionMode.multiple,onSelect:M,usersRequestBuilder:B,searchRequestBuilder:L,listItemView:U,subtitleView:P,group:O,onAddMembersButtonClick:j=null,buttonText:V=n.localize("ADD_MEMBERS"),closeButtonIconURL:G=Br,onClose:H,statusIndicatorStyle:Q,avatarStyle:N,listItemStyle:K,addMembersStyle:z=null}=e,J=t.useRef([]),_=t.useRef(T),W=t.useRef(null),Z=A(M),X=A(O),q=A(a),ee=A(j),te=b(S),{theme:ne}=t.useContext(R),oe=t.useCallback((e=>{const t=new s.CometChat.GroupMember(e.getUid(),n.CometChatUIKitConstants.groupMemberScope.participant);return t.setName(e.getName()),t.setGuid(X.current.getGuid()),t}),[X]),re=t.useCallback(((e,t)=>{if(Z.current)return Z.current(e,t);if(_.current===n.SelectionMode.single)J.current=[oe(e)];else if(_.current===n.SelectionMode.multiple){const t=e.getUid(),n=[];let o=!1;for(let e=0;e{const i=new s.CometChat.Action(o.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return i.setAction(n.CometChatUIKitConstants.groupMemberAction.ADDED),i.setActionBy(r.CometChatUIKitUtility.clone(t)),i.setActionFor(r.CometChatUIKitUtility.clone(o)),i.setActionOn(r.CometChatUIKitUtility.clone(e)),i.setReceiver(r.CometChatUIKitUtility.clone(o)),i.setSender(r.CometChatUIKitUtility.clone(t)),i.setConversationId("group_"+o.getGuid()),i.setMuid(r.CometChatUIKitUtility.ID()),i.setMessage(`${t.getName()} added ${e.getUid()}`),i.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),i}),[]),ie=t.useCallback((async()=>{if(0!==J.current.length)try{const e=X.current,t=ee.current;if(t)return t(e.getGuid(),J.current),void(J.current=[]);const o=new Set,i=await s.CometChat.addMembersToGroup(e.getGuid(),J.current,[]);if(i)for(const e in i)"success"===i[e]&&o.add(e);const a=[];for(let e=0;ese(e,l,t))),usersAdded:a,userAddedIn:t,userAddedBy:r.CometChatUIKitUtility.clone(l)})}J.current=[],q.current?.()}catch(e){te(e)}}),[te,se,X,ee,q]);return function(e){const{loggedInUserRef:n,errorHandler:o,selectionMode:r,selectionModeRef:i,membersToAddRef:a}=e;t.useEffect((()=>{i.current!==r&&(i.current=r,a.current=[])}),[r,a,i]),t.useEffect((()=>{(async()=>{try{n.current=await s.CometChat.getLoggedinUser()}catch(e){o(e)}})()}),[o,n])}({loggedInUserRef:W,errorHandler:te,selectionMode:T,selectionModeRef:_,membersToAddRef:J}),d.jsxs("div",{className:"cc-add-members",style:Er(z,ne),children:[d.jsx($,{title:l,tileAlignment:c,hideSearch:C,searchIconURL:g,searchPlaceholderText:u,showSectionHeader:p,sectionHeaderKey:h,loadingIconURL:m,loadingStateView:x,emptyStateText:y,emptyStateView:w,errorStateText:f,errorStateView:D,hideError:E,disableUsersPresence:v,hideSeparator:I,onError:S,menus:F,options:k,selectionMode:T,onSelect:re,usersRequestBuilder:B,searchRequestBuilder:L,listItemView:U,subtitleView:P,statusIndicatorStyle:Q,avatarStyle:N,listItemStyle:K,usersStyle:vr(z,ne),onItemClick:void 0,activeUser:void 0}),d.jsx("div",{className:"cc-add-members__add-btn-wrapper",style:{padding:"16px",boxSizing:"border-box"},children:d.jsx(Y,{text:V,buttonStyle:Ir(z,ne),onClick:ie})}),i?d.jsx(Y,{iconURL:o,buttonStyle:Sr(z,ne),onClick:a}):null,d.jsx(Y,{iconURL:G,buttonStyle:Fr(z,ne),onClick:H})]})}function Ur(e,t){return{position:"relative",height:e?.height||"100%",width:e?.width||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"0",boxShadow:e?.boxShadow||"",padding:e?.padding||"0",boxSizing:"border-box"}}function Rr(e,t){return new r.ListStyle({width:"100%",height:"100%",background:"inherit",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),separatorColor:e?.separatorColor||t.palette.getAccent400()})}function Pr(e){return{...e||{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Or(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"36px",height:e?.height||"36px",border:e?.border||"none",backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function jr(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function Vr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.backButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",left:"19px",top:"19px"}}function Gr(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary()||"",background:"transparent",position:"absolute",right:"19px",top:"19px"}}function Hr(e,t){return{border:"none",borderRadius:"0",buttonIconTint:e?.unbanIconTint||t.palette.getPrimary(),background:"transparent"}}function Qr(e){return new o.MenuListStyle({border:"none",borderRadius:"8px",background:e.palette.getBackground(),moreIconTint:e.palette.getPrimary(),submenuWidth:"100%",submenuHeight:"100%",submenuBorder:`1px solid ${e.palette.getAccent200()}`,submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground()})}var Nr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";class Kr{constructor(e){const{bannedMembersRequestBuilder:t,searchRequestBuilder:n,searchText:o,groupGuid:r,bannedMembersSearchText:i}=e;let a=t||new s.CometChat.BannedMembersRequestBuilder(r).setLimit(30);o&&n?(a=n,a.setSearchKeyword(o)):o&&!n&&t?(a=t,a.setSearchKeyword(o)):!o&&t&&n?(a=t,a.setSearchKeyword(i.current)):o||!t||n?o||t||!n?a.setSearchKeyword(o):a.setSearchKeyword(i.current):(a=t,a.setSearchKeyword(i.current)),this.bannedMembersRequest=a.build()}fetchNext(){return this.bannedMembersRequest.fetchNext()}static createGroupMemberFromUser(e,t){const n=new s.CometChat.GroupMember(e.getUid());return n.setName(e.getName()),n.setAvatar(e.getAvatar()),n.setGuid(t.getGuid()),n}static attachSDKGroupListener(e,t){const n="BannedMembers_GroupListener_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberBanned:(n,o,r,s)=>{e.current.getGuid()===s.getGuid()&&t({type:"addMember",member:Kr.createGroupMemberFromUser(o,e.current)})},onGroupMemberUnbanned:(n,o,r,s)=>{e.current.getGuid()===s.getGuid()&&t({type:"removeBannedMemberIfPresent",bannedMemberUid:o.getUid()})}})),()=>s.CometChat.removeGroupListener(n)}static attachSDKUserListener(e){const t="BannedMembers_UserListener_"+String(Date.now()),n=t=>e({type:"updateMemberStatusIfPresent",member:t});return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:n,onUserOffline:n})),()=>s.CometChat.removeUserListener(t)}}var zr,Jr="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",Yr="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",_r="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Wr(e,t){let n=e;const{type:o}=t;switch(o){case"setSearchText":n={...e,searchText:t.searchText};break;case"setFetchState":n={...e,fetchState:t.fetchState};break;case"appendBannedMembers":{const{bannedMembers:o}=t;0!==o.length&&(n={...e,bannedMembers:[...e.bannedMembers,...o]});break}case"setBannedMembers":n={...e,bannedMembers:t.bannedMembers};break;case"removeBannedMemberIfPresent":{const{bannedMembers:o}=e,r=t.bannedMemberUid,s=o.findIndex((e=>e.getUid()===r));s>-1&&(n={...e,bannedMembers:o.filter(((e,t)=>t!==s))});break}case"addMember":n={...e,bannedMembers:[...e.bannedMembers,t.member]};break;case"updateMemberStatusIfPresent":{const{member:o}=t,{bannedMembers:r}=e,s=o.getUid(),i=r.findIndex((e=>e.getUid()===s));i>-1&&(n={...e,bannedMembers:r.map(((e,t)=>(t===i&&e.setStatus(o.getStatus()),e)))});break}}return n}function Zr(e){const{backButtonIconURL:o=_r,showBackButton:r=!1,onBack:i,menus:a=null,title:l=n.localize("BANNED_MEMBERS"),titleAlignment:c=n.TitleAlignment.center,searchPlaceholder:C=n.localize("SEARCH"),searchIconURL:g=Jr,hideSearch:u=!0,loadingIconURL:p=Yr,loadingStateView:h,emptyStateText:m=n.localize("NO_BANNED_MEMBERS_FOUND"),emptyStateView:x,errorStateText:w=n.localize("SOMETHING_WRONG"),errorStateView:f,onError:D,group:E,bannedMembersRequestBuilder:v=null,searchRequestBuilder:I=null,listItemView:S=null,hideSeparator:F=!1,disableUsersPresence:k=!0,closeButtonIconURL:M=Nr,onClose:P,subtitleView:O=null,options:j=null,selectionMode:V=n.SelectionMode.none,unbanIconURL:G=Nr,onItemClick:H=null,onSelect:Q=null,hideError:N=!1,statusIndicatorStyle:K=null,avatarStyle:z=null,bannedMemberStyle:J=null,listItemStyle:_=null}=e,[W,Z]=t.useReducer(Wr,{searchText:"",bannedMembers:[],fetchState:n.States.loading}),q=t.useRef(null),$=t.useRef(""),ee=b(D),te=A(E),{theme:ne}=t.useContext(R),oe=t.useRef(""),re=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(oe.current="",Z({type:"setSearchText",searchText:e}))}),[Z]),se=t.useCallback((async e=>{if(q.current){Z({type:"setFetchState",fetchState:n.States.loading});try{const t=await q.current.fetchNext();if(e!==$.current)return;0!==t.length&&Z({type:"appendBannedMembers",bannedMembers:t}),Z({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===$.current&&(Z({type:"setFetchState",fetchState:n.States.error}),ee(t))}}}),[ee,Z]),ie=t.useCallback((async e=>{try{await s.CometChat.unbanGroupMember(te.current.getGuid(),e.getUid()),Z({type:"removeBannedMemberIfPresent",bannedMemberUid:e.getUid()})}catch(e){ee(e)}}),[Z,ee,te]);function ae(e){let t=(new X).getUserStatusVisible(e);return k||t?null:J?.onlineStatusColor||ne.palette.getSuccess()||"rgb(0, 200, 111)"}function le(e){const t=j?.(e);return t?.length?d.jsx(L,{data:t,menuListStyle:Qr(ne),onOptionClick:e=>{const{onClick:t}=e.detail.data;t?.()}}):null}function ce(e){switch(V){case n.SelectionMode.none:return d.jsx(Y,{iconURL:G,onClick:()=>ie(e),hoverText:n.localize("UNBAN"),buttonStyle:Hr(J,ne)});case n.SelectionMode.single:return d.jsx(U,{onChange:t=>Q?.(e,t.detail.checked)});case n.SelectionMode.multiple:return d.jsx(y,{onChange:t=>Q?.(e,t.detail.checked)});default:return null}}return function(e){const{bannedMembersManagerRef:o,groupGuid:r,searchText:s,bannedMembersRequestBuilder:i,searchRequestBuilder:a,dispatch:l,fetchNextAndAppendBannedMembers:c,fetchNextIdRef:C,groupPropRef:d,bannedMembersSearchText:g}=e;t.useEffect((()=>{i?.searchKeyword?g.current=i?.searchKeyword:a?.searchKeyword&&(g.current=a?.searchKeyword)}),[]),t.useEffect((()=>{o.current=new Kr({groupGuid:r,bannedMembersRequestBuilder:i,searchRequestBuilder:a,searchText:s,bannedMembersSearchText:g}),l({type:"setBannedMembers",bannedMembers:[]}),c(C.current="initialFetchNext_"+String(Date.now()))}),[r,i,a,s,c,l,o,C]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{const{kickedFrom:t,kickedUser:n}=e;t.getGuid()===d.current.getGuid()&&l({type:"addMember",member:Kr.createGroupMemberFromUser(n,t)})})),t=n.CometChatGroupEvents.ccGroupMemberUnbanned.subscribe((e=>{const{unbannedFrom:t,unbannedUser:n}=e;t.getGuid()===d.current.getGuid()&&l({type:"removeBannedMemberIfPresent",bannedMemberUid:n.getUid()})}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[l,d]),t.useEffect((()=>Kr.attachSDKGroupListener(d,l)),[l,d]),t.useEffect((()=>Kr.attachSDKUserListener(l)),[l])}({groupGuid:E.getGuid(),searchText:W.searchText,bannedMembersRequestBuilder:v,searchRequestBuilder:I,bannedMembersManagerRef:q,dispatch:Z,fetchNextAndAppendBannedMembers:se,fetchNextIdRef:$,groupPropRef:te,bannedMembersSearchText:oe}),d.jsxs("div",{className:"cc-banned-members",style:Ur(J,ne),children:[d.jsxs("div",{className:"cc-banned-members__list-wrapper",style:{position:"relative",height:"100%"},children:[null===a?null:d.jsx("div",{className:"cc-banned-members__menus",style:{position:"absolute",right:"12px",top:"8px",cursor:"pointer"},children:a}),d.jsx(T,{title:l,titleAlignment:c,searchPlaceholderText:C,searchIconURL:g,searchText:W.searchText,onSearch:re,hideSearch:u,list:W.bannedMembers,listItemKey:"getUid",listItem:S||function(e){return d.jsx(B,{id:e.getUid(),title:e.getName(),avatarURL:e.getAvatar(),avatarName:e.getName(),statusIndicatorColor:ae(e),hideSeparator:F,statusIndicatorStyle:Pr(K),avatarStyle:Or(z,ne),listItemStyle:jr(_,J,ne),subtitleView:O?.(e),subtitleViewClassName:"cc-banned-members__subtitle-view",menuView:le(e),menuViewClassName:"cc-banned-members__options-view",tailView:ce(e),tailViewClassName:"cc-banned-members__tail-view",onClick:t=>H?.(e)})},showSectionHeader:!1,onScrolledToBottom:()=>se($.current="onScrolledToBottom_"+String(Date.now())),state:W.fetchState===n.States.loaded&&0===W.bannedMembers.length?n.States.empty:W.fetchState,loadingIconURL:p,emptyStateText:m,errorStateText:w,loadingView:h,emptyStateView:x,errorStateView:f,hideError:N,listStyle:Rr(J,ne)})]}),r?d.jsx(Y,{iconURL:o,buttonStyle:Vr(J,ne),onClick:i}):null,d.jsx(Y,{iconURL:M,buttonStyle:Gr(J,ne),onClick:P})]})}function Xr(e,t){return{width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent400()}`,borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),boxShadow:e?.boxShadow||"",position:"relative",boxSizing:"border-box"}}function qr(e,t){return new o.ConfirmDialogStyle({confirmButtonBackground:e?.confirmButtonBackground||t.palette.getError(),cancelButtonBackground:e?.cancelButtonBackground||t.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||t.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(t.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||t.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(t.typography.text2),titleFont:e?.titleFont||n.fontHelper(t.typography.title1),titleColor:e?.titleColor||t.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(t.typography.subtitle2),messageTextColor:e?.messageTextColor||t.palette.getAccent600(),background:e?.background||t.palette.getBackground(),height:e?.height||"auto",width:e?.width||"auto",border:e?.border||"none",borderRadius:e?.borderRadius||"12px",boxShadow:e?.boxShadow||`0 0 1px 1px ${t.palette.getAccent50()}`})}function $r(e,t){return new r.ListStyle({background:"inherit",width:"100%",height:"100%",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),separatorColor:e?.separatorColor||t.palette.getAccent400(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600()})}function es(e,t){return new o.AvatarStyle({width:e?.width||"36px",height:e?.height||"36px",borderRadius:e?.borderRadius||"24px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),backgroundSize:e?.backgroundSize||"cover",outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function ts(e){return{...null!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function ns(e,t,r){return new o.ListItemStyle({height:e?.height||"auto",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||r.palette.getAccent100(),borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent(),border:e?.border||"none",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),hoverBackground:e?.hoverBackground||r.palette.getAccent50()})}function os(e,t){return new o.BadgeStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle2),textColor:e?.textColor||t.palette.getAccent("dark"),background:e?.background||t.palette.getPrimary(),borderRadius:e?.borderRadius||"16px",width:e?.width||"24px",height:e?.height||"16px",border:e?.border||"none"})}function rs(e,t){return new o.LabelStyle({background:"transparent",textFont:e?.threadIndicatorTextFont||n.fontHelper(t.typography.caption2),textColor:e?.threadIndicatorTextColor||t.palette.getAccent400()})}function ss(e){return new o.IconStyle({width:"24px",height:"24px",iconTint:e.palette.getAccent400()})}function is(e,t){return new o.ReceiptStyle({waitIconTint:e?.waitIconTint||t.palette.getAccent700(),sentIconTint:e?.sentIconTint||t.palette.getAccent600(),deliveredIconTint:e?.deliveredIconTint||t.palette.getAccent600(),readIconTint:e?.readIconTint||t.palette.getPrimary(),errorIconTint:e?.errorIconTint||t.palette.getError(),height:e?.height||"20px",width:e?.width||"20px",border:e?.border||"none",borderRadius:e?.borderRadius||"inherit",background:e?.background||"inherit"})}function as(e,t,o,r){const i=e.getConversationWith(),a=i instanceof s.CometChat.User?i.getUid():i.getGuid();return void 0!==t.get(a)?{font:o?.typingIndictorTextFont||n.fontHelper(r.typography.subtitle2),color:o?.typingIndictorTextColor||r.palette.getSuccess()||"",width:"100%",overflow:"hidden",textOverflow:"ellipsis"}:{font:o?.lastMessageTextFont||n.fontHelper(r.typography.subtitle2),color:o?.lastMessageTextColor||r.palette.getAccent600()||"",width:"100%",overflow:"hidden",textOverflow:"ellipsis"}}function ls(e){return new o.MenuListStyle({width:"",height:"",border:"none",borderRadius:"8px",background:"transparent",moreIconTint:"grey",submenuWidth:"70px",submenuHeight:"20px",submenuBorder:"1px solid #e8e8e8",submenuBorderRadius:"8px",submenuBackground:e.palette.getBackground()})}function cs(e,t){const r=null!==e?e:{};return{...new o.DateStyle({textFont:e?.textFont||n.fontHelper(t.typography.caption2),textColor:e?.textColor||t.palette.getAccent600(),background:"transparent"}),...r}}function Cs(e,t){return{width:e?.width||t?.width,height:e?.height||t?.height,background:e?.background||"rgba(0, 0, 0, 0.5)",border:e?.border,borderRadius:e?.borderRadius,position:"absolute"}}class ds{constructor(e){const{conversationsRequestBuilder:t}=e,n=t||(new s.CometChat.ConversationsRequestBuilder).setLimit(zr.limit);this.conversationsRequest=n.build(),t&&(zr.conversationType=t.build().getConversationType())}fetchNext(){return this.conversationsRequest.fetchNext()}static attachUserListener(e){const t="ConversationList_User_"+String(Date.now());return s.CometChat.addUserListener(t,new s.CometChat.UserListener({onUserOnline:e,onUserOffline:e})),()=>s.CometChat.removeUserListener(t)}static attachGroupListener(e,t){const n="ConversationList_Group_"+String(Date.now());return s.CometChat.addGroupListener(n,new s.CometChat.GroupListener({onGroupMemberJoined:t=>{e(t)},onGroupMemberLeft:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberKicked:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberBanned:(n,o)=>{t?.getUid()===o.getUid()?e(n,!0):e(n)},onGroupMemberUnbanned:t=>{e(t)},onMemberAddedToGroup:t=>{e(t)},onGroupMemberScopeChanged:t=>{e(t)}})),()=>s.CometChat.removeGroupListener(n)}static attachMessageReceivedListener(e){const t=n.CometChatMessageEvents.onTextMessageReceived.subscribe((t=>{e(t)})),o=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((t=>{e(t)})),r=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((t=>{e(t)})),s=n.CometChatMessageEvents.onFormMessageReceived.subscribe((t=>{e(t)})),i=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((t=>{e(t)})),a=n.CometChatMessageEvents.onCardMessageReceived.subscribe((t=>{e(t)})),l=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((t=>{e(t)}));return()=>{t?.unsubscribe(),o?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe()}}static attachMessageReceiptListener(e){const t=n.CometChatMessageEvents.onMessagesRead.subscribe((t=>{e(t,!0)})),o=n.CometChatMessageEvents.onMessagesDelivered.subscribe((t=>{e(t,!1)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachMessageTypingListener(e){const t=n.CometChatMessageEvents.onTypingStarted.subscribe((t=>{e(t,!0)})),o=n.CometChatMessageEvents.onTypingEnded.subscribe((t=>{e(t,!1)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachMessageModifiedListener(e){const t=n.CometChatMessageEvents.onMessageEdited.subscribe((t=>{e(t)})),o=n.CometChatMessageEvents.onMessageDeleted.subscribe((t=>{e(t)}));return()=>{t?.unsubscribe(),o?.unsubscribe()}}static attachCallListener(e){const t="ConversationList_Call_"+String(Date.now());return s.CometChat.addCallListener(t,new s.CometChat.CallListener({onIncomingCallReceived:e,onOutgoingCallAccepted:e,onOutgoingCallRejected:e,onIncomingCallCancelled:e})),()=>s.CometChat.removeCallListener(t)}static attachConnestionListener(e){const t="ConversationList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}static shouldIncrementForCustomMessage(e){const t=e?.getMetadata();return e?.willUpdateConversation()||t&&t.hasOwnProperty("incrementUnreadCount")&&t.incrementUnreadCount||Xn.conversationUpdateSettings?.shouldUpdateOnCustomMessages()}}zr=ds,ds.limit=30,ds.conversationType=void 0,ds.shouldLastMessageAndUnreadCountBeUpdated=e=>{if(zr.conversationType&&zr.conversationType!=e?.getReceiverType())return!1;let t=e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom;return!(e?.getParentMessageId()&&!Xn.conversationUpdateSettings?.shouldUpdateOnMessageReplies())&&(t?!!(e?.getParentMessageId()&&Xn.conversationUpdateSettings?.shouldUpdateOnMessageReplies()&&zr.shouldIncrementForCustomMessage(e))||zr.shouldIncrementForCustomMessage(e):e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action?e?.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember||Xn.conversationUpdateSettings?.shouldUpdateOnGroupActions():e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call||e?.getType()!==n.CometChatUIKitConstants.MessageTypes.audio&&e?.getType()!==n.CometChatUIKitConstants.MessageTypes.video||Xn.conversationUpdateSettings?.shouldUpdateOnCallActivities())};var gs="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",us="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",ps="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",hs="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M17.6377%207L9.87922%2016.3095L6%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",ms="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",As="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",xs="data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",bs="data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E";function ys(e){return e instanceof s.CometChat.TextMessage||e instanceof s.CometChat.MediaMessage||e instanceof s.CometChat.CustomMessage||e instanceof s.CometChat.InteractiveMessage||e instanceof s.CometChat.Action||e instanceof s.CometChat.Call}function ws(e,t){let o=e;const{type:i}=t;switch(i){case"appendConversations":if(t.conversations.length>0){let n=[];t.removeOldConversation?(e.conversationList=[],n=t.conversations):n=[...e.conversationList,...t.conversations],o={...e,conversationList:n}}break;case"setConversationList":{const{typingIndicatorMap:n}=e,{conversationList:r}=t,i=new Map;for(let e=0;ee.getConversationId()===i));if(a>-1){const t=r[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;n.has(i)?(l=new Map(n),l.delete(i)):l=n;const c=e.conversationList.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"updateConversationWithUser":{const{user:n}=t,{conversationList:i}=e,a=n.getUid(),l=i.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.User&&t?.getUid()===a}));if(l>-1){const t=i.map(((e,t)=>{if(t===l){const t=r.CometChatUIKitUtility.clone(e);return t.setConversationWith(n),t}return e}));o={...e,conversationList:t}}break}case"fromUpdateConversationListFn":{const{conversation:n}=t,r=n.getConversationId(),s=e.conversationList.filter((e=>e.getConversationId()!==r));o={...e,conversationList:[n,...s]};break}case"setLastMessageReadOrDeliveredAt":{const{conversationList:n}=e,{messageReceipt:i,updateReadAt:a}=t,l=i.getMessageId(),c=n.findIndex((e=>{if(e.getConversationWith()instanceof s.CometChat.User){const t=e.getLastMessage();if(ys(t)&&String(t.getId())===l)return a?!t.getReadAt():!t.getDeliveredAt()}return!1}));c>-1&&(o={...e,conversationList:n.map(((e,t)=>{if(t===c){const t=r.CometChatUIKitUtility.clone(e),n=t.getLastMessage();return ys(n)&&(a?(n.setReadAt(i.getReadAt()),t.setUnreadMessageCount(0)):n.setDeliveredAt(i.getDeliveredAt())),t}return e}))});break}case"addTypingIndicator":{const{typingIndicator:r}=t,i=r.getSender()?.getUid(),a=r.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group,l=r.getReceiverId();let c;const{conversationList:C,typingIndicatorMap:d}=e;for(let e=0;e{const t=e.getLastMessage();return ys(t)&&t.getId()===s}));a>-1&&(o={...e,conversationList:i.map(((e,t)=>{if(t===a){const t=r.CometChatUIKitUtility.clone(e);return t.setLastMessage(n),t}return e}))});break}case"updateConversationLastMessageAndGroupAndPlaceAtTheTop":{const{conversationList:n}=e,{group:s,message:i}=t,a=i.getConversationId();if(!ds.shouldLastMessageAndUnreadCountBeUpdated(i))return e;const l=n.findIndex((e=>e.getConversationId()===a));if(l>-1){const t=r.CometChatUIKitUtility.clone(n[l]);t.setConversationWith(s),t.setLastMessage(i),o={...e,conversationList:[t,...n.filter(((e,t)=>t!==l))]}}break}case"removeConversationOfTheGroup":{const{conversationList:n,typingIndicatorMap:r}=e,i=t.group.getGuid(),a=n.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.Group&&t.getGuid()===i}));if(a>-1){const t=n[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;r.has(i)?(l=new Map(r),l.delete(i)):l=r;const c=n.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"removeConversationOfTheUser":{const{conversationList:n,typingIndicatorMap:r}=e,i=t.user.getUid(),a=n.findIndex((e=>{const t=e.getConversationWith();return t instanceof s.CometChat.User&&t?.getUid()===i}));if(a>-1){const t=n[a].getConversationWith(),i=t instanceof s.CometChat.User?t?.getUid():t.getGuid();let l;r.has(i)?(l=new Map(r),l.delete(i)):l=r;const c=n.filter(((e,t)=>t!==a));o={...e,conversationList:c,typingIndicatorMap:l}}break}case"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop":{const{conversationList:n}=e,{message:s,conversation:i}=t,a=s.getConversationId();if(!ds.shouldLastMessageAndUnreadCountBeUpdated(s))return e;const l=n.findIndex((e=>e.getConversationId()===a));if(l>-1){const t=r.CometChatUIKitUtility.clone(n[l]);t.setLastMessage(s),t.setUnreadMessageCount(0);const i=n.filter(((e,t)=>t!==l));o={...e,conversationList:[t,...i]}}else{i.setUnreadMessageCount(0);const t=[i,...n];o={...e,conversationList:t}}break}case"resetUnreadCountAndSetReadAtIfLastMessage":{const{conversationList:n}=e,{message:s}=t,i=s.getReadAt()||Date.now(),a=n.findIndex((e=>e.getConversationId()===s.getConversationId()));a>-1&&(o={...e,conversationList:n.map(((e,t)=>{if(t===a){const t=r.CometChatUIKitUtility.clone(e);return t.setUnreadMessageCount(0),t.getLastMessage()&&t.getLastMessage().setReadAt(i),t}return e}))});break}case"updateConversationLastMessageAndPlaceAtTheTop":{const{message:n}=t,s=n?.getId(),{conversationList:i}=e;if(!ds.shouldLastMessageAndUnreadCountBeUpdated(n))return e;const a=i.findIndex((e=>{const t=e.getLastMessage();return ys(t)&&t.getId()===s}));if(a>-1){const t=r.CometChatUIKitUtility.clone(i[a]);t.setLastMessage(n),o={...e,conversationList:[t,...i.filter(((e,t)=>t!==a))]}}break}case"setLoggedInUser":o={...e,loggedInUser:t.loggedInUser};break;case"setIsFirstReload":o={...e,isFirstReload:t.isFirstReload}}return o}function fs(e){const{menus:o=null,title:i=n.localize("CHATS"),titleAlignment:a=n.TitleAlignment.left,conversationsRequestBuilder:l=null,onError:c,listItemView:C=null,subtitleView:g=null,disableUsersPresence:u=!1,hideSeparator:p=!1,activeConversation:h=null,selectionMode:m=n.SelectionMode.none,disableReceipt:w=!1,options:f=null,datePattern:D=n.DatePatterns.DayDateTime,protectedGroupIcon:E=gs,passwordGroupIcon:v,privateGroupIcon:I=ms,readIcon:S=ps,deliveredIcon:F=us,waitIcon:k=xs,errorIcon:M=bs,sentIcon:P=hs,loadingIconURL:O=As,loadingStateView:j,emptyStateText:V=n.localize("NO_CHATS_FOUND"),emptyStateView:G,errorStateText:H=n.localize("SOMETHING_WRONG"),errorStateView:Q,hideError:N=!1,onItemClick:K=null,onSelect:z=null,disableSoundForMessages:J=!1,disableTyping:Y=!1,customSoundForMessages:_=null,confirmDialogTitle:W=n.localize("DELETE_CONVERSATION"),confirmDialogMessage:Z=n.localize("WOULD__YOU_LIKE_TO_DELETE_THIS_CONVERSATION"),cancelButtonText:q=n.localize("CANCEL"),confirmButtonText:$=n.localize("DELETE"),conversationsStyle:ee=null,deleteConversationDialogStyle:te=null,avatarStyle:ne=null,statusIndicatorStyle:oe=null,listItemStyle:re=null,badgeStyle:se=null,receiptStyle:ie=null,dateStyle:ae=null,backdropStyle:le=null,disableMentions:ce=!1,textFormatters:Ce=[]}=e,[de,ge]=t.useReducer(ws,{conversationList:[],fetchState:n.States.loading,typingIndicatorMap:new Map,conversationToBeDeleted:null,loggedInUser:null,isFirstReload:!1,unreadMentions:!1}),[ue,pe]=x(null),he=t.useRef(null),me=t.useRef(""),Ae=b(c),xe=A(_),{theme:be}=t.useContext(R),ye=t.useRef(!1),we=t.useRef(!1);de.isFirstReload&&(ye.current=!0,de.isFirstReload=!1);const fe=t.useCallback((async e=>{const t=he.current;if(!t)return;let o=we.current?n.States.loaded:n.States.loading;ge({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(0!==o.length&&me.current===e){let e=!!we.current;ge({type:"appendConversations",conversations:o,removeOldConversation:e})}ye.current&&(ds.attachConnestionListener((()=>{he.current=new ds({conversationsRequestBuilder:l}),we.current=!0,fe(me.current="initialFetchNext_"+String(Date.now()))})),ye.current=!1),we.current?we.current=!1:ge({type:"setFetchState",fetchState:n.States.loaded})}catch(e){de.conversationList.length<=0&&ge({type:"setFetchState",fetchState:n.States.error}),Ae(e)}}),[Ae,ge]),De=t.useCallback((e=>{const t="getMetadata";let n;return t in e&&"function"==typeof e[t]&&(n=e[t]())&&"object"==typeof n&&"incrementUnreadCount"in n&&Boolean(n.incrementUnreadCount)||e instanceof s.CometChat.CustomMessage&&e.willUpdateConversation()}),[]),Ee=t.useCallback(((e,t)=>{const o=t||e.getLastMessage();if(!ys(o))return;if(!ds.shouldLastMessageAndUnreadCountBeUpdated(o))return;const r=(o.getCategory()===n.CometChatUIKitConstants.MessageCategory.message||o.getCategory()===n.CometChatUIKitConstants.MessageCategory.call||o.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive||De(o))&&o.getSender().getUid()!==de.loggedInUser?.getUid();if(e.setUnreadMessageCount((e.getUnreadMessageCount()??0)+Number(r)),o instanceof s.CometChat.Action&&o.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&e.getConversationType()===n.CometChatUIKitConstants.MessageReceiverType.group){if(o.getReceiver().getGuid()===o.getActionFor().getGuid()){let t=e.getConversationWith();t.setMembersCount(o.getActionFor().getMembersCount()),e.setConversationWith(t)}}e.setLastMessage(o),ge({type:"fromUpdateConversationListFn",conversation:e})}),[ge,de.loggedInUser,De]),ve=t.useCallback((async(e,t=!1)=>{try{const n=de.conversationList.findIndex((t=>t.getConversationId()===e.getConversationId()));if(n>=0){const o=de.conversationList[n];t?ge({type:"removeConversation",conversation:o}):Ee(o,e)}else s.CometChat.CometChatHelper.getConversationFromMessage(e).then((t=>{Ee(t,e)}))}catch(e){Ae(e)}}),[Ae,Ee,de.conversationList]),Ie=t.useCallback((async e=>{if(e.getSender().getUid()!==de.loggedInUser?.getUid()&&!w&&!e.getDeliveredAt())try{s.CometChat.markAsDelivered(e)}catch(e){Ae(e)}J||e.getCategory()===n.CometChatUIKitConstants.MessageCategory.custom&&!De(e)||h&&h.getConversationId()===e.getConversationId()||r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage,xe.current),ve(e)}),[w,J,ve,Ae,de.loggedInUser,h,De,xe]),Se=t.useCallback(((e,t)=>{ge({type:"setLastMessageReadOrDeliveredAt",updateReadAt:t,messageReceipt:e})}),[ge]),Fe=t.useCallback(((e,t)=>{de.loggedInUser?.getUid()!==e.getSender()?.getUid()&&ge(t?{type:"addTypingIndicator",typingIndicator:e}:{type:"removeTypingIndicator",typingIndicator:e})}),[de.loggedInUser]);function ke(e){const t=e.getConversationWith();return t instanceof s.CometChat.User?t.getAvatar():t.getIcon()}function Te(e){const t=e.getConversationWith();if(t instanceof s.CometChat.User){let e=(new X).getUserStatusVisible(t);return u||e?null:ee?.onlineStatusColor||be.palette.getSuccess()||"rgb(0, 200, 111)"}switch(t.getType()){case n.CometChatUIKitConstants.GroupTypes.password:return ee?.passwordGroupIconBackground||"rgb(247, 165, 0)";case n.CometChatUIKitConstants.GroupTypes.private:return ee?.privateGroupIconBackground||be.palette.getSuccess()||"rgb(0, 200, 111)";default:return null}}function Me(e){let t="";const o=e.getConversationWith();if(o instanceof s.CometChat.Group)switch(o.getType()){case n.CometChatUIKitConstants.GroupTypes.password:t=v||E;break;case n.CometChatUIKitConstants.GroupTypes.private:t=I}return t}function Be(e){const t=e.getLastMessage();return ys(t)&&t.getParentMessageId()?d.jsxs("div",{className:"cc-conversations__thread-view",style:{display:"flex",columnGap:"4px"},children:[d.jsx("cometchat-label",{text:n.localize("IN_A_THREAD"),labelStyle:JSON.stringify(rs(ee,be))}),d.jsx("cometchat-icon",{URL:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-corner-right-down%22%3E%3Cpolyline%20points%3D%2210%2015%2015%2020%2020%2015%22%3E%3C%2Fpolyline%3E%3Cpath%20d%3D%22M4%204h7a4%204%200%200%201%204%204v12%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",iconStyle:JSON.stringify(ss(be))})]}):null}function Le(e){return function(e){const t=e.getLastMessage(),o=e.getConversationWith(),r=o instanceof s.CometChat.User?o?.getUid():o.getGuid();return!w&&ys(t)&&!t.getDeletedAt()&&t.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&t.getSender()?.getUid()===de.loggedInUser?.getUid()&&void 0===de.typingIndicatorMap.get(r)}(e)?d.jsx("cometchat-receipt",{receipt:r.MessageReceiptUtils.getReceiptStatus(e.getLastMessage()),waitIcon:k,sentIcon:P,errorIcon:M,deliveredIcon:F,readIcon:S,receiptStyle:JSON.stringify(is(ie,be))}):null}function Ue(e){const t=e.getConversationWith(),o=t instanceof s.CometChat.Group?t.getGuid():t?.getUid(),r=de.typingIndicatorMap.get(o);if(void 0!==r)return t instanceof s.CometChat.Group?`${r.getSender().getName()} ${n.localize("IS_TYPING")}`:n.localize("IS_TYPING");if(de.loggedInUser){let t="";const o=e.getLastMessage();o&&o.getCategory()===n.CometChatUIKitConstants.MessageCategory.call&&(t=(o.getType()===n.CometChatUIKitConstants.MessageTypes.audio?"📞":"📹")+" ");let r=e.getLastMessage(),i=Re.getDataSource().getLastConversationMessage(e,de.loggedInUser,{disableMentions:ce,theme:be,mentionsTargetElement:n.MentionsTargetElement.conversation,textFormattersList:Ce});return r&&e?.getConversationType()!==s.CometChat.RECEIVER_TYPE.USER&&(i=(r?.getSender().getUid(),de.loggedInUser?.getUid(),`${i}`)),d.jsx("div",{dangerouslySetInnerHTML:{__html:t+i},style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})}return""}function Pe(e){return d.jsx("div",{className:"cc-conversations__subtitle-text",style:as(e,de.typingIndicatorMap,ee,be),children:Ue(e)})}function Oe(e){return null!==g?d.jsx(d.Fragment,{children:g(e)}):d.jsxs(d.Fragment,{children:[Be(e),d.jsxs("div",{className:"cc-conversations__subtitle",style:{display:"flex",columnGap:"4px",alignItems:"center"},children:[Le(e),Pe(e)]})]})}function je(e){ge({type:"setConversationToBeDeleted",conversation:e})}function Ve(e,t){if(m!==n.SelectionMode.none)return null;let o;if(f)o=f?.(e);else{const s=r.ConversationUtils.getDefaultOptions();for(let o=0;oje(e),s[o].iconTint=t.palette.getAccent600());o=s}return 0===o?.length?null:d.jsx(L,{data:o,menuListStyle:ls(t),onOptionClick:e=>{const{onClick:t}=e.detail.data;t?.()}})}function Ge(e){switch(m){case n.SelectionMode.none:{const t=e.getLastMessage();return t?d.jsxs("div",{className:"cc-conversations__tail-content",style:{display:"flex",flexDirection:"column",alignItems:"flex-end"},children:[d.jsx("cometchat-date",{timestamp:t.getSentAt(),pattern:D,dateStyle:JSON.stringify(cs(ae,be))}),d.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:d.jsx("cometchat-badge",{count:e.getUnreadMessageCount(),badgeStyle:JSON.stringify(os(se,be))})})]}):null}case n.SelectionMode.single:return d.jsx("div",{className:"cc-conversations__tail-content",children:d.jsx(U,{onChange:t=>z?.(e,t.detail.checked)})});case n.SelectionMode.multiple:return d.jsx("div",{className:"cc-conversations__tail-content",children:d.jsx(y,{onChange:t=>z?.(e,t.detail.checked)})});default:return null}}const He=e=>{const t=e.getConversationWith();if(t instanceof s.CometChat.User){let e=(new X).getUserStatusVisible(t);return u||e?null:ts(oe)}switch(t.getType()){case n.CometChatUIKitConstants.GroupTypes.private:case n.CometChatUIKitConstants.GroupTypes.password:return ts(oe);default:return null}};return function(e){const{conversationsRequestBuilder:o,conversationsManagerRef:i,fetchNextAndAppendConversations:a,fetchNextIdRef:l,dispatch:c,confirmDialogElement:C,conversationToBeDeleted:d,errorHandler:g,refreshSingleConversation:u,onMessageReceived:p,setReceipts:h,setTypingIndicator:m,disableTyping:A,loggedInUser:x,isFirstReload:b}=e;t.useEffect((()=>{c({type:"setIsFirstReload",isFirstReload:!0}),i.current=new ds({conversationsRequestBuilder:o}),c({type:"setConversationList",conversationList:[]}),a(l.current="initialFetchNext_"+String(Date.now()))}),[o,a,c,i,l]),t.useEffect((()=>{(async()=>{try{c({type:"setLoggedInUser",loggedInUser:await s.CometChat.getLoggedinUser()})}catch(e){g(e)}})()}),[g,c]),t.useEffect((()=>{if(null===C)return;const e="cc-confirm-clicked",t="cc-cancel-clicked";async function o(){if(d){const e=d.getConversationWith(),t=e instanceof s.CometChat.Group?e.getGuid():e.getUid();try{await s.CometChat.deleteConversation(t,d.getConversationType()),n.CometChatConversationEvents.ccConversationDeleted.next(r.CometChatUIKitUtility.clone(d)),c({type:"removeConversation",conversation:d}),c({type:"setConversationToBeDeleted",conversation:null})}catch(e){g(e)}}}function i(){c({type:"setConversationToBeDeleted",conversation:null})}return C.addEventListener(e,o),C.addEventListener(t,i),()=>{C.removeEventListener(e,o),C.removeEventListener(t,i)}}),[d,C,g,c]),t.useEffect((()=>ds.attachUserListener((e=>c({type:"updateConversationWithUser",user:e})))),[c]),t.useEffect((()=>ds.attachGroupListener(u,x)),[u,x]),t.useEffect((()=>ds.attachMessageReceivedListener(p)),[p]),t.useEffect((()=>ds.attachMessageModifiedListener((e=>{c({type:"updateConversationLastMessage",message:e})}))),[c]),t.useEffect((()=>ds.attachMessageReceiptListener(h)),[h]),t.useEffect((()=>{if(!A)return ds.attachMessageTypingListener(m)}),[A,m]),t.useEffect((()=>ds.attachCallListener(u)),[u]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e.message})})),t=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{const t=e.messages[e.messages.length-1];t&&c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.userAddedIn,message:t})})),o=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.kickedFrom,message:e.message})})),i=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{c({type:"updateConversationLastMessageAndGroupAndPlaceAtTheTop",group:e.kickedFrom,message:e.message})})),a=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{c({type:"removeConversationOfTheGroup",group:e})})),l=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{ds.shouldLastMessageAndUnreadCountBeUpdated(e.message)&&c({type:"removeConversationOfTheGroup",group:e.leftGroup})})),C=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{c({type:"removeConversationOfTheUser",user:e})})),d=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{e.status===n.MessageStatus.success&&c({type:"updateConversationLastMessage",message:e.message})})),g=n.CometChatMessageEvents.ccMessageSent.subscribe((e=>{e.status===n.MessageStatus.success&&s.CometChat.CometChatHelper.getConversationFromMessage(e.message).then((t=>{c({type:"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop",message:e.message,conversation:t})}))})),u=n.CometChatMessageEvents.ccMessageDeleted.subscribe((e=>{c({type:"updateConversationLastMessage",message:r.CometChatUIKitUtility.clone(e)})})),p=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{c({type:"resetUnreadCountAndSetReadAtIfLastMessage",message:e})})),h=n.CometChatCallEvents.ccCallAccepted.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),m=n.CometChatCallEvents.ccOutgoingCall.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),A=n.CometChatCallEvents.ccCallRejected.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})})),x=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{c({type:"updateConversationLastMessageAndPlaceAtTheTop",message:e})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),C.unsubscribe(),d.unsubscribe(),g.unsubscribe(),u.unsubscribe(),p.unsubscribe(),h.unsubscribe(),m.unsubscribe(),A.unsubscribe(),x.unsubscribe()}}),[c])}({conversationsRequestBuilder:l,conversationsManagerRef:he,fetchNextAndAppendConversations:fe,fetchNextIdRef:me,dispatch:ge,confirmDialogElement:ue,conversationToBeDeleted:de.conversationToBeDeleted,errorHandler:Ae,refreshSingleConversation:ve,onMessageReceived:Ie,setReceipts:Se,setTypingIndicator:Fe,disableTyping:Y,loggedInUser:de.loggedInUser,isFirstReload:!1}),d.jsxs("div",{className:"cc-conversations",style:Xr(ee,be),children:[null===o?null:d.jsx("div",{className:"cc-conversations__menus",style:{position:"absolute",top:"19px",right:"12px",cursor:"pointer",display:"flex",justifyContent:"flex-end",width:"24px"},children:o}),d.jsx(T,{title:i,titleAlignment:a,hideSearch:!0,list:de.conversationList,listItemKey:"getConversationId",listItem:null!==C?C:function(e){return d.jsx(B,{id:e.getConversationId(),avatarURL:ke(e),avatarName:e.getConversationWith().getName(),title:e.getConversationWith().getName(),statusIndicatorColor:Te(e),statusIndicatorIcon:Me(e),hideSeparator:p,isActive:m===n.SelectionMode.none&&e.getConversationId()===h?.getConversationId(),avatarStyle:es(ne,be),statusIndicatorStyle:He(e),listItemStyle:ns(re,ee,be),onClick:t=>K?.(e),subtitleView:Oe(e),subtitleViewClassName:"cc-conversations__subtitle-view",menuView:Ve(e,be),menuViewClassName:"cc-conversations__options-view",tailView:Ge(e),tailViewClassName:"cc-conversations__tail-view"})},onScrolledToBottom:()=>fe(me.current="onScrolledToBottom_"+String(Date.now())),showSectionHeader:!1,state:de.fetchState===n.States.loaded&&0===de.conversationList.length?n.States.empty:de.fetchState,loadingIconURL:O,loadingView:j,emptyStateText:V,emptyStateView:G,errorStateText:H,errorStateView:Q,hideError:N,listStyle:$r(ee,be)}),null===de.conversationToBeDeleted?null:d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(Cs(le,ee)),children:d.jsx("cometchat-confirm-dialog",{ref:pe,title:W,messageText:Z,cancelButtonText:q,confirmButtonText:$,confirmDialogStyle:JSON.stringify(qr(te,be))})})]})}const Ds={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},Es={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},vs={width:"calc(100% - 280px)",height:"100%"},Is={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},Ss={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},Fs={width:"280px",height:"100%",position:"relative"},ks=(e,t)=>({...Es,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),Ts=(e,t,n,o,r)=>n?Ms(o,r):Bs(e,t),Ms=(e,t)=>({...e||t?{visibility:"hidden"}:{visibility:"visible"},...Is,borderRadius:"inherit"}),Bs=(e,t)=>{const n=e?.borderRadius||0;return{...Fs,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},Ls=(e,t,n,o)=>t?Us(n,o):Rs(e),Us=(e,t)=>({...e||t?{visibility:"visible"}:{visibility:"hidden"},...Is,borderRadius:"inherit"}),Rs=e=>{const t=e?.borderRadius||0;return{...vs,borderRadius:`0 ${t} ${t} 0`}},Ps=(e,t)=>({...Ds,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),Os=e=>({width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...e?.conversationsStyle}),js=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},Vs=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},Gs=(e,t)=>({background:t?.background,...e}),Hs=(e,t,n)=>{let o={visibility:"hidden"};return t||n||e||(o={visibility:"visible"}),{...Ss,...o,width:"calc(100% - 280px)"}},Qs=(e,t)=>({height:t?.backdropStyle?.height||e?.height,width:t?.backdropStyle?.width||e?.width,background:t?.backdropStyle?.background||"rgba(0, 0, 0, 0.5)",border:t?.backdropStyle?.border||"0 none",borderRadius:t?.backdropStyle?.borderRadius||"0"}),Ns=(e,t)=>({height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:e?t.palette.getAccent600():t.palette.getPrimary()});function Ks(e,t){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e?.closeIconTint||t.palette.getPrimary(),background:"transparent",position:"absolute",top:"8px",right:"12px"}}function zs(e,t){return{background:e?.submitButtonBackground||t.palette.getPrimary(),buttonTextColor:e?.submitButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.submitButtonTextFont||n.fontHelper(t.typography.title2),height:"100%",width:"100%",border:"none",borderRadius:"8px",padding:"8px",display:"flex",justifyContent:"center",textAlign:"center"}}function Js(e,t){return{height:"30px",textAlign:"center",font:e?.titleTextFont||n.fontHelper(t.typography.title1),padding:"10px 0px",color:e?.titleTextColor||t.palette.getAccent()}}function Ys(e,t){return{height:e?.height||"94%",width:e?.width||"100%",background:e?.background||t.palette.getBackground(),border:e?.border||"none",borderRadius:e?.borderRadius||"none",boxShadow:e?.boxShadow||"0",padding:e?.padding||"0",display:"flex",zIndex:1}}const _s=(e,t,o,r)=>({width:o===n.TabsVisibility.usersAndGroups?"50%":"100%",height:e.tabHeight||"100%",borderRadius:e.tabBorderRadius||"0",border:e.tabBorder||"none",titleTextFont:e.tabTitleTextFont||n.fontHelper(t.typography.text2),titleTextColor:e.tabTitleTextColor||t.palette.getAccent(),activeTitleTextFont:e.activeTabTitleTextFont||n.fontHelper(t.typography.text2),activeTitleTextColor:e.activeTabTitleTextColor||t.palette.getAccent(),activeBackground:e.activeTabBackground||t.palette.getBackground(),activeBorderRadius:"8px",activeBorder:"2px solid red",background:e.tabBackground||"#ececec",boxShadow:"0px 3px 8px rgba(20, 20, 20, 0.12), 0 3px 1px rgba(20, 20, 20, 0.04)"});function Ws(e,t){return{position:"relative",boxSizing:"border-box",background:e?.background||t.palette.getBackground(),width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent50()}`,borderRadius:e?.borderRadius||"0",overflow:"hidden"}}function Zs(e){return{...void 0!==e?e:{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Xs(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"28px",height:e?.height||"28px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.caption1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function qs(e,t,r){return new o.ListItemStyle({height:e?.height||"auto",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||r.palette.getAccent100(),borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent(),border:e?.border||"none",padding:e?.padding||"0",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent100(),hoverBackground:e?.hoverBackground||r.palette.getAccent50()})}function $s(e,t){return new r.GroupsStyle({background:"inherit",width:"100%",height:"100%",border:"none",borderRadius:"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),searchPlaceholderTextFont:e?.searchPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),searchPlaceholderTextColor:e?.searchPlaceholderTextColor||t.palette.getAccent500(),searchTextFont:e?.searchTextFont||n.fontHelper(t.typography.subtitle1),searchTextColor:e?.searchTextColor||t.palette.getAccent(),searchBorder:e?.searchBorder||"none",searchBorderRadius:e?.searchBorderRadius||"8px",searchBackground:e?.searchBackground||t.palette.getAccent50(),searchIconTint:e?.searchIconTint||t.palette.getAccent500(),separatorColor:e?.separatorColor||t.palette.getAccent400(),loadingIconTint:e?.loadingIconTint||t.palette.getAccent600(),emptyStateTextFont:e?.emptyStateTextFont||n.fontHelper(t.typography.heading),emptyStateTextColor:e?.emptyStateTextColor||t.palette.getAccent600(),errorStateTextFont:e?.errorStateTextFont||n.fontHelper(t.typography.heading),errorStateTextColor:e?.errorStateTextColor||t.palette.getAccent600()})}function ei(e,t){return{font:e?.subTitleTextFont||n.fontHelper(t.typography.subtitle2),color:e?.subTitleTextColor||t.palette.getAccent600()}}class ti{constructor(e){const{searchText:t,groupsRequestBuilder:n,searchRequestBuilder:o,groupsSearchText:r}=e;let s=n||this.getDefaultRequestBuilder();t&&o?(s=o,s.setSearchKeyword(t)):t&&!o&&n?(s=n,s.setSearchKeyword(t)):!t&&n&&o?(s=n,s.setSearchKeyword(r.current)):t||!n||o?t||n||!o?s.setSearchKeyword(t):(s=this.getDefaultRequestBuilder(),s.setSearchKeyword(r.current)):(s=n,s.setSearchKeyword(r.current)),this.groupsRequest=s.build()}fetchNext(){return this.groupsRequest.fetchNext()}getDefaultRequestBuilder(){return(new s.CometChat.GroupsRequestBuilder).setLimit(ti.defaultLimit)}static async getLoggedInUser(){return void 0===this.loggedInUser&&(this.loggedInUser=await s.CometChat.getLoggedinUser()),this.loggedInUser}static createGroupListener(e){return new s.CometChat.GroupListener({onGroupMemberJoined:async(t,n,o)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&o.setHasJoined(!0),e({type:"updateGroup",group:o})},onGroupMemberLeft:async(t,n,o)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&o.setHasJoined(!1),e({type:"updateGroup",group:o})},onMemberAddedToGroup:async(t,n,o,r)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&r.setHasJoined(!0),e({type:"updateGroup",group:r})},onGroupMemberKicked:async(t,n,o,r)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&r.setHasJoined(!1),e({type:"updateGroup",group:r})},onGroupMemberBanned:async(t,n,o,r)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()?e({type:"removeGroup",guid:r.getGuid()}):e({type:"updateGroup",group:r})},onGroupMemberUnbanned:async(t,n,o,r)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&(r.setHasJoined(!1),e({type:"prependGroup",group:r}))},onGroupMemberScopeChanged:async(t,n,o,r,s)=>{n.getUid()===(await ti.getLoggedInUser())?.getUid()&&s.setScope(o),e({type:"updateGroup",group:s})}})}static attachListeners(e){const t="GroupsList_"+String(Date.now());return s.CometChat.addGroupListener(t,ti.createGroupListener(e)),()=>s.CometChat.removeGroupListener(t)}static attachConnestionListener(e){const t="GroupsList_connection_"+String(Date.now());return s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}})),()=>s.CometChat.removeConnectionListener(t)}}ti.defaultLimit=30;var ni="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",oi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ri="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",si="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ii=(e,t)=>{let n=e;const{type:o}=t;switch(o){case"appendGroups":if(t.groups.length>0){let o=[];t.removeOldGroups?(e.groupList=[],o=t.groups):o=[...e.groupList,...t.groups],n={...e,groupList:o}}n={...e,groupList:[...e.groupList,...t.groups]};break;case"setGroupList":n={...e,groupList:t.groupList};break;case"setFetchState":n={...e,fetchState:t.fetchState};break;case"updateGroup":{const{groupList:o}=e,{group:r}=t,s=r.getGuid(),i=o.findIndex((e=>e.getGuid()===s));i>-1&&(n={...e,groupList:o.map(((e,t)=>t===i?r:e))});break}case"removeGroup":{const{groupList:o}=e,r=t.guid,s=o.findIndex((e=>e.getGuid()===r));s>-1&&(n={...e,groupList:o.filter(((e,t)=>t!==s))});break}case"prependGroup":n={...e,groupList:[t.group,...e.groupList]};break;case"setSearchText":n={...e,searchText:t.searchText};break;case"setIsFirstReload":n={...e,isFirstReload:t.isFirstReload}}return n};function ai(e){const{menus:o=null,title:i=n.localize("GROUPS"),titleAlignment:a=n.TitleAlignment.left,searchPlaceholderText:l=n.localize("SEARCH"),searchIconURL:c=ri,hideSearch:C=!1,groupsRequestBuilder:g=null,searchRequestBuilder:u=null,onError:p,listItemView:h=null,hideSeparator:m=!1,subtitleView:A=null,options:x=null,selectionMode:w=n.SelectionMode.none,onSelect:f,onItemClick:D,activeGroup:E=null,loadingIconURL:v=si,loadingStateView:I,emptyStateText:S=n.localize("NO_GROUPS_FOUND"),emptyStateView:F,errorStateText:k=n.localize("SOMETHING_WRONG"),errorStateView:M,hideError:P=!1,passwordGroupIcon:O=ni,privateGroupIcon:j=oi,statusIndicatorStyle:V,avatarStyle:G,listItemStyle:H,groupsStyle:Q}=e,[N,K]=t.useReducer(ii,{searchText:"",groupList:[],fetchState:n.States.loading,isFirstReload:!1}),z=t.useRef(null),J=t.useRef(""),Y=b(p),{theme:_}=t.useContext(R),W=t.useRef(!1),Z=t.useRef(!1),X=t.useRef("");N.searchText!==X.current&&N.searchText.trim().length>0&&N.searchText.trim().length==N.searchText.length&&(X.current=N.searchText),N.isFirstReload&&(W.current=!0,N.isFirstReload=!1);const q=t.useCallback((e=>{const t=e.trim();(0===e.length||t.length===e.length&&t.length>0)&&(X.current="",K({type:"setSearchText",searchText:e}))}),[K]),$=t.useCallback((async e=>{const t=z.current;if(!t)return;let o=Z.current?n.States.loaded:n.States.loading;K({type:"setFetchState",fetchState:o});try{const o=await t.fetchNext();if(e!==J.current)return;if(0!==o.length){let e=!!Z.current;K({type:"appendGroups",groups:o,removeOldGroups:e})}K({type:"setFetchState",fetchState:n.States.loaded}),W.current&&(ti.attachConnestionListener((()=>{const e=null===g?(new s.CometChat.GroupsRequestBuilder).setLimit(30):g;z.current=new ti({searchText:X.current,groupsRequestBuilder:e,searchRequestBuilder:u,groupsSearchText:X}),Z.current=!0})),W.current=!1),Z.current?Z.current=!1:K({type:"setFetchState",fetchState:n.States.loaded})}catch(t){e===J.current&&N.groupList?.length<=0&&K({type:"setFetchState",fetchState:n.States.error}),Y(t)}}),[Y,K]);function ee(e){let t="";switch(e.getType()){case n.CometChatUIKitConstants.GroupTypes.password:t=O;break;case n.CometChatUIKitConstants.GroupTypes.private:t=j}return t}function te(e){if(null!==A)return A(e);const t=e.getMembersCount();return d.jsx("div",{className:"cc-groups__subtitle",style:ei(Q,_),children:`${t} ${t>1?n.localize("MEMBERS"):n.localize("MEMBER")}`})}function ne(e){let t;return(t=x?.(e))?.length?d.jsx(L,{data:t,onOptionClick:e=>e.detail.data.onClick?.()}):null}function oe(e){switch(w){case n.SelectionMode.none:return null;case n.SelectionMode.single:return d.jsx(U,{onChange:t=>f?.(e,t.detail.checked)});case n.SelectionMode.multiple:return d.jsx(y,{onChange:t=>f?.(e,t.detail.checked)})}}function re(e){switch(e.getType()){case n.CometChatUIKitConstants.GroupTypes.private:return Q?.privateGroupIconBackground||_.palette.getSuccess()||"rgb(0, 200, 111)";case n.CometChatUIKitConstants.GroupTypes.password:return Q?.passwordGroupIconBackground||"rgb(247, 165, 0)";default:return null}}return function(e){const{groupsRequestBuilder:o,searchRequestBuilder:s,searchText:i,fetchNextIdRef:a,groupsManagerRef:l,dispatch:c,fetchNextAndAppendGroups:C,groupsSearchText:d}=e;t.useEffect((()=>{o?.searchKeyword?d.current=o?.searchKeyword:s?.searchKeyword&&(d.current=s?.searchKeyword)}),[]),t.useEffect((()=>{c({type:"setIsFirstReload",isFirstReload:!0}),c({type:"setGroupList",groupList:[]}),l.current=new ti({searchText:i,groupsRequestBuilder:o,searchRequestBuilder:s,groupsSearchText:d}),C(a.current="initialFetch_"+String(Date.now()))}),[C,o,s,i,c,a,l,d]),t.useEffect((()=>ti.attachListeners(c)),[c]),t.useEffect((()=>{const e=n.CometChatGroupEvents.ccGroupCreated.subscribe((e=>{c({type:"prependGroup",group:r.CometChatUIKitUtility.clone(e)})})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{c({type:"removeGroup",guid:e.getGuid()})})),o=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{c({type:"updateGroup",group:r.CometChatUIKitUtility.clone(e.joinedGroup)})})),s=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{c({type:"updateGroup",group:r.CometChatUIKitUtility.clone(e.kickedFrom)})})),i=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{e.leftGroup.getType()===n.CometChatUIKitConstants.GroupTypes.private?c({type:"removeGroup",guid:e.leftGroup.getGuid()}):c({type:"updateGroup",group:e.leftGroup})})),a=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{c({type:"updateGroup",group:e.kickedFrom})})),l=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{c({type:"updateGroup",group:e.userAddedIn})})),C=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{c({type:"updateGroup",group:e.group})}));return()=>{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),s.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),C.unsubscribe()}}),[c])}({searchText:N.searchText,groupsRequestBuilder:g,searchRequestBuilder:u,fetchNextIdRef:J,groupsManagerRef:z,dispatch:K,fetchNextAndAppendGroups:$,groupsSearchText:X}),d.jsxs("div",{className:"cc-groups",style:Ws(Q,_),children:[null===o?o:d.jsx("div",{className:"cc-groups__menus",style:{position:"absolute",top:"16px",right:"16px",cursor:"pointer",display:"flex",flexDirection:"row-reverse",width:"24px"},children:o}),d.jsx(T,{title:i,titleAlignment:a,searchPlaceholderText:l,searchIconURL:c,hideSearch:C,searchText:N.searchText,onSearch:q,list:N.groupList,listItem:null!==h?h:function(e){return d.jsx(B,{id:e.getGuid(),avatarURL:e.getIcon(),avatarName:e.getName(),title:e.getName(),statusIndicatorColor:re(e),statusIndicatorIcon:ee(e),hideSeparator:m,isActive:w===n.SelectionMode.none&&E?.getGuid()===e.getGuid(),statusIndicatorStyle:Zs(V),avatarStyle:Xs(G,_),listItemStyle:qs(H,Q,_),subtitleView:te(e),subtitleViewClassName:"cc-groups__subtitle-view",menuView:ne(e),menuViewClassName:"cc-groups__options-view",tailView:oe(e),tailViewClassName:"cc-group__tail-view",onClick:t=>D?.(e)})},onScrolledToBottom:()=>$(J.current="onScrolledToBottom_"+String(Date.now())),listItemKey:"getGuid",showSectionHeader:!1,state:N.fetchState===n.States.loaded&&0===N.groupList.length?n.States.empty:N.fetchState,loadingIconURL:v,loadingView:I,emptyStateText:S,emptyStateView:F,errorStateText:k,errorStateView:M,hideError:P,listStyle:$s(Q,_)})]})}const li={title:n.localize("NEW_CHAT"),usersTabTitle:n.localize("USERS"),groupsTabTitle:n.localize("GROUPS"),groupsConfiguration:new r.GroupsConfiguration({}),usersConfiguration:new r.UsersConfiguration({}),onError:e=>{console.log(e)},tabVisibility:n.TabsVisibility.usersAndGroups,contactsStyle:{},selectionLimit:5,hideSubmitButton:!0,submitButtonText:"Submit",selectionMode:n.SelectionMode.none},ci=e=>{const[o,r]=t.useState([]),i=t.useRef([]),a=t.useRef([]),[l,c]=t.useState(!0),[C,g]=t.useState(!0),[u,p]=t.useState(!1),h=t.useRef(),m=t.useRef(),{theme:A}=t.useContext(R),{title:x,usersTabTitle:b,groupsTabTitle:y,closeIconURL:w,onClose:f,usersConfiguration:D,groupsConfiguration:E,onItemClick:v,tabVisibility:I,contactsStyle:S,selectionLimit:F,hideSubmitButton:k,submitButtonText:T,selectionMode:M,onSubmitButtonClick:B}=e;t.useEffect((()=>{const e=(new s.CometChat.UsersRequestBuilder).setLimit(30).hideBlockedUsers(!0),t=(new s.CometChat.UsersRequestBuilder).setLimit(30).hideBlockedUsers(!0),o=(new s.CometChat.GroupsRequestBuilder).setLimit(30).joinedOnly(!0),i=(new s.CometChat.GroupsRequestBuilder).setLimit(30).joinedOnly(!0);h.current=new n.CometChatTabItem({id:"users",title:b,style:_s(S,A,I),childView:d.jsx($,{title:"",activeUser:void 0,hideSearch:D?.hideSearch||!1,searchIconURL:D?.searchIconURL,searchRequestBuilder:D?.searchRequestBuilder||t,onItemClick:D?.onItemClick||L,usersStyle:D?.usersStyle,subtitleView:D?.subtitleView,options:D?.options??void 0,usersRequestBuilder:D?.usersRequestBuilder||e,emptyStateView:D?.emptyStateView,onSelect:D?.onSelect||j,loadingIconURL:D?.loadingIconURL,errorStateView:D?.errorStateView,loadingStateView:D?.loadingStateView,tileAlignment:D?.titleAlignment,showSectionHeader:D?.showSectionHeader,listItemView:D?.listItemView,menus:D?.menu,hideSeparator:D?.hideSeparator,hideError:D?.hideError,selectionMode:M,listItemStyle:D?.listItemStyle,disableUsersPresence:D?.disableUsersPresence,statusIndicatorStyle:D?.statusIndicatorStyle,avatarStyle:D?.avatarStyle}),isActive:l}),m.current=new n.CometChatTabItem({id:"groups",title:y,style:_s(S,A,I),childView:d.jsx(ai,{title:"",activeGroup:void 0,hideSearch:E?.hideSearch||!1,searchIconURL:E?.searchIconURL,searchRequestBuilder:E?.searchRequestBuilder||i,onItemClick:E?.onItemClick||U,groupsStyle:E?.groupsStyle,subtitleView:E?.subtitleView,options:E?.options??void 0,privateGroupIcon:E?.privateGroupIcon,passwordGroupIcon:E?.passwordGroupIcon||E?.protectedGroupIcon,groupsRequestBuilder:E?.groupsRequestBuilder||o,emptyStateView:E?.emptyStateView,onSelect:E?.onSelect||O,loadingIconURL:E?.loadingIconURL,errorStateView:E?.errorStateView,loadingStateView:E?.loadingStateView,titleAlignment:E?.titleAlignment,listItemView:E?.listItemView,menus:E?.menu,hideSeparator:E?.hideSeparator,hideError:E?.hideError,selectionMode:M,listItemStyle:E?.listItemStyle}),isActive:u}),r([h.current,m.current])}),[]),t.useEffect((()=>{I===n.TabsVisibility.groups?(p(!0),c(!1),r([m.current])):I===n.TabsVisibility.users?(p(!1),c(!0),r([h.current])):I===n.TabsVisibility.usersAndGroups&&(p(!1),c(!0),r([h.current,m.current]))}),[I]);const L=e=>{v&&v(e,void 0)},U=e=>{v&&v(void 0,e)},P=()=>{B&&B(a.current,i.current)},O=e=>{var t=i.current.findIndex((t=>t?.getGuid()===e.getGuid()));t>=0?i.current.splice(t,1):i.current.push(e),g(a.current.length+i.current.length>F)},j=e=>{var t=a.current.findIndex((t=>t?.getUid()===e.getUid()));t>=0?a.current.splice(t,1):a.current.push(e),g(a.current.length+i.current.length>F)};return o.length?d.jsx("div",{className:"cc-contacts-wrapper",style:Ys(S,A),children:d.jsxs("div",{className:"cc-contacts",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column"},children:[d.jsx("div",{className:"cc-contacts-header",style:Js(S,A),children:x}),d.jsxs("div",{className:"cc-contacts-content",style:{height:"calc(100% - 50px)"},children:[d.jsx(so,{tabAlignment:n.TabAlignment.right,tabs:o,tabsStyle:{height:"100%",width:"100%",tabListHeight:"30px",tabListBackground:"#ececec",tabListPadding:"2px 2px",tabListBorderRadius:"8px",tabPaneWidth:"100%",tabPaneHeight:"calc(100% - 30px)"},keepAlive:!0}),""===w?d.jsx(d.Fragment,{}):d.jsx(Y,{iconURL:w,hoverText:n.localize("CLOSE"),buttonStyle:Ks(S,A),onClick:f})]}),M===n.SelectionMode.none&&k?d.jsx(d.Fragment,{}):d.jsx("div",{className:"cc-contacts__submit--buttons",style:{boxSizing:"border-box"},children:d.jsx(Y,{text:T,buttonStyle:zs(S,A),disabled:C,onClick:P})})]})}):d.jsx(d.Fragment,{})};ci.defaultProps=li;const Ci=(e,t)=>({display:"flex",position:"relative",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"0 none",borderRadius:e?.borderRadius||"inherit",background:e?.background||t.palette.getBackground()}),di={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",maxHeight:"100%",overflowY:"auto",overflowX:"hidden",maxWidth:"100%",zIndex:"1"},gi={position:"absolute",top:"0",left:"0",height:"100%",width:"100%",maxHeight:"100%",overflowY:"auto",overflowX:"hidden",maxWidth:"100%",zIndex:"1",borderRadius:"inherit"},ui={width:"100%",borderRadius:"inherit"},pi={height:"100%",width:"100%",overflow:"hidden"},hi=e=>({border:"0 none",background:"inherit",borderRadius:"inherit",...e?.messageHeaderStyle}),mi=e=>({border:"0 none",background:"inherit",borderRadius:"inherit",...e?.messageListStyle}),Ai=e=>({...e?.messageComposerStyle}),xi=(e,t,n)=>({...e?.detailsStyle});function bi(e){return{height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:e.palette.getPrimary(),padding:0}}const yi={position:"absolute",display:"flex",alignItems:"center",height:"100%",width:"100%",justifyContent:"center",zIndex:1e3,overflow:"hidden"};function wi(e,t){return{boxSizing:"border-box",width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||t.palette.getBackground(),position:"relative",padding:"19px",display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}function fi(e,t){return{background:"inherit",textFont:e?.titleTextFont||n.fontHelper(t.typography.title1),textColor:e?.titleTextColor||t.palette.getAccent()}}function Di(e,t){return{width:"24px",height:"24px",background:"transparent",border:"none",borderRadius:"0",buttonIconTint:e?.closeButtonIconTint||t.palette.getPrimary(),position:"absolute",right:"12px"}}function Ei(e,t){return{width:e?.width||"100%",height:e?.height||"fit-content",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"inherit",activeBackground:e?.activeBackground||"transparent",hoverBackground:e?.hoverBackground||"transparent",separatorColor:e?.separatorColor||t.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent()}}function vi(e,t){return{...e??{},width:e?.width||"12px",height:e?.height||"12px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px"}}function Ii(e,t){return{width:e?.width||"36px",height:e?.height||"36px",border:e?.border||"none",borderRadius:e?.borderRadius||"24px",backgroundColor:e?.backgroundColor||t.palette.getAccent700(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"}}function Si(e,t,o){return{background:"inherit",textFont:t?.subtitleTextFont||n.fontHelper(o.typography.subtitle2),textColor:e?o.palette.getPrimary():t?.subtitleTextColor}}function Fi(e){return{background:"inherit",textFont:e.titleFont,textColor:e.titleColor}}function ki(e){return{width:"100%",height:"100%",border:"none",borderRadius:"0",buttonTextFont:e.titleFont,buttonTextColor:e.titleColor,backgroundColor:e.backgroundColor||"inherit",buttonIconTint:e.iconTint,padding:"18px 0 16px 0"}}function Ti(e,t){return{background:"rgba(0, 0, 0, 0.5)",position:"absolute",width:t?.width,height:t?.height,...e}}function Mi(e,t,o){return{confirmButtonBackground:e?.confirmButtonBackground||o.palette.getPrimary(),cancelButtonBackground:e?.cancelButtonBackground||o.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||o.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(o.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||o.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(o.typography.text2),titleFont:e?.titleFont||n.fontHelper(o.typography.title1),titleColor:e?.titleColor||o.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(o.typography.subtitle2),messageTextColor:e?.messageTextColor||o.palette.getAccent600(),background:e?.background||t?.background||o.palette.getBackground(),width:e?.width||"320px",height:e?.height||"100%",border:e?.border||`1px solid ${o.palette.getAccent200()}`,borderRadius:e?.borderRadius||"8px",boxShadow:e?.boxShadow}}function Bi(e,t){return{confirmButtonBackground:e?.confirmButtonBackground||t.palette.getError(),cancelButtonBackground:e?.cancelButtonBackground||t.palette.getSecondary(),confirmButtonTextColor:e?.confirmButtonTextColor||t.palette.getAccent900("light"),confirmButtonTextFont:e?.confirmButtonTextFont||n.fontHelper(t.typography.text2),cancelButtonTextColor:e?.cancelButtonTextColor||t.palette.getAccent900("dark"),cancelButtonTextFont:e?.cancelButtonTextFont||n.fontHelper(t.typography.text2),titleFont:e?.titleFont||n.fontHelper(t.typography.title1),titleColor:e?.titleColor||t.palette.getAccent(),messageTextFont:e?.messageTextFont||n.fontHelper(t.typography.subtitle2),messageTextColor:e?.messageTextColor||t.palette.getAccent600(),background:e?.background||t.palette.getBackground(),width:e?.width||"320px",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent200()}`,borderRadius:e?.borderRadius||"8px",boxShadow:e?.boxShadow}}function Li(e,t,n){return{width:"100%",height:(t?"2":"1")+"px",background:e||n.palette.getAccent200()}}const Ui=(e,t)=>{const n=e?.groupMembersStyle;return{background:n?.background||t?.background,...n}},Ri=(e,t)=>{const n=e?.addMembersStyle;return{background:n?.background||t?.background,...n}},Pi=(e,t)=>{const n=e?.bannedMembersStyle;return{background:n?.background||t?.background,...n}},Oi=(e,t)=>{const n=e?.transferOwnershipStyle;return{background:n?.background||t?.background,...n}};var ji="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Vi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Gi(e,t){return{boxSizing:"border-box",width:e?.width||"max(100%, 360px)",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"8px",background:e?.background||t.palette.getBackground(),display:"flex",flexDirection:"column"}}function Hi(e,t,r){const s={height:"14px",width:"14px",border:"none",borderRadius:"4px",background:"inherit"};return r?new o.RadioButtonStyle({...s,labelTextColor:e?.MemberScopeTextColor||t.palette.getAccent600(),labelTextFont:e?.MemberScopeTextFont||n.fontHelper(t.typography.text2)}):new o.LabelStyle({...s,textColor:e?.MemberScopeTextColor||t.palette.getAccent600(),textFont:e?.MemberScopeTextFont||n.fontHelper(t.typography.text2)})}function Qi(e,t){return{width:"100%",background:t.palette.getPrimary(),padding:"16px",buttonTextColor:e?.transferButtonTextColor||t.palette.getAccent900(),buttonTextFont:e?.transferButtonTextFont||n.fontHelper(t.typography.title2),display:"flex",justifyContent:"center",textAlign:"center",border:"none",borderRadius:"8px"}}function Ni(e,t){return{width:"100%",background:"#f1f1f1",padding:"16px",color:e?.cancelButtonTextColor||t.palette.getAccent(),font:e?.cancelButtonTextFont||n.fontHelper(t.typography.title2),display:"flex",justifyContent:"center",textAlign:"center",border:"0 none",borderRadius:"8px"}}function Ki(e,t){return new o.AvatarStyle({borderRadius:e?.borderRadius||"24px",width:e?.width||"36px",height:e?.height||"36px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,backgroundColor:e?.backgroundColor||t.palette.getAccent700(),nameTextColor:e?.nameTextColor||t.palette.getAccent900(),backgroundSize:e?.backgroundSize||"cover",nameTextFont:e?.nameTextFont||n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:e?.outerViewBorderWidth||"0",outerViewBorderRadius:e?.outerViewBorderRadius||"0",outerViewBorderColor:e?.outerViewBorderColor||"",outerViewBorderSpacing:e?.outerViewBorderSpacing||"0"})}function zi(e,t,r){return new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||r.palette.getBackground(),activeBackground:e?.activeBackground||"",hoverBackground:e?.hoverBackground||"",separatorColor:e?.separatorColor||t?.separatorColor||r.palette.getAccent200(),titleFont:e?.titleFont||n.fontHelper(r.typography.title2),titleColor:e?.titleColor||r.palette.getAccent()})}function Ji(e,t){return new r.GroupMembersStyle({height:e?.height||"100%",width:e?.width||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||"inherit",background:e?.background||"inherit",titleTextFont:e?.titleTextFont||n.fontHelper(t.typography.title1),titleTextColor:e?.titleTextColor||t.palette.getAccent(),emptyStateTextFont:e?.emptyStateTextFont||"",emptyStateTextColor:e?.emptyStateTextColor||"",errorStateTextFont:e?.errorStateTextFont||"",errorStateTextColor:e?.errorStateTextColor||"",loadingIconTint:e?.loadingIconTint||"",searchIconTint:e?.searchIconTint||"",searchBorder:e?.searchBorder||"",searchBorderRadius:e?.searchBorderRadius||"",searchBackground:e?.searchBackground||"",searchPlaceholderTextFont:e?.searchPlaceholderTextFont||"",searchPlaceholderTextColor:e?.searchPlaceholderTextColor||"",searchTextFont:e?.searchTextFont||"",searchTextColor:e?.searchTextColor||"",onlineStatusColor:e?.onlineStatusColor||t.palette.getSuccess(),backButtonIconTint:e?.backButtonIconTint||t.palette.getPrimary(),closeButtonIconTint:e?.closeButtonIconTint||t.palette.getPrimary(),padding:e?.padding||"0",separatorColor:e?.separatorColor||t.palette.getAccent200(),boxShadow:e?.boxShadow})}var Yi="data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",_i="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function Wi(e){const{group:o,title:i=n.localize("TRANSFER_OWNERSHIP"),titleAlignment:a=n.TitleAlignment.center,searchIconURL:l=Yi,searchPlaceholder:c=n.localize("SEARCH"),hideSearch:C=!1,groupMembersRequestBuilder:g,searchRequestBuilder:u,loadingIconURL:p=_i,loadingStateView:h,emptyStateText:m=n.localize("NO_USERS_FOUND"),emptyStateView:x,errorStateText:y=n.localize("SOMETHING_WRONG"),errorStateView:w,onError:f,hideSeparator:D=!1,disableUsersPresence:E=!1,closeButtonIconURL:v,onClose:I,listItemView:S,subtitleView:F,transferButtonText:k=n.localize("TRANSFER_OWNERSHIP"),onTransferOwnership:T,cancelButtonText:M=n.localize("CANCEL"),options:B,statusIndicatorStyle:L,avatarStyle:P=null,listItemStyle:O=null,groupMemberStyle:j=null,transferOwnershipStyle:V=null}=e,[G,H]=t.useState(null),[Q,N]=t.useState(!0),K=t.useRef(null),z=b(f),J=A(T),_=A(o),{theme:W}=t.useContext(R);const Z=t.useCallback((async()=>{const e=K.current;if(e)try{const t=J.current;if(t)t(e);else{const t=_.current;if(await s.CometChat.transferGroupOwnership(t.getGuid(),e.getUid()),G){const o=r.CometChatUIKitUtility.clone(t);o.setOwner(e.getUid()),n.CometChatGroupEvents.ccOwnershipChanged.next({group:o,newOwner:r.CometChatUIKitUtility.clone(e)}),I&&I()}}K.current=null}catch(e){z(e)}}),[z,G,_,J]);return function(e){const{errorHandler:n,setLoggedInUser:o}=e;t.useEffect((()=>{(async()=>{try{o(await s.CometChat.getLoggedinUser())}catch(e){n(e)}})()}),[n,o])}({errorHandler:z,setLoggedInUser:H}),d.jsxs("div",{className:"cc-transfer-ownership",style:Gi(V,W),children:[d.jsx(xe,{menus:void 0,hideError:void 0,onItemClick:void 0,dropDownIconURL:void 0,groupScopeStyle:void 0,onBack:void 0,backButtonIconURL:void 0,showBackButton:!1,options:B,group:o,title:i,titleAlignment:a,searchIconURL:l,searchPlaceholder:c,hideSearch:C,groupMemberRequestBuilder:g,searchRequestBuilder:u,loadingIconURL:p,loadingStateView:h,emptyStateText:m,emptyStateView:x,errorStateText:y,errorStateView:w,onError:z,hideSeparator:D,disableUsersPresence:E,closeButtonIconURL:v,onClose:I,selectionMode:n.SelectionMode.none,listItemView:S,subtitleView:F,tailView:function(e){const t=o.getOwner()===e.getUid()?n.CometChatUIKitConstants.groupMemberScope.owner:e.getScope();return o.getOwner()===e.getUid()?d.jsx("cometchat-label",{text:n.localize(t.toUpperCase()),labelStyle:JSON.stringify(Hi(V,W,!1))}):d.jsx(U,{labelText:n.localize(t.toUpperCase()),radioButtonStyle:Hi(V,W,!0),onChange:()=>function(e){Q&&N(!1),K.current=e}(e)})},statusIndicatorStyle:L,avatarStyle:Ki(P,W),listItemStyle:zi(O,j,W),groupMembersStyle:Ji(j,W)}),d.jsxs("div",{className:"cc-transfer-ownership__btns-wrapper",style:{flexShrink:"0",display:"flex",flexDirection:"column",rowGap:"8px",padding:"4px 28px 20px 28px",boxSizing:"border-box"},children:[d.jsx(Y,{text:k,disabled:Q,buttonStyle:Qi(V,W),onClick:Z}),d.jsx(Y,{text:M,buttonStyle:Ni(V,W),onClick:I})]})]})}var Zi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Xi="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";function qi(e){const{user:o,group:i,title:a=n.localize("DETAILS"),closeButtonIconURL:l=Vi,cancelButtonText:c=n.localize("CANCEL"),onClose:C,disableUsersPresence:g=!1,customProfileView:u=null,hideProfile:p=!1,privateGroupIcon:h=Xi,protectedGroupIcon:m=Zi,passwordGroupIcon:y,subtitleView:w=null,data:f,onError:D,leaveButtonText:E=n.localize("LEAVE_GROUP"),leaveConfirmDialogMessage:v=n.localize("LEAVE_CONFIRM"),transferButtonText:I=n.localize("TRANSFER_OWNERSHIP"),transferConfirmDialogMessage:S=n.localize("TRANSFER_CONFIRM"),deleteButtonText:F=n.localize("DELETE"),deleteConfirmDialogMessage:k=n.localize("DELETE_CONFIRM"),addMembersConfiguration:T=null,bannedMembersConfiguration:M=null,groupMembersConfiguration:L=null,transferOwnershipConfiguration:U=null,listItemStyle:P=null,statusIndicatorStyle:O=null,avatarStyle:j=null,leaveDialogStyle:V=null,deleteDialogStyle:G=null,backdropStyle:H=null,detailsStyle:Q=null}=e,[N,K]=t.useState("none"),[z,J]=t.useState(null),[_,W]=t.useState(null),[Z,q]=t.useState(void 0),[$,ee]=x(null),[te,ne]=x(null),oe=A(C),re=b(D),{theme:se}=t.useContext(R),ie=t.useCallback(((e,t)=>{const o=n.CometChatUIKitConstants.groupMemberAction.LEFT,i=new s.CometChat.Action(e.getGuid(),n.CometChatUIKitConstants.MessageTypes.groupMember,n.CometChatUIKitConstants.MessageReceiverType.group,n.CometChatUIKitConstants.MessageCategory.action);return i.setAction(o),i.setActionBy(r.CometChatUIKitUtility.clone(t)),i.setActionFor(r.CometChatUIKitUtility.clone(e)),i.setActionOn(r.CometChatUIKitUtility.clone(t)),i.setReceiver(r.CometChatUIKitUtility.clone(e)),i.setSender(r.CometChatUIKitUtility.clone(t)),i.setConversationId("group_"+e.getGuid()),i.setMuid(r.CometChatUIKitUtility.ID()),i.setMessage(`${t.getName()} ${o} ${t.getUid()}`),i.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),i}),[]),ae=t.useCallback((async e=>{if(!(e instanceof s.CometChat.User))if(e.getOwner()===_?.getUid())J({type:"transferOwnership"});else{J(null);try{if(_){await s.CometChat.leaveGroup(e.getGuid());const t=r.CometChatUIKitUtility.clone(e);t.setHasJoined(!1),n.CometChatGroupEvents.ccGroupLeft.next({userLeft:r.CometChatUIKitUtility.clone(_),leftGroup:t,message:ie(t,_)}),oe.current?.()}}catch(e){re(e)}}}),[_,J,re,ie,oe]),le=t.useCallback((async e=>{if(!(e instanceof s.CometChat.User)){J(null);try{await s.CometChat.deleteGroup(e.getGuid()),n.CometChatGroupEvents.ccGroupDeleted.next(r.CometChatUIKitUtility.clone(e)),oe.current?.()}catch(e){re(e)}}}),[J,re,oe]);function ce(e){if(e instanceof s.CometChat.User){let t=(new X).getUserStatusVisible(e);if(!g&&!t)return Q?.onlineStatusColor||se.palette.getSuccess()||"rgb(0, 200, 111)"}else{const t=e.getType();if(t===n.CometChatUIKitConstants.GroupTypes.private)return Q?.privateGroupIconBackground||"#F7A500";if(t===n.CometChatUIKitConstants.GroupTypes.password)return Q?.passwordGroupIconBackground||"#F7A500"}return null}function Ce(e){let t="";if(e instanceof s.CometChat.Group){const o=e.getType();o===n.CometChatUIKitConstants.GroupTypes.private?t=h:o===n.CometChatUIKitConstants.GroupTypes.password&&(t=y||m)}return t}function de(e){if(e instanceof s.CometChat.User)return g?"":n.localize(e.getStatus().toUpperCase());const t=e.getMembersCount();return`${t} ${n.localize(t>1?"MEMBERS":"MEMBER")}`}function ge(e){if(w)return e instanceof s.CometChat.User?w(e):w(void 0,e);let t=(new X).getUserStatusVisible(e);const o=e instanceof s.CometChat.User&&e.getStatus()===n.CometChatUIKitConstants.userStatusType.online;return t?null:d.jsx("cometchat-label",{text:de(e),labelStyle:JSON.stringify(Si(o,Q,se))})}function ue(e,t){const{id:o,onClick:i}=e;if(i)i(t);else switch(o){case n.CometChatUIKitConstants.UserOptions.viewProfile:t instanceof s.CometChat.User&&t.getLink()&&window.open(t.getLink(),"_blank");break;case n.CometChatUIKitConstants.UserOptions.block:t instanceof s.CometChat.User&&async function(e){if(!e.getBlockedByMe())try{await s.CometChat.blockUsers([e.getUid()]);const t=r.CometChatUIKitUtility.clone(e);t.setBlockedByMe(!0),n.CometChatUserEvents.ccUserBlocked.next(t),q(t)}catch(e){re(e)}}(t);break;case n.CometChatUIKitConstants.UserOptions.unblock:t instanceof s.CometChat.User&&async function(e){if(e.getBlockedByMe())try{await s.CometChat.unblockUsers([e.getUid()]);const t=r.CometChatUIKitUtility.clone(e);t.setBlockedByMe(!1),n.CometChatUserEvents.ccUserUnblocked.next(t),q(t)}catch(e){re(e)}}(t);break;case n.CometChatUIKitConstants.GroupOptions.viewMembers:t instanceof s.CometChat.Group&&K("groupMembers");break;case n.CometChatUIKitConstants.GroupOptions.addMembers:t instanceof s.CometChat.Group&&K("addMembers");break;case n.CometChatUIKitConstants.GroupOptions.bannedMembers:t instanceof s.CometChat.Group&&K("bannedMembers");break;case n.CometChatUIKitConstants.GroupOptions.leave:if(t instanceof s.CometChat.Group){const e=t.getOwner()===_?.getUid();J({type:"leaveOrTransferConfirm",buttonText:e?I:E,confirmDialogMessage:e?S:v})}break;case n.CometChatUIKitConstants.GroupOptions.delete:t instanceof s.CometChat.Group&&J({type:"deleteConfirm",buttonText:F,confirmDialogMessage:k})}}function pe(e,t,n){return t?d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(Li(t,n,se))}):null}function he(e,t){const{title:n,id:o,hideSectionSeparator:r=!0,sectionSeparatorColor:i,hideItemSeparator:a=!1,itemSeparatorColor:l}=e;let c=null;n&&(c=d.jsx("div",{className:"cc-details__section-header",style:{textAlign:"left"},children:d.jsx("cometchat-label",{text:n.toUpperCase(),labelStyle:JSON.stringify(Fi(e))})}));let C=null;const g=function(e,t){const{id:n}=e;if(void 0!==n)return t instanceof s.CometChat.User?e.options?.(t,null,n):e.options?.(null,t,n)}(e,t);return g?.length&&(C=d.jsx("div",{className:"cc-details__options",style:{display:"flex",flexDirection:"column"},children:g.map(((e,n)=>function(e,t,n,o){const{id:r,customView:s}=e;if(s)return d.jsx("div",{className:"cc-details__option",children:s},r);const{title:i,tail:a,iconURL:l}=e,c=d.jsx(Y,{text:i,iconURL:l,buttonStyle:ki(e),onClick:()=>ue(e,t)});let C=c;return a&&(C=d.jsxs("div",{className:"cc-details__option-content",style:{position:"relative"},children:[c,d.jsx("div",{className:"cc-details__option-tail",style:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"},children:a})]})),d.jsxs("div",{className:"cc-details__option",style:{display:"flex",flexDirection:"column"},children:[C,pe(0,o,!1)]},r)}(e,t,0,l)))})),d.jsxs("div",{className:"cc-details__section",style:{padding:"16px 0"},children:[c,C,pe(0,i,!0)]},o)}function me(){K("none")}function Ae(){J(null)}function be(e){if(e instanceof s.CometChat.User)return null;const t=U?.options;return d.jsx(Wi,{group:e,onTransferOwnership:U?.onTransferOwnership,titleAlignment:U?.titleAlignment,loadingIconURL:U?.loadingIconURL,loadingStateView:U?.loadingStateView,errorStateView:U?.errorStateView,emptyStateView:U?.emptyStateView,onError:U?.onError,hideSearch:U?.hideSearch,searchIconURL:U?.searchIconURL,hideSeparator:U?.hideSeparator,closeButtonIconURL:U?.closeButtonIconURL||Vi,disableUsersPresence:U?.disableUsersPresence,listItemView:U?.listItemView,subtitleView:U?.subtitleView,onClose:U?.onClose??Ae,groupMembersRequestBuilder:U?.groupMembersRequestBuilder,searchRequestBuilder:U?.searchRequestBuilder,options:t?(e,n)=>t(n):void 0,statusIndicatorStyle:U?.statusIndicatorStyle,avatarStyle:U?.avatarStyle,listItemStyle:U?.listItemStyle,groupMemberStyle:U?.groupMemberStyle,transferOwnershipStyle:Oi(U,Q)})}return function(e){const{setLoggedInUser:n,errorHandler:o,leaveOrTransferConfirmDialogElement:r,setModalInfo:i,handleLeaveOrTransferConfirmClick:a,deleteConfirmDialogElement:l,handleDeleteConfirmClick:c,userOrGroup:C,user:d,group:g,setUserOrGroup:u}=e;t.useEffect((()=>{d instanceof s.CometChat.User&&(d.getStatus?.()?u(d):s.CometChat.getUser(d.getUid()).then((e=>{u(e)})).catch((e=>o(e)))),g instanceof s.CometChat.Group&&(g.getOwner?.()?u(g):s.CometChat.getGroup(g.getGuid()).then((e=>{u(e)})).catch((e=>o(e))))}),[d,g,u,o]),t.useEffect((()=>{if(!r)return;const e="cc-confirm-clicked",t=()=>{C&&a(C)};return r.addEventListener(e,t),()=>{r.removeEventListener(e,t)}}),[r,a,C]),t.useEffect((()=>{if(!r)return;const e="cc-cancel-clicked",t=()=>i(null);return r.addEventListener(e,t),()=>{r.removeEventListener(e,t)}}),[r,i]),t.useEffect((()=>{if(!l)return;const e="cc-confirm-clicked",t=()=>{C&&c(C)};return l.addEventListener(e,t),()=>{l.removeEventListener(e,t)}}),[l,c,C]),t.useEffect((()=>{if(!l)return;const e="cc-cancel-clicked",t=function(){i(null)};return l.addEventListener(e,t),()=>{l.removeEventListener(e,t)}}),[l,i]),t.useEffect((()=>{(async()=>{try{n(await s.CometChat.getLoggedinUser())}catch(e){o(e)}})()}),[o,n])}({setLoggedInUser:W,errorHandler:re,leaveOrTransferConfirmDialogElement:$,setModalInfo:J,handleLeaveOrTransferConfirmClick:ae,deleteConfirmDialogElement:te,handleDeleteConfirmClick:le,userOrGroup:Z,user:o,group:i,setUserOrGroup:q}),Z?d.jsxs("div",{className:"cc-details",style:wi(Q,se),children:[d.jsxs("div",{className:"cc-details__header",style:{display:"flex",justifyContent:"center",textAlign:"center",width:"100%",paddingBottom:"19px"},children:[d.jsx("cometchat-label",{text:a,labelStyle:JSON.stringify(fi(Q,se))}),d.jsx(Y,{iconURL:l,buttonStyle:Di(Q,se),onClick:C})]}),d.jsxs("div",{className:"cc-details__content",style:{flexGrow:"1",display:"flex",flexDirection:"column",overflowY:"auto"},children:[function(e){if(p)return null;let t;return t=u?e instanceof s.CometChat.User?u(e):u(void 0,e):function(e){return d.jsx(B,{avatarName:e.getName(),title:e.getName(),avatarURL:e instanceof s.CometChat.User?e.getAvatar():e.getIcon(),statusIndicatorColor:ce(e),statusIndicatorIcon:Ce(e),listItemStyle:Ei(P,se),statusIndicatorStyle:vi(O),avatarStyle:Ii(j,se),subtitleViewClassName:"cc-details__subtitle-view",subtitleView:ge(e)})}(e),d.jsx("div",{className:"cc-details__profile",style:{overflowX:"auto"},children:t})}(Z),function(t){const n=function(t){let n;return f&&(n=f),n||(n=r.DetailsUtils.getDefaultDetailsTemplate(_,e?.user,e?.group,se)),n}().map(((e,n)=>he(e,t)));return 0===n.length?null:d.jsx("div",{className:"cc-details__section-list",style:{flexGrow:"1",overflowY:"auto",display:"flex",flexDirection:"column",padding:"28px 0"},children:n})}(Z)]}),function(e){try{let t=null;switch(N){case"addMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=T?.sectionHeaderField,o=T?.options;return d.jsx(Lr,{group:e,selectionMode:T?.selectionMode??n.SelectionMode.multiple,onClose:T?.onClose??C??me,onBack:T?.onBack??me,backButtonIconURL:T?.backButtonIconURL||ji,showBackButton:T?.showBackButton??!0,titleAlignment:T?.titleAlignment,hideSearch:T?.hideSearch,searchIconURL:T?.searchIconURL,showSectionHeader:T?.showSectionHeader,sectionHeaderField:(r=t,void 0!==r&&r in new s.CometChat.User("anyString")?t:void 0),loadingIconURL:T?.loadingIconURL,loadingStateView:T?.loadingStateView,emptyStateView:T?.emptyStateView,errorStateView:T?.errorStateView,hideError:T?.hideError,disableUsersPresence:T?.disableUsersPresence,hideSeparator:T?.hideSeparator,onError:T?.onError??void 0,menus:T?.menu,options:o??void 0,onSelect:T?.onSelect,usersRequestBuilder:T?.usersRequestBuilder,searchRequestBuilder:T?.searchRequestBuilder,listItemView:T?.listItemView,subtitleView:T?.subtitleView,onAddMembersButtonClick:T?.onAddMembersButtonClick??void 0,closeButtonIconURL:T?.closeButtonIconURL||Vi,listItemStyle:T?.listItemStyle,statusIndicatorStyle:T?.statusIndicatorStyle,avatarStyle:T?.avatarStyle,addMembersStyle:Ri(T,Q)});var r}(e);break;case"bannedMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=M?.options;return d.jsx(Zr,{group:e,onClose:M?.onClose??C??me,onBack:M?.onBack??me,backButtonIconURL:M?.backButtonIconURL||ji,showBackButton:M?.showBackButton||!0,menus:M?.menu,titleAlignment:M?.titleAlignment,hideSearch:M?.hideSearch,searchIconURL:M?.searchIconURL,bannedMembersRequestBuilder:M?.bannedMembersRequestBuilder,searchRequestBuilder:M?.searchRequestBuilder,listItemView:M?.listItemView,subtitleView:M?.subtitleView,hideSeparator:M?.hideSeparator,disableUsersPresence:M?.disableUsersPresence,options:t??void 0,selectionMode:M?.selectionMode,closeButtonIconURL:M?.closeButtonIconURL||Vi,onError:M?.onError??void 0,onSelect:M?.onSelect,emptyStateView:M?.emptyStateView,errorStateView:M?.errorStateView,loadingStateView:M?.loadingStateView,loadingIconURL:M?.loadingIconURL,hideError:M?.hideError,statusIndicatorStyle:M?.statusIndicatorStyle,avatarStyle:M?.avatarStyle,listItemStyle:M?.listItemStyle,bannedMemberStyle:Pi(M,Q)})}(e);break;case"groupMembers":t=function(e){if(e instanceof s.CometChat.User)return null;const t=L?.options;return d.jsx(xe,{group:e,onClose:L?.onClose??C??me,onBack:L?.onBack??me,groupMemberRequestBuilder:L?.groupMembersRequestBuilder,searchRequestBuilder:L?.searchRequestBuilder,listItemView:L?.listItemView,subtitleView:L?.subtitleView,disableUsersPresence:L?.disableUsersPresence,menus:L?.menu,options:t?(e,n)=>t(n):void 0,backButtonIconURL:L?.backButtonIconURL||ji,closeButtonIconURL:L?.closeButtonIconURL||Vi,showBackButton:L?.showBackButton||!0,hideSeparator:L?.hideSeparator,selectionMode:L?.selectionMode,hideError:L?.hideError,searchIconURL:L?.searchIconURL,dropDownIconURL:L?.dropdownIconURL,hideSearch:L?.hideSearch,onError:L?.onError??void 0,onSelect:L?.onSelect,emptyStateView:L?.emptyStateView,errorStateView:L?.errorStateView,loadingIconURL:L?.loadingIconURL,loadingStateView:L?.loadingStateView,titleAlignment:L?.titleAlignment,statusIndicatorStyle:L?.statusIndicatorStyle,avatarStyle:L?.avatarStyle,groupMembersStyle:Ui(L,Q),groupScopeStyle:L?.groupScopeStyle,listItemStyle:L?.listItemStyle})}(e);break;case"none":break;default:}if(null!==t)return d.jsx("div",{className:"cc-details__page-wrapper",style:{position:"absolute",top:"0",left:"0",boxSizing:"border-box",width:"100%",height:"100%",border:"none",borderRadius:"inherit"},children:t})}catch(e){re(e)}}(Z),function(e){if(!z)return null;const{type:t}=z;try{switch(t){case"leaveOrTransferConfirm":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(Ti(H,Q)),children:d.jsx("cometchat-confirm-dialog",{ref:ee,title:"",cancelButtonText:c,confirmButtonText:z.buttonText,messageText:z.confirmDialogMessage,confirmDialogStyle:JSON.stringify(Mi(V,Q,se))})});case"transferOwnership":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(Ti(H,Q)),children:be(e)});case"deleteConfirm":return d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(Ti(H,Q)),children:d.jsx("cometchat-confirm-dialog",{ref:ne,cancelButtonText:c,confirmButtonText:z.buttonText,messageText:z.confirmDialogMessage,confirmDialogStyle:JSON.stringify(Bi(G,se))})});default:}}catch(e){re(e)}}(Z)]}):null}const $i="10px";function ea(e,t){return new o.PreviewStyle({height:"100%",width:"100%",border:`1px solid ${t.palette.getAccent200()}`,background:t.palette.getBackground(),previewTitleFont:e?.previewTitleFont||n.fontHelper(t.typography.caption1),previewTitleColor:e?.previewTitleColor||t.palette.getAccent600(),previewSubtitleFont:e?.previewSubtitleFont||n.fontHelper(t.typography.subtitle2),previewSubtitleColor:e?.previewSubtitleColor||t.palette.getAccent400(),closeButtonIconTint:e?.closePreviewTint||t.palette.getAccent600(),borderRadius:"12px"})}function ta(e,t,o){return{height:"fit-content",width:"fit-content",buttonTextFont:n.fontHelper(t.typography.subtitle2),buttonTextColor:t.palette.getAccent600(),borderRadius:"8px",border:"none",buttonIconTint:t.palette.getAccent600(),padding:"8px",iconHeight:"20px",iconWidth:"20px",iconBackground:"transparent",gap:"5px",...o}}function na(e,t){return new o.TextInputStyle({height:"100%",width:"100%",maxHeight:e?.maxInputHeight||"150px",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||"12px",background:e?.background||`${t.palette.getAccent50()}`,textFont:e?.textFont||n.fontHelper(t.typography.text2),textColor:e?.textColor||t.palette.getAccent(),dividerColor:e?.dividerTint||t.palette.getAccent100(),inputBorder:e?.inputBorder||"none",inputBorderRadius:e?.inputBorderRadius||"0px",inputBackground:e?.inputBackground||"transparent",placeholderTextColor:t.palette.getAccent500(),placeholderTextFont:n.fontHelper(t.typography.subtitle2)})}function oa(e,t,n=!1){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:n?t.palette.getAccent200():e?.sendIconTint||t.palette.getPrimary(),background:"transparent",padding:"0"}}function ra(e,t,n){return n?e?.emojiIconTint||t.palette.getAccent():e?.emojiIconTint||t.palette.getAccent500()}function sa(e,t,n){return n?e?.voiceRecordingIconTint||t.palette.getAccent():e?.voiceRecordingIconTint||t.palette.getAccent500()}function ia(e,t,n){return n?e?.attachIcontint||t.palette.getAccent():e?.attachIcontint||t.palette.getAccent500()}function aa(e,t,n){return n?e?.AIIconTint||t.palette.getAccent():e?.AIIconTint||t.palette.getAccent500()}const la="244px",ca="275px",Ca="12px";function da(e,t){let n=e?.height,r=e?.width,s="100%"==n||"100%"==r;return new o.PopoverStyle({width:r&&!s?e?.width:ca,height:n&&!s?e?.height:la,borderRadius:e?.borderRadius||Ca,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})}function ga(e={},t){return{width:e?.width||ca,height:e?.height||la,borderRadius:e?.borderRadius||Ca,border:`1px solid ${t.palette.getAccent100()}`,boxSizing:"border-box",overflow:"auto"}}function ua(e,t){return{width:e?.width||ca,height:e?.height||la,borderRadius:e?.borderRadius||Ca,border:`1px solid ${t.palette.getAccent100()}`,boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}}function pa(e,t){return new o.ActionSheetStyle({width:e?.width||"100%",height:e?.height||"100%",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||Ca,background:e?.background||t.palette.getBackground(),layoutModeIconTint:e?.layoutModeIconTint||t.palette.getPrimary(),titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent(),listItemBackground:e?.listItemBackground||"transparent",listItemIconTint:e?.listItemIconTint||t.palette.getAccent700(),listItemIconBackground:e?.listItemIconBackground||"transparent",listItemIconBorderRadius:e?.listItemIconBorderRadius||"0",ActionSheetSeparatorTint:e?.ActionSheetSeparatorTint||`${t.palette.getAccent400()}`})}function ha(e,t){return new o.ActionSheetStyle({width:e?.width||"100%",height:e?.height||"100%",border:e?.border||"none",borderRadius:e?.borderRadius||Ca,background:e?.background||t.palette.getBackground(),listItemBackground:e?.listItemBackground||"transparent",ActionSheetSeparatorTint:e?.optionsSeparatorTint||`${t.palette.getAccent600()}`})}function ma(e,t,n){return{height:"24px",width:"24px",border:"none",borderRadius:"0",padding:"0",buttonIconTint:ia(e,t,n),background:"transparent"}}function Aa(e,t,n){return{height:"24px",width:"24px",border:"none",borderRadius:"0",padding:"0",buttonIconTint:aa(e,t,n),background:"transparent"}}const xa="400px",ba="320px",ya="12px";function wa(e){return{width:ba,height:xa,borderRadius:ya,border:`1px solid ${e.palette.getAccent100()}`,boxSizing:"border-box"}}function fa(e,t){return new o.EmojiKeyboardStyle({width:"100%",height:"100%",border:"none",borderRadius:ya,background:t.palette.getBackground(),textFont:e?.emojiKeyboardTextFont||n.fontHelper(t.typography.caption1),textColor:e?.emojiKeyboardTextColor||t.palette.getAccent()})}function Da(e,t,n,o=!1){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:ra(e,t,n),background:"transparent",padding:"0"}}const Ea="100px",va="250px",Ia="8px";function Sa(e,t){return new o.MediaRecorderStyle({...e,background:e?.background||t.palette.getBackground(),border:"1px solid rgba(20, 20, 20, 0.08)",borderRadius:Ia,closeIconTint:e?.closeIconTint||t.palette.getAccent600(),submitIconTint:e?.submitIconTint||t.palette.getAccent600(),startIconTint:e?.startIconTint||t.palette.getError(),stopIconTint:e?.stopIconTint||t.palette.getError(),timerTextColor:e?.timerTextColor||t.palette.getAccent400(),timerTextFont:e?.timerTextFont||n.fontHelper(t.typography.text3)})}function Fa(e,t,n,o=!1){const r={};return o&&(r.margin=`0px ${$i}`),{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:sa(e,t,n),background:"transparent",...r}}var ka="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABeZJREFUeF7tnOGx5TQMhbUdQAdQAUsFQAVABSwVLFQAVABUAFTAUgFQAXSwuxVABzAfc81kM7ElJ7KjeyPPvHk%2FrpPI5%2BRIsuz4iWQLhcCTUNakMZKEBHsJkpAkJBgCwcxJhSQhwRAIZk4qJAkJhkAwc1IhSUgwBIKZkwpJQoIhEMycVIiNkLdE5Omt62%2B2S%2Fb1SkJ03N4RkV9FhP%2B0VyLy0e2%2FfnVnjyREBwwyPlx1QyWQ4t6SEB3SfypdhmA35Kb6GO%2BmB7Hjr4q1b4vI394jSULaiD4TkR8qXXBZ7gE%2BCWkT8nIRzNc9%2FxSR91Mh3gjU74cyUEir%2FSgin3ualAp5E80y3%2Fh2Me%2FQ8CYN%2FkZEXnjElGiEMPkCDNJMX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bkOUzIAYANWKspFjIKEQQWzxSa9Nb7dlpJCHYSeAF8K1d7ctxaKRYyEAR3OcuiShgjCakPMcShFEUtad102KGR5Lg%2BZIfutcsQjAyF6gMVM0kxELK%2BtOD1vd%2FD7daCECzCbGQUmbNrbjxkGScRUghZf3FbRE0QZnNCz9XMrSttXeDM7iPLmcopCCTG%2BU23pEzCcGc3q2kwzY5K%2Fq5zIlyPZ8lgxlfts6eeV9qszUg176%2BXb%2B0o7%2FGrYnkcifKWVVCifyMquzlPtixxJKZn0YvlXLJT9oAQNtJctaK3mVPlNPc1lnu6tInykU7OODyJ8rVPj2YOffIE%2BUWEbT2Ne4vt%2FNHRtU%2B8kS5CrJnHM%2BEKXmiXIWQPMDspPJ7zfXkEX%2FBCNnajDe61J4nyimRebkZb9YmtjxRblS65HDfPFHOAcRRt7AcivOwJ8qNAvXofbXv5HedPNoy6uwVw6OAjb7%2BsifKjQZ27%2F0vW37fC9iM6y65QDUD2L3PuNSJcntBmnnd5TY5zAT3yLMe%2FkS5I%2BA87LWZ9gajNglJQoIhEMycVEgSEgyBYOakQpKQYAgEMycVkoQEQyCYOamQJCQYAsHMSYUEI%2BRfzec9dI8XxxgAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E",Ta="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ma="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FHeart%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FHeart%22%20fill%3D%22%23000000%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.375%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.3134395%2C18.0459049%20L1.52443954%2C8.87923824%20C-0.0597509272%2C7.29629358%20-0.452349335%2C4.87680895%200.550022872%2C2.87415491%20L0.550022872%2C2.87415491%20C1.29768241%2C1.3792661%202.71831477%2C0.334867269%204.36817344%2C0.0671851901%20C6.01803212%2C-0.200496889%207.69599623%2C0.341168737%208.87793954%2C1.52298824%20L10.3134395%2C2.95757158%20L11.7489395%2C1.52298824%20C12.9308829%2C0.341168737%2014.608847%2C-0.200496889%2016.2587056%2C0.0671851901%20C17.9085643%2C0.334867269%2019.3291967%2C1.3792661%2020.0768562%2C2.87415491%20L20.0768562%2C2.87415491%20C21.0778256%2C4.87595612%2020.6857045%2C7.29366739%2019.1033562%2C8.87648824%20L10.3134395%2C18.0459049%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";var Ba="data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M30.0001%200.666626C46.2004%200.666626%2059.3334%2013.7996%2059.3334%2030C59.3334%2046.2003%2046.2004%2059.3333%2030.0001%2059.3333C13.7997%2059.3333%200.666748%2046.2003%200.666748%2030C0.666748%2013.7996%2013.7997%200.666626%2030.0001%200.666626ZM30.0001%205.99996C16.7452%205.99996%206.00008%2016.7451%206.00008%2030C6.00008%2043.2548%2016.7452%2054%2030.0001%2054C43.2549%2054%2054.0001%2043.2548%2054.0001%2030C54.0001%2016.7451%2043.2549%205.99996%2030.0001%205.99996ZM31.6667%2027.3333C32.219%2027.3333%2032.6667%2027.781%2032.6667%2028.3333V42.3333C32.6667%2042.8856%2032.219%2043.3333%2031.6667%2043.3333H28.3334C27.7811%2043.3333%2027.3334%2042.8856%2027.3334%2042.3333V28.3333C27.3334%2027.781%2027.7811%2027.3333%2028.3334%2027.3333H31.6667ZM30.0001%2019.3333C31.4728%2019.3333%2032.6667%2020.5272%2032.6667%2022C32.6667%2023.4727%2031.4728%2024.6666%2030.0001%2024.6666C28.5273%2024.6666%2027.3334%2023.4727%2027.3334%2022C27.3334%2020.5272%2028.5273%2019.3333%2030.0001%2019.3333Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",La="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FMic%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMic%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284%2C%201%29%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%228%22%20y1%3D%2218.3333333%22%20x2%3D%228%22%20y2%3D%2222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20x%3D%223.5%22%20y%3D%220%22%20width%3D%229%22%20height%3D%2214.9111111%22%20rx%3D%223.91111111%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C8.8%20L0%2C11%20C0%2C15.0500882%203.35786438%2C18.3333333%207.5%2C18.3333333%20L8.5%2C18.3333333%20C12.6421356%2C18.3333333%2016%2C15.0500882%2016%2C11%20L16%2C8.8%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ua="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Ra="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%20Rotated%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus-Rotated%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%2845.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Pa="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Oa="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FStipop%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FStipop%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.5%2C1%20C18.2989899%2C1%2023%2C5.70101013%2023%2C11.5%20C23%2C17.2039245%2018.451858%2C21.8455734%2012.7842951%2C21.9962258%20L12.5%2C22%20L6%2C23%20L6.47908443%2C20.1033393%20C3.77065445%2C18.2043706%202%2C15.0589646%202%2C11.5%20C2%2C5.70101013%206.70101013%2C1%2012.5%2C1%20Z%20M12.5%2C2.5%20C7.52943725%2C2.5%203.5%2C6.52943725%203.5%2C11.5%20C3.5%2C14.3705191%204.85206397%2C17.0112175%207.09635804%2C18.6980916%20L7.34021132%2C18.8751453%20L8.11298335%2C19.416961%20L7.817%2C21.202%20L12.3852902%2C20.5%20L12.5%2C20.5%20C17.4705627%2C20.5%2021.5%2C16.4705627%2021.5%2C11.5%20C21.5%2C6.52943725%2017.4705627%2C2.5%2012.5%2C2.5%20Z%20M13.5%2C12.3%20C13.1666667%2C13.9666667%2012.3333333%2C14.8%2011%2C14.8%20C9.66666667%2C14.8%208.83333333%2C13.9666667%208.5%2C12.3%20L13.5%2C12.3%20Z%20M15.0030662%2C6.67300699%20C15.1656001%2C6.92305919%2015.1180007%2C7.24908483%2014.9043132%2C7.44344192%20L14.826993%2C7.50306617%20L13.632%2C8.279%20L14.8086975%2C8.98550424%20C15.0644308%2C9.13894425%2015.1646368%2C9.45281874%2015.0578342%2C9.72120324%20L15.0144958%2C9.80869745%20C14.8610557%2C10.0644308%2014.5471813%2C10.1646368%2014.2787968%2C10.0578342%20L14.1913025%2C10.0144958%20L12.1913025%2C8.81449576%20C11.8402552%2C8.60386734%2011.8048611%2C8.12100565%2012.0939654%2C7.85785853%20L12.173007%2C7.79693383%20L14.173007%2C6.49693383%20C14.4508428%2C6.31634058%2014.8224729%2C6.39517122%2015.0030662%2C6.67300699%20Z%20M8.1%2C6.7%20C8.92842712%2C6.7%209.6%2C7.37157288%209.6%2C8.2%20C9.6%2C9.02842712%208.92842712%2C9.7%208.1%2C9.7%20C7.27157288%2C9.7%206.6%2C9.02842712%206.6%2C8.2%20C6.6%2C7.37157288%207.27157288%2C6.7%208.1%2C6.7%20Z%22%20id%3D%22Oval%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",ja="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20height%3D%2224px%22%3E%3Cpath%20d%3D%22M%2012%202%20C%206.477%202%202%206.477%202%2012%20C%202%2017.523%206.477%2022%2012%2022%20C%2017.523%2022%2022%2017.523%2022%2012%20C%2022%206.477%2017.523%202%2012%202%20z%20M%2012%204%20C%2016.411%204%2020%207.589%2020%2012%20C%2020%2016.411%2016.411%2020%2012%2020%20C%207.589%2020%204%2016.411%204%2012%20C%204%207.589%207.589%204%2012%204%20z%20M%208%208%20L%208%2016%20L%2016%2016%20L%2016%208%20L%208%208%20z%22%2F%3E%3C%2Fsvg%3E";const Va=De({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t,events:{onClick:"cc-actionsheet-clicked"}}),Ga=De({tagName:"cometchat-action-sheet",elementClass:o.CometChatActionSheet,react:t}),Ha=De({tagName:"cometchat-text-input",elementClass:o.CometChatTextInput,react:t});function Qa(e,t){let n=e;const{type:o}=t;switch(o){case"setText":n={...e,text:t.text};break;case"setAddToMsgInputText":n={...e,addToMsgInputText:t.addToMsgInputText};break;case"setTextMessageToEdit":n={...e,textMessageToEdit:t.textMessageToEdit};break;case"setContentToDisplay":n={...e,contentToDisplay:t.contentToDisplay};break;case"setLoggedInUser":n={...e,loggedInUser:t.loggedInUser};break;case"setShowPoll":n={...e,showPoll:t.showPoll};break;case"setShowMentionsCountWarning":n={...e,showMentionsCountWarning:t.showMentionsCountWarning}}return n}function Na(e){const{user:a,group:l,text:c="",onTextChange:C,placeHolderText:g=n.localize("ENTER_YOUR_MESSAGE_HERE"),sendButtonIconURL:u=Pa,sendButtonView:p,onSendButtonClick:h,secondaryButtonView:m,attachmentIconURL:y=Ua,emojiIconURL:w=Oa,AIIconURL:f=ka,auxiliaryButtonView:D,auxiliaryButtonAlignment:E=n.AuxiliaryButtonAlignment.right,attachmentOptions:v,hideLayoutMode:I=!1,parentMessageId:S=null,LiveReactionIconURL:F=Ma,hideLiveReaction:k=!0,headerView:T=null,onError:M,disableSoundForMessages:B=!1,customSoundForMessage:L,disableTypingEvents:U=!1,messageComposerStyle:P,hideVoiceRecording:O=!1,actionSheetStyle:j,AIOptionsStyle:V={},mediaRecorderStyle:G,voiceRecordingStartIconURL:H=La,voiceRecordingCloseIconURL:Q=Ta,voiceRecordingStopIconURL:N=ja,voiceRecordingSubmitIconURL:K=Pa,userMemberWrapperConfiguration:z,textFormatters:J=[],disableMentions:Y=!1,InfoSimpleIcon:_=Ba,mentionsWarningText:W,mentionsWarningStyle:Z={}}=e,[X,q]=t.useReducer(Qa,{text:c,addToMsgInputText:c,textMessageToEdit:null,contentToDisplay:"none",loggedInUser:null,showPoll:!1,showMentionsCountWarning:!1}),$=t.useRef(null),ee=t.useRef(null),[te,ne]=x(null),[oe,re]=x(null),[se,ie]=x(null),[ae,le]=x(null),[ce,Ce]=x(null),[de,ge]=x(null),[ue,pe]=x(null),[he,me]=x(null),[Ae,xe]=x(null),[ye,we]=x(null),[fe,De]=x(null),[Ee,ve]=x(null),[Ie,Se]=x(null),[Fe,ke]=x(null),Te=t.useRef(new Map),Me=t.useRef(null),Be=t.useRef(null),Le=b(M),Ue=A(a),Pe=A(l),Oe=A(S),je=A(B),Ve=A(L),Ge=A(h),{theme:He}=t.useContext(R),[Qe,Ne]=t.useState(null),[Ke,ze]=t.useState(J),[Je,Ye]=t.useState(""),_e=t.useRef(""),We=t.useRef(""),[Ze,Xe]=t.useState(!1),qe=t.useRef(Re.getDataSource().getMentionsTextFormatter({theme:He})),[$e,et]=t.useState(0),[tt,nt]=t.useState(z??new r.UserMemberWrapperConfiguration({})),[ot,rt]=t.useState(),[st,it]=t.useState(void 0),[at,lt]=t.useState(void 0),ct=t.useRef(null),Ct="composer_"+Date.now(),dt=t.useCallback((()=>{We.current=_e.current,Xe(!1),Ye(""),_e.current=""}),[Xe,Ye]),gt=t.useCallback((e=>{if(!e||!e.length)return Ye(""),_e.current="",Xe(!1),void et(1);let t=e.split("@")[1].toLowerCase()?e.split("@")[1].toLowerCase():void 0;t&&We.current&&t.startsWith(We.current.toLowerCase())||t===Je||(Ye(t),_e.current=t,Xe(!0),We.current="",et($e+1))}),[Ye,Xe,et]),ut=t.useCallback((()=>{const e=Ue.current,t=Pe.current;if(e){const t=e.getBlockedByMe()||e.getHasBlockedMe();return{receiverId:e?.getUid(),receiverType:n.CometChatUIKitConstants.MessageReceiverType.user,isBlocked:t}}if(t)return{receiverId:t?.getGuid(),receiverType:n.CometChatUIKitConstants.MessageReceiverType.group};throw new Error("No user or group object provided. Should at least provide one.")}),[Pe,Ue]),pt=t.useCallback((()=>{const{receiverId:e,receiverType:t,isBlocked:n}=ut();return n?null:new s.CometChat.TypingIndicator(e,t)}),[ut]),ht=t.useCallback((()=>{try{const e=pt();if(!e)return;s.CometChat.startTyping(e)}catch(e){Le(e)}}),[pt,Le]),mt=t.useCallback((()=>{try{s.CometChat.endTyping(pt()),Me.current=null}catch(e){Le(e)}}),[pt,Le]),At=t.useCallback((()=>{U||(null!==Me.current?(window.clearTimeout(Me.current),Me.current=null):ht(),Me.current=window.setTimeout((()=>mt()),500))}),[ht,mt,U]);function xt(){const e=Ue.current;if(null!=e)return{user:e?.getUid(),group:null,parentMessageId:S};const t=Pe.current;return null!=t?{user:null,group:t?.getGuid(),parentMessageId:S}:{user:null,group:null,parentMessageId:S}}const bt=t.useCallback((function(e){i.flushSync((()=>{q({type:"setAddToMsgInputText",addToMsgInputText:""})})),q({type:"setAddToMsgInputText",addToMsgInputText:e}),setTimeout((()=>{q({type:"setAddToMsgInputText",addToMsgInputText:""})}),0)}),[q]),yt=t.useCallback(((e,t,o)=>{throw t.setMetadata({error:e}),o?n.CometChatMessageEvents.ccMessageEdited.next({message:t,status:n.MessageStatus.error}):n.CometChatMessageEvents.ccMessageSent.next({message:t,status:n.MessageStatus.error}),e}),[]),wt=t.useCallback((()=>{je.current||r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.outgoingMessage,Ve.current)}),[Ve,je]),ft=t.useCallback((e=>{const{receiverId:t,receiverType:n}=ut(),o=new s.CometChat.TextMessage(t,e,n);o.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),o.setMuid(r.CometChatUIKitUtility.ID());const i=Oe.current;return null!==i&&o.setParentMessageId(i),o}),[ut,Oe]),Dt=t.useCallback((async e=>{try{for(let t=0;t{try{const t=ft(e);let o=qe.current.getCometChatUserGroupMembers();if(o){let e=[];for(let t=0;t{const{receiverId:n,receiverType:o}=ut(),r=new s.CometChat.TextMessage(n,e,o);return r.setId(t),r}),[ut]),It=t.useCallback((async e=>{try{for(let t=0;t{try{if(Ge.current)Ge.current(vt(e,t.getId()),n.PreviewMessageMode.edit),bt("");else{const o=await It(vt(e,t.getId()));bt(""),o&&n.CometChatMessageEvents.ccMessageEdited.next({message:o,status:n.MessageStatus.success})}}catch(e){Le(e)}}),[It,vt,Le]),Ft=t.useCallback((async e=>{if(0===(e=e?.trim())?.length||null!==X.textMessageToEdit&&X.textMessageToEdit.getText()===e)return;let t;if("emojiKeyboard"===X.contentToDisplay&&(ue?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})),"voiceRecording"===X.contentToDisplay&&(de?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})),q({type:"setText",text:""}),$.current?.emptyInputField(),null!==X.textMessageToEdit)q({type:"setTextMessageToEdit",textMessageToEdit:null}),await St(e,X.textMessageToEdit);else if(t=Ge.current)try{await Promise.all([t(ft(e),n.PreviewMessageMode.none)])}catch(e){Le(e)}else await Et(e)}),[X.textMessageToEdit,X.contentToDisplay,ue,de,q,St,Et,Le,ft,Ge,Ue]),kt=t.useCallback((async(e,t)=>{const n=await function(e){return new Promise(((t,n)=>{const o=new FileReader;o.onload=()=>{null!==o.result&&t(new File([o.result],e.name,e))},o.onerror=()=>n(new Error(`Converting the file named "${e.name}" to binary failed`)),o.readAsArrayBuffer(e)}))}(e),{receiverId:o,receiverType:i}=ut(),a=new s.CometChat.MediaMessage(o,n,t,i);a.setSentAt(r.CometChatUIKitUtility.getUnixTimestamp()),a.setMuid(r.CometChatUIKitUtility.ID()),a.setMetadata({file:n});const l=Oe.current;return null!==l&&a.setParentMessageId(l),a}),[ut,Oe]),Tt=t.useCallback((async e=>{try{return await s.CometChat.sendMediaMessage(e)}catch(t){yt(t,e,!1)}}),[yt]),Mt=t.useCallback((async(e,t)=>{try{const o=await kt(e,t);n.CometChatMessageEvents.ccMessageSent.next({message:o,status:n.MessageStatus.inprogress});const r=await Tt(o);r&&(n.CometChatMessageEvents.ccMessageSent.next({message:r,status:n.MessageStatus.success}),wt())}catch(e){Le(e)}}),[kt,wt,Tt,Le]),Bt=t.useCallback((async e=>{try{const t=new File([e],`${function(){const e=new Date,t="audio-recording-yyyyMMddHHmmss",n=e.getFullYear().toString(),o=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getDate().toString().padStart(2,"0"),s=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0");return t.replace("yyyyMMdd",`${n}${o}${r}`).replace("HHmmss",`${s}${i}${a}`)}()}.wav`,{type:e.type});Mt(t,n.CometChatUIKitConstants.MessageTypes.audio)}catch(e){Le(e)}}),[Mt,Le]);const Lt=t.useCallback((async()=>{const e=ee.current;if(!e?.files?.length||Ue.current?.getBlockedByMe())return;const t=e.files[0],o=e.accept.slice(0,-2),r=Ge.current;if(r)try{await Promise.all([r(await kt(t,o),n.PreviewMessageMode.none)])}catch(e){Le(e)}else await Mt(t,o);e.value=""}),[Mt,Le,kt,Ge,Ue]);function Ut(){return!X.text||""===X?.text?.trim()||null!==X.textMessageToEdit&&X.textMessageToEdit.getText()===X.text}function Rt(){return p?p(void 0!==a?a:l,xt()):d.jsx("div",{className:"cc-message-composer__send-btn-wrapper",children:d.jsx("cometchat-button",{ref:ie,iconURL:u,hoverText:n.localize("SEND_MESSAGE"),buttonStyle:JSON.stringify(oa(P,He,Ut()))})})}function Pt(){if(m&&(void 0!==a||void 0!==l))return m(void 0!==a?a:l,xt());const e=d.jsx("cometchat-button",{ref:le,hoverText:n.localize("ATTACH"),iconURL:"attachments"===X.contentToDisplay?Ra:y,buttonStyle:JSON.stringify(ma(P,He,"attachments"===X.contentToDisplay))});let t;if(v&&v.length>0&&(void 0!==a||void 0!==l)){t=v(a||l,xt())}else t=Re.getDataSource().getAttachmentOptions(He,xt());for(let e=0;e{n.onClick?.call(new jn(Re.getDataSource(),new io({})),[a,l])}),Te.current.set(o,e||null)}}const o=d.jsx(Ga,{ref:ve,hideLayoutMode:I,actions:t,actionSheetStyle:pa(j,He)});return d.jsxs("cometchat-popover",{ref:xe,placement:n.Placement.top,popoverStyle:JSON.stringify(da(j)),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__secondary-btn-wrapper",children:e}),d.jsx("div",{slot:"content",className:"cc-message-composer__secondary-content",style:ga(j,He),children:o})]})}function Ot(){const e=d.jsx("cometchat-media-recorder",{ref:re,mediaPlayerStyle:JSON.stringify(Sa(G,He)),"cc-media-recorder-submitted":"onVoiceRecordingSubmit",autorecording:"true",recordingType:n.RecordingType.audio,closeIconURL:Q,startIconURL:H,stopIconURL:N,submitButtonIconURL:K,startIconText:"",stopIconText:"",submitButtonIconText:""}),t=d.jsx("cometchat-button",{ref:ge,hoverText:n.localize("VOICE_RECORDING"),iconURL:"voiceRecording"===X.contentToDisplay?Ra:H,buttonStyle:JSON.stringify(Fa(P,He,"voiceRecording"===X.contentToDisplay,!1))});return O?null:d.jsxs("cometchat-popover",{placement:n.Placement.top,popoverStyle:JSON.stringify(new o.PopoverStyle({width:va,height:Ea,borderRadius:Ia,border:"1px solid rgba(20, 20, 20, 0.08)",boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})),closeOnOutsideClick:!1,children:[d.jsx("div",{slot:"children",className:"cc-message-composer__secondary-btn-wrapper",children:t}),d.jsx("div",{slot:"content",className:"cc-message-composer__secondary-content",style:{width:va,height:Ea,borderRadius:Ia,boxSizing:"border-box"},children:"voiceRecording"===X.contentToDisplay?e:null})]})}function jt(){const e=d.jsx("cometchat-button",{ref:Ce,hoverText:n.localize("AI"),iconURL:"ai"===X.contentToDisplay?Ra:f,buttonStyle:JSON.stringify(Aa(P,He,"ai"===X.contentToDisplay))});let t;t=Re.getDataSource().getAIOptions(Ue?.current||null,Pe?.current||null,He,xt(),V);const r=()=>{ce?.click(),q({type:"setContentToDisplay",contentToDisplay:"none"})},s=()=>{Ne(null)},i=d.jsx(Va,{ref:Se,hideLayoutMode:!0,actions:t,actionSheetStyle:ha(V,He),onActionItemClick:e=>{e instanceof n.CometChatMessageComposerAction&&e?.onClick&&(e.onClick(),r()),e instanceof n.CometChatActionsView&&e?.customView&&Ne(e.customView({backAction:s,closePopover:r}))}});return t.length<=0?d.jsx(d.Fragment,{}):d.jsxs("cometchat-popover",{ref:we,placement:n.Placement.top,popoverStyle:JSON.stringify((a=V,new o.PopoverStyle({width:a?.width||ca,height:a?.height||la,borderRadius:a?.borderRadius||Ca,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"}))),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__ai-btn-wrapper",children:e}),d.jsx("div",{slot:"content",className:"cc-message-composer__ai-content",style:ua(V,He),children:Qe||i})]});var a}function Vt(){if(D&&(void 0!==a||void 0!==l))return D(void 0!==a?a:l,xt());const e=k&&Ut(),t=Re.getDataSource().getAuxiliaryOptions(xt(),He,a,l),r=d.jsx("cometchat-button",{ref:pe,hoverText:n.localize("EMOJI"),iconURL:"emojiKeyboard"===X.contentToDisplay?Ra:w,buttonStyle:JSON.stringify(Da(P,He,"emojiKeyboard"===X.contentToDisplay,e))}),s=d.jsx("cometchat-emoji-keyboard",{ref:ne,emojiKeyboardStyle:JSON.stringify(fa(P,He))});return d.jsxs(d.Fragment,{children:[d.jsx(d.Fragment,{children:jt()}),d.jsx("div",{style:{flex:1,display:"flex",columnGap:"8px"},children:t.map((e=>e))}),d.jsx("div",{className:"cc-message-composer__default-auxiliary-view-wrapper",style:{display:"flex",flex:"1"},children:d.jsxs("cometchat-popover",{ref:me,placement:n.Placement.top,popoverStyle:JSON.stringify(new o.PopoverStyle({width:ba,height:xa,borderRadius:ya,boxShadow:"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)"})),children:[d.jsx("div",{slot:"children",className:"cc-message-composer__auxiliary-btn-wrapper",children:r}),d.jsx("div",{slot:"content",className:"cc-message-composer__auxiliary-content",style:wa(He),children:s})]})})]})}function Gt(){if(null===X.textMessageToEdit)return null;const e=X.textMessageToEdit;return d.jsx("cometchat-preview",{style:{textAlign:"left"},ref:De,previewSubtitle:(e=>{const t=/<@uid:(.*?)>/g;let n=e.getText(),o=n,s=t.exec(n),i=[],a=e.getMentionedUsers();for(;null!==s;){let e;for(let t=0;t{ne&&(Q?.getUid()||H?.getGuid())&&o({type:"setAddToMsgInputText",addToMsgInputText:ne})}),[Q?.getUid(),H?.getGuid(),ne,o]),t.useEffect((()=>{const e=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{let t=e?.message?.getParentMessageId();(te.current&&t&&t===te.current||!te.current&&!t)&&(e.status===n.MessageStatus.inprogress&&e.message instanceof s.CometChat.TextMessage?(oe.current=!0,o({type:"setTextMessageToEdit",textMessageToEdit:e.message}),i.current?.emptyInputField(),c(e.message.getText())):oe.current=!0)})),t=n.CometChatUIEvents.ccComposeMessage.subscribe((e=>{o({type:"setText",text:""}),i.current?.emptyInputField(),c(e)}));O.current.setId(W);const r=n.CometChatUIEvents.ccShowMentionsCountWarning.subscribe((e=>{if(e.id===W){if(e.showWarning)return void o({type:"setShowMentionsCountWarning",showMentionsCountWarning:!0});o({type:"setShowMentionsCountWarning",showMentionsCountWarning:!1})}}));return()=>{e.unsubscribe(),t.unsubscribe(),r.unsubscribe()}}),[c,o,i,W]),t.useEffect((()=>{if(!a)return;async function e(){try{const{receiverId:e,receiverType:t}=S(),o={type:"live_reaction",reaction:"heart"};s.CometChat.sendTransientMessage(new s.CometChat.TransientMessage(e,t,o)),n.CometChatMessageEvents.ccLiveReaction.next("heart")}catch(e){I(e)}}const t="cc-button-clicked";return a.addEventListener(t,e),()=>{a.removeEventListener(t,e)}}),[l,a,I,S]),t.useEffect((()=>{if(!C||!d.current)return;function e(e){const{action:t}=e.detail;g?.click(),o({type:"setContentToDisplay",contentToDisplay:"none"});const n=E.current.get(`${t.id}`);"function"==typeof n?n():(d.current.accept=`${t.id}/*`,d.current.click())}const t="cc-actionsheet-clicked";return C.addEventListener(t,e),()=>{C.removeEventListener(t,e)}}),[g,C,o,E,d]),t.useEffect((()=>{if(!u)return;function e(){o({type:"setTextMessageToEdit",textMessageToEdit:null}),o({type:"setText",text:""}),i.current?.emptyInputField(),c("")}const t="cc-preview-close-clicked";return u.addEventListener(t,e),()=>{u.removeEventListener(t,e)}}),[u,o,i]),t.useEffect((()=>{if(!g)return;function e(){switch(F){case"attachments":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"attachments"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"attachments"})}}function t(){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-button-clicked",r="cc-popover-outside-clicked";return g.addEventListener(n,e),b.addEventListener(r,t),()=>{g.removeEventListener(n,e),b.removeEventListener(r,t)}}),[F,g,b,p,h,B,o]),t.useEffect((()=>{if(!B)return;function e(){switch(L(null),F){case"ai":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"ai"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"ai"})}}function t(){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-button-clicked",r="cc-popover-outside-clicked";return B.addEventListener(n,e),M.addEventListener(r,t),()=>{B.removeEventListener(n,e),M.removeEventListener(r,t)}}),[F,B,M,g,p,h,L,o]),t.useEffect((()=>{if(!p||!h)return;function e(){switch(F){case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"voiceRecording":h?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"emojiKeyboard":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"emojiKeyboard"})}}function t(){switch(F){case"attachments":g?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"emojiKeyboard":p?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"voiceRecording":o({type:"setContentToDisplay",contentToDisplay:"none"});break;case"ai":B?.click(),o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"});break;case"none":o({type:"setContentToDisplay",contentToDisplay:"voiceRecording"})}}const n="cc-button-clicked";return p.addEventListener(n,e),h.addEventListener(n,t),()=>{p.removeEventListener(n,e),h.removeEventListener(n,t)}}),[F,g,h,p,B,o]),t.useEffect((()=>{if(!m)return;function e(e){const t=e.detail.id;"string"==typeof t&&c(t)}function t(e){o({type:"setContentToDisplay",contentToDisplay:"none"})}const n="cc-emoji-clicked",r="cc-popover-outside-clicked";return m.addEventListener(n,e),x.addEventListener(r,t),()=>{m.removeEventListener(n,e),x.removeEventListener(r,t)}}),[c,x,m,o]),t.useEffect((()=>{if(!A)return;function e(e){const t=new CustomEvent("cc-button-clicked",{});h?.click(),h?.dispatchEvent(t)}function t(t){const n=t.detail.file;e(),T(n)}const n="cc-media-recorder-closed",o="cc-media-recorder-submitted";return A.addEventListener(n,e),A.addEventListener(o,t),()=>{A.removeEventListener(n,e),A.removeEventListener(o,t)}}),[A,h,o,T]),t.useEffect((()=>{if(!f)return;function e(){y&&w(y)}const t="cc-button-clicked";return f.addEventListener(t,e),()=>{f.removeEventListener(t,e)}}),[w,y,f]),t.useEffect((()=>{const e=i.current;if(!e)return;function t(e){Y(!1);const t=e.detail.value;"string"==typeof t&&w(t)}const n="cc-text-input-entered";return e.addEventListener(n,t),()=>{e.removeEventListener(n,t)}}),[w,i]),t.useEffect((()=>{const e=i.current;if(!e)return;function t(e){const t=e.detail.value;"string"!=typeof t&&null!=t||(v(),o({type:"setText",text:t}),c(""),void 0!==D&&D(t))}const n="cc-text-input-changed";return e.addEventListener(n,t),()=>{e.removeEventListener(n,t)}}),[D,v,o,i,H?.getGuid(),Q?.getUid()]),t.useEffect((()=>{const e=n.CometChatUIEvents.ccShowModal.subscribe((e=>{o({type:"setShowPoll",showPoll:!0}),k.current=e.child})),t=n.CometChatUIEvents.ccHideModal.subscribe((()=>{o({type:"setShowPoll",showPoll:!1}),k.current=null}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[k,o]),t.useEffect((()=>{if(!R)if(U.length){let e=!1;for(let t=0;t{e&&e.cleanup()}}),[]),t.useEffect((()=>{(z.current&&Q&&z.current.getUid()!==Q.getUid()||J.current&&H&&J?.current.getGuid()!==H.getGuid())&&(o({type:"setText",text:""}),c("")),z.current&&Y(Q&&z.current.getUid()!==Q.getUid()),J.current&&Y(H&&J?.current.getGuid()!==H.getGuid());for(let e=0;e{if(!R){if(H){const e=void 0!==j?.userMemberListType?j?.userMemberListType:n.UserMemberListType.groupmembers;q(e);const t=j?.groupMemberRequestBuilder?j?.groupMemberRequestBuilder:new s.CometChat.GroupMembersRequestBuilder(H.getGuid()).setLimit(15);X(t)}if(Q){const e=void 0!==j?.userMemberListType?j?.userMemberListType:n.UserMemberListType.users;q(e);const t=j?.usersRequestBuilder?j?.usersRequestBuilder:(new s.CometChat.UsersRequestBuilder).setLimit(15);Z(t)}}}),[Q,H,R]),t.useEffect((()=>{const e=e=>{$.current&&!$.current.contains(e.target)&&Y(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),t.useEffect((()=>{try{setTimeout((()=>{oe.current&&i.current&&(o({type:"setTextMessageToEdit",textMessageToEdit:null}),o({type:"setText",text:""}),i.current?.emptyInputField(),c(""),oe.current=!1)}))}catch(e){I(e)}}),[Q,H,te])}({dispatch:q,textInputRef:$,liveReactionBtnElement:Fe,LiveReactionIconURL:F,mySetAddToMsgInputText:bt,actionSheetElement:Ee,secondaryBtnElement:ae,mediaFilePickerRef:ee,textMessageEditPreviewElement:fe,auxiliaryBtnElement:ue,voiceRecordingBtnElement:de,emojiKeyboardElement:te,voiceRecordingElement:oe,text:X.text,propsText:e.text,handleSendButtonClick:Ft,primaryBtnElement:se,onTextChange:C,actionIdToActionOnClick:Te,handleTyping:At,errorHandler:Le,getReceiverDetails:ut,contentToDisplay:X.contentToDisplay,createPollViewRef:Be,handleSendVoiceMessage:Bt,auxiliaryPopoverElement:he,attachmentPopoverElement:Ae,aiPopoverElement:ye,aiBtnElement:ce,setSmartRepliesView:Ne,textFormatters:J,disableMentions:Y,textFormatterArray:Ke,mentionsTextFormatterInstanceRef:qe,userMemberWrapperConfiguration:z,setTextFormatters:ze,CometChatUIKitLoginListener:r.CometChatUIKitLoginListener,group:l,user:a,setUserMemberWrapperConfig:nt,userMemberWrapperConfig:tt,userPropRef:Ue,groupPropRef:Pe,setShowListForMentions:Xe,searchMentions:gt,mentionsFormatterInstanceId:Ct,setUsersRequestBuilder:it,setGroupMembersRequestBuilder:lt,setUserMemberListType:rt,userMemberWrapperRef:ct,getComposerId:xt,parentMessageIdPropRef:Oe}),d.jsxs(d.Fragment,{children:[X.showPoll&&Be?.current?Be.current:null,d.jsxs("div",{className:"cc-message-composer",style:(Qt=P,{width:Qt?.width||"100%",height:Qt?.height||"100%",boxSizing:"border-box",padding:"14px 16px",border:"none",borderRadius:"0",background:"transparent",display:"flex",flexDirection:"column",justifyContent:"flex-end"}),children:[Ze&&d.jsx("div",{style:{maxHeight:"196px",overflowY:"hidden",display:"flex !important",flexDirection:"column",justifyContent:"flex-end !important",zIndex:2,height:"auto",minHeight:"45px",padding:"0px 0px 1px 0px",width:"100%"},ref:ct,children:d.jsx(be,{userMemberListType:ot,onItemClick:tt?.onItemClick||(e=>{let t=[e];qe.current.setCometChatUserGroupMembers(t),qe.current.getCometChatUserGroupMembers(),qe.current.reRender(),Xe(!1),et(1),Ye("")}),usersRequestBuilder:st,searchKeyword:Je,subtitleView:tt?.subtitleView,disableUsersPresence:tt?.disableUsersPresence,avatarStyle:tt?.avatarStyle,listItemView:tt?.listItemView,statusIndicatorStyle:tt?.statusIndicatorStyle,userPresencePlacement:tt?.userPresencePlacement,hideSeparator:tt?.hideSeparator,loadingStateView:tt?.loadingStateView,onEmpty:dt,loadingIconUrl:tt?.loadingIconURL,group:l,groupMemberRequestBuilder:at,disableLoadingState:!0,onError:dt})}),X.showMentionsCountWarning&&d.jsx("div",{style:{height:"fit-content",position:"relative",width:"100%",boxSizing:"border-box",left:"50%",transform:"translate(-50%)",zIndex:1,padding:"0px 0px 1px 0px"},children:d.jsx("cometchat-icon-button",{text:W||n.localize("MENTIONS_LIMIT_WARNING_MESSAGE"),iconURL:_,buttonStyle:JSON.stringify(ta(0,He,Z))})}),d.jsx("input",{ref:ee,type:"file",onChange:Lt,style:{display:"none"}}),d.jsx("div",{className:"cc-message-composer__header",style:{height:"fit-content",position:"relative",width:"100%",boxSizing:"border-box",left:"50%",transform:"translate(-50%)",zIndex:1,padding:"0px 0px 1px 0px"},children:T??Gt()}),d.jsxs(Ha,{ref:$,text:X.addToMsgInputText,placeholderText:g,auxiliaryButtonAlignment:E,textInputStyle:na(P,He),textFormatters:Ke,children:[d.jsx("div",{"data-slot":"primaryView",className:"cc-message-composer__primary-view",style:{display:"flex",gap:"6px"},children:d.jsxs(d.Fragment,{children:[Ot(),Ut()?k?d.jsx(d.Fragment,{}):d.jsx("div",{className:"cc-message-composer__live-reaction-btn-wrapper",style:{},children:d.jsx("cometchat-button",{ref:ke,iconURL:F,hoverText:n.localize("LIVE_REACTION"),buttonStyle:JSON.stringify((Ht=P,{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:Ht?.liveReactionIconTint||"red",background:"transparent",padding:"0"}))})}):d.jsx(d.Fragment,{}),k?Rt():Ut()?d.jsx(d.Fragment,{}):Rt()]})}),d.jsx("div",{"data-slot":"secondaryView",className:"cc-message-composer__secondary-view",style:{flex:"1"},children:Pt()}),d.jsx("div",{"data-slot":"auxilaryView",className:"cc-message-composer__auxiliary-view",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"fit-content",gap:"8px",padding:"0",marginRight:"8px"},children:Vt()})]})]},xt()?.group||xt()?.user)]});var Ht,Qt}const Ka=(e,t)=>({width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent50()}`,borderRadius:"inherit",background:t.palette.getBackground(),display:"flex",alignItems:"center",justifyContent:"space-between",flexDirection:"row",padding:"8px",boxSizing:"border-box",...e}),za=(e,t,o,r)=>t&&t.current?{textFont:o?.typingIndicatorTextFont||n.fontHelper(r.typography.subtitle2),textColor:o?.typingIndicatorTextColor||r.palette.getPrimary()}:{textFont:o?.subtitleTextFont||n.fontHelper(r.typography.subtitle2),textColor:o?.subtitleTextColor||r.palette.getAccent600()},Ja=e=>({borderRadius:"24px",width:"36px",height:"36px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorder:"",outerViewBorderSpacing:""}),Ya=e=>({height:"24px",width:"24px",border:"none",borderRadius:"none",background:"transparent",buttonIconTint:e.palette.getPrimary()});var _a="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";var Wa="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Za="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const Xa=e=>{const{theme:r}=t.useContext(R),{avatarStyle:i={},statusIndicatorStyle:a={},messageHeaderStyle:l={},listItemStyle:c={},subtitleView:C=null,disableUsersPresence:g=!1,disableTyping:u=!1,protectedGroupIcon:p=Wa,passwordGroupIcon:h,privateGroupIcon:m=Za,menu:y=null,user:w,group:f,backButtonIconURL:D=_a,hideBackButton:E,listItemView:v=null,onError:I,onBack:S=(()=>{})}=e,[F,k]=t.useState(""),[T,M]=t.useState(null),B=A(w),L=A(f),U=A(S),[P,O]=x(null),j=t.useRef(!1),V=b(I),G=t.useCallback((()=>{const e=B.current,t=L.current;if(e)k(n.localize(e.getStatus().toUpperCase()));else if(t){const e=t.getMembersCount(),o=n.localize(e>1?"MEMBERS":"MEMBER");k(`${e} ${o}`)}}),[B,L]),H=t.useCallback((e=>{const t=B.current;t&&(t.setStatus(e.getStatus()),k(t.getStatus()))}),[B]),Q=t.useCallback((e=>{try{const t=e?.getSender(),o=e?.getReceiverId();if(t?.getUid()===B?.current?.getUid()&&T?.getUid()===o){if((new X).getUserStatusVisible(B?.current))return;k(n.localize("IS_TYPING"))}L?.current?.getGuid()===o&&k(`${t?.getName()} ${n.localize("IS_TYPING")}`)}catch(e){V(e)}}),[B,L,V,T]),N=t.useCallback((()=>{try{const e=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{L?.current?.getGuid()===e?.userAddedIn?.getGuid()&&(e?.usersAdded.length>0&&e?.usersAdded.forEach((e=>{e?.getUid()===T?.getUid()&&L?.current?.setHasJoined(!0)})),L?.current?.setMembersCount(e?.userAddedIn?.getMembersCount()),G())})),t=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{L?.current?.getGuid()===e?.kickedFrom?.getGuid()&&(T?.getUid()===e?.kickedUser?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.kickedFrom?.getMembersCount()),G())})),o=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{L?.current?.getGuid()===e?.joinedGroup?.getGuid()&&(T?.getUid()===e?.joinedUser?.getUid()&&L?.current?.setHasJoined(!0),L?.current?.setMembersCount(e?.joinedGroup?.getMembersCount()),G())})),r=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{L?.current?.getGuid()===e?.kickedFrom?.getGuid()&&(T?.getUid()===e?.kickedUser?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.kickedFrom?.getMembersCount()),G())})),s=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{L?.current?.getGuid()===e?.group?.getGuid()&&(L?.current?.setOwner(e?.group?.getOwner()),G())})),i=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{L?.current?.getGuid()===e?.leftGroup?.getGuid()&&(T?.getUid()===e?.userLeft?.getUid()&&L?.current?.setHasJoined(!1),L?.current?.setMembersCount(e?.leftGroup?.getMembersCount()),G())}));return()=>{try{e.unsubscribe(),t.unsubscribe(),o.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe()}catch(e){V(e)}}}catch(e){V(e)}}),[L,G,V,T]),K=t.useCallback((()=>{const e="userList_"+Date.now(),t="groupsList_"+Date.now(),o="connection_"+Date.now();let r,i;return g||s.CometChat.addUserListener(e,new s.CometChat.UserListener({onUserOnline:e=>{B.current?.getUid()===e.getUid()&&H(e)},onUserOffline:e=>{B.current?.getUid()===e?.getUid()&&H(e)}})),u||(r=n.CometChatMessageEvents.onTypingStarted.subscribe((e=>{j.current=!0,Q(e)})),i=n.CometChatMessageEvents.onTypingEnded.subscribe((e=>{j.current=!1,G()}))),s.CometChat.addGroupListener(t,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(e,t,n,o,r)=>{L.current?.getGuid()===r?.getGuid()&&t.getUid()===T?.getUid()&&L.current?.setScope(n),G()},onGroupMemberKicked:(e,t,n,o)=>{L.current?.getGuid()===o?.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(o?.getMembersCount()),G())},onMemberAddedToGroup:(e,t,n,o)=>{L.current?.getGuid()===o.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!0),L.current?.setMembersCount(o?.getMembersCount()),G())},onGroupMemberLeft:(e,t,n)=>{L.current?.getGuid()===n.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(n.getMembersCount()),G())},onGroupMemberJoined:(e,t,n)=>{L.current?.getGuid()===n.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!0),L.current?.setMembersCount(n.getMembersCount()),G())},onGroupMemberBanned:(e,t,n,o)=>{L.current?.getGuid()===o.getGuid()&&(t.getUid()===T?.getUid()&&L.current?.setHasJoined(!1),L.current?.setMembersCount(o.getMembersCount()),G())}})),s.CometChat.addConnectionListener(o,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener => On Connected")}})),()=>{s.CometChat.removeUserListener(e),s.CometChat.removeGroupListener(t),s.CometChat.removeConnectionListener(o),r?.unsubscribe(),i?.unsubscribe()}}),[B,L,H,u,G,Q,T,g]),z=t.useCallback((()=>{let e=(new X).getUserStatusVisible(B.current);if(B.current){if(!g&&!e)return"#00f300"}else if(L.current){const e=L.current.getType();if(e===n.CometChatUIKitConstants.GroupTypes.private)return"#00f300";if(e===n.CometChatUIKitConstants.GroupTypes.password)return"#F7A500"}return null}),[B,L,g]),J=t.useCallback((()=>{let e="";if(L.current)switch(L.current?.getType()){case n.CometChatUIKitConstants.GroupTypes.password:e=h||p;break;case n.CometChatUIKitConstants.GroupTypes.private:e=m;break;default:e=""}return e}),[L,p,m,h]),Y=t.useCallback((()=>({...new o.AvatarStyle(Ja(r)),...i})),[i,r]),_=t.useCallback((()=>({height:"12px",width:"12px",border:"none",borderRadius:"24px",...a})),[a,B]),W=t.useCallback((()=>((e,t)=>new o.ListItemStyle({height:e?.height||"45px",width:e?.width||"100%",background:e?.background||"inherit",activeBackground:e?.activeBackground||"transparent",borderRadius:e?.borderRadius||"0",titleFont:e?.titleFont||n.fontHelper(t.typography.title2),titleColor:e?.titleColor||t.palette.getAccent(),border:e?.border||"none",separatorColor:e?.separatorColor||"",hoverBackground:e?.hoverBackground||"transparent"}))(c,r)),[c,r]),Z=t.useCallback((()=>{if(C)return C;return(new X).getUserStatusVisible(B.current)?null:d.jsx("div",{children:d.jsx("cometchat-label",{text:F,labelStyle:JSON.stringify(za(B.current,j,l,r))})})}),[B,C,F,r,l]),q=t.useCallback((()=>v||d.jsx("cometchat-list-item",{avatarName:B.current?.getName()||L.current?.getName(),avatarURL:B.current?.getAvatar()||L.current?.getIcon(),listItemStyle:JSON.stringify(W()),statusIndicatorColor:z(),statusIndicatorIcon:J(),title:B.current?.getName()||L.current?.getName(),hideSeparator:!0,statusIndicatorStyle:JSON.stringify(_()),avatarStyle:JSON.stringify(Y()),style:{width:"100%"},children:d.jsx("div",{slot:"subtitleView",children:Z()})})),[B,L,v,Z,Y,_,W,J,z]),$=t.useCallback((()=>y?d.jsx("div",{className:"cc-message-header__menu",style:{width:"fit-content",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:y}):null),[y]);return function(e,n,o,r,i,a,l,c,C,d){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{const t=[];return e&&(t.push(o()),t.push(r())),()=>{for(let e=0;e{if(!a)return;const e="cc-button-clicked",t=()=>l.current?.();return a.addEventListener(e,t),()=>{a.removeEventListener(e,t)}}),[a,l]),t.useEffect((()=>{d()}),[c.current,C.current,d])}(T,M,N,K,V,P,U,B,L,G),d.jsxs("div",{className:"cc-message-header__wrapper",style:Ka(l,r),children:[d.jsxs("div",{className:"cc-message-header",style:{display:"flex",alignItems:"center",justifyContent:"flex-start",height:"100%",width:"100%",boxSizing:"border-box",borderRadius:"inherit"},children:[E?null:d.jsx("div",{className:"cc-message-header__back-button",style:{width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:d.jsx("cometchat-button",{iconURL:D,buttonStyle:JSON.stringify(Ya(r)),ref:O})}),d.jsx("div",{className:"cc-message-header__listitem",style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:q()})]}),$()]})},qa=De({tagName:"cometchat-reactions",elementClass:r.CometChatReactions,react:t}),$a=De({tagName:"cometchat-emoji-keyboard",elementClass:o.CometChatEmojiKeyboard,events:{onEmojiClick:"cc-emoji-clicked"},react:t}),el=De({tagName:"cometchat-icon-button",elementClass:o.CometChatIconButton,react:t,events:{buttonClick:"cc-button-clicked"}}),tl=De({tagName:"cometchat-button",elementClass:o.CometChatButton,react:t,events:{buttonClick:"cc-button-clicked"}}),nl=De({tagName:"cometchat-date",elementClass:o.CometChatDate,react:t}),ol=De({tagName:"cometchat-label",elementClass:o.CometChatLabel,react:t}),rl=De({tagName:"cometchat-loader",elementClass:o.CometChatLoader,react:t}),sl=De({tagName:"cometchat-avatar",elementClass:o.CometChatAvatar,react:t}),il=De({tagName:"cometchat-receipt",elementClass:o.CometChatReceipt,react:t}),al=(e,t)=>({height:"100%",width:"100%",flex:"1 1 0",order:"2",position:"relative",display:"flex",flexDirection:"column",border:`1px solid ${t.palette.getAccent50()}`,borderRadius:"inherit",background:t.palette.getBackground(),...e}),ll=(e,t,o,r={},s)=>{const i={height:"100%",width:"100%",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:r.threadReplyIconTint||t.palette.getAccent600(),display:"flex",alignItems:"center",gap:"5px",buttonTextColor:r?.threadReplyTextColor||t.palette.getAccent(),buttonTextFont:r?.threadReplyTextFont||n.fontHelper(t.typography.text2),iconHeight:"15px",iconWidth:"15px"};return e.getSender()&&e.getSender().getUid()!==o?.getUid()||s==n.MessageBubbleAlignment.left?{...i,flexFlow:"row"}:{...i,flexFlow:"row-reverse"}},cl=e=>({height:"fit-content",width:"fit-content",background:e.palette.getPrimary(),display:"flex",justifyContent:"center",buttonTextFont:n.fontHelper(e.typography.text2),buttonTextColor:e.palette.getAccent("dark"),border:"none",borderRadius:"12px",padding:"2px 6px"}),Cl=(e,t,o,s)=>{const i={background:"transparent",borderRadius:"12px"},a={background:t.palette.getSecondary(),borderRadius:"12px"};return e.getDeletedAt()?{...i}:e?.getType()!==n.CometChatUIKitConstants.calls.meeting||e?.getSender()&&e?.getSender().getUid()!==s?.getUid()?e?.getType()===r.StickersConstants.sticker?i:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.text||e.getSender()&&s?.getUid()!==e.getSender().getUid()?e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.message||e.getType()!==n.CometChatUIKitConstants.MessageTypes.audio?e.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember||e.getCategory()===n.CometChatUIKitConstants.MessageCategory.call?{...i,border:`1px solid ${t.palette.getSecondary()}`}:e.getDeletedAt()||e.getCategory()!==n.CometChatUIKitConstants.MessageCategory.interactive?a:{...a,width:"300px"}:{...a,borderRadius:""}:{...a,background:o===n.MessageListAlignment.left?t.palette.getSecondary():t.palette.getPrimary()}:{...a,background:t.palette.getPrimary(),border:"none"}},dl=(e,t)=>{const r=t?.getType()===n.CometChatUIKitConstants.MessageTypes.text;return new o.ReceiptStyle({waitIconTint:e.palette.getAccent700(),sentIconTint:e.palette.getAccent600(),deliveredIconTint:e.palette.getAccent600(),readIconTint:r?e.palette.getBackground():e.palette.getPrimary(),errorIconTint:e.palette.getError(),height:"11px",width:"12px",background:"none"})},gl=(e,t,o,r)=>{const s={display:"flex",alignItems:"end",padding:"1px 8px 8px",gap:"4px",marginTop:"0"};return e?{...s,justifyContent:"center",height:"fit-content",borderRadius:"22px",padding:"3px 5px",paddingTop:"2px",position:"relative",marginTop:"-22px",marginRight:"12px",background:t.palette.getAccent500("dark"),width:"fit-content"}:(o?.getType()===n.CometChatUIKitConstants.MessageTypes.text&&(s.padding="0px 8px 8px",s.marginTop=r===n.MessageBubbleAlignment.right?"-6px":"-5px"),s)},ul=e=>{let t="center";return e===n.MessageBubbleAlignment.right?t="flex-end":e===n.MessageBubbleAlignment.left&&(t="flex-start"),{display:"flex",justifyContent:t,width:"100%",boxSizing:"border-box"}},pl=(e,t)=>({textColor:e?.TimestampTextColor||t.palette.getAccent600(),textFont:e?.TimestampTextFont||n.fontHelper(t.typography.caption3),padding:"0",display:"block"}),hl=(e,t)=>{const o={...Al(e),...t};return{textFont:o?.nameTextFont||n.fontHelper(e.typography.caption2),textColor:o?.nameTextColor||e.palette.getAccent600()}},ml=(e,t)=>new o.DateStyle({textFont:e?.textFont||n.fontHelper(t.typography.subtitle2),textColor:e?.textColor||t.palette.getAccent600(),background:e?.background||"inherit",height:e?.height||"100%",width:e?.width||"100%",border:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:e?.borderRadius||"8px"}),Al=e=>new r.MessageListStyle({background:e.palette.getBackground(),border:"none",emptyStateTextFont:n.fontHelper(e.typography.title1),emptyStateTextColor:e.palette.getAccent600(),errorStateTextFont:n.fontHelper(e.typography.title1),errorStateTextColor:e.palette.getAccent600(),loadingIconTint:e.palette.getAccent600(),nameTextFont:n.fontHelper(e.typography.caption2),nameTextColor:e.palette.getAccent600(),threadReplyTextFont:n.fontHelper(e.typography.subtitle1),threadReplyIconTint:e.palette.getAccent600(),threadReplyTextColor:e.palette.getAccent600(),TimestampTextFont:n.fontHelper(e.typography.caption2),TimestampTextColor:e.palette.getAccent600()}),xl=(e,t)=>({iconTint:{...Al(t),...e}.loadingIconTint}),bl=(e,t)=>{const n={...Al(t),...e};return{textFont:n.errorStateTextFont,textColor:n.errorStateTextColor}},yl=(e,t)=>({...new o.AvatarStyle({borderRadius:"24px",width:"28px",height:"28px",border:"none",backgroundColor:t.palette.getAccent700(),nameTextColor:t.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(t.typography.subtitle1),outerViewBorderWidth:"0",outerViewBorderRadius:"0",outerViewBorderColor:"",outerViewBorderSpacing:"0"}),...e}),wl=e=>{let t="center";return e===n.MessageBubbleAlignment.right?t="flex-end":e===n.MessageBubbleAlignment.left&&(t="flex-start"),{display:"flex",justifyContent:t,width:"100%",marginBottom:"16px"}},fl={padding:"0px 0px 0px 15px",overflow:"hidden",display:"flex",justifyContent:"flex-end",marginRight:"8px",boxSizing:"border-box"},Dl=e=>({width:"100%",padding:"5px 0px",boxSizing:"border-box",display:"flex",marginTop:"-9px",justifyContent:e===n.MessageBubbleAlignment.left?"flex-start":"flex-end"});function El(e){return{height:"24px",width:"24px",border:"none",borderRadius:"0",buttonIconTint:e.palette.getPrimary(),background:"transparent",position:"absolute",top:"20px",right:"16px"}}const vl=e=>({height:"1px",width:"100%",background:e.palette.getAccent100()});function Il(e){return new o.ReceiptStyle({deliveredIconTint:e.palette.getAccent600(),readIconTint:e.palette.getPrimary(),errorIconTint:e.palette.getError(),height:"20px",width:"20px"})}const Sl=(e,t)=>{let r=e;return r={...new o.DateStyle({textFont:n.fontHelper(t.typography.caption2),textColor:t.palette.getAccent600(),background:t.palette.getAccent100(),height:"100%",width:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"8px"}),...r},r.background=r.background||t.palette.getAccent600(),r},Fl={background:"transparent",height:"",width:"",border:"none",borderRadius:"none"},kl={marginLeft:"auto"},Tl={display:"flex"},Ml={width:"100%"},Bl=(e,t)=>({...{width:"360px",height:"620px",margin:"0 auto",background:e.palette.getBackground(),borderRadius:"12px",overflow:"hidden",boxSizing:"border-box"},...t}),Ll=e=>({marginTop:"8px",marginBottom:"8px",marginLeft:"10px",fontSize:n.fontHelper(e.typography.subtitle2),fontWeight:"500",color:e.palette.getAccent600(),display:"flex"}),Ul=e=>({marginBottom:"8px",marginLeft:"10px",fontSize:n.fontHelper(e.typography.subtitle2),fontWeight:"500",color:e.palette.getAccent600(),display:"flex"});var Rl="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",Pl="data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E";const Ol=e=>{const{theme:i}=t.useContext(R),{title:a=n.localize("MESSAGE_INFORMATION"),closeIconURL:l,onClose:c,message:C,bubbleView:g,subtitleView:u=null,listItemView:p=null,messageInformationStyle:h,listItemStyle:m,receiptDatePattern:A,template:x,loadingIconURL:b=Rl,backdropStyle:y=new o.BackdropStyle({})}=e,[w,f]=t.useState(),[D,E]=t.useState(x),[v,I]=t.useState([]),S=t.useRef(null),F=()=>({...new o.ListItemStyle({height:"70px",width:"100%",background:"inherit",borderRadius:"0",titleFont:n.fontHelper(i.typography.title2),titleColor:i.palette.getAccent(),border:"none",separatorColor:i.palette.getAccent200(),hoverBackground:i.palette.getAccent50()}),...m});t.useEffect((()=>{if(!x){const t=Xn.getDataSource()?.getMessageTemplate(e.message?.getType(),e.message?.getCategory(),i);t&&E(t)}}),[e.message,x,i]),t.useEffect((()=>{C?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&f(C.getReceiver()),C?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&async function(e){if(e?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group){let t=await s.CometChat.getMessageReceipts(e?.getId()),n=t.filter((e=>e.getSender().getUid()!==S.current?.getUid()));I(n)}}(C)}),[C]);const k=t.useCallback((()=>{if(r.CometChatUIKitLoginListener.getLoggedInUser()&&(S.current=r.CometChatUIKitLoginListener.getLoggedInUser()),C){if(g)return g(C);{if(!D)return d.jsx(d.Fragment,{});const e=(new X).messageBubbleStyle(C,i,n.MessageBubbleAlignment.right,S.current);return(new X).getMessageBubble(C,D,e,n.MessageBubbleAlignment.right)}}return null}),[C,g,D,i]);function M(e,t){return null!==u&&"function"==typeof u?d.jsx(d.Fragment,{children:u(C)}):d.jsx("div",{style:Ml,children:d.jsx("div",{className:"cc-receipts__subtitle",children:L(e,t)})})}function L(e,t){return d.jsxs("div",{className:"cc-message_information__receipt-container",children:[d.jsxs("div",{className:"cc-message_information__receipt",style:Tl,children:[d.jsx("div",{className:"cc-message_information__delivered-receipt",children:d.jsx("cometchat-receipt",{receipt:n.Receipts.delivered,errorIcon:Pl,deliveredIcon:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",receiptStyle:JSON.stringify(Il(i))})}),d.jsx("div",{style:U,className:"cc_message-information__subtitle-text",children:void 0!==e&&n.localize("DELIVERED")}),d.jsx("div",{className:"cc_message-information__date",style:kl,children:d.jsx("cometchat-date",{timestamp:e,customDateString:A?A(e):null,pattern:A?null:n.DatePatterns.DateTime,dateStyle:JSON.stringify(Sl(Fl,i))})})]}),t&&d.jsxs("div",{className:"cc-message_information__receipt",style:Tl,children:[d.jsx("div",{className:"cc-message_information__read-receipt",children:d.jsx("cometchat-receipt",{receipt:n.Receipts.read,errorIcon:Pl,readIcon:"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",receiptStyle:JSON.stringify(Il(i))})}),d.jsx("div",{style:U,className:"cc_message-information__subtitle-text",children:void 0!==t&&n.localize("READ")}),void 0!==t&&d.jsx("div",{className:"cc_message-information__date",style:kl,children:d.jsx("cometchat-date",{timestamp:t,customDateString:A?A(t):null,pattern:A?null:n.DatePatterns.DateTime,dateStyle:JSON.stringify(Sl(Fl,i))})}),void 0===t&&d.jsx("div",{className:"cc_message-information__date",style:kl,children:"..."})]})]})}const U={font:n.fontHelper(i.typography.subtitle2),color:i.palette.getAccent600()},P=new o.AvatarStyle({borderRadius:"50%",width:"43px",height:"43px"});function O(e){return d.jsx(B,{id:e.getMessageId(),title:e.getSender()?.getName(),avatarURL:e.getSender()?.getAvatar(),avatarName:e.getSender()?.getName(),hideSeparator:!1,isActive:!1,avatarStyle:P,listItemStyle:F(),subtitleView:M(e.getDeliveredAt(),e.getReadAt()),subtitleViewClassName:"cc-message_information__subtitle-view",tailViewClassName:"cc-receipt-details__tail-view"})}return d.jsx("div",{className:"cc__messageinfo__wrapper",style:Ml,children:d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify((V=y,{background:"rgba(0, 0, 0, 0.5)",position:"absolute",width:V?.width,height:V?.height,...V})),children:d.jsxs("div",{className:"cc__messageinfo",style:Bl(i,h),children:[d.jsxs("div",{className:"cc__messageinfo__header",style:{textAlign:"center",fontSize:"22px",fontWeight:"700",padding:"19px 0px",position:"relative"},children:[d.jsxs("div",{className:"cc__messageinfo__title",children:[" ",a," "]}),d.jsx(Y,{iconURL:l,hoverText:n.localize("CLOSE"),buttonStyle:El(i),onClick:c})]}),d.jsxs("div",{className:"cc__messageinfo__content",style:Ml,children:[d.jsx("div",{style:Ul(i),children:n.localize("MESSAGE")}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(vl(i))}),d.jsx("div",{className:"cc__messageinfo__bubble-wrapper",style:(j=!g,{height:"fit-content",maxHeight:"182px",overflow:"hidden auto",boxSizing:"border-box",padding:"2px 8px",justifyContent:"flex-end",display:j?"flex":"inherit",paddingRight:j?"16px":"8px"}),children:k()}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(vl(i))}),d.jsx("div",{style:Ll(i),children:n.localize("RECEIPT_INFORMATION")}),d.jsx("cometchat-divider",{dividerStyle:JSON.stringify(vl(i))}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&void 0!==C.getDeliveredAt()&&d.jsx("div",{children:d.jsx(B,{id:C.getConversationId(),title:w?.getName(),avatarURL:w?.getAvatar(),avatarName:w?.getName(),hideSeparator:!1,isActive:!1,avatarStyle:P,listItemStyle:F(),subtitleView:M(C.getDeliveredAt(),C.getReadAt()),subtitleViewClassName:"cc-message_information__subtitle-view",tailViewClassName:"cc-receipt-details__tail-view"})}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&void 0===C.getDeliveredAt()&&d.jsxs("div",{style:{padding:"2em 0px 0px 0px",fontSize:"18px",textAlign:"center",color:i.palette.getAccent400()},children:[" ",n.localize("NO_RECIPIENT")," "]}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&v.length>0&&d.jsx("div",{children:d.jsx(T,{list:v,listItem:function(e){return d.jsx(d.Fragment,{children:p?p(C,e):O(e)})},state:0===v.length?n.States.loading:n.States.loaded,hideSearch:!0,showSectionHeader:!1,loadingIconURL:b})}),C.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group&&v.length<=0&&d.jsxs("div",{style:{padding:"2em 0px 0px 0px",fontSize:"18px",textAlign:"center",color:i.palette.getAccent400()},children:[" ",n.localize("NO_RECIPIENTS")," "]})]})]})})});var j,V};var jl;class Vl{constructor(e,t,n,o,r){if(this.messagesRequest=null,this.fetchNextMessages=()=>this.messagesRequest?.fetchNext(),this.fetchPreviousMessages=()=>this.messagesRequest?.fetchPrevious(),e){let r;t?(e.guid=void 0,r=e.setUID(t.getUid())):n&&(e.uid=void 0,r=e.setGUID(n.getGuid())),o&&r.setMessageId(o),this.messagesRequest=r.build()}else{const e=(new s.CometChat.MessagesRequestBuilder).setTypes(Re.dataSource.getAllMessageTypes()).setCategories(Re.dataSource.getAllMessageCategories()).hideReplies(!0).setLimit(30);o&&e.setMessageId(o),r&&e.setParentMessageId(r),t?(e.setUID(t.getUid()),e.guid=void 0):n&&(e.setGUID(n.getGuid()),e.uid=void 0),this.messagesRequest=e.build()}}static removeListeners(){s.CometChat.removeGroupListener(this.groupListenerId),s.CometChat.removeConnectionListener(this.connectionListenerId),Re.names.includes("calling")&&s.CometChat.removeCallListener(this.callListenerId)}static attachConnectionListener(e){const t="MessageList_connection_"+String(Date.now());s.CometChat.addConnectionListener(t,new s.CometChat.ConnectionListener({onConnected:()=>{console.log("ConnectionListener =>connected"),e&&e()},onDisconnected:()=>{console.log("ConnectionListener => On Disconnected")}}))}}jl=Vl,Vl.groupListenerId="group_"+(new Date).getTime(),Vl.callListenerId="call_"+(new Date).getTime(),Vl.connectionListenerId="MessageList_connection_"+String(Date.now()),Vl.attachListeners=e=>{s.CometChat.addGroupListener(jl.groupListenerId,new s.CometChat.GroupListener({onGroupMemberScopeChanged:(t,o,r,s,i)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,i)},onGroupMemberKicked:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberBanned:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberUnbanned:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onMemberAddedToGroup:(t,o,r,s)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,s)},onGroupMemberLeft:(t,o,r)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,r)},onGroupMemberJoined:(t,o,r)=>{e(n.CometChatUIKitConstants.MessageCategory.action,t,r)}})),Re.names.includes("calling")&&s.CometChat.addCallListener(jl.callListenerId,new s.CometChat.CallListener({onIncomingCallReceived:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onIncomingCallCancelled:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onOutgoingCallRejected:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onOutgoingCallAccepted:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)},onCallEndedMessageReceived:t=>{e(n.CometChatUIKitConstants.MessageCategory.call,t)}}))};const Gl={parentMessageId:0,user:void 0,group:void 0,emptyStateText:n.localize("NO_MESSAGES_FOUND"),errorStateText:n.localize("SOMETHING_WRONG"),emptyStateView:null,errorStateView:null,loadingStateView:null,disableReceipt:!1,disableSoundForMessages:!1,customSoundForMessages:"",readIcon:"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",deliveredIcon:"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E",sentIcon:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMessage%20Sent%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMessage-Sent%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.1282564%2C3.43708984%20C11.3839897%2C3.0108676%2011.9368239%2C2.87265904%2012.3630462%2C3.12839238%20C12.7564821%2C3.36445393%2012.9045099%2C3.85366653%2012.7238142%2C4.26276853%20L12.6717436%2C4.3631822%20L7.87174363%2C12.3631822%20C7.59058211%2C12.8317847%206.96826751%2C12.9373278%206.54992747%2C12.6127032%20L6.4636039%2C12.5365321%20L3.2636039%2C9.33653212%20C2.91213203%2C8.98506026%202.91213203%2C8.41521177%203.2636039%2C8.06373991%20C3.58578644%2C7.74155737%204.091466%2C7.71470883%204.44423138%2C7.98319428%20L4.5363961%2C8.06373991%20L6.921%2C10.448136%20L11.1282564%2C3.43708984%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",waitIcon:"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E",errorIcon:"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E",loadingIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",alignment:n.MessageListAlignment.standard,showAvatar:!0,datePattern:n.DatePatterns.time,timestampAlignment:n.TimestampAlignment.bottom,DateSeparatorPattern:n.DatePatterns.DayDate,hideDateSeparator:!1,templates:[],messagesRequestBuilder:void 0,newMessageIndicatorText:"",scrollToBottomOnNewMessages:!1,thresholdValue:1e3,onThreadRepliesClick:()=>{},headerView:null,footerView:null,avatarStyle:{borderRadius:"24px",width:"36px",height:"36px"},dateSeparatorStyle:void 0,messageListStyle:{nameTextFont:"600 15px Inter, sans-serif",nameTextColor:"white",TimestampTextFont:"",TimestampTextColor:"",threadReplyTextFont:"",threadReplyIconTint:"",threadReplyTextColor:"",emptyStateTextFont:"700 22px Inter, sans-serif",emptyStateTextColor:"#bcbcbc",errorStateTextFont:"700 22px Inter, sans-serif",errorStateTextColor:"#bcbcbc",loadingIconTint:"grey"},onError:e=>{console.log(e)},hideError:!1,messageInformationConfiguration:new r.MessageInformationConfiguration({}),reactionsConfiguration:new r.ReactionsConfiguration({}),disableReactions:!1,emojiKeyboardStyle:{},threadIndicatorIcon:"data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_10800_33104%29%22%3E%3Cpath%20d%3D%22M13.9906%201.69617C13.824%204.12358%2012.7401%206.39667%2010.959%208.05423C9.17776%209.71179%206.83266%2010.6296%204.39955%2010.6215C4.23748%2010.6215%203.84965%2010.6297%203.68799%2010.6215H1.03645%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.2041%207.43042L1.0094%2010.6251L4.2041%2013.8198%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_10800_33104%22%3E%3Crect%20width%3D%2215%22%20height%3D%2215%22%20fill%3D%22white%22%20transform%3D%22matrix%28-1%200%200%201%2015%200%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",disableMentions:!1,textFormatters:[],backdropStyle:new o.BackdropStyle({})},Hl=e=>{const{parentMessageId:i,user:a,group:l,emptyStateText:c,errorStateText:C,emptyStateView:g,errorStateView:u,loadingStateView:p,disableReceipt:h,disableSoundForMessages:m,customSoundForMessages:x,readIcon:y,deliveredIcon:w,sentIcon:f,waitIcon:D,errorIcon:E,loadingIconURL:v,alignment:I,showAvatar:S,datePattern:F,timestampAlignment:k,DateSeparatorPattern:M,hideDateSeparator:B,templates:L,messagesRequestBuilder:U,newMessageIndicatorText:P,scrollToBottomOnNewMessages:O,thresholdValue:j,onThreadRepliesClick:V,headerView:G,footerView:H,avatarStyle:Q,dateSeparatorStyle:N,messageListStyle:K,onError:z,hideError:J,messageInformationConfiguration:Y,reactionsConfiguration:_,disableReactions:W,emojiKeyboardStyle:X,threadIndicatorIcon:q,disableMentions:$,textFormatters:ee,backdropStyle:te}=e,[ne,oe]=t.useState([]),[re,se]=t.useState(!0),[ie,ae]=t.useState(n.States.loading),[le,ce]=t.useState(!1),[Ce,de]=t.useState(!1),[ge,ue]=t.useState(null),[pe,he]=t.useState(!1),[me,Ae]=t.useState(null),[xe,be]=t.useState(!1),[ye,we]=t.useState(!1),[fe,De]=t.useState(!1),Ee=t.useRef(null),ve=t.useRef(null),Ie=t.useRef(!1),Se=t.useRef({}),Fe=t.useRef(null),ke=t.useRef({prevMessageId:0,nextMessageId:0}),Te=t.useRef(0),Me=t.useRef([]),Be=t.useRef(""),Le=t.useRef(null),Ue=A(a),Pe=A(l),Oe=A(i),je=t.useRef(null),Ve=t.useRef(null),Ge=t.useRef(!1),He=t.useRef(!1),{theme:Qe}=t.useContext(R),Ne=b(z);let Ke=!0,ze=n.TimestampAlignment,Je=!1,Ye=n.MessageBubbleAlignment.left;const _e=t.useMemo((()=>p?d.jsx("div",{className:"cc__messagelist__loadingview",children:d.jsx("span",{className:"cc__messagelist__customview--loading",children:p})}):d.jsx("div",{className:"cc__messagelist__loadingview",children:d.jsx(rl,{iconURL:v,loaderStyle:xl(K,Qe)})})),[p,v,K,Qe]),We=t.useMemo((()=>u?d.jsx("div",{className:"cc__messagelist__errorview",children:d.jsx("span",{className:"cc__messagelist__customview--error",children:u})}):d.jsx("div",{className:"cc__messagelist__errorview",children:d.jsx(ol,{labelStyle:bl(K,Qe),text:C})})),[u,C,K,Qe]),Ze=t.useMemo((()=>g?d.jsx("div",{className:"cc__messagelist__emptyview",children:d.jsx("span",{className:"cc__messagelist__customview--empty",children:g})}):void 0),[g,c,K,Qe]),Xe=t.useMemo((()=>L&&L.length>0?L:Re.getDataSource().getAllMessageTemplates(Qe,{disableMentions:$,textFormatters:ee})),[L,Qe]),qe=t.useMemo((()=>{let e={};return Xe.forEach((t=>{e[t.category+"_"+t.type]=t})),e}),[Xe]),$e=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType();if(!Oe.current){if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&t===Ue.current.getUid())return!0}else if(Pe.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Pe.current.getGuid())return!0;return!1}if(e.getParentMessageId()===Oe.current)return!0}),[]),et=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getSender()?.getUid();if(Oe.current)return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current.getUid()||r===Ue.current.getUid()))return!0}else if(Pe.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Pe.current.getGuid())return!0;return!1}),[]),tt=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getSender()?.getUid();if(!Oe.current){if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current.getUid()||r===Ue.current.getUid()))return!0}else if(Pe.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Pe.current.getGuid())return!0;return!1}if(e.getParentMessageId()===Oe.current)return!0}),[]),nt=t.useCallback((e=>{if(!e.getParentMessageId())return!1;const t=e?.getReceiverId();if(Ue.current){if(t===Ue.current.getUid())return!0}else if(Pe.current&&t===Pe.current.getGuid())return!0;return!1}),[]),ot=t.useCallback((e=>{if(!e.getParentMessageId())return!1;const t=e?.getReceiverId(),n=e?.getSender()?.getUid();if(Ue.current){if(t===Ue.current.getUid()||n===Ue.current.getUid())return!0}else if(Pe.current&&t===Pe.current.getGuid())return!0;return!1}),[]),rt=t.useCallback((e=>{try{return ne.find((t=>t?.getId()?.toString()===e?.toString()))}catch(e){Ne(e)}}),[ne,Ne]),st=t.useCallback((e=>{try{He.current=!1,se(!1),V&&V(e,Tn)}catch(e){Ne(e)}}),[V,Ne,He]),it=t.useCallback((e=>{void 0!==e&&(He.current=e)}),[He]),at=t.useCallback((e=>{try{oe((t=>t.map((t=>t.getMuid()===e.getMuid()?e:t))))}catch(e){Ne(e)}}),[Ne]),lt=t.useCallback((e=>{try{se(!1),oe((t=>t.map((t=>t?.getId()===e?.getId()?e:t))))}catch(e){Ne(e)}}),[Ne]),ct=t.useCallback((e=>{try{tt(e)&<(e)}catch(e){Ne(e)}}),[lt,Ne,tt]),Ct=t.useCallback(((e,t=!1)=>{try{t?(se(!0),at(e)):(se(!1),lt(e))}catch(e){Ne(e)}}),[at,lt,Ne]),dt=t.useCallback(((e,t)=>{const n=t?.getId(),o=rt(n),i=o?.getReactions()||[],a=i?.find((t=>t?.reaction===e));if(a&&a?.getReactedByMe()){const t=[];i.forEach((n=>{if(n?.getReaction()===e){if(1===n?.getCount())return;n.setCount(n?.getCount()-1),n.setReactedByMe(!1),t.push(n)}else t.push(n)}));const a=r.CometChatUIKitUtility.clone(o);a.setReactions(t),Ct(a),s.CometChat.removeReaction(n,e).then((e=>{})).catch((e=>{Ct(o),console.log(e)}))}else{const t=[],a=i.find((t=>t?.getReaction()===e));if(i.forEach((n=>{n?.getReaction()===e?(n.setCount(n?.getCount()+1),n.setReactedByMe(!0),t.push(n)):t.push(n)})),!a){const n=new s.CometChat.ReactionCount(e,1,!0);t.push(n)}const l=r.CometChatUIKitUtility.clone(o);l.setReactions(t),Ct(l),s.CometChat.addReaction(n,e).then((()=>{})).catch((e=>{Ne(e),Ct(o)}))}}),[rt,Ne,Ct]),gt=t.useCallback((e=>{let t={zIndex:"100"},n=X,r=new o.EmojiKeyboardStyle({width:n?.width||"320px",height:n?.height||"300px",border:n?.border||"1px solid #e0e0e0",borderRadius:n?.borderRadius||"8px",activeIconTint:n?.activeIconTint,background:n?.background,iconTint:n?.iconTint,textColor:n?.textColor,textFont:n?.textFont});const s=rt(e);return e=>d.jsx($a,{emojiKeyboardStyle:r,style:t,onEmojiClick:t=>{e(t),dt(t?.detail?.id,s)}})}),[X,rt,dt]),ut=t.useCallback((e=>{try{let t=rt(e);if(t){let e=t.getText();!$&&t.getMentionedUsers()&&t.getMentionedUsers().length&&(e=(e=>{const t=/<@uid:(.*?)>/g;let n=e.getText(),o=e.getText(),r=t.exec(n),s=e.getMentionedUsers();for(;null!==r;){let e;for(let t=0;t{try{let t=rt(e);t&&(He.current=!1,se(!1),ue(t),de(!0))}catch(e){Ne(e)}}),[Ne,He,rt]),ht=t.useCallback((e=>{try{let t=rt(e);t&&st(t)}catch(e){Ne(e)}}),[st,Ne,rt]),mt=t.useCallback((e=>{try{const t=rt(e);if(t){const e=t.getSender();n.CometChatUIEvents.ccOpenChat.next({user:e})}}catch(e){Ne(e)}}),[rt,Ne]),At=t.useCallback((e=>{try{let t=rt(e);if(t){const e=t.getId();s.CometChat.deleteMessage(e).then((e=>{ct(e),n.CometChatMessageEvents.ccMessageDeleted.next(e)}),(e=>{Ne(e)}))}}catch(e){Ne(e)}}),[ct,Ne,rt]),xt=t.useCallback((e=>{try{let t=rt(e);t&&n.CometChatMessageEvents.ccMessageEdited.next({message:t,status:n.MessageStatus.inprogress})}catch(e){Ne(e)}}),[Ne,rt]),bt=t.useCallback(((e,t)=>{try{return e.forEach((e=>{switch(e.id){case n.CometChatUIKitConstants.MessageOption.deleteMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=At);break;case n.CometChatUIKitConstants.MessageOption.editMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=xt);break;case n.CometChatUIKitConstants.MessageOption.copyMessage:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=ut);break;case n.CometChatUIKitConstants.MessageOption.replyInThread:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=ht);break;case n.CometChatUIKitConstants.MessageOption.messageInformation:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=pt);break;case n.CometChatUIKitConstants.MessageOption.sendMessagePrivately:e instanceof n.CometChatActionsIcon&&!e.onClick&&(e.onClick=mt);break;case n.CometChatUIKitConstants.MessageOption.reactToMessage:e instanceof n.CometChatActionsView&&!e?.customView&&(e.customView=gt(t))}})),e}catch(t){return Ne(t),e}}),[Ne,At,xt,ht,ut,pt,mt,gt]),yt=t.useCallback((e=>W?e.filter((e=>e.id!==n.CometChatUIKitConstants.MessageOption.reactToMessage)):e),[W]),wt=t.useCallback((e=>{let t=[];if(!e.getId())return t;try{return Xe&&Xe.length>0&&!e.getDeletedAt()&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&Xe.forEach((n=>{n.type===e.getType()&&n.category===e.getCategory()&&(t=bt(n?.options?.(ve.current,e,Qe,Pe.current),e?.getId()))})),t=yt(t),t}catch(e){return Ne(e),t}}),[Xe,yt,bt,Qe,Ne]),ft=t.useCallback((e=>{let t=n.MessageBubbleAlignment.center;try{return t=I===n.MessageListAlignment.left&&e.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember?n.MessageBubbleAlignment.left:e?.getType()===n.CometChatUIKitConstants.MessageTypes.groupMember||e?.getCategory()==n.CometChatUIKitConstants.MessageCategory.call?n.MessageBubbleAlignment.center:!e.getSender()||e?.getSender().getUid()===ve.current?.getUid()&&e?.getType()!==n.CometChatUIKitConstants.MessageTypes.groupMember?n.MessageBubbleAlignment.right:n.MessageBubbleAlignment.left,t}catch(e){return Ne(e),t}}),[I,Ne]),Dt=t.useCallback((e=>{try{let t=ft(e);return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()]?.contentView?qe[e?.getCategory()+"_"+e?.getType()]?.contentView(e,t):null}catch(e){return Ne(e),null}}),[qe,Ne,ft]),Et=t.useCallback((e=>{try{let t=ft(e);return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()]?.bottomView?qe[e?.getCategory()+"_"+e?.getType()]?.bottomView(e,t):null}catch(e){return Ne(e),null}}),[qe,Ne,ft]),vt=t.useCallback((e=>{try{let t=null;return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()]?.headerView&&(t=qe[e?.getCategory()+"_"+e?.getType()]?.headerView(e)),t}catch(e){return Ne(e),null}}),[qe,Ne]),It=t.useCallback((e=>{try{let t=null;return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()]?.footerView&&(t=qe[e?.getCategory()+"_"+e?.getType()]?.footerView(e)),t}catch(e){return Ne(e),null}}),[qe,Ne]),St=t.useCallback((e=>{let t=null;try{return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()].bubbleView&&(t=qe[e?.getCategory()+"_"+e?.getType()].bubbleView(e)),t}catch(e){return Ne(e),t}}),[qe,Ne]),Ft=t.useCallback((e=>{s.CometChat.markAsRead(e).then((()=>{n.CometChatMessageEvents.ccMessageRead.next(e)}),(e=>{Ne(e)}))}),[Ne]),kt=t.useCallback((e=>{h||e.getSender().getUid()===ve.current?.getUid()||Ft(e)}),[h,Ft]),Tt=t.useCallback((()=>{He.current=!0,Ee.current&&Ee.current?.click();const e=Me.current[Me.current.length-1];e&&kt(e),Me.current=[],Be.current&&(Be.current=""),xe&&be(!1)}),[kt,xe]),Mt=t.useCallback((()=>{try{oe(Ke?e=>e.slice(-30):e=>e.slice(0,30))}catch(e){Ne(e)}}),[Ne]),Bt=t.useCallback((e=>new Promise(((t,o)=>{if(tt(e[0]))try{oe((t=>[...e,...t])),Te.current=Te.current+e.length,ae(n.States.loaded),Te.current>j&&(Ke=!1,Mt()),t(!0)}catch(e){ne?.length<=0&&ae(n.States.error),Ne(e),o(e)}else 0==ne.length&&ae(n.States.loaded),t(!0)}))),[ne,j,Mt,tt,Ne]),Lt=t.useCallback((()=>new Promise((async(e,t)=>{try{ae(n.States.loading);let o=0;if(Ue?.current){const e=await s.CometChat.getUnreadMessageCountForUser(Ue.current?.getUid());o=e[Ue.current?.getUid()]||0}if(Pe?.current){const e=await s.CometChat.getUnreadMessageCountForGroup(Pe.current?.getGuid());o=e[Pe.current?.getGuid()]||0}Je?e(!0):(Je=!0,Fe.current.previous||(Fe.current.previous=new Vl(U,Ue.current,Pe.current,ke.current.prevMessageId,Oe.current)),Fe?.current.previous.fetchPreviousMessages().then((i=>{if(Oe.current,i&&i.length>0&&(i=i.map((e=>e.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive?r.InteractiveMessageUtils.convertInteractiveMessage(e):e))),Ie.current&&(n.CometChatUIEvents.ccActiveChatChanged.next({user:Ue.current,group:Pe.current,message:i.length>0?i[i.length-1]:void 0,unreadMessageCount:o}),Ie.current=!1,Vl.attachConnectionListener((()=>{Ge.current=!0,Rt().then((()=>{Pt().then((t=>{e(t),Ge.current=!1}),(e=>{t(e)})).catch((e=>{Ne(e)}))}))}))),Je=!1,i&&i.length>0){let o=i[i.length-1],r=o?.getSender().getUid()==ve.current?.getUid();o.getDeliveredAt()||h||r||s.CometChat.markAsDelivered(o).then((()=>{i.forEach((e=>(e?.getId()<=o?.getId()&&!r&&!e.getDeliveredAt()&&e.setDeliveredAt((new Date).getTime()),e)))})),o.getReadAt()||r?r||n.CometChatMessageEvents.ccMessageRead.next(o):h?Me.current=[]:s.CometChat.markAsRead(o).then((()=>{i.forEach((e=>(e?.getId()<=o?.getId()&&!r&&!e.getReadAt()&&e.setReadAt((new Date).getTime()),e))),n.CometChatMessageEvents.ccMessageRead.next(o)})),Bt(i).then((t=>{e(t)}),(e=>{t(e)}))}else 0===i.length&&0===Te.current&&ae(n.States.empty),e(!0)}),(e=>{Je=!1,ne?.length<=0&&ae(n.States.error),"REQUEST_IN_PROGRESS"!=e.code?(Ne(e),t(e)):ae(n.States.loading)})))}catch(e){ne?.length<=0&&ae(n.States.error),Ne(e)}}))),[h,Ne,Bt]),Ut=t.useCallback((e=>new Promise(((t,o)=>{try{oe((t=>[...t,...e])),Te.current=Te.current+e.length;let o=e[e.length-1]?.getId();if(o&&ke.current.prevMessageId!==o&&(ke.current.nextMessageId=o),O)setTimeout((()=>{se(!0),He.current=!0}),100);else{if(Ge.current){se(He.current);let t=e[e?.length-1];He.current&&t&&t.getSender().getUid()!=ve.current?.getUid()&&!t.getReadAt()&&s.CometChat.markAsRead(t).then((()=>{Me.current=[],n.CometChatMessageEvents.ccMessageRead.next(t)}))}else se(!1);let t=P||(Me.current.length>1?n.localize("NEW_MESSAGES"):n.localize("NEW_MESSAGE"));Me.current.push(...e),Be.current=" ↓ "+Me.current.length+" "+t,be(!0)}ae(n.States.loaded),Te.current>j&&(Ke=!0,Mt()),t(!0)}catch(e){ne?.length<=0&&ae(n.States.error),Ne(e),o(e)}}))),[j,Mt,Ne,He]),Rt=t.useCallback((()=>new Promise(((e,t)=>{let o=(new s.CometChat.MessagesRequestBuilder).setType(n.CometChatUIKitConstants.MessageCategory.message).setCategory(n.CometChatUIKitConstants.MessageCategory.action).setMessageId(ke.current.nextMessageId).setLimit(30);Ue.current?o.setUID(Ue.current.getUid()):Pe.current&&o.setGUID(Pe.current.getGuid()),o.build().fetchNext().then((t=>t&&t.length>0?(t.forEach((e=>{ct(e.getActionOn())})),e(!0)):e(!0))).catch((e=>(Ne(e),ne?.length<=0&&ae(n.States.error),t(e))))}))),[Ne]),Pt=t.useCallback((()=>new Promise(((e,t)=>{try{ke.current.nextMessageId?(Fe.current.next||(Fe.current.next=new Vl(U,Ue.current,Pe.current,ke.current.nextMessageId,Oe.current)),ae(n.States.loading),Fe?.current.next.fetchNextMessages().then((o=>{o&&o.length>0&&(o=o.map((e=>e.getCategory()===n.CometChatUIKitConstants.MessageCategory.interactive?r.InteractiveMessageUtils.convertInteractiveMessage(e):e))),o?0===o.length?(0===Te.current?ae(n.States.empty):ae(n.States.loaded),e(!0)):Ut(o).then((t=>{e(t)}),(e=>{t(e)})):e(!0)}),(e=>{ne?.length<=0&&ae(n.States.error),Ne(e),t(e)}))):e(!0)}catch(e){Ne(e)}}))),[Ut,Ne,ne?.length,U]),Ot=t.useCallback((e=>{try{oe((t=>t.map((t=>t?.getId()===e.getParentMessageId()?(t.getReplyCount()?t.setReplyCount(t.getReplyCount()+1):t.setReplyCount(1),t):t))))}catch(e){Ne(e)}}),[Ne]),jt=t.useCallback((e=>{try{oe((t=>{let n=[...t],o=n.findIndex((t=>t.getId()===e.getParentMessageId()));if(o>-1){const e=n[o];n.splice(o,1,e),t=[...n]}return t}))}catch(e){Ne(e)}}),[Ne]),Vt=t.useCallback((e=>{try{Te.current+=1,Te.current>0&&ie!=n.States.loaded&&ae(n.States.loaded),oe((t=>[...t,e])),e.getSender()&&e.getSender().getUid()!=ve.current?.getUid()||se(!0),Te.current>j&&(Ke=!0,Mt())}catch(e){Ne(e)}}),[j,Ne,re]),Gt=t.useCallback((e=>{try{return r.MessageReceiptUtils.getReceiptStatus(e)}catch(e){Ne(e)}}),[Ne]),Ht=t.useCallback((()=>{try{m||(x?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage,x):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingMessage))}catch(e){Ne(e)}}),[m,x,Ne]),Qt=t.useCallback((e=>{if(!He.current&&e.getSender()&&e.getSender().getUid()!=ve.current?.getUid()){let t=P||(Me.current.length>1?n.localize("NEW_MESSAGES"):n.localize("NEW_MESSAGE"));Me.current.push(e),Be.current=" ↓ "+Me.current.length+" "+t,be(!0)}}),[P]),Nt=t.useCallback((e=>{try{oe((t=>t.map((t=>(parseInt(t?.getId()?.toString())<=parseInt(e.getMessageId())&&t.getSender().getUid()===ve.current?.getUid()&&!t.getDeliveredAt()&&t.setDeliveredAt(e.getDeliveredAt()),t)))))}catch(e){Ne(e)}}),[Ne]),Kt=t.useCallback((e=>{try{const t=[];oe((o=>{const r=o.map((n=>(parseInt(n?.getId()?.toString())<=parseInt(e.getMessageId())&&n.getSender().getUid()===ve.current?.getUid()&&!n.getReadAt()&&(n.setReadAt(e.getReadAt()),parseInt(n?.getId()?.toString())===parseInt(e.getMessageId())&&t.push(n)),n)));return t.forEach((e=>{n.CometChatMessageEvents.ccMessageRead.next(e)})),r}))}catch(e){Ne(e)}}),[Ne]),zt=t.useCallback((e=>{try{e.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&e.getSender().getUid()===Ue.current?.getUid()&&e.getReceiver()===ve.current?.getUid()&&("delivery"===e.getReceiptType()?Nt(e):Kt(e))}catch(e){Ne(e)}}),[Nt,Kt,Ne]),Jt=t.useCallback((e=>{ve.current?.getUid()===e.getSender().getUid()&&oe((t=>t.map((t=>{if(String(t.getId())===String(e.getMessageId())){const n=e.getInteractions();return t.setInteractions(n),r.InteractiveMessageUtils.convertInteractiveMessage(t)}return t}))))}),[]),Yt=t.useCallback(((e=!1)=>{(e||O)&&setTimeout((()=>{se(!0),He.current=!0,Me.current=[]}),100)}),[O]),_t=t.useCallback((e=>{try{tt(e)?(Vt(e),O?(Yt(),kt(e)):He.current?(Yt(!0),kt(e)):(se(!1),Qt(e))):ot(e)&&(Ot(e),jt(e)),Ht()}catch(e){Ne(e)}}),[tt,ot,Ht,Vt,O,Yt,kt,Qt,Ot,jt,Ne]),Wt=t.useCallback(((e,t)=>{try{t?.getGuid()===Pe?.current?.getGuid()&&(Vt(e),He.current?Yt(!0):O?Yt():(se(!1),Qt(e)))}catch(e){Ne(e)}}),[Vt,O,Yt,Qt,Ne]),Zt=t.useCallback((e=>{const t=e?.getReceiverId(),o=e?.getReceiverType(),r=e?.getReaction()?.getReactedBy()?.getUid(),s=e?.getParentMessageId(),i=s&&String(s);if(i)return s===i;if(e.getParentMessageId())return!1;if(Ue.current){if(o===n.CometChatUIKitConstants.MessageReceiverType.user&&(t===Ue.current?.getUid()||r===Ue.current?.getUid()))return!0}else if(Pe.current&&o===n.CometChatUIKitConstants.MessageReceiverType.group&&t===Pe.current?.getGuid())return!0;return!1}),[]),Xt=t.useCallback(((e,t)=>{if(!Zt(e))return!1;oe((n=>{const o=n.findIndex((t=>t.getId().toString()===e.getReaction()?.getMessageId().toString()));if(-1===o)return n;const i=n[o];let a;a=t?s.CometChat.REACTION_ACTION.REACTION_ADDED:s.CometChat.REACTION_ACTION.REACTION_REMOVED;const l=s.CometChat.CometChatHelper.updateMessageWithReactionInfo(i,e.getReaction(),a);return n.map((e=>e.getId().toString()===l?.getId().toString()?r.CometChatUIKitUtility.clone(l):e))}))}),[Zt]),qt=t.useCallback((e=>{try{tt(e)&&Re.names.includes("calling")&&(Vt(e),He.current?Yt(!0):O?Yt():(se(!1),Qt(e)))}catch(e){Ne(e)}}),[tt,Vt,O,Yt,Qt,Ne]),$t=t.useCallback(((e="",t,o)=>{try{switch(e){case n.CometChatUIKitConstants.MessageCategory.action:o&&Wt(t,o);break;case n.CometChatUIKitConstants.MessageCategory.call:qt(t)}}catch(e){Ne(e)}}),[Wt,qt,Ne]),en=t.useCallback((()=>new Promise(((e,t)=>{try{Tt(),se(!1),Fe.current&&Fe.current.previous&&(Fe.current.previous=null),Pt().then((t=>{e(t)}),(e=>{t(e)}))}catch(e){Ne(e)}}))),[ne,kt,Pt,Tt,Ne]),tn=t.useCallback((()=>new Promise(((e,t)=>{try{se(!1),He.current=!1,Fe.current&&Fe.current.next&&(Fe.current.next=null),Lt().then((t=>{e(t)}),(e=>{t(e)}))}catch(e){Ne(e)}}))),[Lt,Ne,He]),nn=t.useCallback((e=>{Se.current[e.getId()].current?.scrollIntoView({block:"center"})}),[]),on=t.useCallback((()=>{try{Tt(),se(!0)}catch(e){Ne(e)}}),[Ft,Ne,Tt]),rn=t.useCallback((e=>{oe((e=>e.map((e=>(e?.getId(),e)))))}),[]),sn=t.useCallback((()=>{try{const e=n.CometChatUIEvents.ccShowOngoingCall.subscribe((e=>{ce(!0),Ae(e.child)})),t=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{ce(!1),Ae(null),e&&qt(e)})),o=n.CometChatCallEvents.ccCallRejected.subscribe((e=>{qt(e)})),r=n.CometChatCallEvents.ccOutgoingCall.subscribe((e=>{qt(e)})),s=n.CometChatCallEvents.ccCallAccepted.subscribe((e=>{qt(e)})),a=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{ot(e)&&rn(e.getParentMessageId())})),l=n.CometChatUIEvents.ccShowDialog.subscribe((e=>{Le.current=e.child,he(!0)})),c=n.CometChatUIEvents.ccHideDialog.subscribe((()=>{Le.current=null,he(!1)})),C=n.CometChatUIEvents.ccShowPanel.subscribe((e=>{(!e.message||e.message.getParentMessageId()&&i&&e.message.getParentMessageId()==i||!i&&!e.message?.getParentMessageId())&&(e.position===n.PanelAlignment.messageListFooter?(je.current&&(je.current=null,be(!1),we(!1)),setTimeout((()=>{je.current=e.child,we(!0)}),0)):e.position===n.PanelAlignment.messageListHeader&&(Ve.current&&(Ve.current=null,De(!1)),setTimeout((()=>{Ve.current=e.child,De(!0)}),0)))})),d=n.CometChatUIEvents.ccHidePanel.subscribe((e=>{e===n.PanelAlignment.messageListFooter?(je.current=null,be(!1),we(!1)):e===n.PanelAlignment.messageListHeader&&(Ve.current=null,De(!1))})),g=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{e.messages.map((t=>{Wt(t,e.userAddedIn)}))})),u=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{Wt(e.message,e.kickedFrom)})),p=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{Wt(e.message,e.kickedFrom)})),m=n.CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((e=>{Wt(e.message,e.group)})),A=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{Wt(e.message,e.leftGroup)})),x=n.CometChatMessageEvents.ccMessageEdited.subscribe((e=>{e?.status===n.MessageStatus.success&&$e(e.message)&&Ct(e.message,!1)})),b=n.CometChatMessageEvents.ccMessageTranslated.subscribe((e=>{e?.status===n.MessageStatus.success&&tt(e.message)&&(Ct(e.message,!1),setTimeout((()=>{nn(e.message)}),100))})),y=n.CometChatMessageEvents.ccMessageSent.subscribe((e=>{let{message:t,status:o}=e;switch(o){case n.MessageStatus.inprogress:$e(t)&&Vt(t);break;case n.MessageStatus.success:$e(t)&&Ct(t,!0),nt(t)&&Ot(t);break;default:Ct(t,!0),nt(t)&&Ot(t)}})),w=n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{_t(e)})),f=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{_t(e)})),D=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{_t(e)})),E=n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{_t(e)})),v=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{_t(e)})),I=n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{_t(e)})),S=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{_t(e)})),F=n.CometChatMessageEvents.onMessagesDelivered.subscribe((e=>{h||zt(e)})),k=n.CometChatMessageEvents.onMessagesRead.subscribe((e=>{h||zt(e)})),T=n.CometChatMessageEvents.onMessageDeleted.subscribe((e=>{ct(e)})),M=n.CometChatMessageEvents.onMessageEdited.subscribe((e=>{ct(e)})),B=n.CometChatMessageEvents.onTransientMessageReceived.subscribe((e=>{let t=e.getData();et(e)&&"live_reaction"==t.type&&n.CometChatMessageEvents.ccLiveReaction.next(t.reaction)})),L=n.CometChatMessageEvents.onInteractionGoalCompleted.subscribe((e=>{Jt(e)}));let U,R;return W||(U=n.CometChatMessageEvents.onMessageReactionAdded.subscribe((e=>{Xt(e,!0)})),R=n.CometChatMessageEvents.onMessageReactionRemoved.subscribe((e=>{Xt(e,!1)}))),()=>{try{x?.unsubscribe(),y?.unsubscribe(),g?.unsubscribe(),u?.unsubscribe(),p?.unsubscribe(),m?.unsubscribe(),A?.unsubscribe(),e?.unsubscribe(),r?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),s?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe(),b?.unsubscribe(),a?.unsubscribe(),w?.unsubscribe(),f?.unsubscribe(),D?.unsubscribe(),E?.unsubscribe(),v?.unsubscribe(),I?.unsubscribe(),S?.unsubscribe(),F?.unsubscribe(),k?.unsubscribe(),T?.unsubscribe(),M?.unsubscribe(),B?.unsubscribe(),L?.unsubscribe(),W||(U?.unsubscribe(),R?.unsubscribe())}catch(e){Ne(e)}}}catch(e){Ne(e)}}),[et,rn,W,qt,ot,Ct,Wt,$e,nn,Vt,nt,Ot,Ne,ye]),an=t.useCallback(((e,t)=>{try{let n,o;return n=new Date(1e3*e),o=new Date(1e3*t),n.getDate()!==o.getDate()||n.getMonth()!==o.getMonth()||n.getFullYear()!==o.getFullYear()}catch(e){Ne(e)}}),[Ne]),ln=t.useCallback((e=>I===n.MessageListAlignment.left||!(!Pe.current||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action||!e?.getSender()||e?.getSender()?.getUid()===ve.current?.getUid()||I!==n.MessageListAlignment.standard)),[I]),cn=t.useCallback((e=>e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&S&&ln(e)?d.jsx(sl,{name:e?.getSender()?.getName(),avatarStyle:yl(Q,Qe),image:e?.getSender()?.getAvatar()}):null),[S,Q,ln,Qe]),Cn=t.useCallback((e=>d.jsx(d.Fragment,{children:d.jsx(nl,{timestamp:e.getSentAt(),dateStyle:pl(K,Qe),pattern:F})})),[K,F,Qe]),dn=t.useCallback((e=>d.jsx(d.Fragment,{children:d.jsx(ol,{text:e?.getSender()?.getName(),labelStyle:hl(Qe,K)})})),[Qe]),gn=t.useCallback((e=>vt(e)?vt(e):e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call&&(ln(e)||k===ze.top)?d.jsxs(d.Fragment,{children:[ln(e)?dn(e):null,k===ze.top?Cn(e):null]}):null),[k,Cn,ln,vt,dn]),un=t.useCallback((e=>k===ze.bottom&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.action&&e?.getCategory()!==n.CometChatUIKitConstants.MessageCategory.call?d.jsx(nl,{timestamp:e.getSentAt(),dateStyle:pl(K,Qe),pattern:F}):null),[k,K,F,Qe]),pn=t.useCallback((e=>h||e?.getSender()&&ve.current?.getUid()!==e?.getSender()?.getUid()||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.action||e?.getCategory()===n.CometChatUIKitConstants.MessageCategory.call?null:d.jsx(il,{receiptStyle:dl(Qe,e),receipt:Gt(e),waitIcon:D,sentIcon:f,deliveredIcon:w,readIcon:y,errorIcon:E})),[h,D,f,w,y,E,Gt,Qe]),hn=t.useCallback((()=>{const e=_?.reactionListConfiguration||{},t=(e=>new o.AvatarStyle({borderRadius:"50%",width:"35px",height:"35px",border:"none",backgroundColor:e.palette.getAccent700(),nameTextColor:e.palette.getAccent900(),backgroundSize:"cover",nameTextFont:n.fontHelper(e.typography.subtitle1),outerViewBorderWidth:"0",outerViewBorderRadius:"0",outerViewBorderColor:"",outerViewBorderSpacing:"0"}))(Qe),s=(e=>new o.ListItemStyle({background:"transparent",activeBackground:"transparent",hoverBackground:"transparent",titleFont:n.fontHelper(e.typography.subtitle1),titleColor:e.palette.getAccent(),separatorColor:e.palette.getAccent100()}))(Qe),i=(e=>new r.ReactionListStyle({width:"320px",height:"300px",borderRadius:"12px",background:e.palette.getAccent900(),border:"none",errorIconTint:e.palette.getAccent400(),loadingIconTint:e.palette.getAccent400(),sliderEmojiCountFont:n.fontHelper(e.typography.subtitle2),sliderEmojiFont:n.fontHelper(e.typography.subtitle1),subtitleTextColor:e.palette.getAccent500(),subtitleTextFont:n.fontHelper(e.typography.subtitle2),tailViewFont:n.fontHelper(e.typography.title1),dividerTint:e.palette.getAccent100(),sliderEmojiCountColor:e.palette.getAccent500(),activeEmojiBackground:e.palette.getAccent100()}))(Qe);return new r.ReactionListConfiguration({avatarStyle:{...t,...e?.avatarStyle},errorIconURL:e?.errorIconURL||"",listItemStyle:{...s,...e?.listItemStyle},loadingIconURL:e?.loadingIconURL||"",reactionListStyle:{...i,...e?.reactionListStyle},reactionItemClicked:e?.reactionItemClicked||((e,t)=>{e?.getReactedBy()?.getUid()===ve.current?.getUid()&&dt(e?.getReaction(),t)}),reactionsRequestBuilder:e?.reactionsRequestBuilder||void 0})}),[_,dt,Qe]),mn=t.useCallback((()=>{const e=_?.reactionInfoConfiguration||{},t=((e,t)=>new r.ReactionInfoStyle({background:t?.reactionInfoStyle?.background||e.palette.getAccent("light"),border:t?.reactionInfoStyle?.border||"none",borderRadius:t?.reactionInfoStyle?.borderRadius||"12px",errorIconTint:t?.reactionInfoStyle?.errorIconTint||e.palette.getBackground("light"),loadingIconTint:t?.reactionInfoStyle?.loadingIconTint||e.palette.getBackground("light"),namesColor:t?.reactionInfoStyle?.namesColor||e.palette.getBackground("light"),namesFont:t?.reactionInfoStyle?.namesFont||n.fontHelper(e.typography.subtitle2),reactedTextColor:t?.reactionInfoStyle?.reactedTextColor||e.palette.getAccent700("dark"),reactedTextFont:t?.reactionInfoStyle?.reactedTextFont||n.fontHelper(e.typography.subtitle2),reactionFontSize:t?.reactionInfoStyle?.reactionFontSize||"37px"}))(Qe,e);return new r.ReactionInfoConfiguration({reactionInfoStyle:t,reactionsRequestBuilder:e?.reactionsRequestBuilder||void 0,errorIconURL:e?.errorIconURL||"",loadingIconURL:e?.loadingIconURL||""})}),[_,Qe]),An=t.useCallback((e=>{const t=e?.getReactions()||[],o=ft(e);if(t&&t.length>0&&!W){const t=((e={},t)=>new r.ReactionsStyle({height:e?.height||"100%",width:e?.width||"fit-content",border:e?.border||"none",borderRadius:e?.borderRadius||"0",background:e?.background||"transparent",activeReactionBackground:e?.activeReactionBackground||t.palette.getPrimary150(),reactionBackground:e?.reactionBackground||t.palette.getAccent100(),reactionBorder:e?.reactionBorder||"none",activeReactionBorder:e?.activeReactionBorder||`1px solid ${t.palette.getPrimary500()}`,reactionBorderRadius:e?.reactionBorderRadius||"20px",activeReactionCountTextColor:e?.activeReactionCountTextColor||t.palette.getAccent(),activeReactionCountTextFont:e?.activeReactionCountTextFont||n.fontHelper(t.typography.caption1),reactionCountTextFont:e?.reactionCountTextFont||n.fontHelper(t.typography.caption1),reactionCountTextColor:e?.reactionCountTextColor||t.palette.getAccent(),reactionBoxShadow:e?.reactionBoxShadow||"rgba(0, 0, 0, 0.1) 0px 4px 12px",reactionEmojiFont:e?.reactionEmojiFont||n.fontHelper(t.typography.subtitle1),baseReactionBackground:e?.baseReactionBackground||t.palette.getBackground()}))(_?.reactionsStyle,Qe);return d.jsx(qa,{messageObject:e,alignment:o,reactionsStyle:t,hoverDebounceTime:500,reactionClick:(e,t)=>{_?.reactionClick?_?.reactionClick(e,t):dt(e?.getReaction(),t)},reactionListConfiguration:hn(),reactionInfoConfiguration:mn(),style:Dl(o)})}return null}),[W,mn,hn,dt,_,ft,Qe]),xn=t.useCallback((e=>It(e)?d.jsx("div",{className:"cc-message-bubble__footer",style:ul(ft(e)),children:It(e)}):d.jsx("div",{className:"cc-message-bubble__footer",style:ul(ft(e)),children:An(e)})),[An,It,ft]),bn=t.useCallback((e=>{if(e?.getReplyCount()&&!e?.getDeletedAt()){const t=ft(e),o=q;return d.jsx("div",{className:"cc-message-bubble__thread-replies",children:d.jsx(el,{text:kn(e),hoverText:kn(e),buttonStyle:ll(e,Qe,ve.current,K,t),mirrorIcon:t===n.MessageBubbleAlignment.left,iconURL:o,buttonClick:()=>{st(e)}})})}}),[ft,q,Qe,K,st]),yn=e=>{const t=e?.getType();return[n.CometChatUIKitConstants.MessageTypes.image,n.CometChatUIKitConstants.MessageTypes.video].includes(t)},wn=t.useCallback((e=>{try{let t=ft(e);return qe[e?.getCategory()+"_"+e?.getType()]&&qe[e?.getCategory()+"_"+e?.getType()]?.statusInfoView?qe[e?.getCategory()+"_"+e?.getType()]?.statusInfoView(e,t):e?.getDeletedAt()||e instanceof s.CometChat.Action||e instanceof s.CometChat.Call?null:d.jsx("div",{style:{position:"relative",display:"flex",justifyContent:"flex-end"},children:d.jsxs("div",{className:"cc-message-bubble__statusInfo",style:gl(yn(e),Qe,e,ft(e)),children:[un(e),pn(e)]})})}catch(e){return Ne(e),null}}),[un,pn,qe,Ne,ft]),fn=t.useCallback(((e,t)=>d.jsx(Z,{setRef:t=>{Se.current[e.getId()]=t},leadingView:cn(e),headerView:gn(e),footerView:xn(e),contentView:Dt(e),bottomView:Et(e),id:e?.getId()||e?.getMuid(),options:wt(e),messageBubbleStyle:Cl(e,Qe,I,ve.current),alignment:ft(e),replyView:null,threadView:bn(e),statusInfoView:wn(e)})),[cn,gn,xn,Dt,I,ft,bn,wn,wt,Et,Qe]),Dn=t.useCallback(((e,t)=>0===t||an(ne[t-1]?.getSentAt(),e?.getSentAt())?d.jsx("div",{className:"cc-message-list__date-container",style:{display:"flex",justifyContent:"center",width:"100%",marginBottom:"16px"},children:d.jsx(nl,{timestamp:e.getSentAt(),pattern:M,dateStyle:ml(N,Qe)})},`${e.getId()}-${e.getSentAt()}`):null),[M,ne,N,an,Qe]),En=t.useCallback(((e,t)=>{let n=ft(e);return d.jsxs(d.Fragment,{children:[B?d.jsx(d.Fragment,{}):Dn(e,t),d.jsx("div",{className:"cc-message-list__bubble",style:wl(n),children:St(e)?St(e):fn(e,t)},e.getId())]})}),[St,Dn,fn,ft]),vn=t.useCallback(((e,t)=>d.jsx(Z,{leadingView:cn(e),headerView:gn(e),footerView:null,contentView:Dt(e),bottomView:null,statusInfoView:null,id:e?.getId()||e?.getMuid(),options:[],messageBubbleStyle:Cl(e,Qe,I,ve.current),alignment:ft(e),replyView:null,threadView:null})),[cn,gn,Dt,I,ft,Qe]),In=t.useCallback(((e,t)=>d.jsx("div",{className:"cc__messagelist__bubble",style:fl,children:St(e)?St(e):vn(e,t)},e.getId())),[St,Dn,fn,vn]),Sn=t.useCallback((()=>d.jsxs(d.Fragment,{children:[ye&&je.current?je.current:null,H&&!je.current?H:null]})),[H,on,ye]),Fn=t.useCallback((()=>d.jsxs(d.Fragment,{children:[fe&&Ve.current?Ve.current:null,G&&!Ve.current?G:null]})),[G,fe]),kn=e=>{const t=e?.getReplyCount()||0;return`${t} ${1===t?n.localize("REPLY"):n.localize("REPLIES")}`},Tn=t.useCallback((e=>d.jsx(d.Fragment,{children:St(e)?St(e):d.jsx(Z,{leadingView:cn(e),headerView:gn(e),footerView:null,contentView:Dt(e),bottomView:Et(e),statusInfoView:wn(e),id:e?.getId()||e?.getMuid(),messageBubbleStyle:Cl(e,Qe,I,ve.current),alignment:Ye,replyView:null,threadView:null,options:[]})})),[cn,gn,xn,Dt,I,wt,St,Et,Qe]),Mn=t.useMemo((()=>function(e,t){return En(e,t)}),[En]),Bn=t.useCallback((()=>ie),[ie]);return function(e,n,o,i,a,l,c,C,d,g,u,p,h,m,A,x,b){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((t=>{b.current=!0,t&&(e.current=t)}),(e=>{p(e)}))}),[p]),t.useEffect((()=>{let e;return r.CometChatUIKitLoginListener.getLoggedInUser()&&(l||c)&&(n.current={previous:new Vl(a,l,c)},Vl.attachListeners(i),e=C(),h([]),m(!0),x.current=!0,o(),A.current=null),()=>{Vl?.removeListeners?.(),e?.()}}),[l,c]),t.useEffect((()=>{g.current=u.length,u?.length>0&&(d.current.prevMessageId=u[0].getId(),d.current.nextMessageId=u[u.length-1].getId())}),[u])}(ve,Fe,Lt,$t,U,Ue.current,Pe.current,sn,ke,Te,ne,Ne,oe,se,je,He,Ie),d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"cc-message-list__wrapper",style:al(K,Qe),children:[d.jsx("div",{className:"cc-message-list__header-view",style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:"auto"},children:Fn()}),d.jsxs("div",{className:"cc-message-list",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",boxSizing:"border-box"},children:[d.jsx(T,{scrolledUpCallback:it,title:"",hideSearch:!0,showSectionHeader:!1,list:ne,listItem:Mn,onScrolledToBottom:en,onScrolledToTop:tn,listItemKey:"getMuid",state:Bn(),loadingView:_e,loadingIconURL:v,hideError:J,errorStateView:We,errorStateText:C,emptyStateView:Ze,emptyStateText:void 0,scrollToBottom:re,theme:Qe,listStyle:new r.ListStyle({height:"100%",width:"100%",background:"inherit"})}),xe&&Me.current&&Me.current.length>0&&!He.current?d.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"fit-content",width:"100%"},className:"cc-message-list__message-indicator",children:d.jsx(tl,{ref:Ee,text:Be.current,buttonStyle:cl(Qe),buttonClick:on})}):null]}),d.jsx("div",{className:"cc-message-list__footer-view",style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:"auto"},children:Sn()})]}),le?me:null,pe&&Le.current?Le.current:null,Ce&&null!==ge&&d.jsx(Ol,{message:ge,bubbleView:Y?.bubbleView||In,onClose:Y?.onClose||(()=>{de(!1)}),template:(Ln=ge,qe[Ln?.getCategory()+"_"+Ln?.getType()]),loadingStateView:Y?.loadingStateView,errorStateView:Y?.errorStateView,listItemStyle:Y?.listItemStyle,emptyStateView:Y?.emptyStateView,loadingIconURL:Y?.loadingIconURL,readIcon:Y?.readIcon,deliveredIcon:Y?.deliveredIcon,onError:Y?.onError,subtitleView:Y?.subtitleView,listItemView:Y?.listItemView,messageInformationStyle:Y?.messageInformationStyle,closeIconURL:Y?.closeIconURL||"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",receiptDatePattern:Y?.receiptDatePattern,backdropStyle:te})]});var Ln};Hl.defaultProps=Gl;const Ql=e=>({height:"36px",padding:"8px 16px",boxSizing:"border-box",border:`1px solid ${e.palette.getAccent100()}`}),Nl=e=>({height:"100%",width:"100%",border:"0 none",borderRadius:"0",background:`${e.palette.getBackground()}`,buttonTextFont:`${n.fontHelper(e.typography.subtitle1)}`,buttonTextColor:`${e.palette.getAccent600()}`});var Kl="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const zl={width:"100%",height:"100%",background:"white",borderRadius:"none",border:"1px solid rgba(20, 20, 20, 0.1)",titleColor:"rgba(20, 20, 20)",titleFont:"700 22px Inter",closeIconTint:"#3399FF"},Jl={textFont:"700 22px Inter",textColor:"black",background:"transparent"},Yl={height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:"#7dbfff"},_l=e=>{const{parentMessage:o,title:i=n.localize("THREAD"),closeIconURL:a=Kl,bubbleView:l=null,messageActionView:c=null,onError:C,onClose:g=(()=>{}),threadedMessagesStyle:u=zl,messageListConfiguration:p=new r.MessageListConfiguration({}),messageComposerConfiguration:h=new r.MessageComposerConfiguration({}),messageComposerView:m,messageListView:A,hideMessageComposer:x}=e,{theme:y}=t.useContext(R),[w,f]=t.useState(o),[D,E]=t.useState(0),v=t.useRef(u);let I=new r.ThreadedMessagesStyle({width:"100%",height:"100%",background:y.palette.getBackground(),borderRadius:"none",border:"none",titleColor:y.palette.getAccent(),titleFont:n.fontHelper(y.typography.title1),closeIconTint:y.palette.getPrimary()});v.current={...I,...u},Jl.textFont=v?.current?.titleFont||n.fontHelper(y.typography.title1),Jl.textColor=v?.current?.titleColor||y.palette.getAccent(),Jl.background="transparent",Yl.buttonIconTint=v?.current?.closeIconTint||y.palette.getPrimary();const[S,F]=t.useState(null),k=b(C),T=t.useMemo((()=>{if(S&&o?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user)return o?.getSender()?.getUid()===S?.getUid()?o?.getReceiver():o?.getSender()}),[o,S]),M=t.useMemo((()=>{if(S&&o?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.group)return o?.getReceiver()}),[S,o]),B=w.getId(),L=t.useMemo((()=>(new s.CometChat.MessagesRequestBuilder).setCategories(Re.getDataSource().getAllMessageCategories()).setTypes(Re.getDataSource().getAllMessageTypes()).hideReplies(!0).setLimit(20).setParentMessageId(B)),[B]),U=t.useCallback((e=>{try{Number(e?.getMessageId())===B&&(e?.getReadAt()?f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getReadAt()),n})):e?.getDeliveredAt()&&f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getDeliveredAt()),n})))}catch(e){k(e)}}),[B,f,k]),P=t.useCallback((e=>{try{B===e?.getId()&&f((t=>r.CometChatUIKitUtility.clone(e)))}catch(e){k(e)}}),[B,f,k]),O=t.useCallback((()=>{const e=n.CometChatMessageEvents.onMessagesDelivered.subscribe((e=>{U(e)})),t=n.CometChatMessageEvents.onMessagesRead.subscribe((e=>{U(e)})),r=n.CometChatMessageEvents.onMessageDeleted.subscribe((e=>{P(e)})),s=n.CometChatMessageEvents.onMessageEdited.subscribe((e=>{P(e)})),i=n.CometChatMessageEvents.onTextMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),a=n.CometChatMessageEvents.onMediaMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),l=n.CometChatMessageEvents.onCustomMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),c=n.CometChatMessageEvents.onFormMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),C=n.CometChatMessageEvents.onSchedulerMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),d=n.CometChatMessageEvents.onCardMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))})),g=n.CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((e=>{e?.getParentMessageId()&&e.getParentMessageId()==o.getId()&&E((e=>e+1))}));return()=>{e?.unsubscribe(),t?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe(),g?.unsubscribe()}}),[U,P,o]),j=t.useCallback((()=>{try{const e=n.CometChatMessageEvents.ccMessageSent.subscribe((({status:e,message:t})=>{e===n.MessageStatus.success&&t?.getParentMessageId()===w?.getId()&&E((e=>e+1))})),t=n.CometChatMessageEvents.ccMessageEdited.subscribe((({status:e,message:t})=>{e===n.MessageStatus.success&&t?.getId()===w?.getId()&&f((e=>r.CometChatUIKitUtility.clone(t)))})),o=n.CometChatMessageEvents.ccMessageDeleted.subscribe((e=>{e?.getId()===w?.getId()&&f((t=>r.CometChatUIKitUtility.clone(e)))})),s=n.CometChatMessageEvents.ccMessageRead.subscribe((e=>{e?.getId()===w?.getId()&&f((t=>{const n=r.CometChatUIKitUtility.clone(t);return n?.setReadAt(e?.getReadAt()),n}))}));return()=>{try{o?.unsubscribe(),t?.unsubscribe(),s?.unsubscribe(),e?.unsubscribe()}catch(e){k(e)}}}catch(e){k(e)}}),[w,f,k]),V=t.useCallback((()=>{g()}),[g]),G=t.useCallback((()=>{try{const e=D||0;return`${e} ${1===e?n.localize("REPLY"):n.localize("REPLIES")}`}catch(e){k(e)}}),[k,D]),H=t.useCallback((()=>l&&w?l(w):null),[w,l]);return function(e,n,o,r,i,a,l){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{n(e)}),(e=>{i(e)}))}),[n,i]),t.useEffect((()=>{if(e){const e=o(),t=r();return()=>{e(),t()}}}),[e,o,r]),t.useEffect((()=>{void 0===a?.getReplyCount()?l(0):l(a?.getReplyCount())}),[a,l])}(S,F,O,j,k,o,E),d.jsxs("div",{className:"cc-threaded-messages__wrapper",style:{background:v?.current?.background||y.palette.getBackground(),height:v?.current?.height,width:v?.current?.width,border:v?.current?.border,borderRadius:v?.current?.borderRadius,display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box"},children:[d.jsxs("div",{className:"cc-threaded-messages__header",style:{padding:"16px",width:"100%",display:"flex",boxSizing:"border-box"},children:[d.jsx("div",{className:"cc-threaded-messages__title",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"calc(100% - 24px)"},children:d.jsx("cometchat-label",{text:i,labelStyle:JSON.stringify(Jl)})}),d.jsx("div",{className:"cc-threaded-messages__close",style:{display:"flex",alignItems:"center",width:"24px"},children:d.jsx("cometchat-button",{iconURL:a,buttonStyle:JSON.stringify(Yl),onClick:V})})]}),d.jsxs("div",{className:"cc-threaded-messages",style:{width:"100%",height:"calc(100% - 156px)",display:"flex",flexDirection:"column"},children:[d.jsx("div",{className:"cc-threaded-messages__bubbleview",style:{display:"flex",width:"100%",height:"fit-content",padding:"8px 16px",boxSizing:"border-box",maxHeight:"20em",overflow:"hidden scroll"},children:H()}),d.jsx("div",{className:"cc-threaded-messages__actionview",style:Ql(y),children:c||d.jsx("cometchat-button",{text:G(),buttonStyle:JSON.stringify(Nl(y))})}),A?T||M?A(T,M,o):null:d.jsx("div",{className:"cc-threaded-messages__list",style:{height:"100%",overflow:"hidden",width:"100%"},children:d.jsx(Hl,{parentMessageId:w?.getId(),user:T,group:M,emptyStateView:p?.emptyStateView,loadingStateView:p?.loadingStateView,errorStateView:p?.errorStateView,disableReceipt:p?.disableReceipt,readIcon:p?.readIcon,deliveredIcon:p?.deliveredIcon,sentIcon:p?.sentIcon,waitIcon:p?.waitIcon,errorIcon:p?.errorIcon,alignment:p?.alignment,showAvatar:p?.showAvatar,datePattern:p?.datePattern,timestampAlignment:p?.timestampAlignment,DateSeparatorPattern:p?.DateSeparatorPattern,templates:p?.templates,messagesRequestBuilder:p?.messagesRequestBuilder||L,thresholdValue:p?.thresholdValue,onThreadRepliesClick:p?.onThreadRepliesClick,headerView:p?.headerView,footerView:p?.footerView,avatarStyle:p?.avatarStyle,dateSeparatorStyle:p?.dateSeparatorStyle,messageListStyle:p?.messageListStyle,onError:p?.onError,disableMentions:p?.disableMentions,hideDateSeparator:p?.hideDateSeparator,reactionsConfiguration:p?.reactionsConfiguration,disableReactions:p?.disableReactions,emojiKeyboardStyle:p?.emojiKeyboardStyle,threadIndicatorIcon:p?.threadIndicatorIcon,textFormatters:p?.textFormatters})})]}),x||m?null:d.jsx("div",{className:"cc-threaded-messages__composer",style:{height:"fit-content",width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",minHeight:"90px"},children:d.jsx(Na,{sendButtonIconURL:h?.sendButtonIconURL,parentMessageId:w?.getId(),user:T,group:M,text:h?.text,headerView:h?.headerView?h.headerView(T,M):null,onTextChange:h?.onTextChange,attachmentIconURL:h?.attachmentIconURL,attachmentOptions:h?.attachmentOptions,secondaryButtonView:h?.secondaryButtonView,auxiliaryButtonView:h?.auxilaryButtonView,auxiliaryButtonAlignment:h?.auxiliaryButtonsAlignment,sendButtonView:h?.sendButtonView,hideLiveReaction:h?.hideLiveReaction,LiveReactionIconURL:h?.LiveReactionIconURL,messageComposerStyle:h?.messageComposerStyle,onSendButtonClick:h?.onSendButtonClick,onError:h?.onError,hideVoiceRecording:h?.hideVoiceRecording,voiceRecordingStartIconURL:h?.voiceRecordingStartIconURL,voiceRecordingCloseIconURL:h?.voiceRecordingCloseIconURL,voiceRecordingStopIconURL:h?.voiceRecordingStopIconURL,voiceRecordingSubmitIconURL:h?.voiceRecordingSubmitIconURL,AIOptionsStyle:h?.AIOptionsStyle,AIIconURL:h?.AIIconURL,userMemberWrapperConfiguration:h?.userMemberWrapperConfiguration,textFormatters:h?.textFormatters||[],disableMentions:h?.disableMentions,mentionsWarningText:h?.mentionsWarningText,mentionsWarningStyle:h?.mentionsWarningStyle,emojiIconURL:h?.emojiIconURL,hideLayoutMode:h?.hideLayoutMode,actionSheetStyle:h?.actionSheetStyle})}),!x&&m&&(T||M)?m(T,M,o):null]})};const Wl={user:void 0,group:void 0,hideMessageComposer:!1,disableTyping:!1,messageHeaderConfiguration:new r.MessageHeaderConfiguration({}),messageListConfiguration:new r.MessageListConfiguration({}),messageComposerConfiguration:new r.MessageComposerConfiguration({}),threadedMessagesConfiguration:new r.ThreadedMessagesConfiguration({}),detailsConfiguration:new r.DetailsConfiguration({}),customSoundForIncomingMessages:"",customSoundForOutgoingMessages:"",disableSoundForMessages:!1,messagesStyle:new r.MessagesStyle({width:"100%",height:"100%",background:"white",borderRadius:"none",border:"1px solid rgba(20, 20, 20, 0.1)"}),messageHeaderView:null,messageComposerView:null,messageListView:null,hideMessageHeader:!1,hideDetails:!1,auxiliaryMenu:null},Zl=e=>{const{theme:o}=t.useContext(R),{user:r,group:i,hideMessageComposer:a,disableTyping:l,messageHeaderConfiguration:c,messageListConfiguration:C,messageComposerConfiguration:g,threadedMessagesConfiguration:u,detailsConfiguration:p,customSoundForIncomingMessages:h,customSoundForOutgoingMessages:m,disableSoundForMessages:A,messagesStyle:x,messageHeaderView:b,messageComposerView:y,messageListView:w,hideMessageHeader:f,hideDetails:D,auxiliaryMenu:E}=e,[v,I]=t.useState(null),[S,F]=t.useState(r),[k,T]=t.useState(i),M=t.useRef(null),B=t.useRef(null),L=t.useRef(null),[U,P]=t.useState(!1),[O,j]=t.useState(!1),[V,G]=t.useState(!1),[H,Q]=t.useState(!1),N=t.useRef(null);t.useMemo((()=>r?(new s.CometChat.MessagesRequestBuilder).setUID(r.getUid()).setCategories(Re.getDataSource().getAllMessageCategories()).setTypes(Re.getDataSource().getAllMessageTypes()).setLimit(20).hideReplies(!0):i?(new s.CometChat.MessagesRequestBuilder).setGUID(i.getGuid()).setCategories(Re.getDataSource().getAllMessageCategories()).setTypes(Re.getDataSource().getAllMessageTypes()).setLimit(20).hideReplies(!0):void 0),[r,i]);let K=g?.LiveReactionIconURL||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAFAAAAAAnxZisAAACpElEQVQ4Ea1VzUsVURQ/5868UrEg/AMy0NTMRQRBJfIQszKxgh5ByzbVIooiiDbZBwUtXAWJtGgRJW0MQsxnxfhRIbgpsqcQtajoA8uITGfu3Hs6Z+zJU3pq+n4wc+fee87vd+bcM2cQ5mB0Z+0WMuERQNiNgO+UgtYAgs7K7uffM01fVlevyc9391iAo5bsOkT1gPdvlvd4Q5l2mJ68bahdG2rTwvMmB9HV1gKP0WWA3oSWzlc86rsj9qm6mkOuwgsKsMQSgeErxpEYS5oQOpSLp0u7vA9iGwmkdsWLlaGuPKXKJw3TyU4GYizEYG+OFglXAt7gOWomzoRY5TsO+Na+8pEaqpJ97/FeIuFUjX++X+C4jb+ZPBsUi3C0Wvb5OSaRZ0MBi0xY01GxvfYApuprtjkE/ZZAZXeZpkrnczF2Ek9oaKtCi2c4ogXJRUKIFyJP2zmolHLUSZeAGjWXQq4RcpHwMTVxIeCwVEuuIWfGSPGIl/9OcqohnA7QVWUCeMg1PyJ1nCsIl7ZmVIcqqSo97xen6aK8UC4SleZB5VwS7ijs8p7e9sDQLflIlos8R4FPdLs9Gb8rXJEAq5K7YurEpLHeckTEd8rYp77G483QHNXmTOJLuwZ/ukof9I0dWIqI+PjWDFqHEps870c6EzMCslCSfPYVQtzvG9MpDos5E7GZJrc9gfX3buju/5Qml3GWgCyUed7YtwmdYJHrLqqom8r6vyDfT0whsG3bqrzV+6oeD36ZazdvkCN1NYe5nq8xSRHndpYvd14Igca5dZxdn+xtm7WZMZlXQOxe18c3ukQtLLJDc0cUSPsOiJ6AMqfKugdeRItZbgsKiN/Q5s2xwqLCYw7hOWl3/FO5oj+OtVYODwdZeJe2LD+mVDxe/D/efwCuAQs2cnkFkQAAAABJRU5ErkJggg==",z="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E";const J=t.useCallback((e=>{U?P(!1):(P(!0),setTimeout((()=>{P(!1)}),1500))}),[U,P]),Y=t.useCallback((()=>{try{const e=n.CometChatMessageEvents.ccLiveReaction.subscribe((e=>{!V&&e&&"heart"===e&&J(e)})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{k&&k.getGuid()===i?.getGuid()&&(j(!1),G(!1),T(e))})),o=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{k?.getGuid()===e.leftGroup.getGuid()&&(v?.getUid()===e?.userLeft.getUid()&&(j(!1),G(!1)),T(e.leftGroup))})),r=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{S?.getUid()===e.getUid()&&(e.setBlockedByMe(!0),F(e))})),s=n.CometChatUserEvents.ccUserUnblocked.subscribe((e=>{S?.getUid()===e.getUid()&&(e.setBlockedByMe(!1),F(e))})),a=n.CometChatUIEvents.ccShowPanel.subscribe((e=>{e.position===n.PanelAlignment.messages&&(N.current=e.child,Q(!0))})),l=n.CometChatUIEvents.ccHidePanel.subscribe((e=>{e===n.PanelAlignment.messages&&(N.current=null,Q(!1))}));return()=>{try{e?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),r?.unsubscribe(),s?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe()}catch(e){console.log("error",e)}}}catch(e){console.log("error",e)}}),[V,J,j,G,k,S,v,i]),_=(e,t)=>{B.current=e,L.current=t,G(!0)},W=()=>j(!0),Z=()=>{j(!1)},X=()=>{B.current=null,L.current=null,G(!1)};function q(){if(e.detailsConfiguration?.data)return e.detailsConfiguration?.data(e.user,e.group)}const $=t.useCallback((()=>{if(c?.menu)return c.menu(S,k);const e=Re.getDataSource().getAuxiliaryHeaderMenu(S,k);return d.jsxs(d.Fragment,{children:[E||e.map((e=>e)),D?null:d.jsx("div",{className:"cc-messages__header-menu-wrapper",style:{height:"100%",width:"100%",border:"none",background:"transparent",borderRadius:0,marginLeft:"16px"},children:d.jsx("cometchat-button",{iconURL:z,buttonStyle:JSON.stringify(bi(o)),ref:M,onClick:W})})]})}),[c,S,k,E,D,z]);return function(e,n,o,r,i,a,l,c,C,d,g){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&n(e)}))}),[n]),t.useEffect((()=>{const e=r.current;if(!e)return;const t=e=>{i(!0)};return a?.menu?e.removeEventListener("cc-menu-clicked",t):e.addEventListener("cc-menu-clicked",t),()=>{e.removeEventListener("cc-menu-clicked",t)}}),[a,r,i]),t.useEffect((()=>{l&&(d(null),c((e=>(e?.getUid()!==l?.getUid()&&(i(!1),g(!1)),l))))}),[l,c,d,i,g]),t.useEffect((()=>{C&&(c(null),d((e=>(e?.getGuid()!==C?.getGuid()&&(i(!1),g(!1)),C))))}),[C,c,d,i,g]),t.useEffect((()=>{let t;return e&&(t=o()),()=>{t?.()}}),[e,o])}(v,I,Y,M,j,C,r??null,F,i??null,T,G),S||k?d.jsxs("div",{className:"cc-messages-wrapper",style:Ci(x,o),children:[H&&N.current?d.jsxs("div",{className:"cc-messages-wrapper__panel",style:yi,children:[N.current," "]}):null,d.jsxs("div",{className:"cc-messages",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",position:"relative",boxSizing:"border-box",justifyContent:"space-between",borderRadius:"inherit"},children:[f?null:d.jsx("div",{className:"cc-messages__header",style:ui,children:b||d.jsx(Xa,{user:S,group:k,subtitleView:c?.subtitleView?c.subtitleView(S,k):null,disableUsersPresence:c?.disableUsersPresence,protectedGroupIcon:c?.protectedGroupIcon,passwordGroupIcon:c?.passwordGroupIcon,privateGroupIcon:c?.privateGroupIcon,menu:$(),avatarStyle:c?.avatarStyle,statusIndicatorStyle:c?.statusIndicatorStyle,messageHeaderStyle:hi(c),listItemStyle:c?.listItemStyle,backButtonIconURL:c?.backButtonIconURL,hideBackButton:c?.hideBackButton,listItemView:c?.listItemView?c.listItemView(S,k):null,onError:c?.onError,onBack:c?.onBack,disableTyping:l})}),w||d.jsx("div",{className:"cc-messages__list",style:pi,children:d.jsx(Hl,{loadingIconURL:C?.loadingIconURL,user:S,group:k,emptyStateView:C?.emptyStateView,errorStateView:C?.errorStateView,loadingStateView:C?.loadingStateView,disableSoundForMessages:A,customSoundForMessages:h,disableReceipt:C?.disableReceipt,readIcon:C?.readIcon,deliveredIcon:C?.deliveredIcon,sentIcon:C?.sentIcon,waitIcon:C?.waitIcon,errorIcon:C?.errorIcon,alignment:C?.alignment,showAvatar:C?.showAvatar,scrollToBottomOnNewMessages:C?.scrollToBottomOnNewMessages,datePattern:C?.datePattern,timestampAlignment:C?.timestampAlignment,DateSeparatorPattern:C?.DateSeparatorPattern,templates:C?.templates,messagesRequestBuilder:C?.messagesRequestBuilder,thresholdValue:C?.thresholdValue,onThreadRepliesClick:C?.onThreadRepliesClick||_,headerView:C?.headerView,footerView:C?.footerView,avatarStyle:C?.avatarStyle,dateSeparatorStyle:C?.dateSeparatorStyle,messageListStyle:mi(C),onError:C?.onError,disableMentions:C?.disableMentions,hideDateSeparator:C?.hideDateSeparator,reactionsConfiguration:C?.reactionsConfiguration,disableReactions:C?.disableReactions,emojiKeyboardStyle:C?.emojiKeyboardStyle,threadIndicatorIcon:C?.threadIndicatorIcon,textFormatters:C?.textFormatters,messageInformationConfiguration:C?.messageInformationConfiguration,backdropStyle:C?.backdropStyle,hideError:C?.hideError})}),a?null:y||d.jsx("div",{className:"cc-messages__composer",style:{width:"100%",display:"flex"},children:a?null:d.jsx(Na,{sendButtonIconURL:g?.sendButtonIconURL,user:S,group:k,text:g?.text,headerView:g?.headerView?g.headerView(S,k):null,onTextChange:g?.onTextChange,attachmentIconURL:g?.attachmentIconURL,attachmentOptions:g?.attachmentOptions,secondaryButtonView:g?.secondaryButtonView,auxiliaryButtonView:g?.auxilaryButtonView,auxiliaryButtonAlignment:g?.auxiliaryButtonsAlignment,sendButtonView:g?.sendButtonView,emojiIconURL:g?.emojiIconURL,hideLiveReaction:g?.hideLiveReaction,LiveReactionIconURL:g?.LiveReactionIconURL,hideLayoutMode:g?.hideLayoutMode,actionSheetStyle:g?.actionSheetStyle,messageComposerStyle:Ai(g),onSendButtonClick:g?.onSendButtonClick,onError:g?.onError,disableSoundForMessages:A,customSoundForMessage:m,hideVoiceRecording:g?.hideVoiceRecording,voiceRecordingStartIconURL:g?.voiceRecordingStartIconURL,voiceRecordingCloseIconURL:g?.voiceRecordingCloseIconURL,voiceRecordingStopIconURL:g?.voiceRecordingStopIconURL,voiceRecordingSubmitIconURL:g?.voiceRecordingSubmitIconURL,AIOptionsStyle:g?.AIOptionsStyle,AIIconURL:g?.AIIconURL,userMemberWrapperConfiguration:g?.userMemberWrapperConfiguration,textFormatters:g?.textFormatters||[],disableMentions:g?.disableMentions,mentionsWarningText:g?.mentionsWarningText,mentionsWarningStyle:g?.mentionsWarningStyle,mediaRecorderStyle:g?.mediaRecorderStyle})})]}),V&&B.current?d.jsx("div",{className:"cc-messages__threaded",style:di,children:V&&B.current?d.jsx(_l,{parentMessage:B.current,onClose:u?.onClose||X,onError:u?.onError,closeIconURL:u?.closeIconURL,bubbleView:u?.bubbleView||L.current,messageActionView:u?.messageActionView?u.messageActionView(B.current):null,messageListConfiguration:u?.messageListConfiguration,messageComposerConfiguration:u?.messageComposerConfiguration,threadedMessagesStyle:u?.threadedMessagesStyle,hideMessageComposer:u?.hideMessageComposer,messageComposerView:u?.messageComposerView,messageListView:u?.messageListView}):null}):null,U?d.jsx("div",{className:"cc-messages__live-reaction",style:{position:"absolute",bottom:"50px",right:"20px",width:"50%",height:"100%"},children:d.jsx("cometchat-live-reaction",{reactionIconURL:K,liveReactionStyle:JSON.stringify({height:"20px",width:"25px",background:g?.messageComposerStyle?.liveReactionIconTint||"red"})})}):null,O?d.jsx("div",{className:"cc-messages__details",style:gi,children:d.jsx(qi,{user:S,group:k,closeButtonIconURL:p?.closeButtonIconURL||"./assets/close2x.svg",hideProfile:p?.hideProfile,subtitleView:p?.subtitleView,customProfileView:p?.customProfileView,data:q(),disableUsersPresence:p?.disableUsersPresence,privateGroupIcon:p?.privateGroupIcon,protectedGroupIcon:p?.protectedGroupIcon,passwordGroupIcon:p?.passwordGroupIcon,onError:p?.onError,onClose:p?.onClose||Z,leaveDialogStyle:p?.leaveDialogStyle,statusIndicatorStyle:p?.statusIndicatorStyle,avatarStyle:p?.avatarStyle,detailsStyle:xi(p),listItemStyle:p?.listItemStyle,groupMembersConfiguration:p?.groupMembersConfiguration,addMembersConfiguration:p?.addMembersConfiguration,bannedMembersConfiguration:p?.bannedMembersConfiguration,transferOwnershipConfiguration:p?.transferOwnershipConfiguration})}):null]}):null};Zl.defaultProps=Wl;const Xl={user:void 0,group:void 0,isMobileView:!1,messageText:"",conversationsWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),conversationsConfiguration:new r.ConversationsConfiguration({}),onError:e=>{console.log(e)},startConversationConfiguration:new r.ContactsConfiguration({}),startConversationIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FNew%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FNew%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9288822%2C11.8990317%20L7.62932866%2C12.3710104%20L8.10043948%2C9.07071466%20L16.5857676%2C0.585763632%20C17.3668205%2C-0.195254544%2018.6331574%2C-0.195254544%2019.4142103%2C0.585763632%20C20.1952632%2C1.36678181%2020.1952632%2C2.63306247%2019.4142103%2C3.41408064%20L10.9288822%2C11.8990317%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2215.6426571%22%20y1%3D%221.52883225%22%20x2%3D%2218.4710998%22%20y2%3D%224.35714926%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C12.0003604%20L16%2C18.6667267%20C16%2C19.4030732%2015.4030369%2C20%2014.6666577%2C20%20L1.33333252%2C20%20C0.596953301%2C20%200%2C19.4030732%200%2C18.6667267%20L0%2C5.33399414%20C0%2C4.59764765%200.596953301%2C4.00072088%201.33333252%2C4.00072088%20L8%2C4.00072088%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"},ql=e=>{const{theme:o}=t.useContext(R),{user:i,group:a,isMobileView:l,messageText:c,conversationsWithMessagesStyle:C,messagesConfiguration:g,conversationsConfiguration:u,startConversationConfiguration:p,onError:h,startConversationIconURL:m}=e,[A,y]=t.useState(null),[w,f]=t.useState(null),[D,E]=t.useState(i??null),[v,I]=t.useState(a??null),[S,F]=t.useState(!1),k=t.useRef(null),T=b(h);k.current=w;const[M,B]=x(null),L=t.useCallback((async()=>{try{let e=D?n.CometChatUIKitConstants.MessageReceiverType.user:n.CometChatUIKitConstants.MessageReceiverType.group,t=D?D?.getUid():v?.getGuid();"string"==typeof t&&f(await s.CometChat.getConversation(t,e))}catch(e){T(e)}}),[D,v,f,T]),U=()=>{E(null),I(null),f(null)},P=e=>{try{if(k.current=e,f(e),e.getConversationType()&&e.getConversationType()===n.CometChatUIKitConstants.MessageReceiverType.user)I(null),E(e.getConversationWith());else{if(!e.getConversationType()||e.getConversationType()!==n.CometChatUIKitConstants.MessageReceiverType.group)return;E(null),I(e.getConversationWith())}}catch(e){T(e)}},O=t.useCallback(((e,t,n)=>{const o=k.current,r=A||n,i=r?.getUid()===t.getUid(),a=e.getActionFor()instanceof s.CometChat.Group;if(i&&o&&o.getConversationWith()instanceof s.CometChat.Group){let t=o.getConversationWith();if(a){e.getActionFor().getGuid()===t.getGuid()&&(f(null),I(null),E(null))}}}),[A,y,D,v,k]),j=t.useCallback((e=>{try{const t=e.getConversationType(),o=e.getConversationWith();if(t===n.CometChatUIKitConstants.MessageReceiverType.user&&D&&D.getUid()===o.getUid())E(null);else{if(t!==n.CometChatUIKitConstants.MessageReceiverType.group||!v||v.getGuid()!==o.getGuid())return;I(null)}}catch(e){T(e)}}),[v,I,D,E,T]),V=t.useCallback((()=>{try{const e=n.CometChatConversationEvents.ccConversationDeleted.subscribe((e=>{j(e)})),t=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{v&&v.getGuid()===e.getGuid()&&(f(null),I(null))})),o=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{v&&v.getGuid()===e?.userAddedIn.getGuid()&&I(e?.userAddedIn)})),i=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{v&&v.getGuid()===e?.kickedFrom.getGuid()&&I(e?.kickedFrom)})),a=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{v&&v.getGuid()===e?.joinedGroup.getGuid()&&I(e?.joinedGroup)})),l=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{v&&v.getGuid()===e?.kickedFrom.getGuid()&&I(e?.kickedFrom)})),c=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{v&&v.getGuid()===e?.group.getGuid()&&(I(e?.group),f((t=>{if(t){let n=r.CometChatUIKitUtility.clone(t);return n.setConversationWith(e?.group),n}return t})))})),C=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{v&&v.getGuid()===e?.leftGroup.getGuid()&&A?.getUid()===e?.userLeft?.getUid()&&(I(null),f(null))})),d=n.CometChatUIEvents.ccOpenChat.subscribe((e=>{const t=e.user?.getUid();t&&s.CometChat.getConversation(t,n.CometChatUIKitConstants.MessageReceiverType.user).then((e=>{P(e)}))}));return()=>{try{e?.unsubscribe(),t?.unsubscribe(),o?.unsubscribe(),i?.unsubscribe(),a?.unsubscribe(),l?.unsubscribe(),c?.unsubscribe(),C?.unsubscribe(),d?.unsubscribe()}catch(e){T(e)}}}catch(e){T(e)}}),[v,f,I,j,T,A]),G=()=>F(!1),H=S?null:d.jsx("cometchat-button",{ref:B,iconURL:m,buttonStyle:JSON.stringify(Ns(S,o)),children:" "}),Q=(e,t)=>{e?(I(null),E(e),G()):t&&(E(null),I(t),G())};return function(e,n,o,r,i,a,l,c,C,d,g,u,p,h){t.useEffect((()=>{let e;s.CometChat.getLoggedinUser().then((t=>(h&&(e=h(t)),n(t),()=>{e&&e()})),(e=>{r(e)}))}),[n,r]),t.useEffect((()=>{let t;return e&&(t=o(),i()),()=>{t?.()}}),[e,a,l,i,o]),t.useEffect((()=>{if(!c)return;async function e(){d?g():C()}const t="cc-button-clicked";return c.addEventListener(t,e),()=>{c.removeEventListener(t,e)}}),[c,C,g,d]),t.useEffect((()=>{u(a)}),[a,u]),t.useEffect((()=>{p(l)}),[l,p])}(A,y,V,T,L,i,a,M,(()=>F(!0)),S,G,E,I,(e=>{const t="ConversationWithMessages_Group_"+String(Date.now());return s.CometChat.addGroupListener(t,new s.CometChat.GroupListener({onGroupMemberKicked:(t,n)=>{O(t,n,e)},onGroupMemberBanned:(t,n)=>{O(t,n,e)}})),()=>s.CometChat.removeGroupListener(t)})),d.jsxs("div",{className:"cc-conversations-with-messages__wrapper",style:ks(C,o),children:[d.jsx("div",{className:"cc-conversations-with-messages__sidebar",style:Ts(C,o,l,D,v),children:d.jsx(fs,{activeConversation:w??void 0,onItemClick:u?.onItemClick||P,conversationsStyle:Os(u),subtitleView:u?.subtitleView,options:u?.options??void 0,disableUsersPresence:u?.disableUsersPresence,disableReceipt:u?.disableReceipt,disableTyping:u?.disableTyping,deliveredIcon:u?.deliveredIcon,readIcon:u?.readIcon,waitIcon:u?.waitIcon,errorIcon:u?.errorIcon,datePattern:u?.datePattern,receiptStyle:u?.receiptStyle,sentIcon:u?.sentIcon,privateGroupIcon:u?.privateGroupIcon,protectedGroupIcon:u?.protectedGroupIcon,passwordGroupIcon:u?.passwordGroupIcon,customSoundForMessages:u?.customSoundForMessages,conversationsRequestBuilder:u?.conversationsRequestBuilder,emptyStateView:u?.emptyStateView,onSelect:u?.onSelect,loadingIconURL:u?.loadingIconURL,errorStateView:u?.errorStateView,loadingStateView:u?.loadingStateView,titleAlignment:u?.titleAlignment,listItemView:u?.listItemView,menus:u?.menu||H,hideSeparator:u?.hideSeparator,hideError:u?.hideError,selectionMode:u?.selectionMode,disableSoundForMessages:u?.disableSoundForMessages,deleteConversationDialogStyle:u?.deleteConversationDialogStyle,avatarStyle:u?.avatarStyle,statusIndicatorStyle:u?.statusIndicatorStyle,badgeStyle:u?.badgeStyle,dateStyle:u?.dateStyle,listItemStyle:u?.listItemStyle,backdropStyle:Qs(C,u),disableMentions:u?.disableMentions,textFormatters:u?.textFormatters})}),S||!D&&!v?null:d.jsx("div",{className:"cc-conversations-with-messages__main",style:Ls(C,l,D,v),children:d.jsx(Zl,{auxiliaryMenu:g?.messageHeaderConfiguration.menu,user:D??void 0,group:v??void 0,messageHeaderConfiguration:{...g?.messageHeaderConfiguration,onBack:g?.messageHeaderConfiguration?.onBack||U,hideBackButton:!l,messageHeaderStyle:{...js(C,g,l),...g?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:g?.messageListConfiguration,messageComposerConfiguration:{...g?.messageComposerConfiguration,messageComposerStyle:{...Vs(C,g,l),...g?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:Gs(g?.messagesStyle,C),customSoundForIncomingMessages:g?.customSoundForIncomingMessages,customSoundForOutgoingMessages:g?.customSoundForOutgoingMessages,detailsConfiguration:g?.detailsConfiguration,disableSoundForMessages:g?.disableSoundForMessages,disableTyping:g?.disableTyping,hideMessageComposer:g?.hideMessageComposer,hideMessageHeader:g?.hideMessageHeader,messageComposerView:g?.messageComposerView?g?.messageComposerView(D,v):null,messageHeaderView:g?.messageHeaderView?g?.messageHeaderView(D,v):null,messageListView:g?.messageListView?g?.messageListView(D,v):null,hideDetails:g?.hideDetails,threadedMessagesConfiguration:g?.threadedMessageConfiguration})}),S||D||v?null:(()=>{const e=c||n.localize("NO_CHATS_SELECTED");return d.jsx("div",{className:"cc-decorator-message--empty",style:Hs(l,D,v),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(Ps(C,o))})})})(),S&&d.jsx(ci,{title:n.localize("NEW_CHAT"),usersTabTitle:n.localize("USERS"),groupsTabTitle:n.localize("GROUPS"),closeIconURL:p?.closeIconURL?p?.closeIconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",onItemClick:Q,onClose:p?.onClose?p?.onClose:G,tabVisibility:p?.tabVisibility,usersConfiguration:p?.usersConfiguration,groupsConfiguration:p?.groupsConfiguration,contactsStyle:p?.contactsStyle,hideSubmitButton:p?.hideSubmitButton,selectionLimit:p?.selectionLimit,selectionMode:p?.selectionMode})]})};ql.defaultProps=Xl;const $l={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},ec={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},tc={width:"calc(100% - 280px)",height:"100%"},nc={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},oc={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},rc={width:"280px",height:"100%",position:"relative"},sc=(e,t)=>({...ec,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),ic=(e,t,n,o)=>n?ac(o):lc(e,t),ac=e=>({...e?{visibility:"hidden"}:{visibility:"visible"},...nc,borderRadius:"inherit"}),lc=(e,t)=>{const n=e?.borderRadius||0;return{...rc,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},cc=(e,t,n)=>t?Cc(n):dc(e),Cc=e=>({...e?{visibility:"visible"}:{visibility:"hidden"},...nc,borderRadius:"inherit"}),dc=e=>{const t=e?.borderRadius||0;return{...tc,borderRadius:`0 ${t} ${t} 0`}},gc=(e,t)=>({...$l,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),uc=e=>{const t=e?.groupsStyle;return{width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...t}},pc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},hc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},mc=(e,t)=>{let n={visibility:"hidden"};return t||e||(n={visibility:"visible"}),{...oc,...n,width:"calc(100% - 280px)"}},Ac=e=>e?{...nc,background:"inherit",borderRadius:"inherit"}:{width:"calc(100% - 280px)",background:"inherit",borderRadius:"inherit"},xc=(e,t)=>{const o=e?.joinGroupStyle;return{width:o?.width||"100%",height:o?.height||"100%",boxShadow:o?.boxShadow||"none",background:o?.background||"transparent",border:o?.border||"0",borderRadius:o?.borderRadius||"inherit",titleTextFont:o?.titleTextFont||n.fontHelper(t.typography.heading),titleTextColor:o?.titleTextFont||t.palette.getAccent700(),passwordInputPlaceholderTextFont:o?.passwordInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),passwordInputPlaceholderTextColor:o?.passwordInputPlaceholderTextColor||t.palette.getAccent600(),passwordInputBackground:o?.passwordInputBackground||t.palette.getAccent50(),passwordInputBorder:o?.passwordInputBorder||"none",passwordInputBorderRadius:o?.passwordInputBorderRadius||"8px",passwordInputBoxShadow:o?.passwordInputBoxShadow||`${t.palette.getAccent50()} 0 0 0 1px`,passwordInputTextFont:o?.passwordInputTextFont||n.fontHelper(t.typography.subtitle1),passwordInputTextColor:o?.passwordInputTextColor||t.palette.getAccent(),joinButtonTextFont:o?.joinButtonTextFont||n.fontHelper(t.typography.title2),joinButtonTextColor:o?.joinButtonTextColor||t.palette.getBackground(),joinButtonBackground:o?.joinButtonBackground||t.palette.getPrimary(),joinButtonBorderRadius:o?.joinButtonBorderRadius||"8px",joinButtonBorder:o?.joinButtonBorder||"none",errorTextFont:o?.errorTextFont||n.fontHelper(t.typography.subtitle1),errorTextColor:o?.errorTextFont||t.palette.getError()}},bc=(e,t,o)=>{const r=t?.messageHeaderStyle;return{background:r?.background||"inherit",border:"none",borderRadius:r?.borderRadius||e?.borderRadius||"inherit",onlineStatusColor:r?.onlineStatusColor||o.palette.getSuccess(),privateGroupIconBackground:r?.privateGroupIconBackground||o.palette.getSuccess(),passwordGroupIconBackground:r?.passwordGroupIconBackground||"RGB(247, 165, 0)",backButtonIconTint:r?.backButtonIconTint||o.palette.getPrimary(),subtitleTextColor:r?.subtitleTextColor||o.palette.getAccent600(),subtitleTextFont:r?.subtitleTextFont||n.fontHelper(o.typography.subtitle2),typingIndicatorTextColor:r?.typingIndicatorTextColor||o.palette.getPrimary(),typingIndicatorTextFont:r?.typingIndicatorTextFont||n.fontHelper(o.typography.subtitle1)}},yc=(e,t)=>{const o=e?.listItemStyle;return{width:o?.width||"100%",height:o?.height||"45px",background:o?.background||"inherit",hoverBackground:o?.hoverBackground||"transparent",activeBackground:o?.activeBackground||"transparent",borderRadius:o?.borderRadius||"0",titleFont:o?.titleFont||n.fontHelper(t.typography.title2),titleColor:o?.titleColor||t.palette.getAccent(),border:o?.border||"none",separatorColor:o?.separatorColor||""}},wc=e=>({height:e?.height,width:e?.width,position:"absolute"}),fc=e=>{if(e)return{...nc,background:"inherit",borderRadius:"inherit"}},Dc=(e,t,o)=>{let r="360px",s="500px";o&&(r="100%",s="100%");const i=e?.createGroupStyle;return{width:i?.width||r,height:i?.height||s,border:i?.border||"0 none",borderRadius:i?.borderRadius||"0",background:i?.background||t.palette.getBackground(),boxShadow:i?.boxShadow||`${t.palette.getAccent100()} 4px 16px 32px 4px`,titleTextFont:i?.titleTextFont||n.fontHelper(t.typography.heading),titleTextColor:i?.titleTextColor||t.palette.getAccent(),groupTypeTextFont:i?.groupTypeTextFont||n.fontHelper(t.typography.text3),groupTypeBorder:i?.groupTypeBorder||"0 none",groupTypeBorderRadius:i?.groupTypeBorderRadius||"0px",groupTypeTextColor:i?.groupTypeTextColor||t.palette.getAccent(),groupTypeTextBackground:i?.groupTypeTextBackground||"inherit",groupTypeBackground:i?.groupTypeBackground||t.palette.getAccent100(),groupTypeBoxShadow:i?.groupTypeBoxShadow||"",activeGroupTypeTextFont:i?.activeGroupTypeTextFont||n.fontHelper(t.typography.text3),activeGroupTypeTextColor:i?.activeGroupTypeTextColor||t.palette.getAccent(),activeGroupTypeBackground:i?.activeGroupTypeBackground||t.palette.getAccent900(),activeGroupTypeBoxShadow:i?.activeGroupTypeBoxShadow||`${t.palette.getAccent200()} 0 3px 8px 0`,activeGroupTypeBorderRadius:i?.activeGroupTypeBorderRadius||"8px",activeGroupTypeBorder:i?.activeGroupTypeBorder||"none",groupTypeTextBoxShadow:i?.groupTypeTextBoxShadow||"none",groupTypeTextBorderRadius:i?.groupTypeTextBorderRadius||"7px",closeIconTint:i?.closeIconTint||t.palette.getPrimary(),errorTextFont:i?.errorTextFont||n.fontHelper(t.typography.text2),errorTextBackground:i?.errorTextBackground||t.palette.getError(),errorTextBorderRadius:i?.errorTextBorderRadius||"8px",errorTextBorder:i?.errorTextBorder||"none",errorTextColor:i?.errorTextColor||t.palette.getError(),nameInputPlaceholderTextFont:i?.nameInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),nameInputPlaceholderTextColor:i?.nameInputPlaceholderTextColor||t.palette.getAccent600(),nameInputBackground:i?.nameInputBackground||t.palette.getAccent100(),nameInputTextFont:i?.nameInputTextFont||n.fontHelper(t.typography.subtitle1),nameInputTextColor:i?.nameInputTextColor||t.palette.getAccent(),nameInputBorder:i?.nameInputBorder||"none",nameInputBorderRadius:i?.nameInputBorderRadius||"8px",nameInputBoxShadow:i?.nameInputBoxShadow||`${t.palette.getAccent100()} 0 0 0 1px`,passwordInputPlaceholderTextFont:i?.passwordInputPlaceholderTextFont||n.fontHelper(t.typography.subtitle1),passwordInputPlaceholderTextColor:i?.passwordInputPlaceholderTextColor||t.palette.getAccent600(),passwordInputBackground:i?.passwordInputBackground||t.palette.getAccent100(),passwordInputBorder:i?.passwordInputBorder||"none",passwordInputBorderRadius:i?.passwordInputBorderRadius||"8px",passwordInputBoxShadow:i?.passwordInputBoxShadow||`${t.palette.getAccent100()} 0 0 0 1px`,passwordInputTextFont:i?.passwordInputTextFont||n.fontHelper(t.typography.subtitle1),passwordInputTextColor:i?.passwordInputTextColor||t.palette.getAccent(),createGroupButtonTextFont:i?.createGroupButtonTextFont||n.fontHelper(t.typography.title2),createGroupButtonTextColor:i?.createGroupButtonTextColor||t.palette.getAccent("dark"),createGroupButtonBackground:i?.createGroupButtonBackground||t.palette.getPrimary(),createGroupButtonBorderRadius:i?.createGroupButtonBorderRadius||"8px",createGroupButtonBorder:i?.createGroupButtonBorder||"none"}},Ec=e=>({height:"24px",width:"24px",border:"none",borderRadius:"0",background:"transparent",buttonIconTint:`${e.palette.getPrimary()}`,padding:"0"});const vc=De({tagName:"cometchat-create-group",elementClass:o.CometChatCreateGroup,react:t}),Ic={group:void 0,isMobileView:!1,messageText:"",groupsWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),groupsConfiguration:new r.GroupsConfiguration({}),createGroupConfiguration:new r.CreateGroupConfiguration({}),joinGroupConfiguration:new r.JoinGroupConfiguration({}),onError:e=>{console.log(e)}},Sc=e=>{const{theme:r}=t.useContext(R),{group:i,isMobileView:a,messageText:l,groupsWithMessagesStyle:c,messagesConfiguration:C,groupsConfiguration:g,createGroupConfiguration:u,joinGroupConfiguration:p,onError:h}=e,m=u?.createClick,A=p?.onError,y=p?.joinClick,[w,f]=t.useState(null),[D,E]=x(null),[v,I]=x(null),S=t.useRef(null),[F,k]=t.useState(!1),[T,M]=t.useState(!1),B=t.useRef(void 0),[L,U]=t.useState(i??void 0),[P,O]=t.useState(null),j=b(h),V=De({tagName:"cometchat-join-group",elementClass:o.CometChatJoinGroup,react:t,events:{ccCloseClicked:"cc-close-clicked"}}),G=t.useCallback((()=>{k(!1)}),[]),H=()=>{B.current=void 0,M(!1)},Q=e=>{try{if(O(null),M(!1),e.getHasJoined())return void U(e);if(e.getType()===n.CometChatUIKitConstants.GroupTypes.password)return U(void 0),B.current=e,void M(!0);s.CometChat.joinGroup(e).then((e=>{U(e)}),(e=>{j(e)}))}catch(e){j(e)}},N=t.useCallback((e=>{try{let t=e?.detail?.response;M(!1),B.current=void 0,t&&U(t)}catch(e){j(e)}}),[U,B,M,j]),K=t.useCallback((()=>{try{const e=n.CometChatGroupEvents.ccGroupDeleted.subscribe((e=>{L&&L.getGuid()===e.getGuid()&&U(void 0)})),t=n.CometChatGroupEvents.ccGroupCreated.subscribe((e=>{e&&(U(e),k(!1))})),o=n.CometChatGroupEvents.ccGroupMemberAdded.subscribe((e=>{L&&L.getGuid()===e?.userAddedIn.getGuid()&&(U(e?.userAddedIn),k(!1))})),r=n.CometChatGroupEvents.ccGroupMemberBanned.subscribe((e=>{L&&L.getGuid()===e?.kickedFrom.getGuid()&&U(e?.kickedFrom)})),s=n.CometChatGroupEvents.ccGroupMemberJoined.subscribe((e=>{B.current&&B.current.getGuid()===e?.joinedGroup.getGuid()&&(H(),U(e?.joinedGroup))})),i=n.CometChatGroupEvents.ccGroupMemberKicked.subscribe((e=>{L&&L.getGuid()===e?.kickedFrom.getGuid()&&U(e?.kickedFrom)})),a=n.CometChatGroupEvents.ccOwnershipChanged.subscribe((e=>{L&&L.getGuid()===e?.group.getGuid()&&U(e?.group)})),l=n.CometChatGroupEvents.ccGroupLeft.subscribe((e=>{L&&L.getGuid()===e?.leftGroup.getGuid()&&w?.getUid()===e?.userLeft?.getUid()&&U(void 0)})),c=n.CometChatUIEvents.ccOpenChat.subscribe((e=>{const t=e.user;t&&(U(void 0),O(t))}));return()=>{e.unsubscribe(),o.unsubscribe(),r.unsubscribe(),s.unsubscribe(),i.unsubscribe(),a.unsubscribe(),l.unsubscribe(),t.unsubscribe(),c.unsubscribe()}}catch(e){j(e)}}),[L,U,B,O,k,j,w]),z=t.useCallback((e=>{if(!a)return null;let t=p?.messageHeaderConfiguration;return d.jsx("div",{slot:"headerView",style:{position:"absolute",top:"0",left:"0"},children:d.jsx(Xa,{group:e,subtitleView:t?.subtitleView?t?.subtitleView(null,e):null,disableUsersPresence:t?.disableUsersPresence,protectedGroupIcon:t?.protectedGroupIcon,passwordGroupIcon:t?.passwordGroupIcon,privateGroupIcon:t?.privateGroupIcon,menu:t?.menu,messageHeaderStyle:bc(c,t,r),backButtonIconURL:t?.backButtonIconURL,hideBackButton:t?.hideBackButton||!1,onError:t?.onError,onBack:t?.onBack||H,listItemStyle:yc(t,r),statusIndicatorStyle:t?.statusIndicatorStyle,avatarStyle:t?.avatarStyle})})}),[c,a,p?.messageHeaderConfiguration,r]),J=()=>d.jsx(vc,{createGroupStyle:Dc(u,r,a),closeButtonIconURL:u?.closeButtonIconURL,ref:E,hideCloseButton:u?.hideCloseButton||!1});const Y=t.useCallback((()=>d.jsx("cometchat-icon-button",{iconURL:"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%229%22%20y1%3D%220%22%20x2%3D%229%22%20y2%3D%2218%22%20id%3D%22Path-10%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%229%22%20x2%3D%2218%22%20y2%3D%229%22%20id%3D%22Path-11%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E",hoverText:n.localize("CREATE_GROUP"),buttonStyle:JSON.stringify(Ec(r)),ref:S})),[r]);return function(e,n,o,r,i,a,l,c,C,d,g,u,p,h,m,A,x,b,y){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{n(e)}),(e=>{r(e)}))}),[n,r]),t.useEffect((()=>{if(e)return o()}),[e,o]),t.useEffect((()=>{const e=u.current;if(!e)return;const t=()=>{p()};return e.addEventListener("cc-button-clicked",t),()=>{e.removeEventListener("cc-button-clicked",t)}}),[p,u]),t.useEffect((()=>{i?(C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.hideBackButton=!1),a?.messageHeaderConfiguration&&(a.messageHeaderConfiguration.hideBackButton=!1)):(C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.hideBackButton=!0),a?.messageHeaderConfiguration&&(a.messageHeaderConfiguration.hideBackButton=!0))}),[i,a,C]),t.useEffect((()=>{c(l)}),[l,c]),t.useEffect((()=>{C?.messageHeaderConfiguration?.onBack||C?.messageHeaderConfiguration&&(C.messageHeaderConfiguration.onBack=d)}),[C,d]),t.useEffect((()=>{if(!m)return;const e="cc-joingroup-joined",t=e=>A(e);return m.addEventListener(e,t),()=>{m.removeEventListener(e,t)}}),[m,A]),t.useEffect((()=>{if(!g)return;const e="cc-creategroup-close-clicked",t=()=>h();return g.addEventListener(e,t),()=>{g.removeEventListener(e,t)}}),[g,h]),t.useEffect((()=>{if(g)return x?(g.createClick=x,()=>{g.createClick=null}):void 0}),[x,g]),t.useEffect((()=>{if(m)return y?(m.joinClick=y,()=>{m.joinClick=null}):void 0}),[y,m]),t.useEffect((()=>{if(m)return b?(m.onError=b,()=>{m.onError=null}):void 0}),[b,m])}(w,f,K,j,a,p,i,U,C,(()=>{O(null),U(void 0)}),D,S,(()=>k(!0)),G,v,N,m,A,y),d.jsx(d.Fragment,{children:d.jsxs("div",{className:"cc-groups-with-messages__wrapper",style:sc(c,r),children:[d.jsx("div",{className:"cc-groups-with-messages__sidebar",style:ic(c,r,a,L),children:d.jsx(ai,{activeGroup:L??void 0,hideSearch:g?.hideSearch,searchIconURL:g?.searchIconURL,searchRequestBuilder:g?.searchRequestBuilder,onItemClick:g?.onItemClick||Q,groupsStyle:uc(g),subtitleView:g?.subtitleView,options:g?.options??void 0,privateGroupIcon:g?.privateGroupIcon,passwordGroupIcon:g?.passwordGroupIcon,groupsRequestBuilder:g?.groupsRequestBuilder,emptyStateView:g?.emptyStateView,onSelect:g?.onSelect,loadingIconURL:g?.loadingIconURL,errorStateView:g?.errorStateView,loadingStateView:g?.loadingStateView,titleAlignment:g?.titleAlignment,listItemView:g?.listItemView,menus:g?.menu||Y(),hideSeparator:g?.hideSeparator,hideError:g?.hideError,selectionMode:g?.selectionMode,listItemStyle:g?.listItemStyle,avatarStyle:g?.avatarStyle,statusIndicatorStyle:g?.statusIndicatorStyle})}),L||P?d.jsx("div",{className:"cc-groups-with-messages__main",style:cc(c,a,L),children:d.jsx(Zl,{user:P||void 0,group:L||void 0,messageHeaderConfiguration:{...C?.messageHeaderConfiguration,onBack:C?.messageHeaderConfiguration?.onBack||H,hideBackButton:C?.messageHeaderConfiguration?.hideBackButton||!a,messageHeaderStyle:{...pc(c,C,a),...C?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:C?.messageListConfiguration,messageComposerConfiguration:{...C?.messageComposerConfiguration,messageComposerStyle:{...hc(c,C,a),...C?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:(_=C?.messagesStyle,W=c,{background:W?.background,..._}),customSoundForIncomingMessages:C?.customSoundForIncomingMessages,customSoundForOutgoingMessages:C?.customSoundForOutgoingMessages,detailsConfiguration:C?.detailsConfiguration,disableSoundForMessages:C?.disableSoundForMessages,disableTyping:C?.disableTyping,hideMessageComposer:C?.hideMessageComposer,hideMessageHeader:C?.hideMessageHeader,messageComposerView:C?.messageComposerView?C?.messageComposerView(P,L):null,messageHeaderView:C?.messageHeaderView?C?.messageHeaderView(P,L):null,messageListView:C?.messageListView?C?.messageListView(P,L):null,hideDetails:C?.hideDetails,threadedMessagesConfiguration:C?.threadedMessageConfiguration})}):null,L||P||T||B.current?null:(()=>{const e=l||n.localize("SELECT__GROUP");return d.jsx("div",{className:"cc-decorator-message--empty",style:mc(a,L),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(gc(c,r))})})})(),T&&!P&&!L&&B.current?d.jsx("div",{className:"cc-withmessages__joingroup",style:Ac(a),children:d.jsx(V,{group:B.current,joinGroupStyle:xc(p,r),children:z(B.current)})}):null,F?a?d.jsx("div",{className:"cc-withmessages__creategroup",style:fc(a),children:J()}):d.jsx("cometchat-backdrop",{backdropStyle:JSON.stringify(wc(c)),children:J()}):null]})});var _,W};Sc.defaultProps=Ic;const Fc={height:"100%",width:"100%",background:"transparent",border:"none",borderRadius:"0",textFont:"700 22px Inter, sans-serif",textColor:"rgba(20, 20, 20, 0.33)"},kc={display:"flex",height:"100%",width:"100%",boxSizing:"border-box",position:"relative"},Tc={width:"calc(100% - 280px)",height:"100%"},Mc={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},Bc={display:"flex",justifyContent:"center",alignItems:"center",background:"inherit",border:"none",borderRadius:"inherit",width:"100%",height:"auto"},Lc={width:"280px",height:"100%",position:"relative"},Uc=(e,t)=>({...kc,width:"100%",height:"100%",border:`1px solid ${t.palette.getAccent100()}`,borderRadius:"0",background:t.palette.getBackground(),...e}),Rc=(e,t,n,o)=>n?Pc(o):Oc(e,t),Pc=e=>({...e?{visibility:"hidden"}:{visibility:"visible"},...Mc,borderRadius:"inherit"}),Oc=(e,t)=>{const n=e?.borderRadius||0;return{...Lc,borderRight:e?.border||`1px solid ${t.palette.getAccent100()}`,borderRadius:`${n} 0 0 ${n}`}},jc=(e,t,n)=>t?Vc(n):Gc(e),Vc=e=>({...e?{visibility:"visible"}:{visibility:"hidden"},...Mc,borderRadius:"inherit"}),Gc=e=>{const t=e?.borderRadius||0;return{...Tc,borderRadius:`0 ${t} ${t} 0`}},Hc=(e,t)=>({...Fc,textFont:e?.messageTextFont||n.fontHelper(t.typography.title1),textColor:e?.messageTextColor||t.palette.getAccent600()}),Qc=e=>{const t=e?.usersStyle;return{width:"100%",height:"100%",border:"0 none",borderRadius:"inherit",background:"inherit",...t}},Nc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`${o} ${o} 0 0`:`0px ${o} 0px 0px`,...t?.messageHeaderConfiguration?.messageHeaderStyle}},Kc=(e,t,n)=>{const o=e?.borderRadius;return{borderRadius:n?`0 0 ${o} ${o}`:`0px 0 ${o} 0px`,...t?.messageComposerConfiguration?.messageComposerStyle}},zc=(e,t)=>{let n={visibility:"hidden"};return t||e||(n={visibility:"visible"}),{...Bc,...n,width:"calc(100% - 280px)"}},Jc=(e,t)=>{const n=e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.width||"320px",o=e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.height||"620px";return{...e?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle,width:t?"100vw":n,height:t?"100vh":o}};const Yc={user:void 0,isMobileView:!1,messageText:"",usersWithMessagesStyle:{},messagesConfiguration:new r.MessagesConfiguration({}),usersConfiguration:new r.UsersConfiguration({}),onError:e=>{console.log(e)}},_c=e=>{const{theme:o}=t.useContext(R),{user:r,isMobileView:i,messageText:a,usersWithMessagesStyle:l,messagesConfiguration:c,usersConfiguration:C,onError:g}=e,[u,p]=t.useState(r??void 0),h=()=>p(void 0),m=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)g(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);g(n)}}),[g]),A=e=>p(e),x=t.useCallback((()=>{try{const e=n.CometChatUserEvents.ccUserBlocked.subscribe((e=>{u&&u.getUid()===e.getUid()&&p(e)})),t=n.CometChatUserEvents.ccUserUnblocked.subscribe((e=>{u&&u.getUid()===e.getUid()&&p(e)}));return()=>{try{e?.unsubscribe(),t?.unsubscribe()}catch(e){m(e)}}}catch(e){m(e)}}),[u,p,m]);return function(e,n,o){t.useEffect((()=>e()),[e]),t.useEffect((()=>{o(n)}),[n,o])}(x,r,p),d.jsxs("div",{className:"cc-users-with-messages__wrapper",style:Uc(l,o),children:[d.jsx("div",{className:"cc-users-with-messages__sidebar",style:Rc(l,o,i,u),children:d.jsx($,{activeUser:u??void 0,hideSearch:C?.hideSearch,searchIconURL:C?.searchIconURL,searchRequestBuilder:C?.searchRequestBuilder,onItemClick:C?.onItemClick||A,usersStyle:Qc(C),subtitleView:C?.subtitleView,options:C?.options??void 0,usersRequestBuilder:C?.usersRequestBuilder,emptyStateView:C?.emptyStateView,onSelect:C?.onSelect,loadingIconURL:C?.loadingIconURL,errorStateView:C?.errorStateView,loadingStateView:C?.loadingStateView,tileAlignment:C?.titleAlignment,showSectionHeader:C?.showSectionHeader,listItemView:C?.listItemView,menus:C?.menu,hideSeparator:C?.hideSeparator,hideError:C?.hideError,selectionMode:C?.selectionMode,listItemStyle:C?.listItemStyle,disableUsersPresence:C?.disableUsersPresence,statusIndicatorStyle:C?.statusIndicatorStyle,avatarStyle:C?.avatarStyle})}),u?d.jsx("div",{className:"cc-users-with-messages__main",style:jc(l,i,u),children:d.jsx(Zl,{user:u,messageHeaderConfiguration:{...c?.messageHeaderConfiguration,onBack:c?.messageHeaderConfiguration?.onBack||h,hideBackButton:c?.messageHeaderConfiguration?.hideBackButton||!i,messageHeaderStyle:{...Nc(l,c,i),...c?.messageHeaderConfiguration?.messageHeaderStyle}},messageListConfiguration:{...c?.messageListConfiguration,messageInformationConfiguration:{messageInformationStyle:{...Jc(c,i)}}},messageComposerConfiguration:{...c?.messageComposerConfiguration,messageComposerStyle:{...Kc(l,c,i),...c?.messageComposerConfiguration?.messageComposerStyle}},messagesStyle:(b=c?.messagesStyle,y=l,{background:y?.background,...b}),customSoundForIncomingMessages:c?.customSoundForIncomingMessages,customSoundForOutgoingMessages:c?.customSoundForOutgoingMessages,detailsConfiguration:c?.detailsConfiguration,disableSoundForMessages:c?.disableSoundForMessages,disableTyping:c?.disableTyping,hideMessageComposer:c?.hideMessageComposer,hideMessageHeader:c?.hideMessageHeader,messageComposerView:c?.messageComposerView?c?.messageComposerView(u):void 0,messageHeaderView:c?.messageHeaderView?c?.messageHeaderView(u):void 0,messageListView:c?.messageListView?c?.messageListView(u):void 0,hideDetails:c?.hideDetails,threadedMessagesConfiguration:c?.threadedMessageConfiguration})}):null,d.jsx(d.Fragment,{children:u?null:(()=>{const e=a||n.localize("SELECT__USER");return d.jsx("div",{className:"cc-decorator-message--empty",style:zc(i,u),children:d.jsx("cometchat-label",{text:e,labelStyle:JSON.stringify(Hc(l,o))})})})()})]});var b,y};_c.defaultProps=Yc;class Wc extends r.BaseStyle{constructor(e){super({}),this.tabListHeight="100%",this.tabListWidth="100%",this.tabListBorder="0 none",this.tabListBorderRadius="0",this.tabListBackground="transparent",this.tabListBoxShadow="0",this.tabListPadding="0",this.tabPaneWidth="100%",this.tabPaneHeight="100%",Object.assign(this,e)}}Object.defineProperty(exports,"ActionSheetStyle",{enumerable:!0,get:function(){return o.ActionSheetStyle}}),Object.defineProperty(exports,"AvatarStyle",{enumerable:!0,get:function(){return o.AvatarStyle}}),Object.defineProperty(exports,"BackdropStyle",{enumerable:!0,get:function(){return o.BackdropStyle}}),Object.defineProperty(exports,"BadgeStyle",{enumerable:!0,get:function(){return o.BadgeStyle}}),Object.defineProperty(exports,"ButtonGroupStyle",{enumerable:!0,get:function(){return o.ButtonGroupStyle}}),Object.defineProperty(exports,"CallscreenStyle",{enumerable:!0,get:function(){return o.CallscreenStyle}}),Object.defineProperty(exports,"CardStyle",{enumerable:!0,get:function(){return o.CardStyle}}),Object.defineProperty(exports,"ChangeScopeStyle",{enumerable:!0,get:function(){return o.ChangeScopeStyle}}),Object.defineProperty(exports,"CheckboxStyle",{enumerable:!0,get:function(){return o.CheckboxStyle}}),Object.defineProperty(exports,"CometChatActionItem",{enumerable:!0,get:function(){return o.CometChatActionItem}}),Object.defineProperty(exports,"CometChatActionSheet",{enumerable:!0,get:function(){return o.CometChatActionSheet}}),Object.defineProperty(exports,"CometChatAvatar",{enumerable:!0,get:function(){return o.CometChatAvatar}}),Object.defineProperty(exports,"CometChatBackdrop",{enumerable:!0,get:function(){return o.CometChatBackdrop}}),Object.defineProperty(exports,"CometChatBadge",{enumerable:!0,get:function(){return o.CometChatBadge}}),Object.defineProperty(exports,"CometChatButton",{enumerable:!0,get:function(){return o.CometChatButton}}),Object.defineProperty(exports,"CometChatButtonGroup",{enumerable:!0,get:function(){return o.CometChatButtonGroup}}),Object.defineProperty(exports,"CometChatCallscreenWrapper",{enumerable:!0,get:function(){return o.CometChatCallscreenWrapper}}),Object.defineProperty(exports,"CometChatCard",{enumerable:!0,get:function(){return o.CometChatCard}}),Object.defineProperty(exports,"CometChatChangeScope",{enumerable:!0,get:function(){return o.CometChatChangeScope}}),Object.defineProperty(exports,"CometChatCheckbox",{enumerable:!0,get:function(){return o.CometChatCheckbox}}),Object.defineProperty(exports,"CometChatConfirmDialog",{enumerable:!0,get:function(){return o.CometChatConfirmDialog}}),Object.defineProperty(exports,"CometChatContextMenu",{enumerable:!0,get:function(){return o.CometChatContextMenu}}),Object.defineProperty(exports,"CometChatCreateGroup",{enumerable:!0,get:function(){return o.CometChatCreateGroup}}),Object.defineProperty(exports,"CometChatDate",{enumerable:!0,get:function(){return o.CometChatDate}}),Object.defineProperty(exports,"CometChatDivider",{enumerable:!0,get:function(){return o.CometChatDivider}}),Object.defineProperty(exports,"CometChatDocumentBubble",{enumerable:!0,get:function(){return o.CometChatDocumentBubble}}),Object.defineProperty(exports,"CometChatDraggable",{enumerable:!0,get:function(){return o.CometChatDraggable}}),Object.defineProperty(exports,"CometChatDropdown",{enumerable:!0,get:function(){return o.CometChatDropdown}}),Object.defineProperty(exports,"CometChatEmoji",{enumerable:!0,get:function(){return o.CometChatEmoji}}),Object.defineProperty(exports,"CometChatEmojiKeyboard",{enumerable:!0,get:function(){return o.CometChatEmojiKeyboard}}),Object.defineProperty(exports,"CometChatFullScreenViewer",{enumerable:!0,get:function(){return o.CometChatFullScreenViewer}}),Object.defineProperty(exports,"CometChatIcon",{enumerable:!0,get:function(){return o.CometChatIcon}}),Object.defineProperty(exports,"CometChatIconButton",{enumerable:!0,get:function(){return o.CometChatIconButton}}),Object.defineProperty(exports,"CometChatInput",{enumerable:!0,get:function(){return o.CometChatInput}}),Object.defineProperty(exports,"CometChatJoinGroup",{enumerable:!0,get:function(){return o.CometChatJoinGroup}}),Object.defineProperty(exports,"CometChatLabel",{enumerable:!0,get:function(){return o.CometChatLabel}}),Object.defineProperty(exports,"CometChatListItem",{enumerable:!0,get:function(){return o.CometChatListItem}}),Object.defineProperty(exports,"CometChatLiveReaction",{enumerable:!0,get:function(){return o.CometChatLiveReaction}}),Object.defineProperty(exports,"CometChatLoader",{enumerable:!0,get:function(){return o.CometChatLoader}}),Object.defineProperty(exports,"CometChatMediaRecorder",{enumerable:!0,get:function(){return o.CometChatMediaRecorder}}),Object.defineProperty(exports,"CometChatMenuList",{enumerable:!0,get:function(){return o.CometChatMenuList}}),Object.defineProperty(exports,"CometChatMessageInput",{enumerable:!0,get:function(){return o.CometChatMessageInput}}),Object.defineProperty(exports,"CometChatModal",{enumerable:!0,get:function(){return o.CometChatModal}}),Object.defineProperty(exports,"CometChatPopover",{enumerable:!0,get:function(){return o.CometChatPopover}}),Object.defineProperty(exports,"CometChatPreview",{enumerable:!0,get:function(){return o.CometChatPreview}}),Object.defineProperty(exports,"CometChatQuickView",{enumerable:!0,get:function(){return o.CometChatQuickView}}),Object.defineProperty(exports,"CometChatRadioButton",{enumerable:!0,get:function(){return o.CometChatRadioButton}}),Object.defineProperty(exports,"CometChatReceipt",{enumerable:!0,get:function(){return o.CometChatReceipt}}),Object.defineProperty(exports,"CometChatSearchInput",{enumerable:!0,get:function(){return o.CometChatSearchInput}}),Object.defineProperty(exports,"CometChatSingleSelect",{enumerable:!0,get:function(){return o.CometChatSingleSelect}}),Object.defineProperty(exports,"CometChatStatusIndicator",{enumerable:!0,get:function(){return o.CometChatStatusIndicator}}),Object.defineProperty(exports,"CometChatTextInput",{enumerable:!0,get:function(){return o.CometChatTextInput}}),Object.defineProperty(exports,"ConfirmDialogStyle",{enumerable:!0,get:function(){return o.ConfirmDialogStyle}}),Object.defineProperty(exports,"ContextMenuStyle",{enumerable:!0,get:function(){return o.ContextMenuStyle}}),Object.defineProperty(exports,"CreateGroupStyle",{enumerable:!0,get:function(){return o.CreateGroupStyle}}),Object.defineProperty(exports,"DateStyle",{enumerable:!0,get:function(){return o.DateStyle}}),Object.defineProperty(exports,"DocumentBubbleStyle",{enumerable:!0,get:function(){return o.DocumentBubbleStyle}}),Object.defineProperty(exports,"DropdownStyle",{enumerable:!0,get:function(){return o.DropdownStyle}}),Object.defineProperty(exports,"EmojiKeyboardStyle",{enumerable:!0,get:function(){return o.EmojiKeyboardStyle}}),Object.defineProperty(exports,"Emojis",{enumerable:!0,get:function(){return o.Emojis}}),Object.defineProperty(exports,"FileBubbleStyle",{enumerable:!0,get:function(){return o.FileBubbleStyle}}),Object.defineProperty(exports,"FullScreenViewerStyle",{enumerable:!0,get:function(){return o.FullScreenViewerStyle}}),Object.defineProperty(exports,"IconStyle",{enumerable:!0,get:function(){return o.IconStyle}}),Object.defineProperty(exports,"ImageBubbleStyle",{enumerable:!0,get:function(){return o.ImageBubbleStyle}}),Object.defineProperty(exports,"InputStyle",{enumerable:!0,get:function(){return o.InputStyle}}),Object.defineProperty(exports,"JoinGroupStyle",{enumerable:!0,get:function(){return o.JoinGroupStyle}}),Object.defineProperty(exports,"LabelStyle",{enumerable:!0,get:function(){return o.LabelStyle}}),Object.defineProperty(exports,"ListItemStyle",{enumerable:!0,get:function(){return o.ListItemStyle}}),Object.defineProperty(exports,"LoaderStyle",{enumerable:!0,get:function(){return o.LoaderStyle}}),Object.defineProperty(exports,"MediaRecorderStyle",{enumerable:!0,get:function(){return o.MediaRecorderStyle}}),Object.defineProperty(exports,"MenuListStyle",{enumerable:!0,get:function(){return o.MenuListStyle}}),Object.defineProperty(exports,"MessageInputStyle",{enumerable:!0,get:function(){return o.MessageInputStyle}}),Object.defineProperty(exports,"ModalStyle",{enumerable:!0,get:function(){return o.ModalStyle}}),Object.defineProperty(exports,"PopoverStyle",{enumerable:!0,get:function(){return o.PopoverStyle}}),Object.defineProperty(exports,"PreviewStyle",{enumerable:!0,get:function(){return o.PreviewStyle}}),Object.defineProperty(exports,"QuickViewStyle",{enumerable:!0,get:function(){return o.QuickViewStyle}}),Object.defineProperty(exports,"RadioButtonStyle",{enumerable:!0,get:function(){return o.RadioButtonStyle}}),Object.defineProperty(exports,"ReceiptStyle",{enumerable:!0,get:function(){return o.ReceiptStyle}}),Object.defineProperty(exports,"SearchInputStyle",{enumerable:!0,get:function(){return o.SearchInputStyle}}),Object.defineProperty(exports,"SingleSelectStyle",{enumerable:!0,get:function(){return o.SingleSelectStyle}}),Object.defineProperty(exports,"TextBubbleStyle",{enumerable:!0,get:function(){return o.TextBubbleStyle}}),Object.defineProperty(exports,"TextInputStyle",{enumerable:!0,get:function(){return o.TextInputStyle}}),Object.defineProperty(exports,"auxiliaryButtonAlignmentEnum",{enumerable:!0,get:function(){return o.auxiliaryButtonAlignmentEnum}}),Object.defineProperty(exports,"layoutType",{enumerable:!0,get:function(){return o.layoutType}}),exports.AIAssistBotDecorator=gt,exports.AIAssistBotExtension=ut,exports.AIConversationStarterDecorator=Dt,exports.AIConversationStarterExtension=Et,exports.AIConversationSummaryDecorator=Mt,exports.AIConversationSummaryExtension=Bt,exports.AIExtensionDataSource=Pe,exports.AISmartRepliesDecorator=Qt,exports.AISmartRepliesExtension=Nt,exports.CallingExtension=gn,exports.CallingExtensionDecorator=Cn,exports.ChatConfigurator=Re,exports.CollaborativeDocumentConfiguration=class{constructor(e){let{style:t,iconURL:n,optionIconURL:o,optionStyle:r}=e;this.style=t,this.iconURL=n,this.optionIconURL=o,this.optionStyle=r}getDocumentBubbleStyle(){return this.style}getIconURL(){return this.iconURL}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.CollaborativeDocumentExtension=mn,exports.CollaborativeDocumentExtensionDecorator=hn,exports.CollaborativeWhiteBoardExtensionDecorator=bn,exports.CollaborativeWhiteboardConfiguration=class{constructor(e){let{style:t,iconURL:n,optionIconURL:o,optionStyle:r}=e;this.style=t,this.iconURL=n,this.optionIconURL=o,this.optionStyle=r}getWhiteboardBubbleStyle(){return this.style}getIconURL(){return this.iconURL}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.CollaborativeWhiteboardExtension=yn,exports.CometChatAddMembers=Lr,exports.CometChatAvatarView=sl,exports.CometChatBannedMembers=Zr,exports.CometChatButtonView=tl,exports.CometChatCallButtons=an,exports.CometChatCallLogDetails=br,exports.CometChatCallLogHistory=Xo,exports.CometChatCallLogParticipants=ar,exports.CometChatCallLogRecordings=Ar,exports.CometChatCallLogs=Uo,exports.CometChatCallLogsWithDetails=Dr,exports.CometChatContacts=ci,exports.CometChatConversations=fs,exports.CometChatConversationsWithMessages=ql,exports.CometChatDateView=nl,exports.CometChatDetails=qi,exports.CometChatEmojiKeyboardView=$a,exports.CometChatGroupMembers=xe,exports.CometChatGroups=ai,exports.CometChatGroupsWithMessages=Sc,exports.CometChatIconButtonView=el,exports.CometChatIncomingCall=e=>{const{call:o,disableSoundForCalls:i=!1,customSoundForCalls:a="",onAccept:l,onDecline:c,acceptButtonText:C=n.localize("ACCEPT"),declineButtonText:g=n.localize("DECLINE"),subtitleView:u=null,listItemStyle:p={height:"100%",width:"100%"},avatarStyle:h={borderRadius:"16px",width:"38px",height:"38px"},incomingCallStyle:m={width:"fit-content",height:"fit-content"},onError:A=(e=>{console.log(e)})}=e,{theme:x}=t.useContext(R),[b,y]=t.useState(null),[w,f]=t.useState(!1),[D,E]=t.useState(!1),[v,I]=t.useState(!1),S=t.useRef(null),F=t.useRef(null),k=t.useRef(null),T=t.useRef(null),M=t.useRef(""),B=t.useRef(null),L=t.useRef(null);F.current={...ho(x),...h},k.current={...mo(x),...m},S.current={...Ao(k?.current,x),...p};const U=t.useRef({});U.current=(e=>({border:e?.acceptButtonBorder,borderRadius:e?.acceptButtonBorderRadius,background:e?.acceptButtonBackground,buttonTextFont:e?.acceptButtonTextFont,buttonTextColor:e?.acceptButtonTextColor,...po}))(k?.current);const P=t.useRef({});P.current=(e=>({border:e?.declineButtonBorder,borderRadius:e?.declineButtonBorderRadius,background:e?.declineButtonBackground,buttonTextFont:e?.declineButtonTextFont,buttonTextColor:e?.declineButtonTextColor,...po}))(k?.current);const O=t.useRef({});O.current={...xo(x)};const j=t.useRef(null);j.current=(e=>({height:"16px",width:"16px",iconTint:e?.subtitleTextColor||"RGBA(20, 20, 20, 0.68)"}))(k?.current);let V="incomingcall_"+(new Date).getTime(),G=n.localize("INCOMING_CALL");const H=t.useCallback((e=>{if(e instanceof s.CometChat.CometChatException)A(e);else{let t={code:e?.code,name:e?.name,message:e?.message,details:e?.details},n=new s.CometChat.CometChatException(t);A(n)}}),[A]),Q=t.useCallback((()=>{try{a?r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall,a):r.CometChatSoundManager.play(r.CometChatSoundManager.Sound.incomingCall)}catch(e){H(e)}}),[a,H]),N=t.useCallback((e=>{let t=!1;try{if(r.StorageUtils.getItem(n.CometChatUIKitConstants.calls.activecall)){let o=r.StorageUtils.getItem(n.CometChatUIKitConstants.calls.activecall);t=!(!o||o.sessionId!==e.getSessionId())}else t=!1;return t}catch(e){return H(e),t}}),[H]),K=t.useCallback(((e=n.CometChatUIKitConstants.calls.rejected)=>{try{r.CometChatSoundManager.pause(),c?c():"string"==typeof T?.current?.getSessionId()&&s.CometChat.rejectCall(T?.current?.getSessionId(),e).then((e=>{r.StorageUtils.setItem(n.CometChatUIKitConstants.calls.activecall,e),n.CometChatCallEvents.ccCallRejected.next(e),f(!1),T.current=null}),(e=>{H(e)}))}catch(e){H(e)}}),[c,H]),z=t.useCallback((e=>{try{if(!N(e)&&b?.getUid()!==e?.getSender()?.getUid()&&T.current)i||D||v||setTimeout((()=>{Q()}),100),D||v?(D||v)&&(r.CometChatSoundManager.pause(),K(n.CometChatUIKitConstants.calls.busy),n.CometChatCallEvents.ccCallRejected.next(e)):f(!0);else{if(b?.getUid()===e?.getSender()?.getUid())return void r.CometChatSoundManager.pause();r.CometChatSoundManager.pause(),K(n.CometChatUIKitConstants.calls.busy)}}catch(e){H(e)}}),[N,i,Q,K,H,b,D,v]),J=t.useCallback((e=>{if(e?.key===n.CometChatUIKitConstants.calls.activecall&&(e.newValue||e.oldValue)){let t;e.newValue?t=JSON.parse(e.newValue):e.oldValue&&(t=JSON.parse(e.oldValue)),T.current?.getSessionId()===t?.sessionId&&(r.CometChatSoundManager.pause(),T.current=null,f(!1))}}),[]),Y=()=>{E(!1),I(!1),T.current=null,M.current=""},_=t.useCallback((()=>{try{const e=n.CometChatCallEvents.ccCallEnded.subscribe((e=>{Y()})),t=n.CometChatCallEvents.ccOutgoingCall.subscribe((()=>{I(!0)}));return()=>{try{e?.unsubscribe(),t?.unsubscribe()}catch(e){H(e)}}}catch(e){H(e)}}),[H]),W=t.useCallback((()=>{try{r.StorageUtils.attachChangeDetection(J),s.CometChat.addCallListener(V,new s.CometChat.CallListener({onIncomingCallReceived:e=>{T.current?.getSender()?.getUid()!==e.getSender()?.getUid()&&(T.current=e,z(e))},onIncomingCallCancelled:e=>{r.CometChatSoundManager.pause(),T.current=null,f(!1)},onOutgoingCallAccepted:e=>{r.CometChatSoundManager.pause(),e.getSender()?.getUid()===b?.getUid()&&(T.current=null,f(!1))},onOutgoingCallRejected:e=>{r.CometChatSoundManager.pause(),e.getSender()?.getUid()===b?.getUid()&&(T.current=null,f(!1))}}))}catch(e){H(e)}}),[J,z,H,V,b]),Z=t.useCallback((()=>{try{r.StorageUtils.detachChangeDetection(J),s.CometChat.removeCallListener(V)}catch(e){H(e)}}),[J,H,V]),X=t.useCallback((()=>{try{let e=s.CometChat.getActiveCall();return new Promise(((t,n)=>{if(!e)return t({success:!0});let o=e?.getSessionId();s.CometChat.endCall(o).then((e=>t(e)),(e=>n(e)))}))}catch(e){H(e)}}),[H]),q=t.useCallback((()=>{try{r.CometChatSoundManager.pause(),l?l():X()?.then((e=>{s.CometChat.acceptCall(T.current.getSessionId()).then((e=>{n.CometChatCallEvents.ccCallAccepted.next(e),r.StorageUtils.setItem(n.CometChatUIKitConstants.calls.activecall,e),E(!0),T.current=e,M.current=e?.getSessionId(),f(!1)}),(e=>{H(e)}))}),(e=>{H(e)}))}catch(e){}}),[X,H,l]);return function(e,o,r,i,a,l,c,C,d,g,u,p,h){t.useEffect((()=>{s.CometChat.getLoggedinUser().then((e=>{e&&o(e)}))}),[o]),t.useEffect((()=>{let t;return e&&(t=i(),a()),()=>{l(),t?.()}}),[e,a,l,i]),t.useEffect((()=>{r&&(g.current=r,d(g.current))}),[r,g,d]),t.useEffect((()=>{const e=c?.current,t=C?.current;if(!e&&!t)return;const o=()=>{u()},r=()=>{p(n.CometChatUIKitConstants.calls.rejected)};return h?(e?.addEventListener("cc-button-clicked",o),t?.addEventListener("cc-button-clicked",r)):(e?.removeEventListener("cc-button-clicked",o),t?.removeEventListener("cc-button-clicked",r)),()=>{e?.removeEventListener("cc-button-clicked",o),t?.removeEventListener("cc-button-clicked",r)}}),[h,u,p,c,C])}(b,y,o,_,W,Z,L,B,z,T,q,K,w),d.jsxs(d.Fragment,{children:[T.current&&w?d.jsxs("div",{className:"cc-incomingcall__wrapper",style:ao(k?.current),children:[d.jsx("div",{className:"cc-incomingcall__listitem",style:Co,children:d.jsxs("cometchat-list-item",{title:T.current?.getSender()?.getName(),listItemStyle:JSON.stringify(S.current),hideSeparator:!0,children:[u?d.jsx("div",{slot:"subtitleView",className:"cc-incomingcall__subtitleview",children:u}):d.jsxs("div",{slot:"subtitleView",className:"cc-incomingcall__subtitleview",style:lo,children:[d.jsx("div",{className:"cc-call__icon",children:d.jsx("cometchat-icon",{iconStyle:JSON.stringify(j.current),URL:T.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio?"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E":"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"})}),d.jsx("cometchat-label",{className:"cc-call__type",text:G,labelStyle:JSON.stringify(co(k?.current))})]}),d.jsx("div",{slot:"tailView",className:"cc-incomingcall__tailview",style:go,children:d.jsx("div",{className:"tail__view",children:d.jsx("div",{className:"cc-incomingcall__avatar",children:d.jsx("cometchat-avatar",{avatarStyle:JSON.stringify(F.current),image:T.current?.getSender()?.getAvatar(),name:T.current?.getSender()?.getName()})})})})]})}),d.jsxs("div",{className:"cc-incomingcall-buttons",style:uo,children:[d.jsx("cometchat-button",{ref:B,buttonStyle:JSON.stringify(P.current),text:g}),d.jsx("cometchat-button",{ref:L,buttonStyle:JSON.stringify(U.current),text:C})]})]}):null,D&&T.current&&!w?d.jsx(zt,{ongoingCallStyle:O.current,sessionID:M.current,callSettingsBuilder:function(){let e=T.current?.getType()===n.CometChatUIKitConstants.MessageTypes.audio;if(T.current?.getType()===n.CometChatUIKitConstants.calls.meeting)return;const t=(new r.CometChatUIKitCalls.CallSettingsBuilder).enableDefaultLayout(!0).setIsAudioOnlyCall(e).setCallListener(new r.CometChatUIKitCalls.OngoingCallListener({onCallEnded:()=>{T.current?.getReceiverType()===n.CometChatUIKitConstants.MessageReceiverType.user&&s.CometChat.endCall(M.current).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(null),Y()})).catch((e=>{}))},onCallEndButtonPressed:()=>{s.CometChat.endCall(M.current).then((e=>{r.CometChatUIKitCalls.endSession(),n.CometChatCallEvents.ccCallEnded.next(e)})).catch((e=>{}))},onError:e=>{H(e)}})).build();return t}()}):null]})},exports.CometChatLabelView=ol,exports.CometChatList=T,exports.CometChatLoaderView=rl,exports.CometChatMessageBubble=Z,exports.CometChatMessageComposer=Na,exports.CometChatMessageHeader=Xa,exports.CometChatMessageInformation=Ol,exports.CometChatMessageList=Hl,exports.CometChatMessages=Zl,exports.CometChatOngoingCall=zt,exports.CometChatOutgoingCall=rn,exports.CometChatReactionsView=qa,exports.CometChatReceiptView=il,exports.CometChatTabs=so,exports.CometChatThemeContext=R,exports.CometChatThreadedMessages=_l,exports.CometChatTransferOwnership=Wi,exports.CometChatUIKit=Xn,exports.CometChatUserMemberWrapper=be,exports.CometChatUsers=$,exports.CometChatUsersWithMessages=_c,exports.DataSource=class{},exports.DataSourceDecorator=Oe,exports.ExtensionsDataSource=dn,exports.ImageModerationConfiguration=class{constructor(e){this.style=e.style,this.confirmDialogStyle=e.confirmDialogStyle,this.backDropStyle=e.backDropStyle}getImageModerationStyle(){return this.style}getConfirmDialogSyle(){return this.confirmDialogStyle}getBackDropStyle(){return this.backDropStyle}},exports.ImageModerationExtension=Sn,exports.ImageModerationExtensionDecorator=In,exports.LinkPreviewConfiguration=class{constructor(e){this.style=e.style}getLinkPreviewStyle(){return this.style}},exports.LinkPreviewExtension=Mn,exports.LinkPreviewExtensionDecorator=Tn,exports.MessageTranslationConfiguration=class{constructor(e){let{style:t,optionIconURL:n,optionStyle:o}=e;this.style=t,this.optionIconURL=n,this.optionStyle=o}getMessageTranslationStyle(){return this.style}getOptionIconURL(){return this.optionIconURL}getOptionStyle(){return this.optionStyle}},exports.MessageTranslationExtension=Rn,exports.MessageTranslationExtensionDecorator=Un,exports.MessagesDataSource=Ue,exports.PollsConfiguration=io,exports.PollsExtension=Vn,exports.PollsExtensionDecorator=jn,exports.SmartRepliesConfiguration=class{constructor(e){this.style=e.style}getSmartRepliesStyle(){return this.style}},exports.SmartReplyExtension=Qn,exports.SmartReplyExtensionDecorator=Hn,exports.StickersConfiguration=class{constructor(e){let{style:t,stickerIconURL:n,closeIconURL:o}=e;this.style=t,this.stickerIconURL=n,this.closeIconURL=o}getStickersStyle(){return this.style}getStickerIconURL(){return this.stickerIconURL}getCloseIconURL(){return this.closeIconURL}},exports.StickersExtension=Jn,exports.StickersExtensionDecorator=zn,exports.TabsStyle=Wc,exports.TextModeratorExtension=_n,exports.TextModeratorExtensionDecorator=Yn,exports.ThumbnailGenerationExtension=Zn,exports.ThumbnailGenerationExtensionDecorator=Wn,Object.keys(n).forEach((function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),Object.keys(r).forEach((function(e){"default"===e||exports.hasOwnProperty(e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})})); //# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index 40cd1f0e..ff7b4e6b 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../node_modules/react/jsx-runtime.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../src/CometChatUsers/style.ts","../src/CometChatCustomHooks.ts","../src/Shared/Views/CometChatCheckbox/index.tsx","../src/Shared/Views/CometChatCheckbox/hooks.ts","../src/Shared/Views/CometChatList/style.ts","../src/Shared/Views/CometChatList/index.tsx","../src/Shared/Views/CometChatList/hooks.ts","../src/Shared/Views/CometChatListItem/assets/LoadingIcon.svg","../src/Shared/Views/CometChatListItem/index.tsx","../src/Shared/Views/CometChatListItem/hooks.ts","../src/Shared/Views/CometChatMenuList/index.tsx","../src/Shared/Views/CometChatMenuList/hooks.ts","../src/Shared/Views/CometChatRadioButton/index.tsx","../src/Shared/Views/CometChatRadioButton/hooks.ts","../src/CometChatThemeContext.ts","../src/CometChatUsers/controller.ts","../src/CometChatUsers/assets/search.svg","../src/CometChatUsers/assets/spinner.svg","../src/CometChatUsers/index.tsx","../src/CometChatUsers/hooks.ts","../src/CometChatGroupMembers/style.ts","../src/Shared/Views/CometChatButton/index.tsx","../src/Shared/Views/CometChatButton/hooks.ts","../src/CometChatGroupMembers/assets/down-arrow.svg","../src/CometChatGroupMembers/controller.ts","../src/CometChatGroupMembers/assets/more-icon.svg","../src/CometChatGroupMembers/assets/search.svg","../src/CometChatGroupMembers/assets/backbutton.svg","../src/CometChatGroupMembers/assets/spinner.svg","../src/CometChatGroupMembers/index.tsx","../src/CometChatGroupMembers/hooks.ts","../src/CometChatUserMemberWrapper/index.tsx","../node_modules/@lit-labs/react/create-component.js","../src/Shared/Utils/MessagesDataSource.tsx","../src/Shared/Utils/assets/editicon.svg","../src/Shared/Utils/assets/deleteicon.svg","../src/Shared/Utils/assets/addreaction.svg","../src/Shared/Utils/assets/threadicon.svg","../src/Shared/Utils/assets/send-message-in-private.svg","../src/Shared/Utils/assets/Copy.svg","../src/Shared/Utils/assets/Info.svg","../src/Shared/Utils/assets/placeholder.png","../src/Shared/Utils/assets/download.svg","../src/Shared/Utils/assets/close2x.svg","../src/Shared/Utils/assets/photolibrary.svg","../src/Shared/Utils/assets/video.svg","../src/Shared/Utils/assets/audio-file.svg","../src/Shared/Utils/assets/attachment-file.svg","../src/Shared/Framework/ChatConfigurator.ts","../src/Shared/Framework/AIExtensionDataSource.ts","../src/Shared/Framework/DataSourceDecorator.ts","../src/AI/AIAssistBot/utils.tsx","../src/AI/AIAssistBot/style.ts","../src/AI/assets/backbutton.svg","../src/AI/AIAssistBot/AIAssistBotOptionsView.tsx","../src/AI/assets/close2x.svg","../src/Shared/Views/CometChatMessageBubble/style.ts","../src/Shared/Views/CometChatContextMenu/style.ts","../src/Shared/Views/CometChatContextMenu/index.tsx","../src/Shared/Views/CometChatMessageBubble/assets/More.svg","../src/Shared/Views/CometChatMessageBubble/index.tsx","../src/AI/AIAssistBot/AIAssistBotChatView.tsx","../src/AI/assets/send.svg","../src/AI/AIAssistBot/AIAssistBotDecorator.tsx","../src/AI/AIAssistBot/AIAssistBotExtension.ts","../src/AI/AIConversationStarter/style.ts","../src/AI/assets/ai-empty.svg","../src/AI/assets/ai-error.svg","../src/AI/assets/loading.svg","../src/AI/AIConversationStarter/AIConversationStarterView.tsx","../src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx","../src/AI/AIConversationStarter/AIConversationStarterExtension.ts","../src/AI/AIConversationSummary/style.ts","../src/AI/AIConversationSummary/AIConversationSummaryView.tsx","../src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx","../src/AI/AIConversationSummary/AIConversationSummaryExtension.ts","../src/AI/AISmartReplies/style.ts","../src/AI/AISmartReplies/AISmartRepliesView.tsx","../src/AI/AISmartReplies/AISmartRepliesDecorator.tsx","../src/AI/AISmartReplies/AISmartRepliesExtension.ts","../src/Calling/CometChatOngoingCall/style.ts","../src/Calling/CometChatOngoingCall/index.tsx","../src/Calling/CometChatOngoingCall/assets/reduce-size.svg","../src/Calling/CometChatOngoingCall/assets/increase-size.svg","../src/Calling/CometChatOngoingCall/hooks.ts","../src/Calling/CometChatCallButtons/style.ts","../src/Calling/CometChatOutgoingCall/style.ts","../src/Calling/CometChatOutgoingCall/assets/close2x.svg","../src/Calling/CometChatOutgoingCall/index.tsx","../src/Calling/CometChatOutgoingCall/hooks.ts","../src/Calling/CometChatCallButtons/index.tsx","../src/Calling/CometChatCallButtons/assets/Audio-Call2x.svg","../src/Calling/CometChatCallButtons/assets/VideoCall2xIcon.svg","../src/Calling/CometChatCallButtons/hooks.ts","../src/Calling/CallingExtensionDecorator.tsx","../src/Calling/assets/Video-call2x.svg","../src/Calling/assets/Audio-Call.svg","../src/Calling/assets/Video-call.svg","../src/Shared/Framework/ExtensionsDataSource.ts","../src/Calling/CallingExtension.ts","../src/Extensions/CollaborativeDocument/assets/collaborativedocument.svg","../src/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx","../src/Extensions/CollaborativeDocument/CollaborativeDocumentExtension.ts","../src/Extensions/CollaborativeWhiteboard/assets/collaborativewhiteboard.svg","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.ts","../src/Extensions/ImageModeration/ImageModerationExtensionDecorator.tsx","../src/Extensions/ImageModeration/assets/close2x.svg","../src/Extensions/ImageModeration/assets/placeholder.png","../src/Extensions/ImageModeration/ImageModerationExtension.ts","../src/Extensions/LinkPreview/LinkPreviewExtensionDecorator.tsx","../src/Extensions/LinkPreview/LinkPreviewExtension.ts","../src/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.tsx","../src/Extensions/MessageTranslation/assets/translation.svg","../src/Extensions/MessageTranslation/MessageTranslationExtension.ts","../src/Extensions/Polls/PollsExtensionDecorator.tsx","../src/Extensions/Polls/assets/polls.svg","../src/Extensions/Polls/assets/delete.svg","../src/Extensions/Polls/assets/close.svg","../src/Extensions/Polls/assets/plus.svg","../src/Extensions/Polls/PollsExtension.ts","../src/Extensions/SmartReplies/SmartRepliesExtensionDecorator.tsx","../src/Extensions/SmartReplies/SmartRepliesExtension.ts","../src/Extensions/Stickers/StickersExtensionDecorator.tsx","../src/Extensions/Stickers/assets/Stickers.svg","../src/Extensions/Stickers/assets/close.svg","../src/Extensions/Stickers/StickersExtension.ts","../src/Extensions/TextModerator/TextModeratorExtensionDecorator.ts","../src/Extensions/TextModerator/TextModeratorExtension.ts","../src/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.ts","../src/Extensions/ThumbnailGeneration/assets/placeholder.png","../src/Extensions/ThumbnailGeneration/ThumbnailGenerationExtension.ts","../src/Shared/CometChatUIKit/CometChatUIKit.ts","../src/Shared/Views/CometChatTabs/style.ts","../src/Shared/Views/CometChatTabs/index.tsx","../src/Extensions/Polls/PollsConfiguration.ts","../src/Calling/CometChatIncomingCall/style.ts","../src/Calling/Utils/utils.ts","../src/Calling/CometChatCallLogs/style.ts","../src/Calling/CometChatCallLogs/index.tsx","../src/Calling/CometChatCallLogs/assets/LoadingIcon.svg","../src/Calling/CometChatCallLogs/assets/IncomingAudio.svg","../src/Calling/CometChatCallLogs/assets/IncomingVideo.svg","../src/Calling/CometChatCallLogs/assets/OutgoingAudio.svg","../src/Calling/CometChatCallLogs/assets/OutgoingVideo.svg","../src/Calling/CometChatCallLogs/assets/MissedAudio.svg","../src/Calling/CometChatCallLogs/assets/MissedVideo.svg","../src/Calling/CometChatCallLogs/assets/Info.svg","../src/Calling/CometChatCallLogs/hooks.ts","../src/Calling/CometChatCallLogDetails/style.ts","../src/Calling/Utils/CallDetailsUtils.tsx","../src/Calling/assets/side-arrow.svg","../src/Calling/CometChatCallLogHistory/style.ts","../src/Calling/CometChatCallLogHistory/index.tsx","../src/Calling/CometChatCallLogHistory/assets/backbutton.svg","../src/Calling/CometChatCallLogHistory/assets/LoadingIcon.svg","../src/Calling/CometChatCallLogHistory/hooks.ts","../src/Calling/CometChatCallLogParticipants/style.ts","../src/Calling/CometChatCallLogParticipants/index.tsx","../src/Calling/CometChatCallLogParticipants/assets/backbutton.svg","../src/Calling/CometChatCallLogRecordings/style.ts","../src/Calling/CometChatCallLogRecordings/index.tsx","../src/Calling/CometChatCallLogRecordings/assets/backbutton.svg","../src/Calling/CometChatCallLogRecordings/assets/download.svg","../src/Calling/CometChatCallLogDetails/index.tsx","../src/Calling/CometChatCallLogDetails/assets/backbutton.svg","../src/Calling/CometChatCallLogDetails/hooks.ts","../src/Calling/CometChatCallLogsWithDetails/style.ts","../src/Calling/CometChatCallLogsWithDetails/index.tsx","../src/Calling/CometChatCallLogsWithDetails/hooks.ts","../src/CometChatAddMembers/style.ts","../src/CometChatAddMembers/assets/search.svg","../src/CometChatAddMembers/assets/spinner.svg","../src/CometChatAddMembers/assets/backbutton.svg","../src/CometChatAddMembers/assets/close2x.svg","../src/CometChatAddMembers/index.tsx","../src/CometChatAddMembers/hooks.ts","../src/CometChatBannedMembers/style.ts","../src/CometChatBannedMembers/assets/close2x.svg","../src/CometChatBannedMembers/controller.ts","../src/CometChatBannedMembers/assets/search.svg","../src/CometChatBannedMembers/assets/spinner.svg","../src/CometChatBannedMembers/assets/backbutton.svg","../src/CometChatBannedMembers/index.tsx","../src/CometChatBannedMembers/hooks.ts","../src/CometChatConversations/style.ts","../src/CometChatConversations/controller.ts","../src/CometChatConversations/assets/locked.svg","../src/CometChatConversations/assets/message-delivered.svg","../src/CometChatConversations/assets/message-read.svg","../src/CometChatConversations/assets/message-sent.svg","../src/CometChatConversations/assets/private.svg","../src/CometChatConversations/assets/spinner.svg","../src/CometChatConversations/assets/wait.svg","../src/CometChatConversations/assets/warning-small.svg","../src/CometChatConversations/index.tsx","../src/CometChatConversations/assets/thread-arrow.svg","../src/CometChatConversations/hooks.ts","../src/CometChatConversationsWithMessages/style.ts","../src/CometChatContacts/style.ts","../src/CometChatGroups/style.ts","../src/CometChatGroups/controller.ts","../src/CometChatGroups/assets/locked.svg","../src/CometChatGroups/assets/private.svg","../src/CometChatGroups/assets/search.svg","../src/CometChatGroups/assets/spinner.svg","../src/CometChatGroups/index.tsx","../src/CometChatGroups/hooks.ts","../src/CometChatContacts/index.tsx","../src/CometChatMessages/style.ts","../src/CometChatDetails/style.ts","../src/CometChatDetails/assets/backbutton.svg","../src/CometChatDetails/assets/close2x.svg","../src/CometChatTransferOwnership/style.ts","../src/CometChatTransferOwnership/assets/search.svg","../src/CometChatTransferOwnership/assets/spinner.svg","../src/CometChatTransferOwnership/index.tsx","../src/CometChatTransferOwnership/hooks.ts","../src/CometChatDetails/assets/locked.svg","../src/CometChatDetails/assets/private.svg","../src/CometChatDetails/index.tsx","../src/CometChatDetails/hooks.ts","../src/CometChatMessageComposer/style.ts","../src/CometChatMessageComposer/assets/ai-bot.svg","../src/CometChatMessageComposer/assets/close.svg","../src/CometChatMessageComposer/assets/heart.svg","../src/CometChatMessageComposer/assets/InfoSimpleIcon.svg","../src/CometChatMessageComposer/assets/mic.svg","../src/CometChatMessageComposer/assets/plus.svg","../src/CometChatMessageComposer/assets/plus-rotated.svg","../src/CometChatMessageComposer/assets/send.svg","../src/CometChatMessageComposer/assets/stipop.svg","../src/CometChatMessageComposer/assets/stop.svg","../src/CometChatMessageComposer/index.tsx","../src/CometChatMessageComposer/hooks.ts","../src/CometChatMessageHeader/style.ts","../src/CometChatMessageHeader/assets/backbutton.svg","../src/CometChatMessageHeader/assets/Locked.svg","../src/CometChatMessageHeader/assets/Private.svg","../src/CometChatMessageHeader/index.tsx","../src/CometChatMessageHeader/hooks.ts","../src/Shared/Views/LitElementsWrapper/LitElementsWrapper.tsx","../src/CometChatMessageList/style.ts","../src/CometChatMessageInformation/style.ts","../src/Shared/Utils/MessageUtils.tsx","../src/CometChatMessageInformation/assets/message-read.svg","../src/CometChatMessageInformation/assets/spinner.svg","../src/CometChatMessageInformation/assets/warning-small.svg","../src/CometChatMessageInformation/index.tsx","../src/CometChatMessageInformation/assets/message-delivered.svg","../src/CometChatMessageList/assets/message-delivered.svg","../src/CometChatMessageList/controller.ts","../src/CometChatMessageList/CometChatMessageList.tsx","../src/CometChatMessageList/assets/message-read.svg","../src/CometChatMessageList/assets/message-sent.svg","../src/CometChatMessageList/assets/wait.svg","../src/CometChatMessageList/assets/warning-small.svg","../src/CometChatMessageList/assets/Spinner.svg","../src/CometChatMessageList/assets/threadIndicatorIcon.svg","../src/CometChatMessageList/useCometChatMessageList.ts","../src/CometChatMessageList/assets/close2x.svg","../src/CometChatThreadedMessages/style.ts","../src/CometChatThreadedMessages/assets/close2x.svg","../src/CometChatThreadedMessages/index.tsx","../src/CometChatThreadedMessages/hooks.ts","../src/CometChatMessages/index.tsx","../src/CometChatMessages/assets/heart-reaction.png","../src/CometChatMessages/assets/Info.svg","../src/CometChatMessages/hooks.ts","../src/CometChatConversationsWithMessages/index.tsx","../src/CometChatConversationsWithMessages/assets/StartConversation.svg","../src/CometChatConversationsWithMessages/hooks.ts","../src/CometChatConversationsWithMessages/assets/close2x.svg","../src/CometChatGroupsWithMessages/style.ts","../src/CometChatGroupsWithMessages/index.tsx","../src/CometChatGroupsWithMessages/assets/create-button.svg","../src/CometChatGroupsWithMessages/hooks.ts","../src/CometChatUsersWithMessages/style.ts","../src/CometChatUsersWithMessages/index.tsx","../src/CometChatUsersWithMessages/hooks.ts","../src/Shared/Views/CometChatTabs/TabsStyle.ts","../src/Extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.ts","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.ts","../src/Calling/CometChatIncomingCall/index.tsx","../src/Calling/CometChatIncomingCall/hooks.ts","../src/Calling/CometChatIncomingCall/assets/Audio-Call.svg","../src/Calling/CometChatIncomingCall/assets/Video-call.svg","../src/Extensions/ImageModeration/ImageModerationConfiguration.ts","../src/Extensions/LinkPreview/LinkPreviewConfiguration.ts","../src/Extensions/MessageTranslation/MessageTranslationConfiguration.ts","../src/Extensions/SmartReplies/SmartRepliesConfiguration.ts","../src/Extensions/Stickers/StickersConfiguration.ts"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { ListStyle, UsersStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function listStyle(usersStyleObject : UsersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: usersStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: usersStyleObject?.titleTextColor || theme.palette.getAccent(),\n searchPlaceholderTextFont: usersStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: usersStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: usersStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: usersStyleObject?.searchTextColor || theme.palette.getAccent(),\n searchBorder: usersStyleObject?.searchBorder || \"none\",\n searchBorderRadius: usersStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: usersStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchIconTint: usersStyleObject?.searchIconTint || theme.palette.getAccent500(),\n separatorColor: usersStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: usersStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: usersStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: usersStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: usersStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: usersStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n sectionHeaderTextFont: usersStyleObject?.sectionHeaderTextFont || fontHelper(theme.typography.caption1),\n sectionHeaderTextColor: usersStyleObject?.sectionHeaderTextColor || theme.palette.getAccent500()\n });\n}\n\nexport function UsersWrapperStyle(usersStyleObject : UsersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n boxSizing: \"border-box\",\n position: \"relative\",\n width: usersStyleObject?.width || \"100%\",\n height: usersStyleObject?.height || \"100%\",\n background: usersStyleObject?.background || theme.palette.getBackground(),\n border: usersStyleObject?.border || `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: usersStyleObject?.borderRadius || \"0\",\n overflow: \"hidden\"\n };\n}\n\nexport function menuStyles() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"12px\",\n right: \"12px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, usersStyleObject : UsersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n separatorColor: listItemStyleObject?.separatorColor || usersStyleObject?.separatorColor || theme.palette.getAccent200(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n width: statusIndicatorStyleObject?.width || \"12px\"\n };\n}\n\nexport function tailViewSelectionContainerStyle() : CSSProperties {\n return {\n paddingRight: \"8px\"\n };\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useCallback, useRef, useState } from \"react\";\n\n/**\n * Sets the created ref to the `value` passed\n * \n * @remarks\n * After the initial call of this hook, the internal ref is set to the `value` passed to this hook after the component has rendered completely. \n * So the returned ref will not have the updated value while the component renders\n */\nexport function useRefSync(value : T) : React.MutableRefObject {\n const res = useRef(value);\n res.current = value;\n return res;\n}\n\n/**\n * Custom hook to make refs stateful\n * \n * @remarks\n * Making refs stateful opens up the possibility of using the element the ref is pointing to as a dependency for a `useEffect` call\n * \n * @example\n * Here's a simple example\n * ```ts\n * // At the top most level of the functional component\n * const [inputElement, setInputRef] = useStateRef(null);\n * \n * // Inside the JSX\n * \n * ```\n */\nexport function useStateRef(initialValue : T) : [T, (node : T) => void] {\n const [state, setState] = useState(initialValue);\n const setRef = useCallback((node : T) => {\n setState(node);\n }, []);\n return [state, setRef];\n}\n\nexport function useCometChatErrorHandler(onError? : ((error : CometChat.CometChatException) => void) | null) : (error : unknown) => void {\n const onErrorRef = useRefSync(onError);\n const errorHandler = useCallback(function fn(error : unknown) : void {\n if (typeof error === \"object\" && error) {\n if (error instanceof CometChat.CometChatException) {\n const onError = onErrorRef.current;\n if (onError) {\n return onError(error);\n }\n }\n else if (error instanceof Error) {\n return fn(new CometChat.CometChatException({\n code: \"ERROR\",\n name: error.name,\n message: error.message\n }));\n }\n }\n console.log(error);\n }, [onErrorRef]);\n return errorHandler;\n}\n","import { CheckboxStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface ICheckboxProps {\n name? : string,\n labelText? : string,\n checked? : boolean,\n disabled? : boolean,\n checkboxStyle? : CheckboxStyle,\n onChange? : (customEvent : CustomEvent<{checked : boolean}>) => void\n};\n\nexport function CometChatCheckbox(props : ICheckboxProps) {\n const {\n name,\n labelText,\n checked,\n disabled,\n checkboxStyle,\n onChange\n } = props;\n\n const ref = useRef();\n const onChangePropRef = useRefSync(onChange);\n\n function getCheckedPropSpreadObject() : {checked? : true} {\n return checked ? {checked} : {};\n }\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onChangePropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onChangePropRef : React.MutableRefObject<((customEvent: CustomEvent<{checked: boolean;}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onChangePropRef\n } = args;\n\n useEffect(() => {\n const checkboxElement = ref.current;\n const eventName = \"cc-checkbox-changed\";\n const handleEvent = (e : CustomEvent<{checked : boolean}>) => onChangePropRef.current?.(e);\n checkboxElement.addEventListener(eventName, handleEvent);\n return () => {\n checkboxElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onChangePropRef]);\n}\n","import {\n LabelStyle,\n LoaderStyle,\n SearchInputStyle,\n} from \"@cometchat/uikit-elements\";\n\nimport { CSSProperties } from \"react\";\nimport { ListStyle } from \"@cometchat/uikit-shared\";\nimport { TitleAlignment } from \"@cometchat/uikit-resources\";\n\nexport function listWrapperStyle(listStyle: ListStyle | null): CSSProperties {\n return {\n boxSizing: \"border-box\",\n width: listStyle?.width || \"100%\",\n height: listStyle?.height || \"100%\",\n border: listStyle?.border || \"none\",\n borderRadius: listStyle?.borderRadius || \"0\",\n background: listStyle?.background || \"inherit\",\n boxShadow: listStyle?.boxShadow,\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n };\n}\n\nexport function headerStyle(emptyTitle: boolean): CSSProperties {\n return {\n flexShrink: \"0\",\n padding: emptyTitle ? \"0px 12px\" : \"19px 16px\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function titleStyle(\n listStyle: ListStyle | null,\n titleAlignment: TitleAlignment,\n emptyTitle?: Boolean\n): CSSProperties {\n return {\n textAlign: titleAlignment === TitleAlignment.left ? \"left\" : \"center\",\n font: listStyle?.titleTextFont || \"700 22px Inter, sans-serif\",\n color: listStyle?.titleTextColor || \"rgb(20, 20, 20)\",\n boxSizing: \"border-box\",\n };\n}\n\nexport const searchStyle = {\n padding: \"16px\",\n margin: \"-16px -16px 0 -16px\",\n} as CSSProperties;\n\nexport function searchInputStyle(\n listStyle: ListStyle | null\n): SearchInputStyle {\n // Property not set - boxShadow? : string;\n\n return {\n border: listStyle?.searchBorder || \"none\",\n borderRadius: listStyle?.searchBorderRadius || \"8px\",\n width: \"100%\",\n height: \"32px\",\n background: listStyle?.searchBackground || \"rgb(20, 20, 20, 0.04)\",\n searchTextFont: listStyle?.searchTextFont || \"400 15px Inter, sans-serif\",\n searchTextColor: listStyle?.searchTextColor || \"rgb(20, 20, 20)\",\n placeholderTextFont:\n listStyle?.searchPlaceholderTextFont || \"400 15px Inter, sans-serif\",\n placeholderTextColor:\n listStyle?.searchPlaceholderTextColor || \"rgb(20, 20, 20, 0.46)\",\n searchIconTint: listStyle?.searchIconTint || \"rgb(20, 20, 20, 0.46)\",\n };\n}\n\nexport function listItemContainerStyle(): CSSProperties {\n return {\n overflow: \"hidden auto\",\n overflowX: \"hidden\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n height: \"100%\",\n boxSizing: \"border-box\",\n padding: \"0 16px\",\n };\n}\n\nexport function viewContainerStyle(): CSSProperties {\n return {\n height: \"calc(100% - 1px)\",\n overflow: \"auto\",\n };\n}\n\nexport function defaultViewStyle(): CSSProperties {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n textAlign: \"center\",\n };\n}\n\nexport function customViewStyle(): CSSProperties {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n };\n}\n\nexport function loaderStyle(listStyle: ListStyle | null): LoaderStyle {\n return {\n iconTint: listStyle?.loadingIconTint || \"rgb(20, 20, 20, 0.58)\",\n };\n}\n\nexport function sectionHeaderStyle(listStyle: ListStyle | null): CSSProperties {\n return {\n font: listStyle?.sectionHeaderTextFont || \"500 12px Inter, sans-serif\",\n color: listStyle?.sectionHeaderTextColor || \"rbg(20, 20, 20, 0.46)\",\n textAlign: \"left\",\n padding: \"8px 0\",\n };\n}\n\nexport function errorLabelStyle(listStyle: ListStyle | null): LabelStyle {\n return {\n textFont: listStyle?.errorStateTextFont || \"700 22px Inter, sans-serif\",\n textColor: listStyle?.errorStateTextColor || \"rgb(20, 20, 20, 0.33)\",\n };\n}\n\nexport function emptyLabelStyle(listStyle: ListStyle | null): LabelStyle {\n return {\n textFont: listStyle?.emptyStateTextFont || \"700 22px Inter, sans-serif\",\n textColor: listStyle?.emptyStateTextColor || \"rgb(20, 20, 20, 0.33)\",\n };\n}\n\nexport function intersectionObserverBottomTargetDivStyle(): CSSProperties {\n return {\n height: \"1px\",\n border: \"1px solid transparent\"\n };\n}\n","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatTheme,\n States,\n TitleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport React, { JSX, useRef } from \"react\";\nimport {\n customViewStyle,\n defaultViewStyle,\n emptyLabelStyle,\n errorLabelStyle,\n headerStyle,\n intersectionObserverBottomTargetDivStyle,\n listItemContainerStyle,\n listWrapperStyle,\n loaderStyle,\n searchInputStyle,\n sectionHeaderStyle,\n titleStyle,\n viewContainerStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../../../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { Hooks } from \"./hooks\";\nimport { ListStyle } from \"@cometchat/uikit-shared\";\n\n/**\n * Extracts the value associated with the passed key from the passed object\n *\n * @param key - Property on the `item` parameter\n * @param item - Any object\n * @returns String converted value associated with the `key` property of the `item`  object\n */\nfunction getKeyValue(key: keyof T, item: T): string {\n let res: string;\n\n const keyValue = item[key];\n if (typeof keyValue === \"function\") {\n const result = keyValue.call(item);\n if (typeof result === \"undefined\") {\n if ((item as any)?.id) {\n res = String((item as any)?.id);\n } else {\n res = String(result);\n }\n } else {\n res = String(result);\n }\n } else {\n res = String(keyValue);\n }\n\n return res;\n}\n\nexport type DivElementRef = HTMLDivElement | null;\n\ninterface IListProps {\n /**\n * Title of the component\n *\n * @defaultValue `\"\"`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Text to fill the search input with\n *\n * @defaultValue `\"\"`\n */\n searchText?: string;\n /**\n * Function to call when the search input text changes\n *\n * @remarks\n * This function will only be called after 500ms of the search input text change\n */\n onSearch?: (searchStr: string) => void;\n /**\n * Image URL for the search icon to use in the search bar\n */\n searchIconURL?: string;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `\"Search\"`\n */\n searchPlaceholderText?: string;\n /**\n * List of objects to display\n */\n list: T[];\n /**\n * Custom list item view to be rendered for each object in the `list` prop\n */\n listItem: (item: T, itemIndex: number) => JSX.Element;\n /**\n * Function to call when the scrollbar is at the top-most position of the scrollable list\n */\n onScrolledToBottom?: () => Promise;\n /**\n * Function to call when the scrollbar is at the bottom-most position of the scrollable list\n */\n onScrolledToTop?: () => Promise;\n /**\n * Function to call when the scrollbar is not at the bottom-most position of the scrollable list\n */\n scrolledUpCallback?: (boolean?: boolean) => void;\n /**\n * Show alphabetical header\n *\n * @defaultValue `true`\n */\n showSectionHeader?: boolean;\n /**\n * Property on each object in the `list` prop\n *\n * @remarks\n * This property will be used to extract the section header character from each object in the `list` prop\n */\n sectionHeaderKey?: keyof T;\n /**\n * Property on each object in the `list` prop\n *\n * @remarks\n * This property will be used to extract the key value from each object in the `list` prop. The extracted key value is set as a `key` of a React element\n */\n listItemKey?: keyof T;\n /**\n * Fetch state of the component\n */\n state: States;\n /**\n * Custom view for the loading state of the component\n */\n loadingView?: JSX.Element;\n /**\n * Image URL for the default loading view\n */\n loadingIconURL?: string;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `\"ERROR\"`\n */\n errorStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `\"EMPTY\"`\n */\n emptyStateText?: string;\n /**\n * Set the scrollbar to the bottom-most position of the scrollable list\n *\n * @remarks\n * If the scrollbar of the scrollable list is set to the bottom-most position of the scrollable list because of this `prop`, the component won't call the `onScrolledToBottom` prop\n */\n scrollToBottom?: boolean;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Styles to apply to this component\n */\n listStyle?: ListStyle;\n // Won't add tsdoc comment here as this will be removed\n theme?: CometChatTheme;\n}\n\nfunction List(props: IListProps): JSX.Element {\n const {\n title = \"\",\n titleAlignment = TitleAlignment.left,\n hideSearch = false,\n searchText = \"\",\n onSearch,\n searchPlaceholderText = \"Search\",\n searchIconURL,\n list,\n listItem,\n showSectionHeader = true,\n sectionHeaderKey,\n listItemKey,\n onScrolledToBottom,\n onScrolledToTop,\n state,\n loadingView,\n loadingIconURL,\n hideError = false,\n errorStateView,\n errorStateText = \"Error\",\n emptyStateView,\n emptyStateText,\n scrollToBottom = false,\n onError,\n listStyle = null,\n scrolledUpCallback,\n } = props;\n\n const [searchInputElement, setSearchInputRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-search-input\"] | null\n >(null);\n const intersectionObserverRootRef = useRef(null);\n const intersectionObserverTopTargetRef = useRef(null);\n const intersectionObserverBottomTargetRef = useRef(null);\n const didComponentScrollToBottomRef = useRef(false);\n const timeoutIdRef = useRef(null);\n const scrollHeightTupleRef = useRef<[number, number]>([0, 0]);\n const didTopObserverCallbackRunRef = useRef(false);\n const onScrolledToTopRef = useRefSync(onScrolledToTop);\n const onScrolledToBottomRef = useRefSync(onScrolledToBottom);\n const onSearchRef = useRefSync(onSearch);\n const errorHandler = useCometChatErrorHandler(onError);\n\n /**\n * Creates the title view\n */\n function getTitle(emptyTitle = false): JSX.Element {\n return (\n \n {title}\n
\n );\n }\n\n /**\n * Creates the search box\n */\n function getSearchBox(): JSX.Element | null {\n if (hideSearch) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates a list of views using the objects from the `list` prop\n */\n function getList(): JSX.Element[] | null {\n if (\n (state === States.loading && list.length === 0) ||\n state === States.empty ||\n state === States.error\n ) {\n return null;\n }\n let currrentSectionHeader = \"\";\n return list.map((item, itemIdx) => {\n let listSectionJSX: JSX.Element | null = null;\n if (showSectionHeader) {\n let itemSectionHeader: string;\n if (sectionHeaderKey === undefined) {\n errorHandler(\n new CometChat.CometChatException({\n code: \"ERROR\",\n name: \"Error\",\n message:\n \"'sectionHeaderKey' prop must be provided when 'showSectionHeader' prop is set to true. 'showSectionHeader' is set to be true by default\",\n })\n );\n itemSectionHeader = \" \";\n } else {\n itemSectionHeader = (getKeyValue(sectionHeaderKey, item) ||\n \" \")[0].toUpperCase();\n }\n let sectionHeaderJSX: JSX.Element | null = null;\n if (itemIdx === 0) {\n sectionHeaderJSX = (\n \n {itemSectionHeader}\n
\n );\n currrentSectionHeader = itemSectionHeader;\n } else if (currrentSectionHeader !== itemSectionHeader) {\n sectionHeaderJSX = (\n
\n \n {itemSectionHeader}\n
\n
\n );\n currrentSectionHeader = itemSectionHeader;\n } else {\n sectionHeaderJSX =
;\n }\n listSectionJSX = (\n
{sectionHeaderJSX}
\n );\n }\n return (\n
\n {listSectionJSX}\n {listItem(item, itemIdx)}\n
\n );\n });\n }\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let loadingViewJSX: JSX.Element;\n if (!loadingView) {\n loadingViewJSX = (\n \n \n \n );\n } else {\n loadingViewJSX = (\n \n {loadingView}\n \n );\n }\n return (\n \n {loadingViewJSX}\n \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n if (hideError) {\n return null;\n }\n let errorViewJSX: JSX.Element;\n if (!errorStateView) {\n errorViewJSX = (\n \n \n \n );\n } else {\n errorViewJSX = (\n \n {errorStateView}\n \n );\n }\n return (\n
\n {errorViewJSX}\n
\n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let emptyViewJSX: JSX.Element;\n if (!emptyStateView && emptyStateText) {\n emptyViewJSX = (\n \n \n \n );\n } else {\n emptyViewJSX = (\n \n {emptyStateView}\n \n );\n }\n return (\n
\n {emptyViewJSX}\n
\n );\n }\n\n /**\n * Creates a view based on the value of the `state` prop\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n\n\n switch (state) {\n case States.loading:\n if (list.length === 0) {\n res = getLoadingView();\n }\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = state;\n }\n return res;\n }\n\n Hooks({\n onSearchRef,\n searchInputElement,\n intersectionObserverRootRef,\n intersectionObserverBottomTargetRef,\n onScrolledToBottomRef,\n onScrolledToTopRef,\n intersectionObserverTopTargetRef,\n timeoutIdRef,\n scrollToBottom,\n didComponentScrollToBottomRef,\n scrollHeightTupleRef,\n didTopObserverCallbackRunRef,\n errorHandler,\n scrolledUpCallback,\n });\n const emptyTitle = title === \"\" ? true : false;\n return (\n
\n
\n {getTitle(emptyTitle)}\n {getSearchBox()}\n
\n \n
\n {getList()}\n {getStateView()}\n
\n \n \n );\n}\n\nconst genericMemo: (component: T) => T = React.memo;\n/**\n * Renders a scrollable list\n */\nexport const CometChatList = genericMemo(List);\n","import React, { JSX, useEffect } from \"react\";\n\nimport { DivElementRef } from \".\";\n\ntype Args = {\n onSearchRef: React.MutableRefObject<((searchStr: string) => void) | undefined>,\n searchInputElement: JSX.IntrinsicElements[\"cometchat-search-input\"] | null,\n intersectionObserverRootRef: React.MutableRefObject,\n intersectionObserverBottomTargetRef: React.MutableRefObject,\n intersectionObserverTopTargetRef: React.MutableRefObject,\n onScrolledToBottomRef: React.MutableRefObject<(() => void) | undefined>,\n onScrolledToTopRef: React.MutableRefObject<(() => void) | undefined>,\n timeoutIdRef: React.MutableRefObject,\n scrollToBottom: boolean,\n didComponentScrollToBottomRef: React.MutableRefObject,\n scrollHeightTupleRef: React.MutableRefObject<[number, number]>,\n didTopObserverCallbackRunRef: React.MutableRefObject,\n errorHandler: (error: unknown) => void,\n scrolledUpCallback?: (boolean?: boolean) => void\n};\n\nexport function Hooks(args: Args) {\n const {\n onSearchRef,\n searchInputElement,\n intersectionObserverRootRef,\n intersectionObserverBottomTargetRef,\n intersectionObserverTopTargetRef,\n onScrolledToBottomRef,\n onScrolledToTopRef,\n timeoutIdRef,\n scrollToBottom,\n didComponentScrollToBottomRef,\n scrollHeightTupleRef,\n didTopObserverCallbackRunRef,\n errorHandler,\n scrolledUpCallback\n } = args;\n\n\n\n useEffect(\n /**\n * Attaches search changed event listener on the search input element\n */\n () => {\n if (!searchInputElement) {\n return;\n }\n function handleSearchChanged(e: CustomEvent) {\n const newSearchText = e.detail.searchText;\n if (timeoutIdRef.current !== null) {\n window.clearTimeout(timeoutIdRef.current);\n }\n timeoutIdRef.current = window.setTimeout(() => {\n onSearchRef.current?.(newSearchText);\n timeoutIdRef.current = null;\n }, 500);\n }\n const eventName = \"cc-search-changed\";\n searchInputElement.addEventListener(eventName, handleSearchChanged);\n return () => {\n searchInputElement.removeEventListener(eventName, handleSearchChanged);\n };\n }, [searchInputElement, onSearchRef, timeoutIdRef]);\n\n useEffect(\n /**\n * Creates an observer and sets it to observe a dummy element that is the bottom-most child of the scrollable list\n */\n () => {\n if (!intersectionObserverRootRef.current || !intersectionObserverBottomTargetRef.current) {\n\n return;\n }\n let stopCallingOnScrolledToBottomCallback = false;\n const rootElement = intersectionObserverRootRef.current;\n const targetElement = intersectionObserverBottomTargetRef.current;\n async function observerCallBack(entry: IntersectionObserverEntry[]) {\n const relevantEntry = entry[0];\n if (relevantEntry) {\n if (scrolledUpCallback) {\n scrolledUpCallback(relevantEntry.isIntersecting)\n }\n }\n if (didComponentScrollToBottomRef.current && relevantEntry.isIntersecting) {\n\n didComponentScrollToBottomRef.current = false;\n return;\n }\n if (!relevantEntry.isIntersecting || stopCallingOnScrolledToBottomCallback || rootElement.scrollHeight <= rootElement.clientHeight) {\n return;\n }\n stopCallingOnScrolledToBottomCallback = true;\n try {\n await Promise.all([onScrolledToBottomRef.current?.()]);\n }\n catch (error) {\n errorHandler(error);\n }\n stopCallingOnScrolledToBottomCallback = false;\n\n }\n const options = { root: rootElement, threshold: 0.1 };\n const observer = new IntersectionObserver(observerCallBack, options);\n observer.observe(targetElement);\n return () => {\n observer.unobserve(targetElement);\n };\n }, [errorHandler, didComponentScrollToBottomRef, intersectionObserverBottomTargetRef, intersectionObserverRootRef, onScrolledToBottomRef, scrolledUpCallback]);\n\n useEffect(\n /**\n * Creates an observer and sets it to observe a dummy element that the top-most child of the scrollable list\n */\n () => {\n if (!intersectionObserverRootRef.current || !intersectionObserverTopTargetRef.current) {\n return;\n }\n let stopCallingOnScrolledToTopCallback = false;\n const rootElement = intersectionObserverRootRef.current;\n const targetElement = intersectionObserverTopTargetRef.current;\n async function observerCallBack(entry: IntersectionObserverEntry[]) {\n\n const relevantEntry = entry[0];\n if (!relevantEntry.isIntersecting || stopCallingOnScrolledToTopCallback || rootElement.scrollHeight <= rootElement.clientHeight) {\n return;\n }\n stopCallingOnScrolledToTopCallback = true;\n try {\n await Promise.all([onScrolledToTopRef.current?.()]);\n }\n catch (error) {\n errorHandler(error);\n }\n stopCallingOnScrolledToTopCallback = false;\n didTopObserverCallbackRunRef.current = true;\n }\n const options = { root: rootElement, threshold: 0.1 };\n const observer = new IntersectionObserver(observerCallBack, options);\n observer.observe(targetElement);\n return () => {\n observer.unobserve(targetElement);\n };\n }, [errorHandler, didTopObserverCallbackRunRef, intersectionObserverRootRef, intersectionObserverTopTargetRef, onScrolledToTopRef]);\n\n useEffect(\n /**\n * Record the change in the scroll height of the scrollable list and manually set the scrollbar position of the scrollable list if some conditions are met\n */\n () => {\n if (!intersectionObserverRootRef.current) {\n return;\n }\n if (intersectionObserverRootRef.current.scrollHeight > intersectionObserverRootRef.current.clientHeight) {\n if (Math.round(intersectionObserverRootRef.current.scrollHeight - scrollHeightTupleRef.current[1]) !== 0) {\n // Recompute scroll height tuple\n scrollHeightTupleRef.current[0] = scrollHeightTupleRef.current[1];\n scrollHeightTupleRef.current[1] = intersectionObserverRootRef.current.scrollHeight;\n // If the topObserverCallback is invoked and the scrollbar position will not be handled by the scrollToBottom handler,\n // set the scrollbar position\n if (!scrollToBottom && didTopObserverCallbackRunRef.current && scrollHeightTupleRef.current[0] !== 0) {\n intersectionObserverRootRef.current.scrollTop = Math.max(scrollHeightTupleRef.current[1] - scrollHeightTupleRef.current[0], 0);\n }\n }\n }\n else {\n // Reset scroll height tuple\n scrollHeightTupleRef.current[0] = 0;\n scrollHeightTupleRef.current[1] = 0;\n }\n if (didTopObserverCallbackRunRef.current) {\n didTopObserverCallbackRunRef.current = false;\n }\n });\n\n useEffect(\n /**\n * Set the scrollbar to be at the bottom-most position of the scrollable list if some conditions are met\n */\n () => {\n setTimeout(() => {\n const rootElement = intersectionObserverRootRef.current;\n const isRootScrollable = (rootElement?.scrollHeight ?? 0) > (rootElement?.clientHeight ?? 0);\n const shouldRootScrollToBottom = scrollToBottom && isRootScrollable && intersectionObserverBottomTargetRef.current !== null;\n if (shouldRootScrollToBottom) {\n didComponentScrollToBottomRef.current = true;\n intersectionObserverBottomTargetRef.current!.scrollIntoView(false);\n }\n });\n });\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\nimport LoadingIcon from \"./assets/LoadingIcon.svg\"\nimport { UserPresencePlacement } from \"@cometchat/uikit-resources\";\n\ninterface IListItemProps {\n id?: string,\n avatarURL?: string,\n avatarName?: string,\n statusIndicatorColor?: string | null,\n statusIndicatorIcon?: string,\n title?: string,\n isActive?: boolean,\n subtitleView?: JSX.Element | null,\n tailView?: JSX.Element | null,\n menuView?: JSX.Element | null,\n hideSeparator?: boolean,\n avatarStyle?: AvatarStyle,\n statusIndicatorStyle?: CSSProperties | null,\n listItemStyle?: ListItemStyle\n onClick?: (customEvent: CustomEvent<{ id: string }>) => void,\n subtitleViewClassName?: string,\n tailViewClassName?: string,\n menuViewClassName?: string,\n loadingIconURL?: string,\n userPresencePlacement ?: UserPresencePlacement,\n};\n\nexport function CometChatListItem(props: IListItemProps) {\n const {\n id,\n avatarURL,\n avatarName,\n statusIndicatorColor,\n statusIndicatorIcon,\n title,\n isActive,\n subtitleView,\n tailView,\n menuView,\n hideSeparator,\n avatarStyle,\n statusIndicatorStyle,\n listItemStyle,\n onClick,\n subtitleViewClassName,\n tailViewClassName,\n menuViewClassName,\n loadingIconURL = LoadingIcon,\n userPresencePlacement = UserPresencePlacement.bottom\n } = props;\n\n const ref = useRef();\n const onListItemClickPropRef = useRefSync(onClick);\n\n function getIsActivePropSpreadObject(): { isActive?: true } {\n return isActive ? { isActive } : {};\n }\n\n function getHideSeparatorPropSpreadObject(): { hideSeparator?: true } {\n return hideSeparator ? { hideSeparator } : {};\n }\n\n function getClassNamePropSpreadObject(className: string | undefined): { className?: string } {\n return className !== undefined ? { className } : {};\n }\n\n function getStylePropSpreadObject(styleObject: T1, stylePropName: T2): { T2?: string } {\n return styleObject ? { [stylePropName]: JSON.stringify(styleObject) } : {};\n }\n\n Hooks({\n ref,\n onListItemClickPropRef\n });\n\n return (\n \n {\n subtitleView\n ?\n (\n \n {subtitleView}\n \n )\n :\n null\n }\n {\n tailView\n ?\n (\n \n {tailView}\n \n )\n :\n null\n }\n {\n menuView\n ?\n (\n \n {menuView}\n \n )\n :\n null\n }\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onListItemClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{id: string}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onListItemClickPropRef\n } = args;\n\n useEffect(() => {\n const listItemElement = ref.current;\n const eventName = \"cc-listitem-clicked\";\n const handleEvent = (e : CustomEvent<{id : string}>) => onListItemClickPropRef.current?.(e);\n listItemElement.addEventListener(eventName, handleEvent);\n return () => {\n listItemElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onListItemClickPropRef]);\n}\n","import { MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { CometChatOption } from \"@cometchat/uikit-resources\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface IMenuListProps {\n data : CometChatOption[],\n moreIconURL? : string,\n topMenuSize? : number,\n menuListStyle? : MenuListStyle,\n onOptionClick? : (customEvent : CustomEvent<{data : CometChatOption}>) => void\n};\n\nexport function CometChatMenuList(props : IMenuListProps) {\n const {\n data,\n moreIconURL,\n topMenuSize,\n menuListStyle,\n onOptionClick\n } = props;\n\n const ref = useRef();\n const onOptionClickPropRef = useRefSync(onOptionClick);\n let idToOnClickMapRef = useRef void) | undefined> | null>(null);\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n data,\n idToOnClickMapRef,\n ref,\n onOptionClickPropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\nimport { CometChatOption } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\n\ntype Args = {\n data : CometChatOption[],\n idToOnClickMapRef : React.MutableRefObject void) | undefined> | null>,\n ref : React.MutableRefObject,\n onOptionClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{data: CometChatOption}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n data,\n idToOnClickMapRef,\n ref,\n onOptionClickPropRef\n } = args;\n\n useEffect(() => {\n const idToOnClickMap = new Map void) | undefined>();\n idToOnClickMapRef.current = idToOnClickMap;\n for (let i = 0; i < data.length; i++) {\n const { id, onClick } = data[i];\n idToOnClickMap.set(id, onClick);\n }\n }, [data, idToOnClickMapRef]);\n\n useEffect(() => {\n const menuListElement = ref.current;\n const eventName = \"cc-menu-clicked\";\n const handleEvent = (event : CustomEvent<{data : CometChatOption}>) => {\n const option = CometChatUIKitUtility.clone(event.detail.data);\n option.onClick = idToOnClickMapRef.current?.get(option.id);\n event.detail.data = option; \n onOptionClickPropRef.current?.(event);\n };\n menuListElement.addEventListener(eventName, handleEvent);\n return () => {\n menuListElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, idToOnClickMapRef, onOptionClickPropRef]);\n}\n","import { RadioButtonStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface IRadioButtonProps {\n name? : string,\n labelText? : string,\n checked? : boolean,\n disabled? : boolean,\n radioButtonStyle? : RadioButtonStyle,\n onChange? : (customEvent : CustomEvent<{checked : true}>) => void\n};\n\nexport function CometChatRadioButton(props : IRadioButtonProps) {\n const {\n name,\n labelText,\n checked,\n disabled,\n radioButtonStyle,\n onChange\n } = props;\n\n const ref = useRef();\n const onChangePropRef = useRefSync(onChange);\n\n function getCheckedPropSpreadObject() : {checked? : true} {\n return checked ? {checked} : {};\n }\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onChangePropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onChangePropRef : React.MutableRefObject<((customEvent: CustomEvent<{checked: true}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onChangePropRef\n } = args;\n\n useEffect(() => {\n const radioBtnElement = ref.current;\n const eventName = \"cc-radio-button-changed\";\n const handleEvent = (event : CustomEvent<{checked : true}>) => onChangePropRef.current?.(event);\n radioBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n radioBtnElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onChangePropRef]);\n}\n","import { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { createContext } from \"react\";\n\nexport const CometChatThemeContext = createContext({\n theme: new CometChatTheme({})\n});\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\ntype Args = {\n searchText: string,\n usersRequestBuilder: CometChat.UsersRequestBuilder | null,\n searchRequestBuilder: CometChat.UsersRequestBuilder | null\n usersSearchText:React.MutableRefObject,\n};\n\nexport class UsersManager {\n private usersRequest: CometChat.UsersRequest;\n private static defaultLimit = 30;\n\n /**\n * Set `usersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n usersSearchText\n } = args;\n \n let currentUsersRequestBuilder = usersRequestBuilder || this.getDefaultRequestBuilder(); // Use provided builder or create a new one if not provided\n if(searchText && searchRequestBuilder) {\n currentUsersRequestBuilder = searchRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && usersRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && usersRequestBuilder && searchRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else if(!searchText && usersRequestBuilder && !searchRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else if(!searchText && !usersRequestBuilder && searchRequestBuilder){\n currentUsersRequestBuilder = this.getDefaultRequestBuilder();\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else{\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }\n this.usersRequest = currentUsersRequestBuilder.build();\n }\n\n private getDefaultRequestBuilder() {\n return new CometChat.UsersRequestBuilder().setLimit(UsersManager.defaultLimit);\n }\n\n /**\n * Calls `fetchNext` method of the set `usersRequest`\n */\n fetchNext() {\n return this.usersRequest.fetchNext();\n }\n\n getCurrentPage(): number {\n return (this.usersRequest as any).pagination.current_page;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static atttachListeners(cb: (user: CometChat.User) => void) {\n const listenerId = \"UsersList_\" + String(Date.now());\n const userListener = new CometChat.UserListener({ onUserOnline: cb, onUserOffline: cb });\n CometChat.addUserListener(listenerId, userListener);\n return () => CometChat.removeUserListener(listenerId);\n }\n /**\n* Attaches an SDK websocket listener\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnestionListener(callback: () => void) {\n const listenerId = \"UsersList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n} from \"react\";\nimport {\n CometChatOption,\n CometChatUIKitConstants,\n SelectionMode,\n States,\n TitleAlignment,\n localize,\n UserPresencePlacement,\n} from \"@cometchat/uikit-resources\";\nimport {\n UsersWrapperStyle,\n avatarStyle,\n listItemStyle,\n listStyle,\n menuStyles,\n statusIndicatorStyle,\n tailViewSelectionContainerStyle,\n} from \"./style\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport { UsersManager } from \"./controller\";\nimport { UsersStyle } from \"@cometchat/uikit-shared\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\n\nexport interface IUsersProps {\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"USERS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n tileAlignment?: TitleAlignment;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholderText?: string;\n /**\n * Custom list item view to be rendered for each user in the fetched list\n */\n listItemView?: (user: CometChat.User) => JSX.Element;\n /**\n * Show alphabetical header\n *\n * @defaultValue `true`\n */\n showSectionHeader?: boolean;\n /**\n * Property on the user object\n *\n * @remarks\n * This property will be used to extract the section header character from the user object\n *\n * @defaultValue `getName`\n */\n sectionHeaderKey?: keyof CometChat.User;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Custom subtitle view to be rendered for each user in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (user: CometChat.User) => JSX.Element;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (user: CometChat.User) => CometChatOption[];\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean;\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Function to call when a user from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (users: CometChat.User, selected: boolean) => void;\n /**\n * Request builder to fetch users\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n usersRequestBuilder?: CometChat.UsersRequestBuilder;\n /**\n * Request builder with search parameters to fetch users\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.UsersRequestBuilder;\n /**\n * Function to call on click of the default list item view of a user\n */\n onItemClick?: (user: CometChat.User) => void;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to this component\n */\n usersStyle?: UsersStyle;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * User to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeUser?: CometChat.User;\n\n /**\n * Search keyword to filter the list of users.\n *\n * @defaultValue `\"\"`\n */\n searchKeyword?: string;\n /**\n * Callback function to be executed when the user list is empty.\n */\n onEmpty?: () => void;\n\n /**\n * Flag to indicate whether users are currently being fetched.\n *\n * @defaultValue `false`\n */\n fetchingUsers?: boolean;\n /**\n * Timeout reference for fetching users.\n */\n fetchTimeOut?: any;\n /**\n * Placement of user presence information within the user interface.\n * @defaultValue `bottom`\n */\n userPresencePlacement?: UserPresencePlacement;\n /**\n * Flag to indicate whether to disable loading state while fetching users.\n * @defaultValue `false`\n */\n disableLoadingState?: boolean;\n /**\n * URL of the icon to be used for the close button.\n */\n closeButtonIconURL?: string;\n}\n\ntype State = {\n searchText: string;\n userList: CometChat.User[];\n fetchState: States;\n isFirstReload: boolean;\n fetchingUsers: boolean;\n fetchTimeOut: any;\n disableLoadingState: boolean;\n};\n\nexport type Action =\n | { type: \"setSearchText\"; searchText: State[\"searchText\"] }\n | {\n type: \"appendUsers\";\n users: CometChat.User[];\n removeOldUsers?: boolean;\n usersManager?: UsersManager | null;\n onEmpty?: () => void;\n }\n | { type: \"setFetchState\"; fetchState: States }\n | { type: \"setUserList\"; userList: CometChat.User[] }\n | { type: \"updateUser\"; user: CometChat.User }\n | { type: \"setIsFirstReload\"; isFirstReload: boolean };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"appendUsers\":\n let users: CometChat.User[] = [];\n if (action.removeOldUsers) {\n if (!state.disableLoadingState) {\n state.userList = [];\n }\n users = action.users;\n if (!state.disableLoadingState) {\n newState = { ...state, userList: users };\n }\n } else {\n if (\n action.usersManager &&\n [0].includes(action.usersManager?.getCurrentPage()) &&\n !action.users.length\n ) {\n if (!action.users.length && action.onEmpty) {\n setTimeout(() => {\n action.onEmpty!();\n });\n newState = {\n ...state,\n fetchState: States.empty,\n };\n }\n } else if (action.users.length !== 0) {\n newState = {\n ...state,\n userList:\n action.usersManager?.getCurrentPage() == 1\n ? [...action.users]\n : [...state.userList, ...action.users],\n };\n }\n }\n break;\n case \"setUserList\":\n newState = { ...state, userList: action.userList };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"updateUser\": {\n const { userList } = state;\n const { user: targetUser } = action;\n const targetUserUid = targetUser.getUid();\n const targetIdx = userList.findIndex(\n (user) => user.getUid() === targetUserUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n userList: userList.map((user, i) => {\n return i === targetIdx ? targetUser : user;\n }),\n };\n }\n break;\n }\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of users that has been created in a CometChat app\n */\nexport function CometChatUsers(props: IUsersProps) {\n const {\n title = localize(\"USERS\"),\n tileAlignment = TitleAlignment.left,\n hideSearch = false,\n searchIconURL = SearchIcon,\n searchPlaceholderText = localize(\"SEARCH\"),\n listItemView = null,\n showSectionHeader = true,\n sectionHeaderKey = \"getName\",\n loadingStateView, // Will use the default provided by CometChatList if undefined\n loadingIconURL = SpinnerIcon,\n hideError = false,\n errorStateView, // Will use the default provided by CometChatList if undefined\n errorStateText = localize(\"SOMETHING_WRONG\"),\n emptyStateView, // Will use the default provided by CometChatList if undefined\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n subtitleView = null,\n disableUsersPresence = false,\n menus = null,\n options = null,\n hideSeparator = false,\n selectionMode = SelectionMode.none,\n onSelect, // Won't use if undefined\n usersRequestBuilder = null,\n searchRequestBuilder = null,\n onItemClick, // Won't use if undefined\n onError,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n usersStyle: usersStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n activeUser = null,\n searchKeyword = \"\",\n onEmpty,\n fetchingUsers = false,\n fetchTimeOut,\n userPresencePlacement = UserPresencePlacement.bottom,\n disableLoadingState = false,\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n userList: [],\n fetchState: States.loading,\n isFirstReload: false,\n fetchingUsers,\n fetchTimeOut,\n disableLoadingState: disableLoadingState,\n });\n const errorHandler = useCometChatErrorHandler(onError);\n const usersManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n const usersSearchText = useRef(\"\");\n let isJustMounted = useRef(true);\n (() => {\n if (state.searchText && state.searchText !== usersSearchText.current) {\n usersSearchText.current = state.searchText;\n }\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Initiates a fetch request and appends the fetched users to the `userList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `userList` state\n */\n const fetchNextAndAppendUsers = useCallback(\n async (fetchId: string): Promise => {\n const usersManager = usersManagerRef.current;\n if (!usersManager) {\n return;\n }\n let initialState =\n isConnectionReestablished.current ||\n (disableLoadingState && !isJustMounted)\n ? States.loaded\n : States.loading;\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const newUsers = await usersManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n let removeOldUsers = isConnectionReestablished.current ? true : false;\n dispatch({\n type: \"appendUsers\",\n users: newUsers,\n removeOldUsers,\n usersManager,\n onEmpty,\n });\n if (attachListenerOnFetch.current) {\n UsersManager.attachConnestionListener(() => {\n const requestBuilder =\n usersRequestBuilder === null\n ? new CometChat.UsersRequestBuilder().setLimit(30)\n : usersRequestBuilder;\n usersManagerRef.current = new UsersManager({\n searchText: usersSearchText.current,\n usersRequestBuilder: requestBuilder,\n searchRequestBuilder,\n usersSearchText\n });\n isConnectionReestablished.current = true;\n });\n attachListenerOnFetch.current = false;\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } else {\n isConnectionReestablished.current = false;\n }\n } catch (error: unknown) {\n if (fetchId === fetchNextIdRef.current && state.userList?.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n isJustMounted.current = false;\n },\n [errorHandler, dispatch]\n );\n\n /**\n * Updates the `searchText` state\n */\n const onSearch = useCallback(\n (newSearchText: string): void => {\n const trimmedText = newSearchText.trim();\n if (\n newSearchText.length === 0 ||\n (trimmedText.length === newSearchText.length && trimmedText.length > 0)\n ) {\n usersSearchText.current = \"\";\n dispatch({ type: \"setSearchText\", searchText: newSearchText });\n }\n // dispatch({type: \"setSearchText\", searchText: newSearchText});\n },\n [dispatch]\n );\n\n /**\n * Update the user object if found in the `userList` state\n */\n const updateUser = useCallback(\n (user: CometChat.User): void => {\n dispatch({ type: \"updateUser\", user });\n },\n [dispatch]\n );\n\n /**\n * Creates menus to display\n */\n function getMenus(): JSX.Element | null {\n if (!menus) {\n return null;\n }\n return (\n
\n {menus}\n
\n );\n }\n\n /**\n * Creates tail view for the default list item view\n */\n function getDefaultListItemTailView(\n user: CometChat.User\n ): JSX.Element | null {\n if (\n selectionMode !== SelectionMode.single &&\n selectionMode !== SelectionMode.multiple\n ) {\n return null;\n }\n let tailViewContent: JSX.Element;\n if (selectionMode === SelectionMode.single) {\n tailViewContent = (\n onSelect?.(user, e.detail.checked)}\n />\n );\n } else {\n tailViewContent = (\n onSelect?.(user, e.detail.checked)}\n />\n );\n }\n return (\n
{tailViewContent}
\n );\n }\n\n /**\n * Creates menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of this view is handled by the default list item view\n */\n function getDefaultListItemMenuView(\n user: CometChat.User\n ): JSX.Element | null {\n let curOptions: CometChatOption[] | undefined;\n if (!(curOptions = options?.(user))?.length) {\n return null;\n }\n return (\n e.detail.data.onClick?.()}\n />\n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(user: CometChat.User): string | null {\n if (\n disableUsersPresence ||\n user.getStatus() === CometChatUIKitConstants.userStatusType.offline\n ) {\n return null;\n }\n return (\n usersStyleObject?.onlineStatusColor || theme.palette.getSuccess() || null\n );\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (user: CometChat.User) => JSX.Element {\n if (listItemView) {\n return listItemView;\n }\n return function (user: CometChat.User): JSX.Element {\n return (\n onItemClick?.(user)}\n userPresencePlacement={userPresencePlacement}\n />\n );\n };\n }\n\n Hooks({\n usersManagerRef,\n fetchNextAndAppendUsers,\n searchText: state.searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n updateUser,\n fetchNextIdRef,\n searchKeyword,\n disableLoadingState,\n usersSearchText\n });\n return (\n \n {getMenus()}\n \n fetchNextAndAppendUsers(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n showSectionHeader={showSectionHeader}\n sectionHeaderKey={sectionHeaderKey}\n listItemKey='getUid'\n state={\n state.fetchState === States.loaded &&\n state.userList.length === 0 &&\n !onEmpty\n ? States.empty\n : state.fetchState\n }\n loadingView={loadingStateView}\n loadingIconURL={loadingIconURL}\n hideError={hideError}\n errorStateView={errorStateView}\n errorStateText={errorStateText}\n emptyStateView={emptyStateView}\n emptyStateText={emptyStateText}\n listStyle={listStyle(usersStyleObject, theme)}\n />\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatUserEvents } from \"@cometchat/uikit-resources\";\nimport { Action } from \".\";\nimport { UsersManager } from \"./controller\";\n\ntype Args = {\n usersManagerRef : React.MutableRefObject,\n fetchNextAndAppendUsers : (fetchId : string) => Promise,\n searchText : string,\n usersRequestBuilder : CometChat.UsersRequestBuilder | null,\n searchRequestBuilder : CometChat.UsersRequestBuilder | null,\n dispatch : React.Dispatch,\n updateUser : (user : CometChat.User) => void,\n fetchNextIdRef : React.MutableRefObject,\n searchKeyword: string,\n disableLoadingState: boolean,\n usersSearchText:React.MutableRefObject,\n};\n\nexport function Hooks(args : Args) {\n const {\n usersManagerRef,\n fetchNextAndAppendUsers,\n searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n updateUser,\n fetchNextIdRef,\n searchKeyword,\n disableLoadingState,\n usersSearchText,\n } = args;\n\n\n\n \n useEffect(() => {\n if(usersRequestBuilder?.searchKeyword){\n usersSearchText.current = usersRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n usersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n return ()=> {\n /* \n When the prop (usersRequestBuilder) gets updated (setSearchKeyword), reference in parent component gets updated too. \n This was causing an issue in mentions since the previous search keyword remained in the request builder reference in \n composer.\n */\n usersRequestBuilder?.setSearchKeyword(\"\")\n }\n }, []); \n useEffect(\n /**\n * Creates a new request builder -> empties the `userList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n usersManagerRef.current = new UsersManager({searchText, usersRequestBuilder, searchRequestBuilder,usersSearchText});\n if(!disableLoadingState){\n dispatch({type: \"setUserList\", userList: []});\n }\n fetchNextAndAppendUsers(fetchNextIdRef.current = \"initialFetch_\" + String(Date.now()));\n }, [searchText, usersRequestBuilder, searchRequestBuilder, fetchNextAndAppendUsers, dispatch, fetchNextIdRef, usersManagerRef]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return UsersManager.atttachListeners(updateUser);\n }, [updateUser]);\n\n useEffect(\n /**\n * Subscribes to User UI events\n */\n () => {\n const subUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(updateUser);\n const subUserUnblocked = CometChatUserEvents.ccUserUnblocked.subscribe(updateUser);\n return () => {\n subUserBlocked.unsubscribe();\n subUserUnblocked.unsubscribe();\n };\n }, [updateUser]);\n\n useEffect(\n () => {\n dispatch({type: \"setSearchText\", searchText: searchKeyword});\n }, [searchKeyword , dispatch]);\n}\n","import { AvatarStyle, BackdropStyle, ChangeScopeStyle, LabelStyle, ListItemStyle, MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { BaseStyle, GroupMembersStyle, ListStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint?: string};\n\nexport function groupMembersWrapperStyle(groupMemberSyleObject : GroupMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n overflowX: \"hidden\",\n width: groupMemberSyleObject?.width || \"100%\",\n height: groupMemberSyleObject?.height || \"100%\",\n boxSizing: \"border-box\",\n border: groupMemberSyleObject?.border || \"none\",\n borderRadius: groupMemberSyleObject?.borderRadius || \"0\",\n background: groupMemberSyleObject?.background || theme.palette.getBackground(),\n padding: groupMemberSyleObject?.padding || \"0\",\n boxShadow: groupMemberSyleObject?.boxShadow || \"0\"\n };\n}\n\nexport function listStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n titleTextFont: groupMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: groupMemberStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: groupMemberStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: groupMemberStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading), \n errorStateTextColor: groupMemberStyleObject?.errorStateTextColor || theme.palette.getAccent600(), \n loadingIconTint: groupMemberStyleObject?.loadingIconTint || theme.palette.getAccent600(), \n searchIconTint: groupMemberStyleObject?.searchIconTint || theme.palette.getAccent500(), \n searchBorder: groupMemberStyleObject?.searchBorder || \"none\", \n searchBorderRadius: groupMemberStyleObject?.searchBorderRadius || \"8px\", \n searchBackground: groupMemberStyleObject?.searchBackground || theme.palette.getAccent50(), \n searchPlaceholderTextFont: groupMemberStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1), \n searchPlaceholderTextColor: groupMemberStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(), \n searchTextFont: groupMemberStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1), \n searchTextColor: groupMemberStyleObject?.searchTextColor || theme.palette.getAccent()\n });\n}\n\nexport function backBtnContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n left: \"16px\",\n top: \"19px\",\n width: 'fit-content',\n height: 'fit-content'\n };\n}\n\nexport function defaultBackBtnStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: groupMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\"\n };\n}\n\nexport function closeBtnStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: groupMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n }; \n}\n\nexport function menusContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"12px\",\n top: \"8px\",\n cursor: \"pointer\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || 'inherit',\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent() \n });\n}\nexport function scopeLabelStyle(groupScopeStyleObject : ChangeScopeStyle | null, theme : CometChatTheme) : LabelStyle {\n return new LabelStyle({\n textFont: groupScopeStyleObject?.textFont || fontHelper(theme.typography.subtitle1),\n textColor: groupScopeStyleObject?.textColor || theme.palette.getAccent600(),\n background: \"inherit\"\n });\n}\n\nexport function menuListStyle(groupMembersStyle: GroupMembersStyle | null, theme : CometChatTheme) : MenuListStyle {\n return new MenuListStyle({\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n moreIconTint: theme.palette.getPrimary(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: groupMembersStyle?.background || theme.palette.getBackground()\n });\n}\n\nexport function groupScopeStyle(groupScopeStyleObject : ChangeScopeStyle | null, theme : CometChatTheme) : ChangeScopeStyle {\n return new ChangeScopeStyle({\n height: groupScopeStyleObject?.height || \"212px\",\n width: groupScopeStyleObject?.width || \"360px\",\n border: groupScopeStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: groupScopeStyleObject?.borderRadius || \"12px\",\n background: groupScopeStyleObject?.background || theme.palette.getBackground(),\n titleTextFont: groupScopeStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupScopeStyleObject?.titleTextColor || theme.palette.getAccent(),\n activeTextFont: groupScopeStyleObject?.activeTextFont || fontHelper(theme.typography.subtitle1),\n activeTextColor: groupScopeStyleObject?.activeTextColor || theme.palette.getAccent(),\n activeTextBackground: groupScopeStyleObject?.activeTextBackground || theme.palette.getAccent200(),\n arrowIconTint: groupScopeStyleObject?.arrowIconTint || theme.palette.getAccent900(),\n textFont: groupScopeStyleObject?.textFont || fontHelper(theme.typography.subtitle1),\n textColor: groupScopeStyleObject?.textColor || theme.palette.getAccent600(),\n optionBackground: groupScopeStyleObject?.optionBackground || theme.palette.getBackground(),\n optionBorder: groupScopeStyleObject?.optionBorder || \"none\",\n optionBorderRadius: groupScopeStyleObject?.optionBorderRadius || \"0\",\n hoverTextFont: groupScopeStyleObject?.hoverTextFont || fontHelper(theme.typography.subtitle1),\n hoverTextColor: groupScopeStyleObject?.hoverTextColor || theme.palette.getAccent900(),\n hoverTextBackground: groupScopeStyleObject?.hoverTextBackground || theme.palette.getAccent100(),\n buttonTextFont: groupScopeStyleObject?.buttonTextFont || fontHelper(theme.typography.title2),\n buttonTextColor: groupScopeStyleObject?.buttonTextColor || theme.palette.getAccent(\"dark\"),\n buttonBackground: groupScopeStyleObject?.buttonBackground || theme.palette.getPrimary(),\n closeIconTint: groupScopeStyleObject?.closeIconTint || theme.palette.getPrimary()\n });\n}\n\n\nexport function listWrapperStyle() : CSSProperties {\n return {\n position: \"relative\",\n height: \"100%\"\n };\n}\n\nexport function tailViewStyle() : CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n columnGap: \"8px\"\n };\n}\n\nexport function closeBtnContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"16px\",\n top: \"19px\",\n width: 'fit-content',\n height: 'fit-content'\n };\n}\n\nexport const getBackdropStyle = (groupsMembersStyle: GroupMembersStyle | null) : BackdropStyle => {\n return {\n height: groupsMembersStyle?.height,\n width: groupsMembersStyle?.width ,\n position: 'absolute'\n } as BaseStyle;\n}\n","import { CSSProperties, useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ntype ButtonStyle = {\n buttonTextFont? : string,\n buttonTextColor? : string,\n buttonIconTint? : string\n} & CSSProperties;\n\ninterface ICometChatButtonProps {\n text? : string,\n hoverText? : string,\n iconURL? : string,\n disabled? : boolean,\n buttonStyle? : ButtonStyle,\n onClick? : (customEvent : CustomEvent<{event : PointerEvent}>) => void ,\n childRefCallback?:(ref:React.RefObject) => void;\n};\n\nexport function CometChatButton(props : ICometChatButtonProps) {\n const {\n text,\n hoverText,\n iconURL,\n disabled,\n buttonStyle,\n onClick,\n childRefCallback\n } = props;\n\n const ref = useRef();\n const onClickPropRef = useRefSync(onClick);\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onClickPropRef,\n childRefCallback\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\nimport { CometChatButton } from \".\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{event: PointerEvent}>) => void) | undefined>,\n childRefCallback?:(ref:React.RefObject) => void,\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onClickPropRef,\n childRefCallback\n } = args;\n\n useEffect(() => {\n const buttonElement = ref.current;\n if(childRefCallback){\n childRefCallback(ref.current)\n }\n const eventName = \"cc-button-clicked\";\n const handleEvent = (e : CustomEvent<{event : PointerEvent}>) => onClickPropRef.current?.(e);\n buttonElement.addEventListener(eventName, handleEvent);\n return () => {\n buttonElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onClickPropRef]);\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20%5Ci-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%5Ci%20%20%5Cihttp%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%5Ci%3E%3Csvg%20enable-background%3D%22new%200%200%2032%2032%22%20%20id%3D%22%D0%A1%D0%BB%D0%BE%D0%B9_1%22%20version%3D%221.1%22%20viewBox%3D%220%200%2032%2032%22%20%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20d%3D%22M24.285%2C11.284L16%2C19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429%2C0%20%20c-0.394%2C0.395-0.394%2C1.035%2C0%2C1.43l8.999%2C9.002l0%2C0l0%2C0c0.394%2C0.395%2C1.034%2C0.395%2C1.428%2C0l8.999-9.002%20%20c0.394-0.395%2C0.394-1.036%2C0-1.431C25.319%2C10.889%2C24.679%2C10.889%2C24.285%2C11.284z%22%20fill%3D%22%23121313%22%20id%3D%22Expand_More%22%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3C%2Fsvg%3E\"","import { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport React from \"react\";\n\ntype Args = {\n searchText: string,\n groupMemberRequestBuilder: CometChat.GroupMembersRequestBuilder | null,\n searchRequestBuilder: CometChat.GroupMembersRequestBuilder | null,\n groupGuid: string,\n groupMembersSearchText:React.MutableRefObject\n};\n\nexport class GroupMembersManager {\n private groupMembersRequest: CometChat.GroupMembersRequest;\n\n /**\n * Sets `groupMembersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n groupMemberRequestBuilder,\n searchRequestBuilder,\n groupGuid,\n groupMembersSearchText\n } = args;\n let finalGroupRequestBuilder = groupMemberRequestBuilder || new CometChat.GroupMembersRequestBuilder(groupGuid).setLimit(30);\n if(searchText && searchRequestBuilder) {\n finalGroupRequestBuilder = searchRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && groupMemberRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && groupMemberRequestBuilder && searchRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else if(!searchText && groupMemberRequestBuilder && !searchRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else if(!searchText && !groupMemberRequestBuilder && searchRequestBuilder){\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else{\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }\n this.groupMembersRequest = finalGroupRequestBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `groupMembersRequest`\n */\n fetchNext(): Promise {\n return this.groupMembersRequest.fetchNext();\n }\n\n getCurrentPage(): number {\n return (this.groupMembersRequest as any).pagination.current_page;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachUserListener(callback: (user: CometChat.User) => void): () => void {\n const listenerId = \"GroupMembers_User_\" + String(Date.now());\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: callback,\n onUserOffline: callback\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n\n /**\n * Creates a `CometChat.GroupMember` instance from the provided `user` and `group`\n */\n static createParticipantGroupMember(user: CometChat.User, group: CometChat.Group): CometChat.GroupMember {\n const groupMember = new CometChat.GroupMember(user.getUid(), CometChatUIKitConstants.groupMemberScope.participant);\n groupMember.setName(user.getName());\n groupMember.setGuid(group.getGuid());\n groupMember.setUid(user.getUid());\n return groupMember;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachGroupListener(groupGuid: string, dispatch: React.Dispatch): () => void {\n const listenerId = \"GroupMembers_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (\n message: CometChat.Action,\n changedUser: CometChat.GroupMember,\n newScope: CometChat.GroupMemberScope,\n oldScope: CometChat.GroupMemberScope,\n changedGroup: CometChat.Group\n ) => {\n if (changedGroup.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"updateGroupMemberScopeIfPresent\", groupMemberUid: changedUser.getUid(), newScope });\n },\n onGroupMemberKicked: (\n message: CometChat.Action,\n kickedUser: CometChat.User,\n kickedBy: CometChat.User,\n kickedFrom: CometChat.Group\n ) => {\n if (kickedFrom.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: kickedUser.getUid() });\n },\n onGroupMemberBanned: (\n message: CometChat.Action,\n bannedUser: CometChat.User,\n bannedBy: CometChat.User,\n bannedFrom: CometChat.Group\n ) => {\n if (bannedFrom.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: bannedUser.getUid() });\n },\n onMemberAddedToGroup: (\n message: CometChat.Action,\n userAdded: CometChat.User,\n userAddedBy: CometChat.User,\n userAddedIn: CometChat.Group\n ) => {\n if (userAddedIn.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"appendGroupMember\", groupMember: GroupMembersManager.createParticipantGroupMember(userAdded, userAddedIn) });\n },\n onGroupMemberLeft: (\n message: CometChat.Action,\n leavingUser: CometChat.User,\n group: CometChat.Group\n ) => {\n if (group.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: leavingUser.getUid() });\n },\n onGroupMemberJoined: (\n message: CometChat.Action,\n joinedUser: CometChat.User,\n joinedGroup: CometChat.Group\n ) => {\n if (joinedGroup.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"appendGroupMember\", groupMember: GroupMembersManager.createParticipantGroupMember(joinedUser, joinedGroup) });\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fmoreicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.5%2C10%20C5.88071187%2C10%207%2C11.1192881%207%2C12.5%20C7%2C13.8807119%205.88071187%2C15%204.5%2C15%20C3.11928813%2C15%202%2C13.8807119%202%2C12.5%20C2%2C11.1192881%203.11928813%2C10%204.5%2C10%20Z%20M12%2C10%20C13.3807119%2C10%2014.5%2C11.1192881%2014.5%2C12.5%20C14.5%2C13.8807119%2013.3807119%2C15%2012%2C15%20C10.6192881%2C15%209.5%2C13.8807119%209.5%2C12.5%20C9.5%2C11.1192881%2010.6192881%2C10%2012%2C10%20Z%20M19.5%2C10%20C20.8807119%2C10%2022%2C11.1192881%2022%2C12.5%20C22%2C13.8807119%2020.8807119%2C15%2019.5%2C15%20C18.1192881%2C15%2017%2C13.8807119%2017%2C12.5%20C17%2C11.1192881%2018.1192881%2C10%2019.5%2C10%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n ChangeScopeStyle,\n ListItemStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport {\n CometChatGroupEvents,\n CometChatOption,\n CometChatUIKitConstants,\n SelectionMode,\n States,\n TitleAlignment,\n UserPresencePlacement,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n GroupMemberUtils,\n GroupMembersStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n avatarStyle,\n backBtnContainerStyle,\n closeBtnContainerStyle,\n closeBtnStyle,\n defaultBackBtnStyle,\n getBackdropStyle,\n groupMembersWrapperStyle,\n groupScopeStyle,\n listItemStyle,\n listStyle,\n listWrapperStyle,\n menuListStyle,\n menusContainerStyle,\n scopeLabelStyle,\n statusIndicatorStyle,\n tailViewStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport DownArrowIcon from \"./assets/down-arrow.svg\";\nimport { GroupMembersManager } from \"./controller\";\nimport { Hooks } from \"./hooks\";\nimport MoreIcon from \"./assets/more-icon.svg\";\nimport SearchIcon from \"./assets/search.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\n\ninterface IGroupMembersProps {\n /**\n * Image URL for the back button\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string;\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean;\n /**\n * Function to call when the default back button is clicked\n */\n onBack?: () => void;\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"MEMBERS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string;\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Request builder to fetch group members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n /**\n * Request builder with search parameters to fetch group members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n /**\n * Group the fetched groupMembers belong to\n */\n group: CometChat.Group;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'errorStateView'. It will be removed in subsequent versions.\n */\n errorSateView?: JSX.Element;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `true`\n */\n hideSeparator?: boolean;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Custom subtitle view to be rendered for each group member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * Custom list item view to be rendered for each group member in the fetched list\n */\n listItemView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (\n group: CometChat.Group,\n groupMember: CometChat.GroupMember\n ) => CometChatOption[];\n /**\n * Image URL for the change scope component's `arrowIconURL` prop\n *\n * @defaultValue `./assets/down-arrow.svg`\n */\n dropDownIconURL?: string;\n /**\n * View to be placed in the tail view\n *\n * @remarks\n * This prop will be used if `listItemView` is not provided\n */\n tailView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * Selection mode to use for the default list item view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Function to call on click of the default list item view of a group member\n */\n onItemClick?: (groupMember: CometChat.GroupMember) => void;\n /**\n * Function to call when a group member from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (groupMember: CometChat.GroupMember, selected: boolean) => void;\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string;\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * Styles to apply to the change scope component\n */\n groupScopeStyle?: ChangeScopeStyle;\n /**\n * Styles to apply to this component\n */\n groupMembersStyle?: GroupMembersStyle;\n\n /**\n * Search keyword to filter the list of users.\n *\n * @defaultValue `\"\"`\n */\n searchKeyword?: string;\n /**\n * Callback function to be executed when the user list is empty.\n */\n onEmpty?: () => void;\n\n /**\n * Timeout reference for fetching users.\n */\n fetchTimeOut?: any;\n /**\n * Placement of user presence information within the user interface.\n * @defaultValue `bottom`\n */\n userPresencePlacement?: UserPresencePlacement;\n /**\n * Flag to indicate whether to disable loading state while fetching users.\n * @defaultValue `false`\n */\n disableLoadingState?: boolean;\n}\n\ntype State = {\n groupMemberList: CometChat.GroupMember[];\n fetchState: States;\n searchText: string;\n groupMemberToChangeScopeOf: CometChat.GroupMember | null;\n fetchTimeOut: any;\n disableLoadingState: boolean;\n};\n\nexport type Action =\n | {\n type: \"appendGroupMembers\";\n groupMembers: CometChat.GroupMember[];\n groupMembersManager?: GroupMembersManager | null;\n onEmpty?: () => void;\n }\n | { type: \"setGroupMemberList\"; groupMemberList: CometChat.GroupMember[] }\n | { type: \"setSearchText\"; searchText: string }\n | { type: \"setFetchState\"; fetchState: States }\n | { type: \"removeGroupMemberIfPresent\"; groupMemberUid: string }\n | {\n type: \"setGroupMemberToChangeScopeOf\";\n groupMember: CometChat.GroupMember | null;\n }\n | {\n type: \"replaceGroupMemberIfPresent\";\n updatedGroupMember: CometChat.GroupMember;\n }\n | { type: \"updateGroupMemberStatusIfPresent\"; user: CometChat.User }\n | {\n type: \"updateGroupMemberScopeIfPresent\";\n groupMemberUid: string;\n newScope: CometChat.GroupMemberScope;\n }\n | { type: \"appendGroupMember\"; groupMember: CometChat.GroupMember };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendGroupMembers\": {\n const { groupMembers, groupMembersManager, onEmpty } = action;\n if (\n (groupMembersManager &&\n [0].includes(groupMembersManager?.getCurrentPage()) && !groupMembers.length))\n {\n if (!groupMembers.length && onEmpty) {\n setTimeout(() => {\n onEmpty();\n });\n newState = {\n ...state,\n fetchState: States.empty,\n };\n }\n } else if (groupMembers.length !== 0) {\n newState = {\n ...state,\n groupMemberList:\n groupMembersManager?.getCurrentPage() == 1\n ? [...groupMembers]\n : [...state.groupMemberList, ...groupMembers],\n };\n }\n break;\n }\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"setGroupMemberList\":\n newState = { ...state, groupMemberList: action.groupMemberList };\n break;\n case \"removeGroupMemberIfPresent\": {\n const targetUid = action.groupMemberUid;\n const targetIdx = state.groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: state.groupMemberList.filter(\n (groupMember, i) => i !== targetIdx\n ),\n };\n }\n break;\n }\n case \"setGroupMemberToChangeScopeOf\":\n newState = { ...state, groupMemberToChangeScopeOf: action.groupMember };\n break;\n case \"replaceGroupMemberIfPresent\": {\n const { updatedGroupMember } = action;\n const targetUid = updatedGroupMember.getUid();\n const targetIdx = state.groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: state.groupMemberList.map((groupMember, i) => {\n if (i !== targetIdx) {\n return groupMember;\n }\n\n return updatedGroupMember;\n }),\n };\n }\n break;\n }\n case \"updateGroupMemberStatusIfPresent\": {\n const { user } = action;\n const { groupMemberList } = state;\n const targetUid = user.getUid();\n const targetIdx = groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: groupMemberList.map((groupMember, i) => {\n if (i === targetIdx) {\n groupMember.setStatus(user.getStatus());\n }\n return groupMember;\n }),\n };\n }\n break;\n }\n case \"updateGroupMemberScopeIfPresent\": {\n const { groupMemberUid, newScope } = action;\n const { groupMemberList } = state;\n const targetIdx = groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === groupMemberUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: groupMemberList.map((groupMember, i) => {\n if (i === targetIdx) {\n groupMember.setScope(newScope);\n }\n return groupMember;\n }),\n };\n }\n break;\n }\n case \"appendGroupMember\": {\n newState = {\n ...state,\n groupMemberList: [...state.groupMemberList, action.groupMember],\n };\n break;\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\nexport function CometChatGroupMembers(props: IGroupMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n menus = null,\n title = localize(\"MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n searchPlaceholder = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = false,\n groupMemberRequestBuilder = null,\n searchRequestBuilder = null,\n group,\n onError,\n emptyStateText = localize(\"NO_USERS_FOUND\"), // According to me, this is the most suitable\n errorStateText = localize(\"SOMETHING_WRONG\"),\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n errorStateView,\n errorSateView,\n emptyStateView,\n hideError = false,\n hideSeparator = true,\n disableUsersPresence = false,\n subtitleView = null,\n listItemView = null,\n options = null,\n dropDownIconURL = DownArrowIcon,\n tailView = null,\n selectionMode = SelectionMode.none,\n onItemClick = null,\n onSelect = null,\n closeButtonIconURL = \"\",\n onClose,\n avatarStyle: avatarStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n groupScopeStyle: groupScopeStyleObject = null,\n groupMembersStyle: groupMemberStyleObject = null,\n searchKeyword = \"\",\n onEmpty,\n fetchTimeOut,\n userPresencePlacement = UserPresencePlacement.bottom,\n disableLoadingState = false,\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n groupMemberList: [],\n fetchState: States.loading,\n searchText: \"\",\n groupMemberToChangeScopeOf: null,\n fetchTimeOut,\n disableLoadingState,\n });\n const groupMembersManagerRef = useRef(null);\n const loggedInUserRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const [changeScopeElement, setChangeScopeRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-change-scope\"] | null\n >(null);\n const groupPropRef = useRefSync(group);\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n const groupMembersSearchText = useRef(\"\");\n\n /**\n * Updates the `searchText` state\n */\n const onSearchTextChange = useCallback(\n (searchText: string): void => {\n const trimmedText = searchText.trim();\n if (\n searchText.length === 0 ||\n (trimmedText.length === searchText.length && trimmedText.length > 0)\n ) {\n groupMembersSearchText.current = \"\";\n dispatch({ type: \"setSearchText\", searchText });\n }\n },\n [dispatch]\n );\n\n /**\n * Initiates a fetch request and appends the fetched group members to the `groupMemberList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `groupMemberList` state\n */\n const fetchNextAndAppendGroupMembers = useCallback(\n async (fetchId: string): Promise => {\n const groupMembersManager = groupMembersManagerRef.current;\n if (!groupMembersManager) {\n return;\n }\n if (!disableLoadingState) {\n dispatch({ type: \"setFetchState\", fetchState: States.loading });\n }\n try {\n const groupMembers = await groupMembersManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n\n dispatch({\n type: \"appendGroupMembers\",\n groupMembers,\n groupMembersManager,\n onEmpty,\n });\n\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } catch (error) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n errorHandler(error);\n }\n },\n [dispatch, errorHandler]\n );\n\n /**\n * Creates an action message\n */\n const createActionMessage = useCallback(\n (\n actionOn: CometChat.GroupMember,\n action: string,\n group: CometChat.Group,\n loggedInUser: CometChat.User\n ): CometChat.Action => {\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory\n .action as CometChat.MessageCategory\n );\n actionMessage.setAction(action);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setMessage(\n `${loggedInUser.getUid()} ${action} ${actionOn.getUid()}`\n );\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(actionOn));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n actionMessage.setReceiverType(\n CometChatUIKitConstants.MessageReceiverType.group\n );\n actionMessage.setRawData({\n extras: {\n scope: {\n new: actionOn.getScope(),\n },\n },\n });\n return actionMessage;\n },\n []\n );\n\n /**\n * Bans the provided `groupMember`\n */\n const banGroupMember = async (\n groupMember: CometChat.GroupMember\n ): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!loggedInUser) {\n return;\n }\n try {\n const currentGroup = groupPropRef.current;\n await CometChat.banGroupMember(\n currentGroup.getGuid(),\n groupMember.getUid()\n );\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: groupMember.getUid(),\n });\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setMembersCount(groupClone.getMembersCount() - 1);\n CometChatGroupEvents.ccGroupMemberBanned.next({\n kickedBy: CometChatUIKitUtility.clone(loggedInUser),\n kickedFrom: groupClone,\n kickedUser: CometChatUIKitUtility.clone(groupMember),\n message: createActionMessage(\n groupMember,\n CometChatUIKitConstants.groupMemberAction.BANNED,\n groupClone,\n loggedInUser\n ),\n });\n } catch (error) {\n errorHandler(error);\n }\n };\n\n /**\n * Kicks the provided `groupMember`\n */\n const kickGroupMember = async (\n groupMember: CometChat.GroupMember\n ): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!loggedInUser) {\n return;\n }\n try {\n const currentGroup = groupPropRef.current;\n await CometChat.kickGroupMember(\n currentGroup.getGuid(),\n groupMember.getUid()\n );\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: groupMember.getUid(),\n });\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setMembersCount(groupClone.getMembersCount() - 1);\n CometChatGroupEvents.ccGroupMemberKicked.next({\n kickedBy: CometChatUIKitUtility.clone(loggedInUser),\n kickedFrom: CometChatUIKitUtility.clone(groupClone),\n kickedUser: CometChatUIKitUtility.clone(groupMember),\n message: createActionMessage(\n groupMember,\n CometChatUIKitConstants.groupMemberAction.KICKED,\n groupClone,\n loggedInUser\n ),\n });\n } catch (error) {\n errorHandler(error);\n }\n };\n\n const { groupMemberToChangeScopeOf: groupMember } = state;\n\n /**\n * Updates the scope of the provided `groupMember`\n */\n const updateGroupMemberScope = useCallback(\n async (newScope: string): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!groupMember || !loggedInUser) {\n return;\n }\n try {\n const newScopeCasted = newScope as CometChat.GroupMemberScope;\n const currentGroup = groupPropRef.current;\n await CometChat.updateGroupMemberScope(\n currentGroup.getGuid(),\n groupMember.getUid(),\n newScopeCasted\n );\n const updatedGroupMember = CometChatUIKitUtility.clone(groupMember);\n updatedGroupMember.setScope(newScopeCasted);\n dispatch({ type: \"replaceGroupMemberIfPresent\", updatedGroupMember });\n CometChatGroupEvents.ccGroupMemberScopeChanged.next({\n scopeChangedFrom: groupMember.getScope(),\n scopeChangedTo: updatedGroupMember.getScope(),\n message: createActionMessage(\n updatedGroupMember,\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE,\n currentGroup,\n loggedInUser\n ),\n group: CometChatUIKitUtility.clone(currentGroup),\n updatedUser: CometChatUIKitUtility.clone(updatedGroupMember),\n });\n } catch (error) {\n errorHandler(error);\n } finally {\n dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember: null });\n }\n },\n [errorHandler, dispatch, createActionMessage, groupMember, groupPropRef]\n );\n\n /**\n * Handles user created action on a groupMember from the fetched list\n */\n function handleActionOnGroupMember(\n action: string,\n groupMember: CometChat.GroupMember\n ): void | Promise {\n if (action === CometChatUIKitConstants.GroupMemberOptions.ban) {\n return banGroupMember(groupMember);\n }\n if (action === CometChatUIKitConstants.GroupMemberOptions.kick) {\n return kickGroupMember(groupMember);\n }\n if (action === CometChatUIKitConstants.GroupMemberOptions.changeScope) {\n return dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember });\n }\n }\n\n /**\n * Creates the default back button\n */\n function getDefaultBackBtnView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates the back button view of the component\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n {\n getDefaultBackBtnView()\n }\n \n\n );\n }\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n
\n {menus}\n
\n );\n }\n\n /**\n * Creates the close button view of the component\n */\n function getCloseBtnView(): JSX.Element | null {\n if (!closeButtonIconURL) {\n return null;\n }\n\n return (\n \n \n \n );\n }\n\n /**\n * Creates the menu view of the default list item view\n */\n function getDefaultListItemMenuView(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n let groupMemberOptions: CometChatOption[] | undefined;\n if (\n tailView === null &&\n (groupMemberOptions = options?.(group, groupMember))?.length\n ) {\n return (\n {\n const { id, onClick } = e.detail.data;\n if (onClick) {\n onClick();\n } else if (typeof id === \"string\") {\n handleActionOnGroupMember(id, groupMember);\n }\n }}\n />\n );\n }\n return null;\n }\n\n /**\n * Creates selection input component based on `selectionMode`\n */\n function getSelectionInput(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n if (selectionMode === SelectionMode.single) {\n return (\n onSelect?.(groupMember, e.detail.checked)}\n />\n );\n }\n if (selectionMode === SelectionMode.multiple) {\n return (\n onSelect?.(groupMember, e.detail.checked)}\n />\n );\n }\n return null;\n }\n\n /**\n * Creates options view of the default tail view\n *\n * @param groupMemberOptions - Return value of `GroupMemberUtils.getViewMemberOptions` function\n */\n function getDefaultTailOptionsView(\n groupMemberOptions: string | CometChatOption[],\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n if (typeof groupMemberOptions === \"string\") {\n return (\n \n );\n }\n return (\n {\n const { id } = e.detail.data;\n if (typeof id === \"string\") {\n handleActionOnGroupMember(id, groupMember);\n }\n }}\n />\n );\n }\n\n /**\n * Creates the default tail view\n */\n function getDefaultTailView(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n if (tailView !== null) {\n return null;\n }\n return (\n
\n {getDefaultTailOptionsView(\n GroupMemberUtils.getViewMemberOptions(\n groupMember,\n group,\n loggedInUserRef.current?.getUid(),\n theme\n ),\n groupMember\n )}\n
\n );\n }\n\n /**\n * Creates the tail view for the default list item view\n */\n function getDefaultListItemTailView(\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n return (\n
\n {tailView?.(groupMember)}\n {getSelectionInput(groupMember)}\n {getDefaultTailView(groupMember)}\n
\n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(\n groupMember: CometChat.GroupMember\n ): string | null {\n if (\n disableUsersPresence ||\n groupMember.getStatus() === CometChatUIKitConstants.userStatusType.offline\n ) {\n return null;\n }\n return (\n groupMemberStyleObject?.onlineStatusColor ||\n theme.palette.getSuccess() ||\n null\n );\n }\n\n /**\n * Creates the default list item view\n */\n function getDefaultListItemView(\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n return (\n onItemClick?.(groupMember)}\n userPresencePlacement={userPresencePlacement}\n />\n );\n }\n\n /**\n * Gets the list item view of the component\n */\n function getListItem(): (groupMember: CometChat.GroupMember) => JSX.Element {\n return listItemView !== null ? listItemView : getDefaultListItemView;\n }\n\n /**\n * Creates the group member scope change modal view\n */\n function getGroupMemberScopeChangeModal(): JSX.Element | null {\n let groupMemberAllowedScopes: string[];\n const { groupMemberToChangeScopeOf } = state;\n if (\n groupMemberToChangeScopeOf !== null &&\n (groupMemberAllowedScopes = GroupMemberUtils.allowScopeChange(\n group,\n groupMemberToChangeScopeOf\n )).length > 0\n ) {\n return (\n \n \n \n );\n }\n return null;\n }\n\n Hooks({\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText: state.searchText,\n groupMembersManagerRef,\n groupGuid: group.getGuid(),\n fetchNextAndAppendGroupMembers,\n fetchNextIdRef,\n dispatch,\n loggedInUserRef,\n errorHandler,\n changeScopeElement,\n updateGroupMemberScope,\n searchKeyword,\n disableLoadingState,\n groupMembersSearchText\n });\n\n return (\n \n \n {getMenusView()}\n \n fetchNextAndAppendGroupMembers(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n state = {state.fetchState === States.loaded && state.groupMemberList.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n emptyStateText={emptyStateText}\n errorStateText={errorStateText}\n loadingView={loadingStateView}\n emptyStateView={emptyStateView}\n errorStateView={errorStateView || errorSateView}\n hideError={hideError}\n listStyle={listStyle(groupMemberStyleObject, theme)}\n />\n \n {getBackBtnView()}\n {getCloseBtnView()}\n {getGroupMemberScopeChangeModal()}\n \n );\n}\n","import React, { JSX, useEffect } from \"react\";\n\nimport { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatGroupEvents } from \"@cometchat/uikit-resources\";\nimport { GroupMembersManager } from \"./controller\";\n\ntype Args = {\n groupMemberRequestBuilder: CometChat.GroupMembersRequestBuilder | null;\n searchRequestBuilder: CometChat.GroupMembersRequestBuilder | null;\n searchText: string;\n groupMembersManagerRef: React.MutableRefObject;\n groupGuid: string;\n fetchNextAndAppendGroupMembers: (id: string) => void;\n fetchNextIdRef: React.MutableRefObject;\n dispatch: React.Dispatch;\n loggedInUserRef: React.MutableRefObject;\n errorHandler: (error: unknown) => void;\n changeScopeElement: JSX.IntrinsicElements[\"cometchat-change-scope\"] | null;\n updateGroupMemberScope: (newScope: string) => Promise;\n searchKeyword: string;\n disableLoadingState: boolean;\n groupMembersSearchText:React.MutableRefObject;\n};\n\nexport function Hooks(args: Args) {\n const {\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupMembersManagerRef,\n groupGuid,\n fetchNextAndAppendGroupMembers,\n fetchNextIdRef,\n dispatch,\n loggedInUserRef,\n errorHandler,\n changeScopeElement,\n updateGroupMemberScope,\n searchKeyword,\n disableLoadingState,\n groupMembersSearchText\n } = args;\n\n useEffect(() => {\n\n if(groupMemberRequestBuilder?.searchKeyword){\n groupMembersSearchText.current = groupMemberRequestBuilder?.searchKeyword;\n } else if(searchRequestBuilder?.searchKeyword){\n groupMembersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n return ()=> {\n /* \n When the prop (groupMemberRequestBuilder) gets updated (setSearchKeyword), reference in parent component gets updated too. \n This was causing an issue in mentions since the previous search keyword remained in the request builder reference in \n composer.\n */\n groupMemberRequestBuilder?.setSearchKeyword(\"\")\n }\n \n}, []);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n loggedInUserRef.current = await CometChat.getLoggedinUser();\n } catch (error) {\n errorHandler(error);\n }\n })();\n },\n [errorHandler, loggedInUserRef]\n );\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `groupMemberList` state -> initiates a new fetch\n */\n () => {\n groupMembersManagerRef.current = new GroupMembersManager({\n searchText,\n groupMemberRequestBuilder,\n searchRequestBuilder,\n groupGuid,\n groupMembersSearchText\n \n });\n if (!disableLoadingState) {\n dispatch({ type: \"setGroupMemberList\", groupMemberList: [] });\n }\n fetchNextAndAppendGroupMembers(\n (fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()))\n );\n },\n [\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupGuid,\n fetchNextAndAppendGroupMembers,\n dispatch,\n fetchNextIdRef,\n groupMembersManagerRef,\n ]\n );\n\n useEffect(\n /**\n * Attaches event listeners to some elements related to the change scope view\n */\n () => {\n if (!changeScopeElement) {\n return;\n }\n const changeScopeClosedEventName = \"cc-changescope-close-clicked\";\n const scopeChangedEventName = \"cc-changescope-changed\";\n function handleChangeScopeClose() {\n dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember: null });\n }\n function handleScopeChange(e: CustomEvent) {\n const newScope = e.detail?.value;\n if (newScope) {\n updateGroupMemberScope(newScope);\n }\n }\n changeScopeElement.addEventListener(\n changeScopeClosedEventName,\n handleChangeScopeClose\n );\n changeScopeElement.addEventListener(\n scopeChangedEventName,\n handleScopeChange\n );\n return () => {\n changeScopeElement.removeEventListener(\n changeScopeClosedEventName,\n handleChangeScopeClose\n );\n changeScopeElement.removeEventListener(\n scopeChangedEventName,\n handleScopeChange\n );\n };\n },\n [changeScopeElement, updateGroupMemberScope, dispatch]\n );\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return GroupMembersManager.attachUserListener((user: CometChat.User) =>\n dispatch({ type: \"updateGroupMemberStatusIfPresent\", user })\n );\n },\n [dispatch]\n );\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return GroupMembersManager.attachGroupListener(groupGuid, dispatch);\n },\n [groupGuid, dispatch]\n );\n\n useEffect(\n /**\n * Subscribes to Group UI events\n */\n () => {\n const groupMemberKickedSub =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe((item) => {\n const { kickedUser } = item;\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: kickedUser.getUid(),\n });\n });\n const groupMemberBannedSub =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe((item) => {\n const { kickedUser } = item;\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: kickedUser.getUid(),\n });\n });\n const groupMemberChangeScopeSub =\n CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((item) => {\n const { updatedUser, scopeChangedTo } = item;\n dispatch({\n type: \"updateGroupMemberScopeIfPresent\",\n groupMemberUid: updatedUser.getUid(),\n newScope: scopeChangedTo,\n });\n });\n const groupMemberAddedSub =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe((item) => {\n const { usersAdded, userAddedIn } = item;\n let groupMembersManager: GroupMembersManager | null = groupMembersManagerRef.current;\n dispatch({\n type: \"appendGroupMembers\",\n groupMembersManager,\n groupMembers: usersAdded.map((user) =>\n GroupMembersManager.createParticipantGroupMember(\n user,\n userAddedIn\n )\n ),\n });\n });\n return () => {\n groupMemberKickedSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupMemberChangeScopeSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n };\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch({ type: \"setSearchText\", searchText: searchKeyword });\n }, [searchKeyword, dispatch]);\n}\n","import { CSSProperties, useContext } from 'react';\nimport { CometChatUsers } from '../CometChatUsers';\nimport { CometChatGroupMembers } from '../CometChatGroupMembers';\nimport { UserMemberListType, UserPresencePlacement } from \"@cometchat/uikit-resources\";\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatThemeContext } from '../CometChatThemeContext';\n\n\nexport interface IMentionsProps {\n userMemberListType?: UserMemberListType;\n onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;\n listItemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element\n avatarStyle?: AvatarStyle;\n statusIndicatorStyle?: CSSProperties;\n searchKeyword?: string;\n group?: CometChat.Group;\n subtitleView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;\n usersRequestBuilder?: CometChat.UsersRequestBuilder;\n disableUsersPresence?: boolean;\n userPresencePlacement?: UserPresencePlacement;\n hideSeparator?: boolean;\n loadingStateView?: JSX.Element;\n onEmpty?: () => void;\n groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n loadingIconUrl?: string;\n disableLoadingState?: boolean,\n onError?: () => void;\n}\n\nfunction CometChatUserMemberWrapper(props: IMentionsProps) {\n const {\n userMemberListType = UserMemberListType.users,\n onItemClick,\n listItemView,\n avatarStyle,\n statusIndicatorStyle,\n searchKeyword,\n group,\n subtitleView,\n usersRequestBuilder,\n userPresencePlacement = UserPresencePlacement.bottom,\n loadingStateView,\n onEmpty,\n groupMemberRequestBuilder,\n loadingIconUrl,\n disableLoadingState = false,\n hideSeparator = false,\n onError,\n disableUsersPresence\n } = props;\n const { theme } = useContext(CometChatThemeContext);\n\n const getUsersStyle = () => {\n return{\n border: '1px solid ' + theme.palette.getAccent300(),\n background: theme.palette.getBackground(),\n minHeight: '45px',\n borderRadius: '12px 12px 12px 12px'\n };\n };\n\n const getGroupMemebersStyle = () => {\n return {\n border: '1px solid ' + theme.palette.getAccent300(),\n padding: \"0px\",\n background: theme.palette.getBackground(),\n borderRadius: '12px 12px 12px 12px'\n };\n };\n\n\n\n return (\n <>\n {userMemberListType === UserMemberListType.users && (\n \n )}\n\n {userMemberListType === UserMemberListType.groupmembers && group && (\n { return <> }}\n disableLoadingState={disableLoadingState}\n disableUsersPresence={disableUsersPresence}\n onError={onError}\n groupMembersStyle={getGroupMemebersStyle()}\n />\n )}\n \n );\n}\n\nexport default CometChatUserMemberWrapper;\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),e=new WeakMap,n=(t,n,s,i,o)=>{const l=null==o?void 0:o[n];void 0===l||s===i?null==s&&n in HTMLElement.prototype?t.removeAttribute(n):t[n]=s:((t,n,s)=>{let i=e.get(t);void 0===i&&e.set(t,i=new Map);let o=i.get(n);void 0!==s?void 0===o?(i.set(n,o={handleEvent:s}),t.addEventListener(n,o)):o.handleEvent=s:void 0!==o&&(i.delete(n),t.removeEventListener(n,o))})(t,l,s)},s=(t,e)=>{\"function\"==typeof t?t(e):t.current=e};function i(e=window.React,i,o,l,d){let a,c,r;if(void 0===i){const t=e;({tagName:c,elementClass:r,events:l,displayName:d}=t),a=t.react}else a=e,r=o,c=i;const h=a.Component,u=a.createElement,f=new Set(Object.keys(null!=l?l:{}));class v extends h{constructor(){super(...arguments),this.o=null}t(t){if(null!==this.o)for(const e in this.i)n(this.o,e,this.props[e],t?t[e]:void 0,l)}componentDidMount(){var t;this.t(),null===(t=this.o)||void 0===t||t.removeAttribute(\"defer-hydration\")}componentDidUpdate(t){this.t(t)}render(){const{_$Gl:e,...n}=this.props;this.h!==e&&(this.u=t=>{null!==e&&s(e,t),this.o=t,this.h=e}),this.i={};const i={ref:this.u};for(const[e,s]of Object.entries(n))t.has(e)?i[\"className\"===e?\"class\":e]=s:f.has(e)||e in r.prototype?this.i[e]=s:i[e]=s;return i.suppressHydrationWarning=!0,u(c,i)}}v.displayName=null!=d?d:r.name;const m=a.forwardRef(((t,e)=>u(v,{...t,_$Gl:e},null==t?void 0:t.children)));return m.displayName=v.displayName,m}export{i as createComponent};\n//# sourceMappingURL=create-component.js.map\n","import {\n AIOptionsStyle,\n CalendarStyle,\n CardBubbleStyle,\n CometChatCardBubble,\n CometChatFormBubble,\n CometChatMentionsFormatter,\n CometChatSchedulerBubble,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUrlsFormatter,\n ComposerId,\n ConversationUtils,\n DetailsUtils,\n FormBubbleStyle,\n SchedulerBubbleStyle,\n TimeSlotStyle,\n UrlFormatterStyle,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n AvatarStyle,\n BaseStyle,\n CheckboxStyle,\n CometChatAudioBubble,\n CometChatFileBubble,\n CometChatFullScreenViewer,\n CometChatImageBubble,\n CometChatTextBubble,\n CometChatVideoBubble,\n DropdownStyle,\n FileBubbleStyle,\n ImageBubbleStyle,\n InputStyle,\n LabelStyle,\n ListItemStyle,\n QuickViewStyle,\n RadioButtonStyle,\n SingleSelectStyle,\n TextBubbleStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatDetailsTemplate,\n CometChatMessageComposerAction,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n FormMessage,\n MentionsTargetElement,\n MessageBubbleAlignment,\n SchedulerMessage,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\n\nimport AudioIcon from \"./assets/audio-file.svg\";\nimport { ChatConfigurator } from \"../Framework/ChatConfigurator\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport CopyIcon from \"./assets/Copy.svg\";\nimport { DataSource } from \"../Framework/DataSource\";\nimport DeleteIcon from \"./assets/deleteicon.svg\";\nimport DownloadIcon from \"./assets/download.svg\";\nimport EditIcon from \"./assets/editicon.svg\";\nimport FileIcon from \"./assets/attachment-file.svg\";\nimport ImageIcon from \"./assets/photolibrary.svg\";\nimport InformationIcon from \"./assets/Info.svg\";\nimport PlaceholderImage from \"./assets/placeholder.png\";\nimport PrivateMessageIcon from \"./assets/send-message-in-private.svg\";\nimport React from \"react\";\nimport ReactionIcon from \"./assets/addreaction.svg\";\nimport ThreadIcon from \"./assets/threadicon.svg\";\nimport VideoIcon from \"./assets/video.svg\";\nimport { createComponent } from \"@lit-labs/react\";\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nconst ImageMessageBubble = createComponent({\n tagName: \"cometchat-image-bubble\",\n elementClass: CometChatImageBubble,\n react: React,\n events: {\n ccImageClicked: \"cc-image-clicked\",\n },\n});\n\nconst AudioMessageBubble = createComponent({\n tagName: \"cometchat-audio-bubble\",\n elementClass: CometChatAudioBubble,\n react: React,\n});\n\nconst VideoMessageBubble = createComponent({\n tagName: \"cometchat-video-bubble\",\n elementClass: CometChatVideoBubble,\n react: React,\n});\n\nconst FileMessageBubble = createComponent({\n tagName: \"cometchat-file-bubble\",\n elementClass: CometChatFileBubble,\n react: React,\n});\n\nconst FormMessageBubble = createComponent({\n tagName: \"cometchat-form-bubble\",\n elementClass: CometChatFormBubble,\n react: React,\n events: {\n ccSubmitClicked: \"cc-submit-clicked\",\n },\n});\n\nconst SchedulerMessageBubble = createComponent({\n tagName: \"cometchat-scheduler-bubble\",\n elementClass: CometChatSchedulerBubble,\n react: React,\n});\n\nconst CardMessageBubble = createComponent({\n tagName: \"cometchat-card-bubble\",\n elementClass: CometChatCardBubble,\n react: React,\n});\n\nconst FullScreenImageViewer = createComponent({\n tagName: \"cometchat-full-screen-viewer\",\n elementClass: CometChatFullScreenViewer,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n});\n\nconst defaultTheme: CometChatTheme = new CometChatTheme({});\nexport class MessagesDataSource implements DataSource {\n getEditOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.editMessage,\n title: localize(\"EDIT\"),\n iconURL: EditIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getDeleteOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.deleteMessage,\n title: localize(\"DELETE\"),\n iconURL: DeleteIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600()!,\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getReactionOption(theme: CometChatTheme): CometChatActionsView {\n return new CometChatActionsView({\n id: CometChatUIKitConstants.MessageOption.reactToMessage,\n title: localize(\"REACT\"),\n iconURL: ReactionIcon,\n customView: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getReplyInThreadOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.replyInThread,\n title: localize(\"REPLY\"),\n iconURL: ThreadIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getSendMessagePrivatelyOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.sendMessagePrivately,\n title: localize(\"MESSAGE_PRIVATELY\"),\n iconURL: PrivateMessageIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getCopyOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.copyMessage,\n title: localize(\"COPY\"),\n iconURL: CopyIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600()!,\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getMessageInfoOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.messageInformation,\n title: localize(\"INFO\"),\n iconURL: InformationIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n isSentByMe(\n loggedInUser: CometChat.User,\n message: CometChat.BaseMessage\n ): boolean {\n return (\n !message.getSender() ||\n loggedInUser.getUid() === message.getSender().getUid()\n );\n }\n\n getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);\n let isParticipant: boolean = false;\n\n if (\n group?.getScope() === CometChatUIKitConstants.groupMemberScope.participant\n ) {\n isParticipant = true;\n }\n\n let messageOptionList: Array = []\n messageOptionList.push(this.getReactionOption(theme));\n if (!messageObject.getParentMessageId()) {\n messageOptionList.push(this.getReplyInThreadOption(theme));\n }\n messageOptionList.push(this.getCopyOption(theme));\n if (isSentByMe || (!isParticipant && group)) {\n messageOptionList.push(this.getEditOption(theme));\n }\n if (isSentByMe) {\n messageOptionList.push(this.getMessageInfoOption(theme));\n }\n if (isSentByMe || (!isParticipant && group))\n messageOptionList.push(this.getDeleteOption(theme));\n if (group && !isSentByMe) {\n messageOptionList.push(this.getSendMessagePrivatelyOption(theme));\n }\n\n return messageOptionList;\n }\n\n getImageMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getVideoMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getAudioMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getFileMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getBottomView(\n _messageObject: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) {\n return null;\n }\n\n getTextMessageTemplate(\n theme: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.text,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let textMessage: CometChat.TextMessage =\n message as CometChat.TextMessage;\n if (textMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(textMessage, theme);\n }\n return ChatConfigurator.getDataSource().getTextMessageContentView(\n textMessage,\n _alignment,\n theme,\n additionalConfigurations\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.audio,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let audioMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (audioMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getAudioMessageContentView(\n audioMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.video,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let videoMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (videoMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getVideoMessageContentView(\n videoMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.image,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let imageMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (imageMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n\n return ChatConfigurator.getDataSource().getImageMessageContentView(\n imageMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.groupMember,\n category: CometChatUIKitConstants.MessageCategory.action,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getGroupActionBubble(message, theme);\n },\n });\n }\n\n getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.file,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let fileMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (fileMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n\n return ChatConfigurator.getDataSource().getFileMessageContentView(\n fileMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.form,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: CometChat.InteractiveMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const formMessage: FormMessage = message as FormMessage;\n if (formMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getFormMessageContentView(\n formMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.scheduler,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: SchedulerMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const schedulerMessage: SchedulerMessage = message as SchedulerMessage;\n if (schedulerMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getSchedulerMessageContentView(\n schedulerMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.card,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: CometChat.InteractiveMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const cardMessage: CardMessage = message as CardMessage;\n if (cardMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getCardMessageContentView(\n cardMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getAllMessageTemplates(\n theme?: CometChatTheme,\n additionalConfigurations?: any\n ): Array {\n let _theme: CometChatTheme = theme ?? defaultTheme;\n if (!additionalConfigurations) {\n additionalConfigurations = {\n disableMentions: false,\n };\n }\n return [\n ChatConfigurator.getDataSource().getTextMessageTemplate(\n _theme,\n additionalConfigurations\n ),\n ChatConfigurator.getDataSource().getImageMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getVideoMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getAudioMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getFileMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getGroupActionTemplate(_theme),\n ChatConfigurator.getDataSource().getFormMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getSchedulerMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getCardMessageTemplate(_theme),\n ];\n }\n\n getMessageTemplate(\n messageType: string,\n messageCategory: string,\n theme?: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate | null {\n let _theme: CometChatTheme = theme ?? defaultTheme;\n\n if (!additionalConfigurations) {\n additionalConfigurations = {\n disableMentions: false,\n };\n }\n\n let _template: CometChatMessageTemplate | null = null;\n if (messageCategory !== CometChatUIKitConstants.MessageCategory.call) {\n switch (messageType) {\n case CometChatUIKitConstants.MessageTypes.text:\n _template =\n ChatConfigurator.getDataSource().getTextMessageTemplate(_theme, additionalConfigurations);\n break;\n\n case CometChatUIKitConstants.MessageTypes.image:\n _template =\n ChatConfigurator.getDataSource().getImageMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.video:\n _template =\n ChatConfigurator.getDataSource().getVideoMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.groupMember:\n _template =\n ChatConfigurator.getDataSource().getGroupActionTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.file:\n _template =\n ChatConfigurator.getDataSource().getFileMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.audio:\n _template =\n ChatConfigurator.getDataSource().getAudioMessageTemplate(_theme);\n break;\n case CometChatUIKitConstants.MessageTypes.form:\n _template =\n ChatConfigurator.getDataSource().getFormMessageTemplate(_theme);\n break;\n case CometChatUIKitConstants.MessageTypes.scheduler:\n _template =\n ChatConfigurator.getDataSource().getSchedulerMessageTemplate(\n _theme\n );\n break;\n case CometChatUIKitConstants.MessageTypes.card:\n _template =\n ChatConfigurator.getDataSource().getCardMessageTemplate(_theme);\n break;\n }\n }\n return _template;\n }\n\n getMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let _optionList: Array = [];\n\n if (\n messageObject.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message\n ) {\n switch (messageObject.getType()) {\n case CometChatUIKitConstants.MessageTypes.text:\n _optionList = ChatConfigurator.getDataSource().getTextMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.image:\n _optionList = ChatConfigurator.getDataSource().getImageMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.video:\n _optionList = ChatConfigurator.getDataSource().getVideoMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.groupMember:\n _optionList = [];\n break;\n case CometChatUIKitConstants.MessageTypes.file:\n _optionList = ChatConfigurator.getDataSource().getFileMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.audio:\n _optionList = ChatConfigurator.getDataSource().getAudioMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n default:\n _optionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n }\n }\n return _optionList;\n }\n\n getCommonOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);\n let isParticipant: boolean = false;\n if (group?.getScope() === CometChatUIKitConstants.groupMemberScope.participant)\n isParticipant = true;\n\n let messageOptionList: Array =\n [];\n\n messageOptionList.push(this.getReactionOption(theme));\n\n if (!messageObject?.getParentMessageId()) {\n messageOptionList.push(this.getReplyInThreadOption(theme));\n }\n if (isSentByMe) {\n messageOptionList.push(this.getMessageInfoOption(theme));\n }\n if (isSentByMe || (!isParticipant && group))\n messageOptionList.push(this.getDeleteOption(theme));\n\n if (group?.getGuid() && !isSentByMe) {\n messageOptionList.push(this.getSendMessagePrivatelyOption(theme));\n }\n\n return messageOptionList;\n }\n\n getAllMessageTypes(): Array {\n return [\n CometChatUIKitConstants.MessageTypes.text,\n CometChatUIKitConstants.MessageTypes.image,\n CometChatUIKitConstants.MessageTypes.audio,\n CometChatUIKitConstants.MessageTypes.video,\n CometChatUIKitConstants.MessageTypes.file,\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageTypes.form,\n CometChatUIKitConstants.MessageTypes.scheduler,\n CometChatUIKitConstants.MessageTypes.card,\n ];\n }\n\n addList(): string {\n return \"\";\n }\n\n getAllMessageCategories(): Array {\n return [\n CometChatUIKitConstants.MessageCategory.message,\n CometChatUIKitConstants.MessageCategory.action,\n CometChatUIKitConstants.MessageCategory.interactive,\n ];\n }\n\n getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ): any {\n return [];\n }\n\n getId(): string {\n return \"messageUtils\";\n }\n\n getTextMessageContentView(\n message: CometChat.TextMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n return ChatConfigurator.getDataSource().getTextMessageBubble(\n message.getText(),\n message,\n _alignment,\n theme,\n undefined,\n additionalConfigurations\n );\n }\n\n getAudioMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getAudioMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme,\n message?.getAttachments()[0]?.getName()\n );\n }\n\n getFileMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getFileMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme,\n message?.getAttachments()[0]?.getName()\n );\n }\n\n getFormMessageContentView(\n message: FormMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getFormMessageBubble(\n message,\n theme\n );\n }\n getSchedulerMessageContentView(\n message: SchedulerMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getSchedulerMessageBubble(\n message,\n theme\n );\n }\n\n getCardMessageContentView(\n message: CardMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getCardMessageBubble(\n message,\n theme\n );\n }\n\n getImageMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n let imageUrl = message?.getAttachments()[0]?.getUrl() || \"\";\n return ChatConfigurator.getDataSource().getImageMessageBubble(\n imageUrl,\n PlaceholderImage,\n message,\n theme\n );\n }\n\n getVideoMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getVideoMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme\n );\n }\n\n getActionMessage(message: any): string {\n let actionMessage = \"\";\n if (\n message.hasOwnProperty(\"actionBy\") === false ||\n message.hasOwnProperty(\"actionOn\") === false\n ) {\n return actionMessage;\n }\n if (\n message.action !== CometChatUIKitConstants.groupMemberAction.JOINED &&\n message.action !== CometChatUIKitConstants.groupMemberAction.LEFT &&\n (message.actionBy.hasOwnProperty(\"name\") === false ||\n message.actionOn.hasOwnProperty(\"name\") === false)\n ) {\n return actionMessage;\n }\n if (\n message.action === CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE\n ) {\n if (\n message.hasOwnProperty(\"data\") &&\n message.data.hasOwnProperty(\"extras\")\n ) {\n if (message.data.extras.hasOwnProperty(\"scope\")) {\n if (message.data.extras.scope.hasOwnProperty(\"new\") === false) {\n return actionMessage;\n }\n } else {\n return actionMessage;\n }\n } else {\n return actionMessage;\n }\n }\n if (\n message.action ===\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE &&\n message.data.extras.hasOwnProperty(\"scope\") === false\n ) {\n return actionMessage;\n }\n if (\n message.action ===\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE &&\n message.data.extras.scope.hasOwnProperty(\"new\") === false\n ) {\n return actionMessage;\n }\n const byEntity = message.actionBy;\n const onEntity = message.actionOn;\n const byString = byEntity.name;\n const forString =\n message.action !== CometChatUIKitConstants.groupMemberAction.JOINED &&\n message.action !== CometChatUIKitConstants.groupMemberAction.LEFT\n ? onEntity.name\n : \"\";\n switch (message.action) {\n case CometChatUIKitConstants.groupMemberAction.ADDED:\n actionMessage = `${byString} ${localize(\"ADDED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.JOINED:\n actionMessage = `${byString} ${localize(\"JOINED\")}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.LEFT:\n actionMessage = `${byString} ${localize(\"LEFT\")}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.KICKED:\n actionMessage = `${byString} ${localize(\"KICKED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.BANNED:\n actionMessage = `${byString} ${localize(\"BANNED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.UNBANNED:\n actionMessage = `${byString} ${localize(\"UNBANNED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE: {\n const newScope = message[\"data\"][\"extras\"][\"scope\"][\"new\"];\n actionMessage = `${byString} ${localize(\n \"MADE\"\n )} ${forString} ${newScope}`;\n break;\n }\n default:\n break;\n }\n return actionMessage;\n }\n\n getDeleteMessageBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n let defaultStyle = style;\n let messageText = localize(\"MESSAGE_IS_DELETED\");\n if (!defaultStyle) {\n defaultStyle = {\n textFont: fontHelper(theme.typography.text2),\n textColor: theme.palette.getAccent400() || \"\",\n border: `1px dashed ${theme.palette.getAccent400()}`,\n borderRadius: \"12px\",\n };\n }\n\n return ;\n }\n\n getGroupActionBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n let defaultStyle = style;\n let messageText = this.getActionMessage(message);\n if (!defaultStyle) {\n defaultStyle = {\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent600() || \"\",\n };\n }\n\n return ;\n }\n\n getTextMessageBubbleStyle(\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n const isLeftAligned = alignment !== MessageBubbleAlignment.left;\n\n if (isLeftAligned) {\n return {\n textFont: fontHelper(theme.typography.text3),\n textColor: theme.palette.getAccent900(\"light\") || \"\",\n };\n } else {\n return {\n textFont: fontHelper(theme.typography.text3),\n textColor: theme.palette.getAccent() || \"\",\n };\n }\n }\n\n getFormMessageBubbleStyle(theme: CometChatTheme) {\n const textStyle = new InputStyle({\n width: \"100%\",\n height: \"30px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"6px\",\n padding: \"0px 0px 0px 5px\",\n placeholderTextColor: theme.palette.getAccent400(),\n placeholderTextFont: fontHelper(theme.typography.subtitle2),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n background: theme.palette.getBackground(),\n });\n const labelStyle = new LabelStyle({\n textFont: fontHelper(theme.typography.subtitle1),\n textColor: theme.palette.getAccent(),\n background: \"transparent\",\n });\n const radioButtonStyle = new RadioButtonStyle({\n height: \"16px\",\n width: \"16px\",\n border: \"none\",\n labelTextFont: fontHelper(theme.typography.subtitle2),\n labelTextColor: theme.palette.getAccent600(),\n borderRadius: \"4px\",\n background: \"\",\n });\n const checkboxStyle = new CheckboxStyle({\n height: \"16px\",\n width: \"16px\",\n border: \"none\",\n borderRadius: \"4px\",\n background: \"\",\n labelTextFont: fontHelper(theme.typography.subtitle2),\n labelTextColor: theme.palette.getAccent(),\n });\n const dropdownStyle = new DropdownStyle({\n height: \"35px\",\n width: \"100%\",\n background: theme.palette.getBackground(),\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"6px\",\n activeTextFont: fontHelper(theme.typography.subtitle2),\n activeTextColor: theme.palette.getAccent(),\n arrowIconTint: theme.palette.getAccent700(),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n optionBackground: theme.palette.getBackground(),\n optionBorder: `1px solid ${theme.palette.getAccent100()}`,\n optionHoverBorder: `1px solid ${theme.palette.getAccent100()}`,\n hoverTextFont: fontHelper(theme.typography.subtitle2),\n hoverTextColor: theme.palette.getAccent(),\n hoverTextBackground: theme.palette.getAccent100(),\n });\n const buttonGroupStyle = {\n height: \"40px\",\n width: \"100%\",\n background: theme.palette.getPrimary(),\n border: `none`,\n borderRadius: \"6px\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: theme.palette.getBackground(),\n justifyContent: \"center\",\n };\n const singleSelectStyle = new SingleSelectStyle({\n height: \"100%\",\n width: \"100%\",\n background: theme.palette.getBackground(),\n border: \"none\",\n borderRadius: \"12px\",\n activeTextFont: fontHelper(theme.typography.subtitle2),\n activeTextColor: theme.palette.getAccent(),\n activeTextBackground: theme.palette.getAccent100(),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n optionBackground: theme.palette.getBackground(),\n optionBorder: `1px solid ${theme.palette.getAccent100()}`,\n optionBorderRadius: \"3px\",\n hoverTextFont: fontHelper(theme.typography.subtitle2),\n hoverTextColor: theme.palette.getAccent(),\n hoverTextBackground: theme.palette.getAccent100(),\n });\n const quickViewStyle = new QuickViewStyle({\n background: \"transparent\",\n height: \"fit-content\",\n width: \"100%\",\n titleFont: fontHelper(theme.typography.subtitle2),\n titleColor: theme.palette.getPrimary(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n leadingBarTint: theme.palette.getPrimary(),\n leadingBarWidth: \"4px\",\n borderRadius: \"8px\",\n });\n return new FormBubbleStyle({\n width: \"300px\",\n height: \"fit-content\",\n border: \"none\",\n background: \"transparent\",\n wrapperBackground: theme.palette.getBackground(),\n borderRadius: \"8px\",\n wrapperBorderRadius: \"8px\",\n textInputStyle: textStyle,\n labelStyle: labelStyle,\n radioButtonStyle: radioButtonStyle,\n checkboxStyle: checkboxStyle,\n dropdownStyle: dropdownStyle,\n buttonStyle: buttonGroupStyle,\n singleSelectStyle: singleSelectStyle,\n quickViewStyle: quickViewStyle,\n titleColor: theme.palette.getAccent(),\n titleFont: fontHelper(theme.typography.title1),\n goalCompletionTextColor: theme.palette.getAccent(),\n goalCompletionTextFont: fontHelper(theme.typography.subtitle1),\n wrapperPadding: \"2px\",\n datePickerBorder: `1px solid ${theme.palette.getAccent100()}`,\n datePickerBorderRadius: \"6px\",\n datePickerFont: fontHelper(theme.typography.subtitle2),\n datePickerFontColor: theme.palette.getAccent(),\n });\n }\n\n getSchedulerBubbleStyle = (theme: CometChatTheme) => {\n let avatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"48px\",\n height: \"48px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n });\n let listItemStyle = new ListItemStyle({\n height: \"auto\",\n width: \"100%\",\n background: \"inherit\",\n activeBackground: \"transparent\",\n borderRadius: \"0\",\n titleFont: fontHelper(theme.typography.text1),\n titleColor: theme.palette.getAccent(),\n border: \"none\",\n separatorColor: \"\",\n hoverBackground: \"transparent\",\n });\n let calendarStyle = new CalendarStyle({\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n dateTextFont: fontHelper(theme.typography.subtitle2),\n dateTextColor: theme.palette.getAccent(),\n dayTextFont: fontHelper(theme.typography.text2),\n dayTextColor: theme.palette.getAccent(),\n monthYearTextFont: fontHelper(theme.typography.text2),\n monthYearTextColor: theme.palette.getAccent(),\n defaultDateTextBackground: \"transparent\",\n disabledDateTextColor: theme.palette.getAccent400(),\n disabledDateTextFont: fontHelper(theme.typography.subtitle2),\n disabledDateTextBackground: \"transparent\",\n titleTextFont: fontHelper(theme.typography.text1),\n titleTextColor: theme.palette.getAccent(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n timezoneTextColor: theme.palette.getAccent(),\n arrowButtonTextColor: theme.palette.getAccent(),\n arrowButtonTextFont: fontHelper(theme.typography.title2),\n });\n let timeSlotStyle = new TimeSlotStyle({\n background: \"transparent\",\n height: \"fit-content\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n calendarIconTint: theme.palette.getAccent(),\n timezoneIconTint: theme.palette.getAccent(),\n emptySlotIconTint: theme.palette.getAccent500(),\n emptySlotTextColor: theme.palette.getAccent500(),\n emptySlotTextFont: fontHelper(theme.typography.subtitle1),\n dateTextColor: theme.palette.getAccent(),\n dateTextFont: fontHelper(theme.typography.subtitle1),\n seperatorTint: theme.palette.getAccent100(),\n slotBackground: theme.palette.getAccent900(),\n slotBorder: \"none\",\n slotBorderRadius: \"8px\",\n slotTextColor: theme.palette.getAccent(),\n slotTextFont: fontHelper(theme.typography.caption2),\n timezoneTextColor: theme.palette.getAccent(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n titleTextColor: theme.palette.getAccent(),\n titleTextFont: fontHelper(theme.typography.text1),\n });\n let qucikViewStyle = new QuickViewStyle({\n background: theme.palette.getAccent50(),\n height: \"fit-content\",\n width: \"100%\",\n titleFont: fontHelper(theme.typography.subtitle2),\n titleColor: theme.palette.getAccent(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n leadingBarTint: theme.palette.getPrimary(),\n leadingBarWidth: \"4px\",\n borderRadius: \"8px\",\n });\n return new SchedulerBubbleStyle({\n avatarStyle: avatarStyle,\n listItemStyle: listItemStyle,\n quickViewStyle: qucikViewStyle,\n dateSelectorStyle: calendarStyle,\n timeSlotSelectorStyle: timeSlotStyle,\n backButtonIconTint: theme.palette.getPrimary(),\n background: \"transparent\",\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"8px\",\n loadingIconTint: theme.palette.getAccent600(),\n suggestedTimeBackground: theme.palette.getAccent900(),\n suggestedTimeBorder: `1px solid ${theme.palette.getPrimary()}`,\n suggestedTimeBorderRadius: \"8px\",\n suggestedTimeDisabledBackground: theme.palette.getAccent50(),\n suggestedTimeDisabledBorder: `1px solid ${theme.palette.getAccent200()}`,\n suggestedTimeDisabledBorderRadius: \"8px\",\n suggestedTimeDisabledTextColor: theme.palette.getAccent700(),\n suggestedTimeDisabledTextFont: fontHelper(theme.typography.text3),\n suggestedTimeTextColor: theme.palette.getPrimary(),\n suggestedTimeTextFont: fontHelper(theme.typography.text3),\n moreButtonDisabledTextBackground: \"transparent\",\n moreButtonDisabledTextBorder: \"none\",\n moreButtonDisabledTextBorderRadius: \"0\",\n moreButtonDisabledTextColor: theme.palette.getAccent600(),\n moreButtonDisabledTextFont: fontHelper(theme.typography.caption2),\n moreButtonTextBackground: \"transparent\",\n moreButtonTextBorder: \"none\",\n moreButtonTextBorderRadius: \"0\",\n moreButtonTextColor: theme.palette.getPrimary(),\n moreButtonTextFont: fontHelper(theme.typography.caption2),\n goalCompletionTextColor: theme.palette.getAccent(),\n goalCompletionTextFont: fontHelper(theme.typography.text3),\n errorTextColor: theme.palette.getError(),\n errorTextFont: fontHelper(theme.typography.text3),\n scheduleButtonStyle: {\n iconHeight: \"16px\",\n iconWidth: \"16px\",\n buttonIconTint: theme.palette.getAccent(),\n buttonTextFont: fontHelper(theme.typography.name),\n buttonTextColor: theme.palette.getAccent(\"dark\"),\n border: \"none\",\n borderRadius: \"8px\",\n background: theme.palette.getPrimary(),\n width: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"8px\",\n },\n seperatorTint: theme.palette.getAccent200(),\n subtitleTextColor: theme.palette.getAccent400(),\n subtitleTextFont: fontHelper(theme.typography.name),\n summaryTextColor: theme.palette.getAccent(),\n summaryTextFont: fontHelper(theme.typography.subtitle1),\n timezoneTextColor: theme.palette.getAccent600(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n titleTextColor: theme.palette.getAccent(),\n titleTextFont: fontHelper(theme.typography.title1),\n timezoneIconTint: theme.palette.getAccent(),\n calendarIconTint: theme.palette.getAccent(),\n clockIconTint: theme.palette.getAccent(),\n });\n };\n\n getCardMessageBubbleStyle(theme: CometChatTheme) {\n const buttonStyle = {\n height: \"40px\",\n width: \"100%\",\n background: \"transparent\",\n border: `none`,\n borderRadius: \"0px\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: `${theme.palette.getPrimary()}`,\n justifyContent: \"center\",\n };\n\n return new CardBubbleStyle({\n background: \"transparent\",\n borderRadius: \"8px\",\n height: \"fit-content\",\n width: \"300px\",\n imageHeight: \"auto\",\n imageWidth: \"100%\",\n imageRadius: \"8px\",\n imageBackgroundColor: \"transparent\",\n descriptionFontColor: theme.palette.getAccent(),\n descriptionFont: fontHelper(theme.typography.subtitle2),\n buttonStyle: buttonStyle,\n dividerTintColor: theme.palette.getAccent100(),\n wrapperBackground: theme.palette.getBackground(),\n wrapperBorderRadius: \"8px\",\n wrapperPadding: \"2px\",\n disabledButtonColor: theme.palette.getAccent600(),\n });\n }\n\n getTextMessageBubble(\n messageText: string,\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n style?: TextBubbleStyle,\n additionalConfigurations?: any\n ): any {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n\n let textFormatters: Array = config.textFormatters;\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter({\n theme,\n alignment,\n });\n textFormatters.push(urlTextFormatter);\n }\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getTextMessageBubbleStyle(alignment, theme);\n }\n\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n );\n }\n\n getAudioMessageBubble(\n audioUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: BaseStyle\n ): any {\n return ;\n }\n\n getFileMessageBubble(\n fileUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: FileBubbleStyle\n ): any {\n let defaulStyle = style;\n if (!defaulStyle) {\n defaulStyle = {\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n iconTint: theme.palette.getPrimary(),\n };\n }\n return (\n \n );\n /*\n return (\n \n )\n */\n }\n\n getFormMessageBubble(\n message: FormMessage,\n theme: CometChatTheme,\n style?: any,\n onSubmitClick?: Function\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getFormMessageBubbleStyle(theme);\n }\n\n const hasCustomCallback = onSubmitClick ? true : false;\n\n return (\n {\n if (onSubmitClick) onSubmitClick(e.detail);\n }}\n hasCustomCallback={hasCustomCallback}\n />\n );\n }\n getSchedulerMessageBubble(\n message: SchedulerMessage,\n theme: CometChatTheme,\n style?: any,\n onSubmitClick?: (timestamp: string, message: SchedulerMessage) => void\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getSchedulerBubbleStyle(theme);\n }\n\n return (\n \n );\n }\n getSchedulerWrapperStyle() {\n return { height: \"inherit\", width: \"inherit\", display: \"block\" };\n }\n\n getCardMessageBubble(\n message: CardMessage,\n theme: CometChatTheme,\n style?: CardBubbleStyle\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getCardMessageBubbleStyle(theme);\n }\n return (\n \n );\n }\n\n getImageMessageBubble(\n imageUrl: string,\n placeholderImage: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n onClick?: Function,\n style?: ImageBubbleStyle\n ) {\n if (!style) {\n style = new ImageBubbleStyle({\n height: 'auto',\n maxHeight: '500px',\n maxWidth: '400px',\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n });\n }\n\n const fullScreenViewer = (\n {\n CometChatUIEvents.ccHideDialog.next();\n }}\n />\n );\n return (\n {\n CometChatUIEvents.ccShowDialog.next({\n child: fullScreenViewer,\n confirmCallback: null,\n });\n }}\n />\n );\n }\n\n getVideoMessageBubble(\n videoUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n thumbnailUrl?: string,\n onClick?: Function,\n style?: BaseStyle\n ): any {\n if (!style) {\n style = new BaseStyle({\n height: \"130px\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px 8px\",\n background: \"transparent\",\n });\n }\n\n return (\n \n );\n }\n\n imageAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.image,\n title: localize(\"ATTACH_IMAGE\"),\n iconURL: ImageIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n videoAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.video,\n title: localize(\"ATTACH_VIDEO\"),\n iconURL: VideoIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n audioAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.audio,\n title: localize(\"ATTACH_AUDIO\"),\n iconURL: AudioIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n fileAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.file,\n title: localize(\"ATTACH_FILE\"),\n iconURL: FileIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n getAttachmentOptions(\n theme: CometChatTheme,\n id: ComposerId\n ): Array {\n let actions: Array = [\n this.imageAttachmentOption(theme),\n this.videoAttachmentOption(theme),\n this.audioAttachmentOption(theme),\n this.fileAttachmentOption(theme),\n ];\n\n return actions;\n }\n\n getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : [this.getMentionsTextFormatter({ theme: additionalConfigurations.theme, disableMentions: additionalConfigurations.disableMentions })],\n };\n let message = ConversationUtils.getLastConversationMessage(\n conversation,\n loggedInUser,\n config\n );\n let messageObject = conversation.getLastMessage();\n\n\n if (messageObject) {\n\n let textFormatters: Array = config.textFormatters;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(messageObject);\n if (messageObject.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n messageObject.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n }\n if (mentionsTextFormatter) {\n break;\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n messageObject,\n ...config,\n alignment: null,\n theme: additionalConfigurations.theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n }\n\n if (\n messageObject &&\n messageObject instanceof CometChat.TextMessage\n ) {\n for (let i = 0; i < textFormatters.length; i++) {\n message = textFormatters[i].getFormattedText(message, { mentionsTargetElement: MentionsTargetElement.conversation });\n }\n }\n }\n\n\n return message;\n }\n\n getDefaultDetailsTemplate(\n loggedInUser: CometChat.User,\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme\n ): CometChatDetailsTemplate[] {\n return DetailsUtils.getDefaultDetailsTemplate(\n loggedInUser,\n user,\n group,\n theme\n );\n }\n\n getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): any {\n return [];\n }\n\n getAIOptions(\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme,\n id?: Map,\n AIOptionsStyle?: AIOptionsStyle\n ): Array {\n return [];\n }\n\n /**\n * Adds styled @ for every mention in the text by matching uid\n *\n * @param {CometChat.TextMessage} message\n * @param {string} subtitle\n * @returns {void}\n */\n getMentionsFormattedText(\n message: CometChat.TextMessage,\n subtitle: string,\n mentionsFormatterParams: {\n mentionsTargetElement: MentionsTargetElement;\n theme: CometChatTheme;\n }\n ) {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp: string = subtitle;\n let match = regex.exec(messageText);\n let cometChatUsers: Array = [];\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] == mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n cometChatUsers.push(user);\n }\n match = regex.exec(messageText);\n }\n let mentionsFormatter = this.getMentionsTextFormatter({\n theme: new CometChatTheme({}),\n });\n\n mentionsFormatter.setClasses([\"cc-mentions\"]);\n mentionsFormatter.setCometChatUserGroupMembers(cometChatUsers);\n\n messageTextTmp = mentionsFormatter.getFormattedText(\n messageTextTmp,\n mentionsFormatterParams\n ) as string;\n return messageTextTmp;\n }\n\n getAllTextFormatters(formatterParams: any): CometChatTextFormatter[] {\n let formatters = [];\n const mentionsFormatter = formatterParams.disableMentions ? null : ChatConfigurator.getDataSource().getMentionsTextFormatter(\n formatterParams\n );\n const urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(formatterParams);\n if (mentionsFormatter) {\n formatters.push(mentionsFormatter);\n }\n if (urlTextFormatter) {\n formatters.push(urlTextFormatter);\n }\n return formatters;\n }\n\n getMentionsTextFormatter(params: any): CometChatMentionsFormatter {\n let mentionsTextFormatter = new CometChatMentionsFormatter();\n if (params && params.theme) {\n mentionsTextFormatter.setComposerMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text2),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text2),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setConversationMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setRightBubbleMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getTertiary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getTertiary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setLeftBubbleMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n }\n return mentionsTextFormatter;\n }\n\n getUrlTextFormatter(params: any = {}): CometChatUrlsFormatter {\n let urlTextFormatter = new CometChatUrlsFormatter([\n /(https?:\\/\\/[^\\s]+)/g,\n ]);\n if (params.alignment == MessageBubbleAlignment.left) {\n urlTextFormatter.setStyle({\n formattedTextColor: params.theme.palette.getPrimary(),\n formattedTextFont: fontHelper(params.theme.typography.text3),\n });\n } else {\n urlTextFormatter.setStyle({\n formattedTextColor: params.theme.palette.getTertiary(),\n formattedTextFont: fontHelper(params.theme.typography.text3),\n });\n }\n return urlTextFormatter;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fediticon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FEdit%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.8666667%2C0.883555287%20C17.2934403%2C0.312679329%2016.5158214%2C-0.00540815756%2015.7068357%2C0%20C14.8978501%2C0.00554734575%2014.1246099%2C0.334135909%2013.5591667%2C0.912721954%20L1.47583333%2C12.9960553%20L0%2C18.750222%20L5.75416667%2C17.2743886%20L17.8375%2C5.19105529%20C18.416086%2C4.6256121%2018.7446746%2C3.8523719%2018.750222%2C3.04338623%20C18.7556301%2C2.23440057%2018.4375426%2C1.45678164%2017.8666667%2C0.883555287%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2213.2133333%22%20y1%3D%221.25855529%22%20x2%3D%2217.4916667%22%20y2%3D%225.53688862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211.4683333%22%20y1%3D%223.00355529%22%20x2%3D%2215.7466667%22%20y2%3D%227.28188862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%221.47583333%22%20y1%3D%2212.9960553%22%20x2%3D%225.75833333%22%20y2%3D%2217.270222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fdeleteicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FReactions%20Add%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FReactions-Add%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C1.25%20C13.2547515%2C1.25%2014.4810955%2C1.46534515%2015.6383943%2C1.88154366%20C16.0281686%2C2.02171794%2016.2305095%2C2.45132619%2016.0903352%2C2.84110054%20C15.9501609%2C3.2308749%2015.5205527%2C3.43321574%2015.1307783%2C3.29304146%20C14.1357379%2C2.9351958%2013.0810879%2C2.75%2012%2C2.75%20C6.89136606%2C2.75%202.75%2C6.89136606%202.75%2C12%20C2.75%2C17.1086339%206.89136606%2C21.25%2012%2C21.25%20C17.1086339%2C21.25%2021.25%2C17.1086339%2021.25%2C12%20C21.25%2C11.2729266%2021.1662576%2C10.5573695%2021.0020875%2C9.8629795%20C20.906785%2C9.45987863%2021.1563049%2C9.05584287%2021.5594058%2C8.96054036%20C21.9625066%2C8.86523784%2022.3665424%2C9.11475771%2022.4618449%2C9.51785857%20C22.6527043%2C10.3251362%2022.75%2C11.1565032%2022.75%2C12%20C22.75%2C17.9370611%2017.9370611%2C22.75%2012%2C22.75%20C6.06293894%2C22.75%201.25%2C17.9370611%201.25%2C12%20C1.25%2C6.06293894%206.06293894%2C1.25%2012%2C1.25%20Z%20M17.6586667%2C13.25%20C18.1185754%2C13.25%2018.5498402%2C13.4733153%2018.8153335%2C13.8488361%20C19.0808092%2C14.2243322%2019.1475058%2C14.7053253%2018.9944111%2C15.1383417%20C17.9483179%2C18.1044405%2015.1451634%2C20.0881971%2012%2C20.0881971%20C8.85483662%2C20.0881971%206.05168206%2C18.1044405%205.00578211%2C15.1388889%20C4.85249421%2C14.7053253%204.91919084%2C14.2243322%205.18466653%2C13.8488361%20C5.45015977%2C13.4733153%205.88142461%2C13.25%206.34133333%2C13.25%20L6.34133333%2C13.25%20Z%20M17.558%2C14.695%20L17.538%2C14.749%20L6.461%2C14.749%20L6.50827179%2C14.8734156%20C7.3732069%2C17.0322917%209.42640021%2C18.4853104%2011.750045%2C18.5829516%20L11.750045%2C18.5829516%20L12%2C18.5881971%20C14.5090629%2C18.5881971%2016.7452873%2C17.0056497%2017.5800043%2C14.6388889%20L17.558%2C14.695%20Z%20M8.11422222%2C8.58288148%20C9.2798673%2C8.58288148%2010.3188817%2C9.31776232%2010.7071667%2C10.4168361%20C10.8451443%2C10.8073935%2010.6403879%2C11.2358557%2010.2498306%2C11.3738333%20C9.89181964%2C11.5003128%209.50195808%2C11.3388005%209.33318946%2C11.0101749%20L9.29283333%2C10.9164972%20C9.11634015%2C10.4169182%208.6440609%2C10.0828815%208.11422222%2C10.0828815%20C7.62853677%2C10.0828815%207.19121722%2C10.3635651%206.98575875%2C10.7951488%20L6.93561111%2C10.9164972%20C6.79763351%2C11.3070546%206.36917126%2C11.5118109%205.97861389%2C11.3738333%20C5.58805653%2C11.2358557%205.38330017%2C10.8073935%205.52127778%2C10.4168361%20C5.90956279%2C9.31776232%206.94857714%2C8.58288148%208.11422222%2C8.58288148%20Z%20M15.8857778%2C8.58288148%20C17.0514229%2C8.58288148%2018.0904372%2C9.31776232%2018.4787222%2C10.4168361%20C18.6166998%2C10.8073935%2018.4119435%2C11.2358557%2018.0213861%2C11.3738333%20C17.6633752%2C11.5003128%2017.2735136%2C11.3388005%2017.104745%2C11.0101749%20L17.0643889%2C10.9164972%20C16.8878957%2C10.4169182%2016.4156165%2C10.0828815%2015.8857778%2C10.0828815%20C15.4000923%2C10.0828815%2014.9627728%2C10.3635651%2014.7573143%2C10.7951488%20L14.7071667%2C10.9164972%20C14.5691891%2C11.3070546%2014.1407268%2C11.5118109%2013.7501694%2C11.3738333%20C13.3596121%2C11.2358557%2013.1548557%2C10.8073935%2013.2928333%2C10.4168361%20C13.6811183%2C9.31776232%2014.7201327%2C8.58288148%2015.8857778%2C8.58288148%20Z%20M19.5%2C0.25%20C19.8796958%2C0.25%2020.193491%2C0.532153882%2020.2431534%2C0.898229443%20L20.25%2C1%20L20.25%2C4.25%20L23%2C4.25%20C23.4142136%2C4.25%2023.75%2C4.58578644%2023.75%2C5%20C23.75%2C5.37969577%2023.4678461%2C5.69349096%2023.1017706%2C5.74315338%20L23%2C5.75%20L20.25%2C5.75%20L20.25%2C9%20C20.25%2C9.41421356%2019.9142136%2C9.75%2019.5%2C9.75%20C19.1203042%2C9.75%2018.806509%2C9.46784612%2018.7568466%2C9.10177056%20L18.75%2C9%20L18.75%2C5.75%20L16%2C5.75%20C15.5857864%2C5.75%2015.25%2C5.41421356%2015.25%2C5%20C15.25%2C4.62030423%2015.5321539%2C4.30650904%2015.8982294%2C4.25684662%20L16%2C4.25%20L18.75%2C4.25%20L18.75%2C1%20C18.75%2C0.585786438%2019.0857864%2C0.25%2019.5%2C0.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fthreadicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FThread%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.6578236%2C0%20C7.2733682%2C-0.00487001799%204.15271669%2C1.82840041%202.50707282%2C4.78828665%20C0.861428952%2C7.74817289%200.949909343%2C11.3686229%202.73817252%2C14.2444485%20L0%2C20%20L5.74989584%2C17.2595575%20C9.11259725%2C19.3520226%2013.4289699%2C19.0910325%2016.5155083%2C16.6086132%20C19.6020468%2C14.1261939%2020.7857069%2C9.9636565%2019.4677154%2C6.22668649%20C18.1497239%2C2.48971647%2014.6174794%2C-0.00681020874%2010.6578236%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%226.66667597%22%20x2%3D%2214.6527312%22%20y2%3D%226.66667597%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%225.3271355%22%20y1%3D%229.33334078%22%20x2%3D%2215.9849591%22%20y2%3D%229.33334078%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%2212.0000056%22%20x2%3D%2214.6527312%22%20y2%3D%2212.0000056%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.8%2015.0099H21V21H13.8V15.0099Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.4%2011.4158C16.7635%2011.4158%2016.153%2011.6682%2015.7029%2012.1176C15.2529%2012.5669%2015%2013.1764%2015%2013.8118V15.0099H19.8V13.8118C19.8%2013.1764%2019.5471%2012.5669%2019.0971%2012.1176C18.647%2011.6682%2018.0365%2011.4158%2017.4%2011.4158Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.3995%2017.7286C17.3402%2017.7286%2017.2823%2017.7461%2017.2331%2017.7791C17.1838%2017.812%2017.1454%2017.8587%2017.1228%2017.9135C17.1001%2017.9682%2017.0942%2018.0284%2017.1057%2018.0865C17.1173%2018.1446%2017.1458%2018.198%2017.1877%2018.2399C17.2296%2018.2818%2017.283%2018.3103%2017.3411%2018.3218C17.3992%2018.3334%2017.4594%2018.3275%2017.5141%2018.3048C17.5688%2018.2821%2017.6156%2018.2437%2017.6485%2018.1945C17.6814%2018.1452%2017.699%2018.0873%2017.699%2018.0281C17.699%2017.9486%2017.6674%2017.8725%2017.6113%2017.8163C17.5551%2017.7601%2017.4789%2017.7286%2017.3995%2017.7286%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%2010.8503C20.9168%209.57663%2020.5439%208.33868%2019.9096%207.23051C19.2753%206.12235%2018.3962%205.17314%2017.3393%204.45503C16.2824%203.73692%2015.0754%203.26882%2013.8101%203.0863C12.5448%202.90378%2011.2545%203.01164%2010.0372%203.4017C8.81989%203.79176%207.70769%204.45374%206.78512%205.33732C5.86254%206.22091%205.15388%207.30285%204.71298%208.5009C4.27209%209.69895%204.11057%2010.9816%204.24071%2012.2513C4.37084%2013.521%204.78921%2014.7444%205.464%2015.8285L3%2021L8.1768%2018.5368C9.14753%2019.1412%2010.2319%2019.5408%2011.3632%2019.7109%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCopy%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCopy%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6%2C6.00000118%20L15.6%2C3.60000142%20C15.6%2C2.93725978%2015.0627417%2C2.40000154%2014.4%2C2.40000154%20L11.2%2C2.40000154%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.4%2C2.40000154%20L1.2%2C2.40000154%20C0.5372583%2C2.40000154%200%2C2.93725978%200%2C3.60000142%20L0%2C16.8000001%20C0%2C17.4627418%200.5372583%2C18%201.2%2C18%20L6%2C18%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9368%2C3.18960146%20C10.8549236%2C3.43464248%2010.625558%2C3.59990166%2010.3672%2C3.60000142%20L5.2328%2C3.60000142%20C4.97444201%2C3.59990166%204.74507642%2C3.43464248%204.6632%2C3.18960146%20L3.8632%2C0.789601696%20C3.80186075%2C0.606570139%203.8324564%2C0.405197059%203.94539051%2C0.248643741%20C4.05832463%2C0.0920904237%204.23976415%2C-0.000467229348%204.4328%2C0%20L11.1672%2C0%20C11.3602359%2C-0.000467229348%2011.5416754%2C0.0920904237%2011.6546095%2C0.248643741%20C11.7675436%2C0.405197059%2011.7981392%2C0.606570139%2011.7368%2C0.789601696%20L10.9368%2C3.18960146%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolygon%20id%3D%22Path%22%20points%3D%228.4%208.40000095%2018%208.40000095%2018%2018%208.4%2018%22%3E%3C%2Fpolygon%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2210.8000007%22%20x2%3D%2215.6%22%20y2%3D%2210.8000007%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2213.2000005%22%20x2%3D%2215.6%22%20y2%3D%2213.2000005%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2215.6000002%22%20x2%3D%2212.6%22%20y2%3D%2215.6000002%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBw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cAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPhoto%20Library%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPhoto-Library%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C2.25%20C9.0543618%2C2.25%209.91816512%2C3.06587779%209.99451426%2C4.10073766%20L10%2C4.25%20L10%2C4.749%20L19.25%2C4.75%20C20.3043618%2C4.75%2021.1681651%2C5.56587779%2021.2445143%2C6.60073766%20L21.25%2C6.75%20L21.25%2C8.647%20L21.3090595%2C8.67075883%20C21.560776%2C8.78204037%2021.7890445%2C8.94502905%2021.9776884%2C9.15176047%20L22.0859904%2C9.28098473%20C22.4268417%2C9.7243264%2022.5648157%2C10.2875838%2022.4792305%2C10.8049438%20L20.599742%2C19.7646666%20C20.3801645%2C20.5892111%2019.6644249%2C21.1776759%2018.8253479%2C21.243794%20L18.6666667%2C21.25%20L4.41416667%2C21.25%20C4.34513107%2C21.25%204.27827401%2C21.2406726%204.21478696%2C21.2232093%20L4.198%2C21.217%20L4.13447967%2C21.2119882%20C3.12077897%2C21.0788944%202.34585208%2C20.2581085%202.25808253%2C19.244849%20L2.25%2C19.0833333%20L2.25%2C4.25%20C2.25%2C3.1956382%203.06587779%2C2.33183488%204.10073766%2C2.25548574%20L4.25%2C2.25%20L8%2C2.25%20Z%20M20.5%2C9.9999998%20L8.94041369%2C9.9999998%20C8.7494078%2C9.99989301%208.57810253%2C10.1081415%208.50251018%2C10.2403227%20L8.47304199%2C10.3080169%20L6.50183631%2C19.6519318%20L6.47%2C19.749%20L18.6669246%2C19.7500001%20C18.8652457%2C19.7500001%2019.0419017%2C19.6334019%2019.1157978%2C19.483767%20L19.1409396%2C19.4178635%20L20.9835913%2C10.6286666%20C21.0235655%2C10.4785581%2020.991501%2C10.3183966%2020.8968201%2C10.1952461%20C20.8210754%2C10.0967258%2020.71214%2C10.0308462%2020.5919295%2C10.0084626%20L20.5%2C9.9999998%20Z%20M8%2C3.75%20L4.25%2C3.75%20C4.00454011%2C3.75%203.80039163%2C3.92687516%203.75805567%2C4.16012437%20L3.7499284%2C4.25%20L3.7499284%2C19.0729701%20C3.75450399%2C19.4040804%204.00142215%2C19.6816449%204.32974627%2C19.7247522%20C4.62158992%2C19.7630698%204.89911328%2C19.6058121%205.0118617%2C19.3809093%20L5.04612468%2C19.2936497%20L7.01858631%2C9.94533345%20C7.25034003%2C9.14246197%207.95397669%2C8.57422367%208.77513888%2C8.50674095%20L8.94083333%2C8.5%20L19.75%2C8.5%20L19.75%2C6.75%20C19.75%2C6.50454011%2019.5731248%2C6.30039163%2019.3398756%2C6.25805567%20L19.25%2C6.25%20L9.25%2C6.25%20C8.87030423%2C6.25%208.55650904%2C5.96784612%208.50684662%2C5.60177056%20L8.5%2C5.5%20L8.5%2C4.25%20C8.5%2C4.00454011%208.32312484%2C3.80039163%208.08987563%2C3.75805567%20L8%2C3.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.5%2C11.3125%20L10.6157711%2C11.3187346%20C11.1481147%2C11.3764201%2011.5625%2C11.8273176%2011.5625%2C12.375%20C11.5625%2C12.9618025%2011.0868025%2C13.4375%2010.5%2C13.4375%20C9.91319745%2C13.4375%209.4375%2C12.9618025%209.4375%2C12.375%20C9.4375%2C11.8273176%209.85188534%2C11.3764201%2010.3842289%2C11.3187346%20L10.5%2C11.3125%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.7615505%2C13.3341733%20C15.1650281%2C13.339062%2015.5432492%2C13.5206846%2015.7989971%2C13.8261321%20L15.8889717%2C13.9463759%20L18.3148051%2C17.5838759%20C18.5446241%2C17.928486%2018.4515675%2C18.3941527%2018.1069574%2C18.6239717%20C17.7936756%2C18.8328981%2017.3803468%2C18.7749852%2017.1351188%2C18.5038182%20L17.0668616%2C18.4161241%20L14.742%2C14.93%20L13.1806552%2C17.1565514%20C12.9524338%2C17.481881%2012.5156848%2C17.5682521%2012.1842442%2C17.371143%20L12.096698%2C17.3103241%20L11.179%2C16.572%20L9.94871059%2C18.4165154%20C9.73958776%2C18.7296662%209.33567986%2C18.8347993%209.00516806%2C18.6784976%20L8.90848458%2C18.6237106%20C8.59533381%2C18.4145878%208.49020073%2C18.0106799%208.64650244%2C17.6801681%20L8.70128941%2C17.5834846%20L10.0076608%2C15.6272604%20C10.2213273%2C15.3068138%2010.5595979%2C15.0906712%2010.9401624%2C15.0314258%20C11.2731564%2C14.9795861%2011.6118179%2C15.0520295%2011.8942272%2C15.2330124%20L12.0116353%2C15.3171759%20L12.412%2C15.639%20L13.6194632%2C13.9191131%20C13.8512845%2C13.5888451%2014.2147222%2C13.3792001%2014.6114213%2C13.3405523%20L14.7615505%2C13.3341733%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M1%205C1%203.89543%201.89543%203%203%203H21.5C22.6046%203%2023.5%203.89543%2023.5%205V19C23.5%2020.1046%2022.6046%2021%2021.5%2021H3C1.89543%2021%201%2020.1046%201%2019V5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%2015.5C9%2015.8978%209.15803%2016.2794%209.43934%2016.5607C9.72064%2016.842%2010.1022%2017%2010.5%2017C10.8978%2017%2011.2794%2016.842%2011.5607%2016.5607C11.842%2016.2794%2012%2015.8978%2012%2015.5C12%2015.1022%2011.842%2014.7206%2011.5607%2014.4393C11.2794%2014.158%2010.8978%2014%2010.5%2014C10.1022%2014%209.72064%2014.158%209.43934%2014.4393C9.15803%2014.7206%209%2015.1022%209%2015.5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%2015V7L14.7141%209.27566C15.3657%209.82133%2015.7957%2010.5251%2015.9433%2011.2871C16.0909%2012.0491%2015.9486%2012.8307%2015.5365%2013.5211%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FAttachment%20File%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FAttachment-File%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.33333333%2C14.6666667%20C9.33333333%2C17.6121853%2011.721148%2C20%2014.6666667%2C20%20C17.6121853%2C20%2020%2C17.6121853%2020%2C14.6666667%20C20%2C11.721148%2017.6121853%2C9.33333333%2014.6666667%2C9.33333333%20C11.721148%2C9.33333333%209.33333333%2C11.721148%209.33333333%2C14.6666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2214.6666667%22%20y1%3D%2212%22%20x2%3D%2214.6666667%22%20y2%3D%2217.3333333%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212%22%20y1%3D%2214.6666667%22%20x2%3D%2217.3333333%22%20y2%3D%2214.6666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6%2C17.3333333%20L1.33333333%2C17.3333333%20C0.596953667%2C17.3333333%200%2C16.7363797%200%2C16%20L0%2C1.33333333%20C0%2C0.596953667%200.596953667%2C0%201.33333333%2C0%20L10.7813333%2C0%20C11.1347086%2C0%2011.4736014%2C0.140428224%2011.7235556%2C0.390222222%20L14.2764444%2C2.94311111%20C14.5262384%2C3.19306523%2014.6666667%2C3.53195804%2014.6666667%2C3.88533333%20L14.6666667%2C6%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { MessagesDataSource } from \"../Utils/MessagesDataSource\";\nimport { DataSource } from \"./DataSource\";\n\nexport class ChatConfigurator {\n static dataSource: DataSource;\n static names: Array = [\"message utils\"];\n\n static init(initialSource?: DataSource) {\n this.dataSource = initialSource ?? new MessagesDataSource();\n if (!initialSource) {\n this.names = [];\n }\n this.names.push(this.dataSource.getId());\n }\n\n static enable(callback: (dataSource: DataSource) => DataSource) {\n let oldSource: DataSource = this.dataSource;\n let newSource: DataSource = callback(oldSource);\n\n if (!this.names.find(nm => nm === newSource.getId())) {\n this.dataSource = newSource;\n this.names.push(this.dataSource.getId());\n }\n }\n\n static getDataSource(): DataSource {\n return this.dataSource;\n }\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nabstract class AIExtensionDataSource {\n abstract addExtension(): void;\n abstract getExtensionId(): string;\n\n enable(): void {\n CometChat.isAIFeatureEnabled(this.getExtensionId()).then(\n (enabled: Boolean) => {\n if (enabled) this.addExtension();\n }\n );\n }\n\n}\n\nexport { AIExtensionDataSource };","import {\n BaseStyle,\n FileBubbleStyle,\n ImageBubbleStyle,\n TextBubbleStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CardBubbleStyle,\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUrlsFormatter,\n ComposerId,\n FormBubbleStyle,\n SchedulerBubbleStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatDetailsTemplate,\n CometChatMessageComposerAction,\n CometChatMessageTemplate,\n CometChatTheme,\n FormMessage,\n MessageBubbleAlignment,\n SchedulerMessage,\n} from \"@cometchat/uikit-resources\";\n\nimport { AIOptionsStyle } from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"./DataSource\";\nimport { MessagesDataSource } from \"../Utils/MessagesDataSource\";\n\nexport abstract class DataSourceDecorator implements DataSource {\n dataSource: DataSource;\n constructor(dataSource: DataSource) {\n this.dataSource = dataSource;\n }\n\n getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getImageMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getImageMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getVideoMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getVideoMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getAudioMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getAudioMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getFileMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getBottomView(\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getBottomView(\n message,\n alignment\n );\n }\n getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n getImageMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getImageMessageContentView(message, alignment, theme);\n }\n getVideoMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getVideoMessageContentView(message, alignment, theme);\n }\n getAudioMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAudioMessageContentView(message, alignment, theme);\n }\n getFileMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getFileMessageContentView(message, alignment, theme);\n }\n getFormMessageContentView(\n message: FormMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getFormMessageContentView(message, alignment, theme);\n }\n getSchedulerMessageContentView(\n message: SchedulerMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageContentView(message, alignment, theme);\n }\n getCardMessageContentView(\n message: CardMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getCardMessageContentView(message, alignment, theme);\n }\n getTextMessageTemplate(\n theme: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageTemplate(\n theme,\n additionalConfigurations\n );\n }\n getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getImageMessageTemplate(theme);\n }\n getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getVideoMessageTemplate(theme);\n }\n getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAudioMessageTemplate(theme);\n }\n getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageTemplate(\n theme\n );\n }\n getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getGroupActionTemplate(\n theme\n );\n }\n getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getFormMessageTemplate(\n theme\n );\n }\n getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageTemplate(theme);\n }\n getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getCardMessageTemplate(\n theme\n );\n }\n getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n return (this.dataSource ?? new MessagesDataSource()).getAllMessageTemplates(\n theme,\n additionalConfigurations\n );\n }\n getMessageTemplate(\n messageType: string,\n messageCategory: string,\n theme?: CometChatTheme | undefined\n ): CometChatMessageTemplate | null {\n return (this.dataSource ?? new MessagesDataSource()).getMessageTemplate(\n messageType,\n messageCategory,\n theme\n );\n }\n getMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getCommonOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getAttachmentOptions(\n theme: CometChatTheme,\n id: ComposerId\n ): CometChatMessageComposerAction[] {\n return (this.dataSource ?? new MessagesDataSource()).getAttachmentOptions(\n theme,\n id\n );\n }\n getAllMessageTypes(): string[] {\n return (this.dataSource ?? new MessagesDataSource()).getAllMessageTypes();\n }\n getAllMessageCategories(): string[] {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAllMessageCategories();\n }\n getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ): any {\n return (this.dataSource ?? new MessagesDataSource()).getAuxiliaryOptions(\n id,\n theme,\n user,\n group\n );\n }\n getId(): string {\n return (this.dataSource ?? new MessagesDataSource()).getId();\n }\n getDeleteMessageBubble(\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getDeleteMessageBubble(\n messageObject,\n theme,\n style\n );\n }\n getGroupActionBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getGroupActionBubble(\n message,\n theme,\n style\n );\n }\n getTextMessageBubble(\n messageText: string,\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n style?: TextBubbleStyle,\n additionalConfigurations?: any\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageBubble(\n messageText,\n message,\n alignment,\n theme,\n style,\n additionalConfigurations\n );\n }\n getVideoMessageBubble(\n videoUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n thumbnailUrl?: string,\n onClick?: Function,\n style?: BaseStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getVideoMessageBubble(\n videoUrl,\n message,\n theme,\n thumbnailUrl,\n onClick,\n style\n );\n }\n getImageMessageBubble(\n imageUrl: string,\n placeholderImage: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n onClick?: Function,\n style?: ImageBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getImageMessageBubble(\n imageUrl,\n placeholderImage,\n message,\n theme,\n onClick,\n style\n );\n }\n getAudioMessageBubble(\n audioUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: BaseStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getAudioMessageBubble(\n audioUrl,\n message,\n theme,\n title,\n style\n );\n }\n getFileMessageBubble(\n fileUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: FileBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageBubble(\n fileUrl,\n message,\n theme,\n title,\n style\n );\n }\n getFormMessageBubble(\n message: FormMessage,\n theme: CometChatTheme,\n style?: FormBubbleStyle,\n onSubmitClick?: Function\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getFormMessageBubble(\n message,\n theme,\n style,\n onSubmitClick\n );\n }\n getSchedulerMessageBubble(\n message: SchedulerMessage,\n theme: CometChatTheme,\n style?: SchedulerBubbleStyle,\n onSubmitClick?: Function\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageBubble(message, theme, style, onSubmitClick);\n }\n getCardMessageBubble(\n message: CardMessage,\n theme: CometChatTheme,\n style?: CardBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getCardMessageBubble(\n message,\n theme,\n style\n );\n }\n getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n getDefaultDetailsTemplate(\n loggedInUser: CometChat.User,\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme\n ): CometChatDetailsTemplate[] {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getDefaultDetailsTemplate(loggedInUser, user, group, theme);\n }\n getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): any {\n return (this.dataSource ?? new MessagesDataSource()).getAuxiliaryHeaderMenu(\n user,\n group\n );\n }\n getAIOptions(\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme,\n id?: Map,\n AIOptionsStyle?: AIOptionsStyle\n ): (CometChatMessageComposerAction | CometChatActionsView)[] {\n return (this.dataSource ?? new MessagesDataSource()).getAIOptions(\n user,\n group,\n theme,\n id,\n AIOptionsStyle\n );\n }\n getAllTextFormatters(formatterParams: any): CometChatTextFormatter[] {\n let formatters = [];\n const mentionsFormatter = formatterParams.disableMentions ? null : (this.dataSource ?? new MessagesDataSource()).getMentionsTextFormatter(\n formatterParams\n );\n const urlTextFormatter = (this.dataSource ?? new MessagesDataSource()).getUrlTextFormatter(\n formatterParams\n );\n if (mentionsFormatter) {\n formatters.push(mentionsFormatter);\n }\n if (urlTextFormatter) {\n formatters.push(urlTextFormatter);\n }\n return formatters;\n }\n\n getMentionsTextFormatter(params: any = {}): CometChatMentionsFormatter {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getMentionsTextFormatter(params);\n }\n getUrlTextFormatter(params: any = {}): CometChatUrlsFormatter {\n return (this.dataSource ?? new MessagesDataSource()).getUrlTextFormatter(\n params\n );\n }\n getMentionsFormattedText(\n message: CometChat.TextMessage,\n subtitle: string,\n additionalConfigurations: any\n ): string {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getMentionsFormattedText(message, subtitle, additionalConfigurations);\n }\n}\n","import {\n AIAssistBotConfiguration,\n AIBotMessageBubbleStyle,\n AISenderMessageBubbleStyle,\n } from \"@cometchat/uikit-shared\";\nimport {\n CometChatTheme,\n DatePatterns,\n MessageBubbleAlignment,\n Receipts,\n fontHelper,\n} from \"@cometchat/uikit-resources\";\nimport { getMessageBubbleDateStyle, getMessageReceiptStyle } from \"./style\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from 'react';\n\n\nconst TextMessageBubble = createComponent({\n tagName: 'cometchat-text-bubble',\n elementClass: CometChatTextBubble,\n react: React\n});\n\nexport const getBubbleAlignment = (\n message: CometChat.TextMessage,\n sender: CometChat.User\n): MessageBubbleAlignment => {\n // @ts-ignore\n if (message.sender.getUid() === sender.getUid()) {\n return MessageBubbleAlignment.right;\n } else {\n return MessageBubbleAlignment.left;\n }\n}\n\nexport const getContentView = (\n message: CometChat.TextMessage,\n theme: CometChatTheme,\n alignment: MessageBubbleAlignment,\n configuration: AIAssistBotConfiguration\n): JSX.Element => {\n let style: AIBotMessageBubbleStyle | AISenderMessageBubbleStyle = {};\n\n if (alignment === MessageBubbleAlignment.right) {\n style = configuration?.senderMessageBubbleStyle || {};\n } else {\n style = configuration?.botMessageBubbleStyle || {};\n }\n\n const defaultStyle: any = {\n textFont: style?.textFont || fontHelper(theme.typography.text3),\n };\n\n if (alignment === MessageBubbleAlignment.right) {\n defaultStyle[\"textColor\"] = style?.textColor || theme.palette.getAccent900();\n } else {\n defaultStyle[\"textColor\"] = style?.textColor || theme.palette.getAccent();\n }\n\n return \n}\n\nexport const getBubbleFooterView = (\n item: CometChat.TextMessage,\n configuration: AIAssistBotConfiguration,\n theme: CometChatTheme\n): JSX.Element => {\n let status;\n let displayReceipt = false;\n\n if (\n item.getStatus() === \"send\" ||\n item.getStatus() === \"wait\" ||\n item.getStatus() === \"error\"\n ) {\n if (item.getStatus() === \"wait\") {\n status = Receipts.wait;\n } else if (item.getStatus() === \"sent\") {\n status = Receipts.sent;\n } else if (item.getStatus() === \"error\") {\n status = Receipts.error;\n }\n\n displayReceipt = true;\n }\n\n return (\n
\n
\n \n \n
\n {\n displayReceipt ?\n
\n \n
:\n null\n }\n
\n )\n}\n\n\n","import {\n AIAssistBotConfiguration,\n AIAssistBotStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n AvatarStyle,\n MessageInputStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, MessageBubbleAlignment, fontHelper } from \"@cometchat/uikit-resources\";\nimport { getBubbleAlignment } from \"./utils\";\n\nexport const getContainerStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\",\n background: style?.background || theme?.palette?.getBackground(),\n borderRadius: style?.borderRadius || \"8px\",\n } as React.CSSProperties;\n};\n\nexport const getBotsContainerStyle = () => {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n } as React.CSSProperties;\n};\n\nexport const getBotTitleStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n font:\n style?.optionTitleFont || (theme && fontHelper(theme?.typography?.text2)),\n color: style?.optionTitleColor || theme?.palette?.getAccent(),\n } as React.CSSProperties;\n};\n\nexport const getBackButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.backIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport const getOptionsContainerStyle = () => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n height: \"100%\",\n boxSizing: \"border-box\",\n } as React.CSSProperties;\n};\n\nexport const getOptionStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return new ActionSheetStyle({\n ActionSheetSeparatorTint: theme?.palette?.getAccent400(),\n background: style?.buttonBackground || theme?.palette?.getBackground(),\n titleColor: style?.buttonTextColor || theme?.palette?.getAccent(),\n titleFont:\n style?.buttonTextFont || (theme && fontHelper(theme?.typography?.text2)),\n listItemBackground: \"transparent\",\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n });\n};\n\nexport const getBotBackgroundStyle = (theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n justifyContent: \"flex-end\",\n height: \"100%\",\n width: \"100%\",\n background: theme?.palette?.getAccent600(),\n } as React.CSSProperties;\n};\n\nexport const getBotChatContainerStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n width: \"40%\",\n minWidth: \"350px\",\n maxWidth: \"100%\",\n height: \"100%\",\n overflow: \"hidden\",\n boxSizing: \"border-box\",\n background: style?.background || theme?.palette.getBackground(),\n } as React.CSSProperties;\n};\n\nexport const getBotChatHeaderStyle = (theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n height: \"40px\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n background: theme?.palette.getAccent200(),\n marginBottom: \"10px\"\n } as React.CSSProperties;\n};\n\nexport const getAvatarStyle = (style: AvatarStyle) => {\n if (style) {\n return style;\n } else {\n return new AvatarStyle({\n borderRadius: \"16px\",\n width: \"28px\",\n height: \"28px\",\n });\n }\n};\n\nexport const getBotHeaderTitleStyle = (\n style: AIAssistBotStyle = {},\n theme: CometChatTheme\n) => {\n return {\n font: style.titleFont || fontHelper(theme.typography.subtitle1),\n color: style.titleColor || theme.palette.getAccent(),\n } as React.CSSProperties;\n};\n\nexport const getBotHeaderSubtitleStyle = (\n style: AIAssistBotStyle = {},\n theme: CometChatTheme\n) => {\n return {\n font: style.subtitleFont || fontHelper(theme.typography.caption2),\n color: style.subtitleColor || theme.palette.getAccent500(),\n } as React.CSSProperties;\n};\n\nexport const getCloseButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.closeIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n } as React.CSSProperties;\n};\n\nexport const getMessageBubbleStyle = (\n message: CometChat.TextMessage,\n theme: CometChatTheme,\n sender: CometChat.User,\n configuration: AIAssistBotConfiguration\n) => {\n // @ts-ignore\n if (message.sender.getUid() === sender.getUid()) {\n const style = configuration?.senderMessageBubbleStyle || {};\n return {\n background: style.background || theme.palette.getPrimary(),\n borderRadius: style.borderRadius || \"12px\",\n border: style.border || \"none\",\n };\n } else {\n const style = configuration?.botMessageBubbleStyle || {};\n return {\n background: style.background || theme.palette.getAccent100(),\n borderRadius: style.borderRadius || \"12px\",\n border: style.border || \"none\",\n };\n }\n};\n\nexport const getMessageListFooterStyle = () => {\n return {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n height: \"40px\",\n padding: \"5px\",\n boxSizing: \"border-box\",\n } as React.CSSProperties; \n}\n\nexport const getMessageInputStyle = (\n style: MessageInputStyle,\n theme: CometChatTheme\n): MessageInputStyle => {\n if (style) {\n return style;\n } else {\n return new MessageInputStyle({\n height: \"40px\",\n width: \"100%\",\n maxHeight: \"40px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"12px\",\n background: theme.palette.getAccent50(),\n textFont: fontHelper(theme.typography.text2),\n textColor: theme.palette.getAccent(),\n dividerColor: theme.palette.getAccent100(),\n inputBorder: \"none\",\n inputBorderRadius: \"0px\",\n inputBackground: \"transparent\",\n });\n }\n};\n\nexport const getSendButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.sendIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n } as React.CSSProperties;\n};\n\nexport const getMessageBubbleDateStyle = (theme: CometChatTheme) => {\n return {\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.caption2),\n padding: \"0px\",\n } as React.CSSProperties;\n};\n\nexport const getMessageReceiptStyle = (\n style: AIAssistBotStyle,\n theme: CometChatTheme\n) => {\n return new ReceiptStyle({\n waitIconTint: style?.loadingIconTint || theme?.palette?.getAccent700(),\n errorIconTint: style?.errorIconTint || theme?.palette?.getError(),\n });\n};\n\nexport const getMessageBubbleContainerStyle = (message: CometChat.TextMessage, sender: CometChat.User) => {\n const bubbleAlignment = getBubbleAlignment(message, sender);\n return {\n flex: \"1 1 0\",\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: \"inherit\",\n justifyContent: bubbleAlignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems: bubbleAlignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n position: \"relative\",\n } as React.CSSProperties;\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import React, { useContext } from 'react';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { CometChatActionSheet } from '@cometchat/uikit-elements';\nimport { AIAssistBotConfiguration } from '@cometchat/uikit-shared';\nimport { CometChatMessageComposerAction } from '@cometchat/uikit-resources';\nimport { getBackButtonStyle, getBotTitleStyle, getBotsContainerStyle, getContainerStyle, getOptionStyle, getOptionsContainerStyle } from './style';\nimport { createComponent } from \"@lit-labs/react\";\nimport backIcon from '../assets/backbutton.svg';\n\ninterface IAIAssistBotProps {\n title?: string\n bots?: CometChatMessageComposerAction[]\n closeCallback?: () => void\n backCallback?:() => void\n configuration?: AIAssistBotConfiguration\n};\n\nconst defaultProps: IAIAssistBotProps = {\n title: undefined,\n bots: undefined,\n closeCallback: undefined,\n backCallback: undefined,\n configuration: undefined\n}\n\nconst ActionSheet = createComponent({\n tagName: 'cometchat-action-sheet',\n elementClass: CometChatActionSheet,\n react: React,\n events: {\n 'onClick': 'cc-actionsheet-clicked',\n }\n})\n\nconst AIAssistBotOptoinsView = (props: IAIAssistBotProps) => {\n\n const {theme} = useContext(CometChatThemeContext);\n\n const onBotClick = (event: any) => {\n const bot: CometChatMessageComposerAction = event?.detail?.action;\n if (bot.onClick) {\n bot.onClick();\n }\n if (props.closeCallback) {\n props.closeCallback();\n }\n }\n\n return (\n
\n
\n
\n
\n props.backCallback ? props.backCallback() : null} buttonStyle={JSON.stringify(getBackButtonStyle(props.configuration?.assistBotStyle, theme))} />\n
\n
\n {props.title}\n
\n
\n
\n
\n \n
\n
\n
\n )\n};\n\nAIAssistBotOptoinsView.defaultProps = defaultProps\nexport default AIAssistBotOptoinsView;\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n CometChatTheme,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const MessageBubbleWrapperStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n display: \"flex\",\n position: \"relative\",\n maxWidth: \"65%\",\n width: \"fit-content\",\n gap: '4px'\n } as CSSProperties;\n};\n\nexport const MessageBubbleAvatarStyles = () => {\n return {\n position: \"relative\",\n borderRadius: \"inherit\",\n display: \"flex\",\n width: \"fit-content\",\n alignSelf: \"flex-start\",\n marginTop: \"5px\",\n padding: \"8px 4px\",\n } as CSSProperties;\n};\n\nexport const MessageBubbleAlignmentStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n flex: \"1 1 0\",\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: \"inherit\",\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n position: \"relative\",\n width: \"100%\"\n } as CSSProperties;\n};\n\nexport const MessageBubbleTitleStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n display: \"flex\",\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems: \"flex-start\",\n };\n};\n\nexport const MessageOptionsStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any,\n headerView: any,\n theme: CometChatTheme\n) => {\n return {\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n top: headerView ? \"-17px\" : \"-36px\",\n right: alignment === MessageBubbleAlignment.right ? \"unset\" : \"0\",\n left: alignment === MessageBubbleAlignment.left ? \"0\" : \"unset\",\n position: \"absolute\",\n background: theme.palette.getBackground(),\n borderRadius: \"8px\",\n width: \"fit-content\",\n zIndex: \"2\",\n } as CSSProperties;\n};\n\nexport const menuListStyles = (theme: CometChatTheme) => {\n return {\n border: `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: \"8px\",\n background: theme.palette.getBackground(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground(),\n moreIconTint: theme.palette.getAccent600(),\n };\n};\n","import {CSSProperties} from 'react';\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { MenuListStyle } from \"@cometchat/uikit-elements\";\n\nexport const contextMenuStyle = () => {\n return {\n display: \"flex\",\n position: \"relative\"\n } as CSSProperties\n}\n\nexport const topMenuStyle = () => {\n return {\n listStyleType: \"none\",\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: \"0\",\n padding: \"0\",\n border: \"1px solid #e8e8e8\",\n zIndex: \"2\",\n borderRadius: \"8px\"\n } as CSSProperties\n}\n\nexport const subMenuStyle = (showSubMenu: boolean, theme: CometChatTheme) => {\n return {\n listStyleType: \"none\",\n display: showSubMenu ? \"flex\" : \"none\",\n position: \"absolute\",\n right: \"24px\",\n top: \"0\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n alignItems: \"flex-start\",\n border: \"1px solid #e8e8e8\",\n width: \"100%\",\n zIndex: \"3\",\n background: theme.palette.getBackground(),\n marginTop: \"35px\",\n padding: \"0\",\n borderRadius: \"8px\"\n } as CSSProperties\n}\n\nexport const menuItemStyle = () => {\n return {\n background: \"transparent\",\n padding: \"4px 4px\"\n }\n}\n\nexport const moreButtonStyle = (ContextMenuStyle: MenuListStyle) => {\n return {\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: ContextMenuStyle?.moreIconTint || \"\",\n }\n}\n\nexport const menuButtonStyle = (isSubMenu: boolean, menuData: any) => {\n return {\n background: menuData?.backgroundColor || \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: menuData?.iconTint,\n buttonTextFont: menuData?.titleFont,\n buttonTextColor: menuData?.titleColor,\n }\n}\n\nexport const popoverStyle = {\n width: \"300px\",\n height: \"300px\"\n}","import { CometChatActionsIcon, CometChatActionsView, Placement } from \"@cometchat/uikit-resources\";\nimport React, { JSX, useCallback, useContext } from 'react';\nimport { contextMenuStyle, menuButtonStyle, menuItemStyle, moreButtonStyle, popoverStyle, subMenuStyle, topMenuStyle } from \"./style\";\n\nimport { CometChatButton } from '../CometChatButton';\nimport { CometChatThemeContext } from \"../../../CometChatThemeContext\";\nimport { MenuListStyle } from '@cometchat/uikit-elements';\n\ninterface ContextMenuProps {\n data: Array,\n topMenuSize: number,\n moreIconURL: string,\n moreIconHoverText: string,\n ContextMenuStyle: MenuListStyle,\n onOptionClicked: (option : CometChatActionsIcon | CometChatActionsView) => void,\n placement: Placement\n}\n\nexport const CometChatContextMenu = (props: ContextMenuProps) => {\n const { theme } = useContext(CometChatThemeContext)\n const [showSubMenu, setShowSubMenu] = React.useState(false);\n const moreButtonRef = React.useRef(null);\n // store the reference pf all the menu items and popover\n const menuButtonRefArray = React.useRef>([]);\n const {\n data,\n topMenuSize,\n moreIconURL,\n moreIconHoverText,\n ContextMenuStyle,\n onOptionClicked,\n placement\n } = props;\n \n const handleMenuClick = useCallback(() => setShowSubMenu((showSubMenu: boolean) => !showSubMenu), []);\n\n const getMoreButton = useCallback(() => {\n return (\n
  • \n \n
  • \n )\n }, [ContextMenuStyle, moreIconHoverText, moreIconURL, handleMenuClick])\n\n const getMenu = useCallback((menu : Array, isSubMenu : boolean) => {\n return menu?.map((menuData, index: number) => {\n \n let menuButton, moreButton = null;\n\n if (menuData instanceof CometChatActionsView && menuData?.customView) {\n \n menuButton = (\n
  • \n { menuButtonRefArray.current[menuData.id] = el }} \n popoverStyle={JSON.stringify(popoverStyle)} placement={placement}>\n
    \n \n
    \n
    \n {menuData?.customView(closeCallback(menuData.id))}\n
    \n \n
  • );\n } else {\n menuButton = (\n
  • \n { onOptionClicked(menuData) }}\n />\n
  • \n );\n };\n\n if(!isSubMenu && data?.length > menu?.length && index === menu?.length - 1) {\n moreButton = getMoreButton();\n }\n\n return (\n \n {menuButton}\n {moreButton}\n \n )\n })\n }, [placement, data, onOptionClicked, getMoreButton])\n\n const getTopMenu = useCallback(() => {\n return getMenu(data.slice(0, topMenuSize - 1), false);\n }, [getMenu, topMenuSize, data])\n\n const getSubMenu = useCallback(() => {\n return getMenu(data.slice(topMenuSize - 1), true);\n }, [getMenu, topMenuSize, data])\n\n const closeCallback = useCallback((id:string) => {\n return () =>{\n if (menuButtonRefArray.current[id]?.closeContentView) {\n menuButtonRefArray.current[id]?.closeContentView();\n }\n }\n },[]);\n\n return (\n
    \n
      {getTopMenu()}
    \n
      {getSubMenu()}
    \n
    \n )\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMore%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C6.66666667%20C3.26666667%2C6.66666667%202.66666667%2C7.26666667%202.66666667%2C8%20C2.66666667%2C8.73333333%203.26666667%2C9.33333333%204%2C9.33333333%20C4.73333333%2C9.33333333%205.33333333%2C8.73333333%205.33333333%2C8%20C5.33333333%2C7.26666667%204.73333333%2C6.66666667%204%2C6.66666667%20Z%20M12%2C6.66666667%20C11.2666667%2C6.66666667%2010.6666667%2C7.26666667%2010.6666667%2C8%20C10.6666667%2C8.73333333%2011.2666667%2C9.33333333%2012%2C9.33333333%20C12.7333333%2C9.33333333%2013.3333333%2C8.73333333%2013.3333333%2C8%20C13.3333333%2C7.26666667%2012.7333333%2C6.66666667%2012%2C6.66666667%20Z%20M8%2C6.66666667%20C7.26666667%2C6.66666667%206.66666667%2C7.26666667%206.66666667%2C8%20C6.66666667%2C8.73333333%207.26666667%2C9.33333333%208%2C9.33333333%20C8.73333333%2C9.33333333%209.33333333%2C8.73333333%209.33333333%2C8%20C9.33333333%2C7.26666667%208.73333333%2C6.66666667%208%2C6.66666667%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import \"@cometchat/uikit-elements\";\n\nimport { CometChatActionsIcon, CometChatActionsView, MessageBubbleAlignment, Placement } from \"@cometchat/uikit-resources\";\nimport { MessageBubbleAlignmentStyles, MessageBubbleAvatarStyles, MessageBubbleTitleStyles, MessageBubbleWrapperStyles, MessageOptionsStyles, menuListStyles } from \"./style\";\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\n\nimport { BaseStyle } from '@cometchat/uikit-shared';\nimport { CometChatContextMenu } from \"../CometChatContextMenu\";\nimport { CometChatThemeContext } from \"../../../CometChatThemeContext\";\nimport MoreIcon from \"./assets/More.svg\";\n\ninterface IMessageBubbleProps {\n id: any;\n setRef?: (ref: any) => void;\n leadingView: any;\n headerView: any;\n replyView: any;\n contentView: any;\n bottomView: any;\n threadView: any;\n footerView: any;\n statusInfoView?: any;\n options: (CometChatActionsIcon | CometChatActionsView)[];\n alignment: MessageBubbleAlignment;\n messageBubbleStyle: BaseStyle,\n moreIconURL?: string,\n topMenuSize?: number\n};\n\nconst CometChatMessageBubble = (props: IMessageBubbleProps) => {\n const {\n id,\n leadingView = null,\n headerView = null,\n replyView = null,\n contentView = null,\n bottomView = null,\n threadView = null,\n footerView = null,\n statusInfoView = null,\n options = [],\n alignment = MessageBubbleAlignment.right,\n messageBubbleStyle = new BaseStyle({\n width: \"100%\",\n height: \"auto\",\n background: \"\",\n borderRadius: \"12px\",\n border: \"none\"\n }),\n moreIconURL = MoreIcon,\n topMenuSize = 5,\n setRef\n } = props;\n\n const contentStyle = {\n borderRadius: '8px',\n };\n\n const getMessageBubbleStyle = () => {\n const object = {\n ...messageBubbleStyle,\n ...contentStyle,\n };\n return object;\n };\n\n const getMessageBubbleStyleDimension = () => {\n const object = {\n height: messageBubbleStyle.height,\n width: messageBubbleStyle.width,\n };\n\n return object;\n };\n\n const { theme } = useContext(CometChatThemeContext);\n const messageRef = React.useRef(null);\n\n useEffect(() => {\n if (messageRef && messageRef.current && setRef) {\n setRef(messageRef);\n }\n }, [messageRef, setRef]);\n\n\n\n const [isHovering, setIsHovering] = useState(false);\n useEffect(() => {\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, []);\n let timeoutId: NodeJS.Timeout | null = null;\n\n const hideMessageOptions =\n () => {\n timeoutId = setTimeout(() => {\n setIsHovering(false);\n }, 150);\n }\n\n const showMessageOptions =\n () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n setIsHovering(true);\n }\n\n const getLeadingView = () => {\n if (leadingView && alignment === MessageBubbleAlignment.left) {\n return (\n\n \n {leadingView}\n \n )\n }\n }\n\n const getHeaderView = () => {\n if (headerView) {\n return (\n \n {headerView}\n \n )\n }\n }\n\n const onOptionClicked = (data: CometChatActionsIcon | CometChatActionsView) => {\n options.forEach((option) => {\n if (option instanceof CometChatActionsIcon) {\n if (option.id === data?.id && id) {\n option.onClick?.(parseInt(id));\n }\n }\n });\n }\n\n const getMessageOptions = () => {\n\n if (options && options.length > 0 && isHovering) {\n\n return (\n
    \n \n
    \n )\n }\n }\n\n const getPlacementAlignment = () => {\n if (isMobile()) {\n return checkBubblePosition();\n }\n\n return props.alignment === MessageBubbleAlignment.left\n ? Placement.right\n : Placement.left;\n };\n\n const isMobile = () => {\n return window.innerWidth <= 768;\n };\n\n const checkBubblePosition = () => {\n const bubble = messageRef.current;\n if (bubble) {\n const rect = bubble.getBoundingClientRect();\n const isAtTop = rect.top < window.innerHeight / 2;\n const isAtBottom = rect.bottom > window.innerHeight / 2;\n if (isAtTop) {\n return Placement.bottom;\n } else if (isAtBottom) {\n return Placement.top;\n } else {\n return Placement.bottom\n }\n } else {\n return Placement.bottom\n }\n };\n\n return (\n
    \n {getLeadingView()}\n
    \n {getMessageOptions()}\n {getHeaderView()}\n \n
    \n {replyView ? replyView : null}\n {contentView ? contentView : null}\n {statusInfoView ? statusInfoView : null}\n
    \n {bottomView ? bottomView : null}\n {footerView ? footerView : null}\n {threadView ? threadView : null}\n
    \n
    \n {/* */}\n \n )\n}\n\nexport { CometChatMessageBubble }\n","import { AIAssistBotConfiguration, CometChatUIKitUtility } from '@cometchat/uikit-shared';\nimport { CometChatUIKitConstants, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { getAvatarStyle, getBotBackgroundStyle, getBotChatContainerStyle, getBotChatHeaderStyle, getBotHeaderSubtitleStyle, getBotHeaderTitleStyle, getCloseButtonStyle, getMessageBubbleContainerStyle, getMessageBubbleStyle, getMessageInputStyle, getMessageListFooterStyle, getSendButtonStyle } from './style';\nimport { getBubbleAlignment, getBubbleFooterView, getContentView } from './utils';\n\nimport Close2xIcon from '../assets/close2x.svg'\nimport { CometChat } from '@cometchat/chat-sdk-javascript';\nimport { CometChatList } from '../../Shared/Views/CometChatList';\nimport { CometChatMessageBubble } from '../../Shared/Views/CometChatMessageBubble';\nimport { CometChatTextInput } from '@cometchat/uikit-elements';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport SendIcon from \"../assets/send.svg\";\nimport { createComponent } from \"@lit-labs/react\";\n\ninterface IAIAssistBotProps {\n configuration?: AIAssistBotConfiguration\n bot: CometChat.User | undefined\n sender: CometChat.User | undefined\n messageSendCallBack?: (message: string, bot: CometChat.User) => Promise\n closeCallback?: () => void\n};\n\nconst defaultProps: IAIAssistBotProps = {\n bot: undefined,\n sender: undefined,\n messageSendCallBack: undefined,\n closeCallback: undefined,\n configuration: undefined\n}\n\nconst MessageInput = createComponent({\n tagName: 'cometchat-text-input',\n elementClass: CometChatTextInput,\n react: React,\n events: {\n 'ccTextInputChanged': 'cc-text-input-changed',\n 'ccTextInputEntered': 'cc-text-input-entered'\n }\n})\n\nconst AIAssistBotChatView = (props: IAIAssistBotProps) => {\n const scrollBottom = useRef(true);\n const subtitleText = localize(\"COMETCHAT_ASK_BOT_SUBTITLE\");\n const botFirstMessage = useRef(localize(\"COMETCHAT_BOT_FIRST_MESSAGE\"));\n const messageInputRef = useRef(null);\n const inputTextRef = useRef(\"\");\n const [messagesList, setMessagesList] = useState([]);\n const { theme } = useContext(CometChatThemeContext);\n const sender = props.sender!;\n const bot = props.bot!;\n\n useEffect(\n () => {\n insertFirstMessage();\n }, []\n );\n\n const insertFirstMessage = useCallback(\n () => {\n if (props.configuration?.botFirstMessageText) {\n botFirstMessage.current = props.configuration.botFirstMessageText(bot);\n }\n const message = new CometChat.TextMessage(sender.getUid(), botFirstMessage.current, CometChatUIKitConstants.MessageReceiverType.user);\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n message.setMuid(CometChatUIKitUtility.ID());\n message.setSender(bot);\n setMessagesList([message]);\n }, [messagesList, setMessagesList]\n )\n\n const onComposerEditTextChange = useCallback(\n (value: string) => {\n inputTextRef.current = value;\n }, [inputTextRef]\n )\n\n const getBotResponse = useCallback(\n (id: any) => {\n if (props.messageSendCallBack) {\n props.messageSendCallBack(inputTextRef.current, bot).then(\n (response) => {\n const newMessage = new CometChat.TextMessage(\n sender.getUid(),\n response,\n CometChatUIKitConstants.MessageReceiverType.user\n );\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(CometChatUIKitUtility.ID());\n newMessage.setSender(bot);\n newMessage.setStatus(\"sent\");\n\n setMessagesList(prevMessages => {\n const messages = prevMessages.map((message) => {\n if (message.getMuid() === id) {\n message.setStatus('sent');\n }\n return message;\n })\n messages.push(newMessage);\n return messages;\n });\n }\n )\n .catch(\n (error) => {\n setMessagesList(\n (prevMessages) => {\n const messages = prevMessages.map(\n (message) => {\n if (message.getMuid() === id) {\n message.setStatus(\"error\");\n }\n return message;\n }\n );\n return messages;\n }\n );\n }\n );\n }\n }, [messagesList, setMessagesList, inputTextRef]\n );\n\n const onMessageSendClick = useCallback(\n () => {\n if (!inputTextRef.current) {\n return;\n }\n const id = CometChatUIKitUtility.ID();\n const newMessage = new CometChat.TextMessage(\n bot.getUid(),\n inputTextRef.current,\n CometChatUIKitConstants.MessageReceiverType.user\n );\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(id);\n newMessage.setSender(sender);\n newMessage.setStatus(\"wait\");\n setMessagesList(prevMessages => ([...prevMessages, newMessage]));\n messageInputRef?.current?.emptyInputField();\n getBotResponse(id)\n }, [messagesList, setMessagesList, getBotResponse, inputTextRef]\n );\n\n const triggerClose = () => {\n if (props.closeCallback) {\n props.closeCallback();\n }\n }\n\n const getListItem = useMemo(() => {\n return function (message: any, index: number): any {\n return (\n
    \n \n
    \n )\n };\n }, [getMessageBubbleStyle, getBubbleAlignment, getContentView, getBubbleFooterView]);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n {bot?.getName()}\n
    \n
    \n {subtitleText}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n onComposerEditTextChange(e?.detail?.value)}\n ccTextInputEntered={() => onMessageSendClick()}\n />\n onMessageSendClick()}\n buttonStyle={JSON.stringify(getSendButtonStyle(props.configuration?.assistBotStyle!, theme))}\n />\n
    \n
    \n
    \n )\n};\n\nAIAssistBotChatView.defaultProps = defaultProps\nexport default AIAssistBotChatView;\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatActionsView,\n CometChatMessageComposerAction,\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatUIEvents,\n PanelAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { AIAssistBotConfiguration, AIOptionsStyle } from \"@cometchat/uikit-shared\";\nimport AIAssistBotOptoinsView from \"./AIAssistBotOptionsView\";\nimport AIAssistBotChatView from \"./AIAssistBotChatView\";\n\nexport class AIAssistBotDecorator extends DataSourceDecorator {\n public configuration?: AIAssistBotConfiguration;\n public newDataSource!: DataSource;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public bots: CometChat.User[] | [] = [];\n public theme: CometChatTheme = new CometChatTheme({});\n\n constructor(\n dataSource: DataSource,\n configuration?: AIAssistBotConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n this.getAllBots();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiassistbot\";\n }\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n\n const generalAskBotText = localize(\"COMETCHAT_ASK_AI_BOT\");\n const askText = localize(\"COMETCHAT_ASK_BOT\");\n\n const numberOfBots = this.bots?.length;\n const titleName = numberOfBots > 1 ? generalAskBotText : `${askText} ${this.bots[0]?.getName()}`;\n\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.assistBotStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.assistBotStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.assistBotStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n\n if(numberOfBots === 1) {\n const newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n title: titleName,\n onClick: () => { this.onOptionClick(this.bots[0]);},\n id: \"ai-assist-bot\",\n iconURL: \"\",\n iconTint: \"\",\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background\n });\n messageComposerActions.push(newAction);\n }else if(numberOfBots > 1) {\n const botList = this.bots.map((bot) => {\n return new CometChatMessageComposerAction({\n title: bot.getName(),\n onClick: () => {this.onOptionClick(bot);},\n id: bot.getUid(),\n });\n });\n\n const newAction: CometChatActionsView = new CometChatActionsView({\n title: titleName,\n customView: (callBacks: any) => {\n return \n },\n id: \"ai-assist-bot\",\n iconURL: \"\",\n iconTint: \"\",\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n\n messageComposerActions.push(newAction);\n }\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n onMessageSent = async (message: string, bot: CometChat.User): Promise => {\n return new Promise(async (resolve, reject) => {\n try{\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n bot,\n this.user,\n this.group\n );\n }\n const response = await CometChat.askBot(\n receiverId,\n receiverType,\n bot.getUid(),\n message,\n configuration ? configuration : {}\n );\n return resolve(response);\n }catch(e){\n reject(e);\n }\n });\n };\n\n closeChat = () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messages);\n };\n\n onOptionClick = (bot: CometChat.User) => {\n CometChatUIEvents.ccShowPanel.next({\n child: ,\n position: PanelAlignment.messages,\n });\n };\n\n private getAllBots(): void {\n new CometChat.UsersRequestBuilder().setLimit(30).setTags([\"aibot\"]).build().fetchNext().then(\n (bots: CometChat.User[] | []) => {\n this.bots = bots;\n }\n )\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(() => {\n this.closeChat();\n });\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIAssistBotDecorator } from \"./AIAssistBotDecorator\";\nimport { AIAssistBotConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIAssistBotExtension extends AIExtensionDataSource {\n private configuration?: AIAssistBotConfiguration;\n\n constructor(configuration?: AIAssistBotConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIAssistBotDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"bots\";\n }\n}","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { AIConversationStarterStyle } from \"@cometchat/uikit-shared\";\n\nexport const getContainerStyle = (style?: AIConversationStarterStyle) => {\n return {\n display: \"flex\",\n overflow: \"hidden\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\"\n }\n};\n\nexport const contentContainerStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n};\n\nexport const getConversationStarterStyle = (\n theme?: CometChatTheme,\n style?: AIConversationStarterStyle\n) => {\n return {\n replyTextFont:\n style?.textFont ||\n fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.textBackground || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n border: style?.textBorder || \"none\",\n borderRadius: style?.textBorderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%2020010904%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2F2001%2FREC-SVG-20010904%2FDTD%2Fsvg10.dtd%22%3E%3Csvg%20version%3D%221.0%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100.000000pt%22%20height%3D%22100.000000pt%22%20viewBox%3D%220%200%20100.000000%20100.000000%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cg%20transform%3D%22translate%280.000000%2C100.000000%29%20scale%280.100000%2C-0.100000%29%22fill%3D%22%23000000%22%20stroke%3D%22none%22%3E%3Cpath%20d%3D%22M375%20847%20c-221%20-73%20-326%20-269%20-254%20-472%20l22%20-62%20-25%20-74%20c-14%20-41-23%20-80%20-21%20-86%206%20-17%2042%20-15%20138%206%2077%2017%2082%2017%20138%20-1%2072%20-22%20199%20-25%20216%20-46%207%209%2021%205%2030%20-5%2013%20-21%2016%20-79%2016%20-44%200%20-98%208%20-136%2019%20-58%2018%20-67%2019%20-123%206-89%20-21%20-88%20-23%20-65%2042%20l20%2058%20-26%2056%20c-52%20116%20-25%20240%2069%20327%2077%2071%20123%2087246%2087%20123%200%20169%20-16%20245%20-86%2064%20-59%2088%20-108%2094%20-199%205%20-68%208%20-75%2028%20-78%2036-5%2048%2038%2033%20118%20-22%20125%20-94%20215%20-218%20273%20-59%2028%20-79%2032%20-167%2034%20-63%202%20-115-2%20-140%20-10z%22%2F%3E%3Cpath%20d%3D%22M687%20313%20c-16%20-15%20-4%20-42%2038%20-83%20l45%20-44%20-45%20-46%20c-47%20-48%20-56%20-74-28%20-84%2011%20-5%2031%208%2064%2040%20l48%2047%2050%20-46%20c54%20-50%2061%20-53%2079%20-35%2018%2018%2015%2025-35%2079%20l-46%2050%2048%2049%20c41%2042%2046%2051%2035%2065%20-19%2023%20-30%2019%20-80%20-30%20l-46%20-45%20-4445%20c-41%2042%20-68%2054%20-83%2038z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3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vLz0fi%2F795m0H6e06GnlnXdOz%2BxI98HHNDLVAkpuiTCuQW%2BWzXYgG5MIMYNjKn1LhWcrf18urjugfQxQtkNrJabcNQdG3b0LreW1dejMbXqk5GL9HkUlGDKT7BNGeB7fu0QKhnn1nhvJT5pNeuOLqvpvwaRCZMiY8SOulKTwi3%2B1Hm1G19Of%2BvQUID09KQfHa1NNd6K3C9FqjPZxkFDOMY1Zb%2Fq3XCmS6QFd%2FwALSbwFhNsr1N%2BEcd4bcKHcO1fa1IuRGub6mnOOuMHNZ51DneCtKc3qm42BLYqxO3Q4oN0hWHSyjedQCotHSw2vS79AZA6V3L%2FbVtLtrAXFRo18lC4ifLl1qWkBc1OhXyQLip0uXmhYQFzX6VfIP%2BqZ1dOfAgekAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Icons%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20viewBox%3D%220%200%2032%2032%22%20style%3D%22enable-background%3Anew%200%200%2032%2032%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%20.st0%7Bfill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A10%3B%7D%3C%2Fstyle%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%223%22%20x2%3D%2216%22%20y2%3D%228%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%226.8%22%20x2%3D%2210.3%22%20y2%3D%2210.3%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%223%22%20y1%3D%2216%22%20x2%3D%228%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%2225.2%22%20x2%3D%2210.3%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%2229%22%20x2%3D%2216%22%20y2%3D%2224%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%2225.2%22%20x2%3D%2221.7%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2229%22%20y1%3D%2216%22%20x2%3D%2224%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%226.8%22%20x2%3D%2221.7%22%20y2%3D%2210.3%22%2F%3E%3C%2Fsvg%3E\"","/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport { AIConversationStarterConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getContainerStyle, getConversationStarterStyle } from './style';\n\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAIConversationStarterProps {\n getConversationStarterCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n configuration?: AIConversationStarterConfiguration\n};\n\nconst defaultProps: IAIConversationStarterProps = {\n getConversationStarterCallback: undefined,\n editReplyCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatConversationStarterView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst AIConversationStarterView = (props: IAIConversationStarterProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_ICEBREAKERS\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getConversationStarterCallback) {\n props.getConversationStarterCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(conversationStarters: string[]): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(conversationStarters).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let conversationStarterView = { props && props.editReplyCallback ? props.editReplyCallback(e?.detail?.reply) : null }}\n key = {\"conversation-starter\"}\n closeIconURL = \"\"\n />\n return resolve(conversationStarterView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n
    \n
    \n
    \n {messageListState === States.loaded ? activeView : getStateView()}\n
    \n\n
    \n
    \n );\n};\n\nAIConversationStarterView.defaultProps = defaultProps\nexport default AIConversationStarterView;\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatMessageEvents,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n IActiveChatChanged,\n PanelAlignment,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport AIConversationStarterView from \"./AIConversationStarterView\";\nimport { AIConversationStarterConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationStarterDecorator extends DataSourceDecorator {\n public configuration?: AIConversationStarterConfiguration;\n public newDataSource!: DataSource;\n public currentMessage: CometChat.BaseMessage | null = null;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n\n constructor(\n dataSource: DataSource,\n configuration?: AIConversationStarterConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiconversationstarter\";\n }\n\n editReply(reply: string) {\n CometChatUIEvents.ccComposeMessage.next(reply);\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n }\n\n closeIfMessageReceived(message: CometChat.BaseMessage) {\n if (message?.getReceiverId() === this.loggedInUser?.getUid() && !this.currentMessage) {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n }\n }\n\n getConversationStarter = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response = await CometChat.getConversationStarter(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n private loadConversationStarter(): void {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: , position: PanelAlignment.messageListFooter });\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n \n CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.user = data.user!;\n this.group = data.group!;\n if (!this.currentMessage) {\n this.loadConversationStarter();\n }\n }\n );\n\n CometChatMessageEvents.ccMessageSent.subscribe(() => {\n if(!this.currentMessage){\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n });\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIConversationStarterDecorator } from \"./AIConversationStarterDecorator\";\nimport { AIConversationStarterConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationStarterExtension extends AIExtensionDataSource {\n private configuration?: AIConversationStarterConfiguration;\n\n constructor(configuration?: AIConversationStarterConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIConversationStarterDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"conversation-starter\";\n }\n}","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { AIConversationSummaryStyle } from \"@cometchat/uikit-shared\";\nimport { PanelStyle } from \"@cometchat/uikit-elements\";\n\nexport const getContainerStyle = (style?: AIConversationSummaryStyle) => {\n return {\n display: \"flex\",\n overflow: \"hidden\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\"\n }\n};\nexport const contentContainerStyle: React.CSSProperties = {\n width:\"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n};\n\nexport const getConversationSummaryStyle = (\n theme?: CometChatTheme,\n style?: AIConversationSummaryStyle\n) => {\n return {\n replyTextFont:\n style?.textFont ||\n fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.background || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n border: style?.border || \"none\",\n borderRadius: style?.borderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport const getPanelStyle = (theme: CometChatTheme, summaryStyle: AIConversationSummaryStyle): PanelStyle => {\n const style = new PanelStyle({\n width: '100%',\n height: 'fit-content',\n border: `1px solid ${theme.palette.getPrimary()}`,\n borderRadius: '8px',\n background: theme.palette.getBackground(),\n textColor: summaryStyle?.textColor || theme.palette.getAccent600(),\n titleColor: summaryStyle?.titleTextColor || theme.palette.getAccent(),\n textFont: summaryStyle?.textFont || fontHelper(theme.typography.text2),\n titleFont: summaryStyle?.titleTextFont || fontHelper(theme.typography.text1),\n })\n return style;\n};","import { AIConversationSummaryConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getContainerStyle, getConversationSummaryStyle, getPanelStyle } from './style';\n\nimport Close2xIcon from '../assets/close2x.svg'\nimport { CometChatPanel } from '@cometchat/uikit-elements';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAIConversationSummaryProps {\n getConversationSummaryCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n closeCallback?: () => void\n configuration?: AIConversationSummaryConfiguration\n};\n\nconst defaultProps: IAIConversationSummaryProps = {\n getConversationSummaryCallback: undefined,\n editReplyCallback: undefined,\n closeCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatConversationSummaryView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst CometChatPanelView = createComponent({\n tagName: 'cometchat-panel',\n elementClass: CometChatPanel,\n react: React,\n events: {\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst AIConversationSummaryView = (props: IAIConversationSummaryProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_SUMMARY\");\n const titleText: string = localize(\"CONVERSATION_SUMMARY\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getConversationSummaryCallback) {\n props.getConversationSummaryCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(conversationSummary: string): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(conversationSummary, props?.closeCallback).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let conversationSummaryView = props.closeCallback!()}\n />\n return resolve(conversationSummaryView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n
    \n
    \n
    \n {messageListState === States.loaded ? activeView : getStateView()}\n
    \n\n
    \n
    \n );\n};\n\nAIConversationSummaryView.defaultProps = defaultProps\nexport default AIConversationSummaryView;\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatMessageEvents,\n CometChatUIEvents,\n IActiveChatChanged,\n PanelAlignment,\n CometChatMessageComposerAction,\n localize,\n CometChatActionsView,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport AIConversationSummaryView from \"./AIConversationSummaryView\";\nimport { AIConversationSummaryConfiguration, AIOptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationSummaryDecorator extends DataSourceDecorator {\n public configuration?: AIConversationSummaryConfiguration;\n public newDataSource!: DataSource;\n public currentMessage: CometChat.BaseMessage | null = null;\n public unreadMessageCount: number = 0;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n private LISTENER_ID: string = \"aiconversationsummary__listener\";\n\n constructor(\n dataSource: DataSource,\n configuration?: AIConversationSummaryConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiconversationsummary\";\n }\n\n closePanel = () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n };\n\n getConversationSummary = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response = await CometChat.getConversationSummary(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n private loadConversationSummary(): void {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: , position: PanelAlignment.messageListFooter });\n }\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.conversationSummaryStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.conversationSummaryStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.conversationSummaryStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n let newAction: CometChatMessageComposerAction = new CometChatMessageComposerAction({\n title: localize(\"CONVERSATION_SUMMARY\"),\n onClick: () => { this.loadConversationSummary() },\n id: \"ai-conversation-summary\",\n iconURL: '',\n iconTint: '',\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.user = data.user!;\n this.group = data.group!;\n this.unreadMessageCount = data.unreadMessageCount ?? 0;\n if (this.unreadMessageCount > (this.configuration?.unreadMessageThreshold ?? 30)) {\n this.loadConversationSummary();\n }\n }\n );\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIConversationSummaryDecorator } from \"./AIConversationSummaryDecorator\";\nimport { AIConversationSummaryConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationSummaryExtension extends AIExtensionDataSource {\n private configuration?: AIConversationSummaryConfiguration;\n\n constructor(configuration?: AIConversationSummaryConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIConversationSummaryDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"conversation-summary\";\n }\n}","import { AISmartRepliesStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport const getContainerStyle = (style?: AISmartRepliesStyle, theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\",\n background: style?.background || theme?.palette.getBackground(),\n borderRadius: style?.borderRadius || \"8px\",\n }\n};\n\nexport const contentContainerStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"auto\",\n height: \"100%\",\n};\n\nexport const getSmartReplyStyle = (\n theme?: CometChatTheme,\n style?: AISmartRepliesStyle\n) => {\n return {\n replyTextFont: style?.textFont || fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.textBackground || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n border: style?.textBorder || \"none\",\n borderRadius: style?.textBorderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport function getBackButtonStyle(style?: AISmartRepliesStyle, theme?: CometChatTheme): any {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.backIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n}\n\nexport function getSmartRepliesContainerStyle(): any {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n };\n}\n\nexport function getSmartRepliesTitleStyle(style?: AISmartRepliesStyle, theme?: CometChatTheme): any {\n return {\n display: \"flex\", \n justifyContent: \"space-between\",\n alignItems: \"center\",\n font: style?.titleFont || fontHelper(theme!.typography.text2),\n color: style?.titleColor || theme?.palette.getAccent(),\n };\n}","import { AISmartRepliesConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getBackButtonStyle, getContainerStyle, getSmartRepliesContainerStyle, getSmartRepliesTitleStyle, getSmartReplyStyle } from './style';\n\nimport { CometChatButton } from '../../Shared/Views/CometChatButton';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport backIcon from '../assets/backbutton.svg';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAISmartRepliesProps {\n title: string\n getSmartRepliesCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n closeCallback?: () => void\n backCallback?:() => void\n configuration?: AISmartRepliesConfiguration\n};\n\nconst defaultProps: IAISmartRepliesProps = {\n title: localize(\"SUGGEST_A_REPLY\"),\n getSmartRepliesCallback: undefined,\n editReplyCallback: undefined,\n closeCallback: undefined,\n backCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatSmartRepliesView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst AISmartRepliesView = (props: IAISmartRepliesProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_REPLIES\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getSmartRepliesCallback) {\n props.getSmartRepliesCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(smartReplies: any): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(smartReplies, props?.closeCallback, props?.backCallback).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let repliesArray: string[] = [];\n Object.keys(smartReplies).forEach((reply) => {\n if (smartReplies[reply] && smartReplies[reply] !== \"\") {\n repliesArray.push(smartReplies[reply]);\n }\n });\n let SmartRepliesView = (\n
    \n \n
    \n \n props.backCallback ? props.backCallback() : null\n }\n buttonStyle={getBackButtonStyle(\n props.configuration?.smartRepliesStyle,\n theme\n )}\n />\n
    \n
    {props.title}
    \n
    \n
    \n {\n props && props.editReplyCallback\n ? props.editReplyCallback(e?.detail?.reply)\n : null;\n props && props.closeCallback\n ? props.closeCallback()\n : null;\n }}\n key={\"smart-replies\"}\n closeIconURL=\"\"\n />\n \n );\n return resolve(SmartRepliesView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n \n
    \n {messageListState === States.loaded ? (\n
    \n {activeView}\n
    \n ) : null}\n {messageListState !== States.loaded ? getStateView() : null}\n
    \n \n );\n};\n\nAISmartRepliesView.defaultProps = defaultProps\nexport default AISmartRepliesView;\n","/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatMessageComposerAction,\n localize,\n CometChatActionsView,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport AISmartRepliesView from \"./AISmartRepliesView\";\nimport { AIOptionsStyle, AISmartRepliesConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AISmartRepliesDecorator extends DataSourceDecorator {\n public configuration?: AISmartRepliesConfiguration;\n public newDataSource!: DataSource;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n public buttonRef: any;\n public isModalClosed: boolean = true;\n private closeCallback?: () => void;\n\n constructor(\n dataSource: DataSource,\n configuration?: AISmartRepliesConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n childRefCallback = (childRef: React.RefObject): void => {\n this.buttonRef = childRef\n };\n\n override getId(): string {\n return \"aismartreplies\";\n }\n\n editReply(reply: string) {\n CometChatUIEvents.ccComposeMessage.next(reply);\n }\n\n closeIfMessageReceived(message: CometChat.BaseMessage) {\n if (message?.getReceiverId() === this.loggedInUser?.getUid()) {\n if (this.closeCallback) {\n if (!this.isModalClosed) {\n this.closeCallback();\n this.isModalClosed = true;\n }\n\n }\n }\n }\n\n getSmartReplies = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response: any = await CometChat.getSmartReplies(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.smartRepliesStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.smartRepliesStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.smartRepliesStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n\n let newAction: CometChatActionsView = new CometChatActionsView({\n title: localize(\"SUGGEST_A_REPLY\"),\n customView: (callback: any) => {\n\n this.isModalClosed = false;\n this.closeCallback = callback?.closePopover;\n return \n },\n id: \"ai-smart-replies\",\n iconURL: '',\n iconTint: '',\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AISmartRepliesDecorator } from \"./AISmartRepliesDecorator\";\nimport { AISmartRepliesConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AISmartRepliesExtension extends AIExtensionDataSource {\n private configuration?: AISmartRepliesConfiguration;\n\n constructor(configuration?: AISmartRepliesConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AISmartRepliesDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"smart-replies\";\n }\n}","import { CSSProperties } from \"react\";\nexport const callScreenWrapperStyle = () => {\n return {\n width: \"100%\",\n height: \"100%\",\n inset: \"0\",\n } as CSSProperties;\n};\n","import {\n CallWorkflow,\n CometChatCallEvents,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { useCallback, useRef, useState } from \"react\";\n\nimport { CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitCalls } from \"@cometchat/uikit-shared\";\nimport { Hooks } from \"./hooks\";\nimport IncreaseSizeIcon from \"./assets/increase-size.svg\";\nimport ReduceSizeIcon from \"./assets/reduce-size.svg\";\nimport { callScreenWrapperStyle } from \"./style\";\n\ninterface IOngoingCallProps {\n callSettingsBuilder?: typeof CometChatUIKitCalls.CallSettings;\n sessionID: string;\n ongoingCallStyle?: CallscreenStyle;\n resizeIconHoverText?: string;\n minimizeIconURL?: string;\n maximizeIconURL?: string;\n onError?: Function;\n callWorkflow?: CallWorkflow;\n}\nconst defaultProps: IOngoingCallProps = {\n resizeIconHoverText: localize(\"RESIZE\"),\n sessionID: \"\",\n minimizeIconURL: ReduceSizeIcon,\n maximizeIconURL: IncreaseSizeIcon,\n callSettingsBuilder: undefined,\n ongoingCallStyle: {\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"grey\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: \"white\",\n maximizeIconTint: \"white\",\n },\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n callWorkflow: CallWorkflow.defaultCalling,\n};\n\nconst CometChatOngoingCall = (props: IOngoingCallProps) => {\n const [loggedInUser, setLoggedInuser] = useState(null);\n const callScreenFrameRef = useRef(null);\n\n const {\n resizeIconHoverText,\n sessionID,\n minimizeIconURL,\n maximizeIconURL,\n ongoingCallStyle,\n callSettingsBuilder,\n onError,\n callWorkflow,\n } = props;\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const getCallBuilder = useCallback((): any => {\n if (callSettingsBuilder) {\n return callSettingsBuilder;\n } else {\n let audioOnlyCall: boolean = false;\n const callSettings: any = new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (callWorkflow === CallWorkflow.defaultCalling) {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n }\n },\n onCallEndButtonPressed: () => {\n if (callWorkflow === CallWorkflow.defaultCalling) {\n CometChat.endCall(sessionID)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n })\n .catch((err: CometChat.CometChatException) => {\n onErrorCallback(err);\n });\n } else {\n CometChatCallEvents.ccCallEnded.next(null as any);\n CometChatUIKitCalls.endSession();\n }\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n )\n .build();\n return callSettings;\n }\n }, [callSettingsBuilder, callWorkflow, onErrorCallback, sessionID]);\n\n const startCall = useCallback(() => {\n // const ccCallScreenRef = document.getElementById(\"cc-callscreen_ref\");\n if (loggedInUser) {\n const authToken = loggedInUser!.getAuthToken();\n\n CometChatUIKitCalls.generateToken(sessionID, authToken).then(\n (res: any) => {\n CometChatUIKitCalls.startSession(\n res?.token,\n getCallBuilder(),\n callScreenFrameRef.current\n );\n },\n (err: any) => {\n onErrorCallback(err);\n }\n );\n } else {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n const authToken = user!.getAuthToken();\n\n CometChatUIKitCalls.generateToken(sessionID, authToken).then(\n (res: any) => {\n CometChatUIKitCalls.startSession(\n res?.token,\n getCallBuilder(),\n callScreenFrameRef.current\n );\n },\n (err: any) => {\n onErrorCallback(err);\n }\n );\n });\n }\n }, [sessionID, getCallBuilder, loggedInUser, onErrorCallback]);\n\n Hooks(setLoggedInuser, sessionID, startCall);\n return sessionID !== \"\" ? (\n \n \n \n ) : (\n <>\n );\n};\n\nCometChatOngoingCall.defaultProps = defaultProps;\nexport { CometChatOngoingCall };\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2019.2V13.8H4.80005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.8%204.8V10.2H19.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%208.4V3H15.6%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3%2015.6V21H8.4%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import { useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n\tsetLoggedInUser: any,\n sessionID: string,\n startCall: any,\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user: CometChat.User | null)=>{\n if(user){\n setLoggedInUser(user);\n }\n }\n )\n }, [setLoggedInUser]\n );\n\n useEffect(\n () => {\n if(sessionID !== \"\"){\n startCall();\n \n }\n }, [sessionID, startCall]\n )\n}\n\nexport { Hooks };","import { CallButtonsStyle, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport {CSSProperties} from \"react\";\n\nexport const CallButtonsWrapperStyle = (callButtonStyle : CallButtonsStyle) => {\n return {\n height: callButtonStyle?.height,\n width: callButtonStyle?.width,\n background: callButtonStyle?.background,\n border: callButtonStyle?.border,\n borderRadius: callButtonStyle?.borderRadius,\n display: 'flex',\n justifyContent: 'center'\n }\n}\n\nexport const outgoingCallStyle: OutgoingCallStyle = {\n width: \"360px\",\n height: \"581px\",\n titleTextFont: \"700 22px Inter\",\n titleTextColor: \"RGB(20, 20, 20)\",\n subtitleTextFont: \"400 15px Inter\",\n subtitleTextColor: \"RGBA(20, 20, 20, 0.58)\",\n borderRadius: \"8px\"\n}\n\nexport const buttonStyle = {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n}\n\nexport const defaultCallsButtonStyle = (theme: CometChatTheme) : CallButtonsStyle => { \n return new CallButtonsStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n voiceCallIconTint: theme.palette.getPrimary(),\n videoCallIconTint: theme.palette.getPrimary(),\n voiceCallIconTextFont: fontHelper(theme.typography.caption1),\n videoCallIconTextFont: fontHelper(theme.typography.caption1),\n voiceCallIconTextColor: theme.palette.getPrimary(),\n videoCallIconTextColor: theme.palette.getPrimary(),\n buttonPadding: \"8px 32px\",\n buttonBackground: theme.palette.getAccent100(),\n buttonBorder: \"0\",\n buttonBorderRadius: \"8px\"\n })\n}\n\nexport const ongoingCallStyle = (theme: CometChatTheme): CallscreenStyle => {\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n}\n\nexport const getVoiceCallButtonTint = (disableButtons : boolean, callButtonStyle : CallButtonsStyle | undefined, theme : CometChatTheme) => {\n return disableButtons ? theme.palette.getAccent600() : callButtonStyle?.voiceCallIconTint\n}\n\nexport const getVideoCallButtonTint = (disableButtons : boolean, callButtonStyle : CallButtonsStyle | undefined, theme : CometChatTheme) => {\n return disableButtons ? theme.palette.getAccent600() : callButtonStyle?.videoCallIconTint\n}\n\nexport const VideoCallButtonStyle = (callButtonStyle : CallButtonsStyle | undefined) => {\n return {\n buttonIconTint: callButtonStyle?.videoCallIconTint ?? \"RGB(51, 153, 255)\",\n buttonTextFont: callButtonStyle?.videoCallIconTextFont ?? \"400 12px Inter\",\n buttonTextColor: callButtonStyle?.videoCallIconTextColor ?? \"RGB(51, 153, 255)\",\n padding: callButtonStyle?.buttonPadding ?? \"8px 32px\",\n background:callButtonStyle?.buttonBackground ?? \"transparent\",\n border:callButtonStyle?.border ?? \"none\",\n borderRadius:callButtonStyle?.buttonBorderRadius ?? \"0\",\n ...buttonStyle\n } as CSSProperties\n}\n\nexport const VoiceCallButtonStyle = (callButtonStyle : CallButtonsStyle | undefined) => {\n return {\n buttonIconTint: callButtonStyle?.voiceCallIconTint ?? \"RGB(51, 153, 255)\",\n buttonTextFont: callButtonStyle?.voiceCallIconTextFont ?? \"400 12px Inter\",\n buttonTextColor: callButtonStyle?.voiceCallIconTextColor ?? \"RGB(51, 153, 255)\",\n padding: callButtonStyle?.buttonPadding ?? \"8px 32px\",\n background: callButtonStyle?.buttonBackground ?? \"transparent\",\n border: callButtonStyle?.border ?? \"none\",\n borderRadius: callButtonStyle?.buttonBorderRadius ?? \"0\",\n ...buttonStyle\n } as CSSProperties\n}","import { AvatarStyle, CardStyle } from \"@cometchat/uikit-elements\";\nimport { OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport const OutgoingCallWrapperStyle = (outgoingCallStyle : OutgoingCallStyle) => {\n return {\n height: outgoingCallStyle?.height,\n width: outgoingCallStyle?.width,\n background: outgoingCallStyle?.background,\n border: outgoingCallStyle?.border,\n borderRadius: outgoingCallStyle?.borderRadius\n }\n}\n\nexport const OutgoingCallSubtitleStyle = (outgoingCallStyle : OutgoingCallStyle) => {\n return {\n textFont: outgoingCallStyle?.subtitleTextFont,\n textColor: outgoingCallStyle?.subtitleTextColor\n }\n}\n\nexport const OutgoingCallCancelButtonStyle = (outgoingCallStyle : OutgoingCallStyle) => { \n return {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: outgoingCallStyle?.declineButtonTextFont,\n buttonTextColor: outgoingCallStyle?.declineButtonTextColor,\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: outgoingCallStyle?.declineButtonIconTint,\n background: \"\",\n iconBackground: outgoingCallStyle?.declineButtonIconBackground\n }\n}\n\nexport const buttonStyle = {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: \"400 12px Inter\",\n buttonTextColor: \"RGBA(20, 20, 20, 0.58)\",\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: \"white\",\n background: \"\",\n iconBackground: \"red\"\n};\n\nexport const OutgoingCallCardStyle: CardStyle = {\n height: \"100%\",\n width: \"100%\",\n border: \"inherite\",\n borderRadius: \"inherite\",\n background: \"transparent\",\n titleFont: \"700 22px Inter\",\n titleColor: \"black\",\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme) : AvatarStyle => {\n return new AvatarStyle(\n {\n borderRadius: \"50%\",\n width: \"180px\",\n height: \"180px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n }\n );\n}\n\nexport const defaultOutgoingCallStyle = (theme: CometChatTheme): OutgoingCallStyle =>{\n return new OutgoingCallStyle(\n {\n width: \"100%\",\n height: \"100%\",\n background: theme.palette.getBackground(),\n border: \"none\",\n borderRadius: \"0\",\n titleTextFont: fontHelper(theme.typography.title1),\n titleTextColor: theme.palette.getAccent(),\n subtitleTextFont: fontHelper(theme.typography.subtitle1),\n subtitleTextColor: theme.palette.getAccent600(),\n declineButtonTextFont:fontHelper(theme.typography.caption1),\n declineButtonTextColor:theme.palette.getAccent600(),\n declineButtonIconTint:theme.palette.getAccent(\"dark\"),\n declineButtonIconBackground:theme.palette.getError()\n }\n );\n} ","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CSSProperties, useCallback, useContext, useRef } from \"react\";\nimport { CometChatSoundManager, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatUIKitConstants, IconButtonAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { OutgoingCallCancelButtonStyle, OutgoingCallCardStyle, OutgoingCallSubtitleStyle, OutgoingCallWrapperStyle, buttonStyle, defaultAvatarStyle, defaultOutgoingCallStyle } from \"./style\";\n\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport Close2xIcon from './assets/close2x.svg';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\n\ninterface IOutgoingCallProps {\n call: CometChat.Call,\n disableSoundForCalls?: boolean,\n customSoundForCalls?: string,\n declineButtonText?: string,\n declineButtonIconURL?: string,\n customView?: any,\n onError?: Function,\n avatarStyle?: AvatarStyle,\n outgoingCallStyle?: OutgoingCallStyle,\n onCloseClicked?: Function\n}\n\ntype IconButtonStyle = CSSProperties & Partial<{\n buttonTextFont : string,\n buttonTextColor : string,\n iconTint : string,\n iconBackground : string,\n}>;\n\nconst CometChatOutgoingCall = (props: IOutgoingCallProps) => {\n \n const {\n call,\n disableSoundForCalls = false,\n customSoundForCalls = \"\",\n declineButtonText = localize(\"CANCEL\"),\n declineButtonIconURL = Close2xIcon,\n customView = null,\n onError = (error: CometChat.CometChatException) => { console.log(error); },\n avatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"180px\",\n height: \"180px\",\n }),\n outgoingCallStyle = new OutgoingCallStyle({\n width: \"100%\",\n height: \"100%\",\n titleTextFont: \"700 22px Inter\",\n titleTextColor: \"RGB(20, 20, 20)\",\n subtitleTextFont: \"400 15px Inter\",\n subtitleTextColor: \"RGBA(20, 20, 20, 0.58)\",\n declineButtonTextFont:\"400 12px Inter\",\n declineButtonTextColor:\"RGBA(20, 20, 20, 0.58)\",\n declineButtonIconTint:\"white\",\n declineButtonIconBackground:\"red\"\n }),\n onCloseClicked = () => {}\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const iconAlignment: IconButtonAlignment = IconButtonAlignment.top;\n \n const avatarStyleRef = useRef(avatarStyle);\n const outgoingCallStyleRef = useRef(outgoingCallStyle);\n const buttonStyleRef = useRef(buttonStyle);\n const callRef = useRef(null);\n const cancelCallButtonRef = useRef(null);\n\n callRef.current = call;\n\n avatarStyleRef.current = { ...defaultAvatarStyle(theme), ...avatarStyleRef?.current };\n\n outgoingCallStyleRef.current = { ...defaultOutgoingCallStyle(theme), ...outgoingCallStyleRef?.current };\n\n buttonStyleRef.current = OutgoingCallCancelButtonStyle(outgoingCallStyleRef?.current);\n\n OutgoingCallCardStyle.titleColor = outgoingCallStyleRef?.current?.titleTextColor;\n OutgoingCallCardStyle.titleFont = outgoingCallStyleRef?.current?.titleTextFont;\n \n let subtitleText: string = localize(\"CALLING\");\n\n const onErrorCallback = useCallback((error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details\n }\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n }, [onError]);\n\n const onClose = useCallback(() => {\n try{\n CometChatSoundManager.pause();\n if (onCloseClicked) {\n onCloseClicked();\n }\n }catch(e){\n onErrorCallback(e);\n }\n }, [onCloseClicked, onErrorCallback])\n\n const getAvatarURL = () => {\n return callRef.current?.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user ? (callRef.current?.getReceiver() as CometChat.User)?.getAvatar() : (callRef.current?.getReceiver() as CometChat.Group)?.getIcon();\n }\n\n const playAudio = useCallback(() => {\n try{\n if(!disableSoundForCalls){\n if (customSoundForCalls) {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall, customSoundForCalls)\n } else {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall)\n }\n }\n }catch(e){\n onErrorCallback(e);\n }\n }, [disableSoundForCalls, customSoundForCalls, onErrorCallback])\n\n Hooks(\n playAudio, \n call, \n onClose, \n cancelCallButtonRef\n );\n\n return (\n <>\n
    \n {\n customView ? \n
    \n {customView}\n
    :\n callRef.current ?\n \n \n
    \n \n
    \n
    :\n null\n }\n
    \n \n );\n};\n\nexport { CometChatOutgoingCall };","import { useEffect } from \"react\";\nimport { CometChatSoundManager } from \"@cometchat/uikit-shared\";\n\nfunction Hooks(\n playAudio: Function,\n\tcall: any,\n\tonClose: Function,\n cancelCallButtonRef: any\n) {\n useEffect(\n () => {\n return () => {\n CometChatSoundManager.pause();\n }\n }, []\n );\n\n useEffect(\n () => {\n setTimeout(() => {\n playAudio();\n });\n return () => {\n CometChatSoundManager.pause();\n }\n }, [call, playAudio]\n );\n\n useEffect(\n () => {\n const cancleCallButton = cancelCallButtonRef.current;\n if(!cancleCallButton) return;\n cancleCallButton.addEventListener(\"cc-button-clicked\", onClose);\n return () => {\n cancleCallButton.removeEventListener(\"cc-button-clicked\", onClose);\n }\n }, [onClose, cancelCallButtonRef]\n );\n\n}\n\nexport { Hooks };","import { CSSProperties, useCallback, useContext, useRef, useState } from \"react\";\nimport { CallButtonsStyle, CometChatSoundManager, CometChatUIKitCalls, CometChatUIKitUtility, StorageUtils } from \"@cometchat/uikit-shared\";\nimport {\n CallButtonsWrapperStyle,\n VideoCallButtonStyle,\n VoiceCallButtonStyle,\n defaultCallsButtonStyle,\n getVideoCallButtonTint,\n getVoiceCallButtonTint,\n ongoingCallStyle,\n outgoingCallStyle,\n} from \"./style\";\nimport { CometChatCallEvents, CometChatMessageEvents, CometChatUIKitConstants, MessageStatus, localize } from \"@cometchat/uikit-resources\";\n\nimport AudioCall2xIcon from \"./assets/Audio-Call2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatOutgoingCall } from \"../CometChatOutgoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport VideoCall2xIcon from \"./assets/VideoCall2xIcon.svg\";\nimport { useRefSync } from \"../../CometChatCustomHooks\";\n\ninterface ICallButtonsBaseProps {\n voiceCallIconURL?: string;\n voiceCallIconText?: string;\n voiceCallIconHoverText?: string;\n videoCallIconURL?: string;\n videoCallIconText?: string;\n videoCallIconHoverText?: string;\n callButtonsStyle?: CallButtonsStyle;\n onVoiceCallClick?: () => void;\n onVideoCallClick?: () => void;\n onError?: (error: CometChat.CometChatException) => void;\n}\n\ninterface ICallButtonsUserProps extends ICallButtonsBaseProps {\n user: CometChat.User;\n group?: CometChat.Group | null;\n}\n\ninterface ICallButtonsGroupProps extends ICallButtonsBaseProps {\n user?: CometChat.User | null;\n group: CometChat.Group;\n}\n\ntype ICallButtonsProps = ICallButtonsUserProps | ICallButtonsGroupProps\n\ntype ButtonStyle = CSSProperties & {\n buttonIconTint?: string;\n buttonTextFont?: string;\n buttonTextColor?: string;\n};\n\nconst defaultProps = {\n voiceCallIconURL: AudioCall2xIcon,\n voiceCallIconText: localize(\"VOICE_CALL\"),\n voiceCallIconHoverText: localize(\"VOICE_CALL\"),\n videoCallIconURL: VideoCall2xIcon,\n videoCallIconText: localize(\"VIDEO_CALL\"),\n videoCallIconHoverText: localize(\"VIDEO_CALL\"),\n callButtonsStyle: {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n },\n onVoiceCallClick: undefined,\n onVideoCallClick: undefined,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n};\n\nconst CometChatCallButtons = (props: ICallButtonsProps) => {\n const {\n user,\n group,\n voiceCallIconURL,\n voiceCallIconText,\n voiceCallIconHoverText,\n videoCallIconURL,\n videoCallIconText,\n videoCallIconHoverText,\n callButtonsStyle,\n onVoiceCallClick,\n onVideoCallClick,\n onError,\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [loggedInUser, setLoggedInuser] = useState(null);\n\n const callButtonStyleRef = useRef(null);\n callButtonStyleRef.current = {\n ...defaultCallsButtonStyle(theme),\n ...callButtonsStyle,\n };\n\n const voiceCallButtonStyleRef = useRef(null);\n\n voiceCallButtonStyleRef.current = VoiceCallButtonStyle(\n callButtonStyleRef?.current\n );\n\n const videoCallButtonStyleRef = useRef(null);\n\n videoCallButtonStyleRef.current = VideoCallButtonStyle(\n callButtonStyleRef?.current\n );\n\n const [activeUser, setActiveUser] = useState(user);\n const [activeGroup, setActiveGroup] = useState(group);\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const [showOutgoingCallScreen, setShowOutgoingCallScreen] = useState(false);\n const [disableButtons, setDisableButtons] = useState(false);\n\n const audioCallButtonRef = useRef(null);\n const videoCallButtonRef = useRef(null);\n const callRef = useRef(null);\n const sessionIdRef = useRef(\"\");\n\n const onVoiceCallClickRef = useRefSync(onVoiceCallClick);\n const onVideoCallClickRef = useRefSync(onVideoCallClick);\n\n let callbuttonsListenerId: string = \"callbuttons_\" + new Date().getTime();\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallRejected = CometChatCallEvents.ccCallRejected.subscribe(\n () => {\n setDisableButtons(false);\n }\n );\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n () => {\n setDisableButtons(true);\n }\n );\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(() => {\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n setShowOngoingCall(false);\n setShowOutgoingCallScreen(false);\n });\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n ccCallRejected?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n } catch (e) {\n onErrorCallback(e);\n }\n };\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const attachListeners = useCallback(() => {\n try {\n CometChat.addCallListener(\n callbuttonsListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: () => {\n setDisableButtons(true);\n },\n onIncomingCallCancelled: () => {\n setDisableButtons(false);\n },\n onOutgoingCallRejected: () => {\n setShowOutgoingCallScreen(false);\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n },\n onOutgoingCallAccepted: (call: CometChat.Call) => {\n if (call.getSender()?.getUid() === loggedInUser?.getUid()\n || call.getSessionId() !== callRef.current?.getSessionId()\n ) {\n setShowOutgoingCallScreen(false);\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n return;\n }\n setShowOutgoingCallScreen(false);\n setShowOngoingCall(true);\n setDisableButtons(true);\n callRef.current = call;\n sessionIdRef.current = call.getSessionId();\n },\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback, callbuttonsListenerId]);\n\n const removeListener = useCallback(() => {\n try {\n CometChat.removeCallListener(callbuttonsListenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback, callbuttonsListenerId]);\n\n const closeCallScreen = () => {\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n setShowOngoingCall(false);\n setShowOutgoingCallScreen(false);\n };\n\n function getCallBuilder(): typeof CometChatUIKitCalls.CallSettings {\n let audioOnlyCall: boolean =\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? true\n : false;\n\n const sessionId = sessionIdRef.current;\n\n return new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n closeCallScreen();\n }\n },\n onCallEndButtonPressed: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChat.endCall(sessionId)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n closeCallScreen()\n })\n .catch((err: CometChat.CometChatException) => {\n onErrorCallback(err);\n });\n }else{\n closeCallScreen();\n }\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n )\n .build();\n }\n\n const initiateCall = useCallback(\n (type: string) => {\n try {\n const receiverType: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n\n const receiverId: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n\n const callObj: CometChat.Call = new CometChat.Call(\n receiverId,\n type,\n receiverType\n );\n\n CometChat.initiateCall(callObj).then(\n (outgoingCall: CometChat.Call) => {\n callRef.current = outgoingCall;\n setShowOutgoingCallScreen(true);\n CometChatCallEvents.ccOutgoingCall.next(outgoingCall);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [activeUser, activeGroup, onErrorCallback]\n );\n\n const initiateAudioCall = useCallback(() => {\n try {\n if (activeUser) {\n initiateCall(CometChatUIKitConstants.MessageTypes.audio);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, initiateCall, onErrorCallback]);\n\n const sendCustomMessage = useCallback(() => {\n try {\n const receiverType: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n\n const receiverId: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n const sessionID = sessionIdRef.current;\n\n const customData = {\n sessionID: sessionID,\n sessionId: sessionID,\n callType: CometChatUIKitConstants.MessageTypes.video,\n };\n\n const customType = CometChatUIKitConstants.calls.meeting;\n const conversationId = `group_${sessionID}`;\n\n const customMessage: any = new CometChat.CustomMessage(\n receiverId,\n receiverType,\n customType,\n customData\n );\n\n customMessage.setMetadata({ incrementUnreadCount: true });\n customMessage.shouldUpdateConversation(true);\n customMessage.setSender(loggedInUser);\n customMessage.setConversationId(conversationId);\n customMessage.sentAt = CometChatUIKitUtility.getUnixTimestamp();\n customMessage.muid = CometChatUIKitUtility.ID();\n\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.inprogress,\n });\n\n CometChat.sendCustomMessage(customMessage).then(\n (m) => {\n CometChatMessageEvents.ccMessageSent.next({\n message: m,\n status: MessageStatus.success,\n });\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, activeGroup, loggedInUser, onErrorCallback]);\n\n const initiateVideoCall = useCallback(() => {\n try {\n if (activeUser) {\n initiateCall(CometChatUIKitConstants.MessageTypes.video);\n }\n if (activeGroup) {\n sessionIdRef.current = activeGroup?.getGuid();\n sendCustomMessage();\n setShowOngoingCall(true);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, activeGroup, sendCustomMessage, onErrorCallback, initiateCall]);\n\n const cancelOutgoingCall = useCallback(() => {\n const call = callRef.current;\n if (!call) {\n return;\n }\n try {\n CometChatSoundManager.pause();\n CometChat.rejectCall(\n call.getSessionId(),\n CometChatUIKitConstants.calls.cancelled\n ).then(\n (call: CometChat.Call) => {\n setDisableButtons(false);\n setShowOutgoingCallScreen(false);\n CometChatCallEvents.ccCallRejected.next(call);\n callRef.current = null;\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n setShowOutgoingCallScreen(false);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const getVoiceCallButtonStyle = useCallback(() => {\n if (!voiceCallButtonStyleRef.current) {\n return;\n }\n voiceCallButtonStyleRef.current.buttonIconTint = getVoiceCallButtonTint(\n disableButtons,\n callButtonStyleRef.current ?? undefined,\n theme\n );\n return voiceCallButtonStyleRef.current;\n }, [disableButtons, theme]);\n\n const getVideoCallButtonStyle = useCallback(() => {\n if (!videoCallButtonStyleRef.current) {\n return;\n }\n videoCallButtonStyleRef.current.buttonIconTint = getVideoCallButtonTint(\n disableButtons,\n callButtonStyleRef.current ?? undefined,\n theme\n );\n return videoCallButtonStyleRef.current;\n }, [disableButtons, theme]);\n\n Hooks(\n loggedInUser,\n setLoggedInuser,\n user,\n group,\n subscribeToEvents,\n onErrorCallback,\n attachListeners,\n removeListener,\n setActiveUser,\n setActiveGroup,\n audioCallButtonRef,\n videoCallButtonRef,\n initiateAudioCall,\n initiateVideoCall,\n disableButtons,\n onVoiceCallClickRef,\n onVideoCallClickRef\n );\n\n const ccBtnDisabledPropSpreadObject = disableButtons\n ? { disabled: true }\n : {};\n return (\n <>\n \n \n {activeUser ? (\n \n ) : null}\n\n {activeUser || activeGroup ? (\n \n ) : null}\n \n \n\n {showOngoingCall && sessionIdRef.current != null ? (\n \n ) : null}\n\n {showOutgoingCallScreen && callRef.current ? (\n \n \n \n ) : null}\n \n );\n};\n\nCometChatCallButtons.defaultProps = defaultProps;\nexport { CometChatCallButtons };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n user: any,\n group: any,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n attachListeners: Function,\n removeListener: Function,\n setActiveUser: any,\n setActiveGroup: any,\n audioCallButtonRef: any,\n videoCallButtonRef: any,\n initiateAudioCall: Function,\n initiateVideoCall: Function,\n disableButtons: boolean,\n onVoiceCallClickRef : React.MutableRefObject,\n onVideoCallClickRef : React.MutableRefObject\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null) => {\n if(user){\n setLoggedInUser(user);\n }\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }, [setLoggedInUser, onErrorCallback]\n )\n \n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n attachListeners();\n }\n return () => {\n unsubscribeFromEvents?.();\n removeListener();\n }\n }, [loggedInUser, attachListeners, removeListener, subscribeToEvents])\n \n useEffect(\n () => {\n if(user){\n setActiveUser(user);\n setActiveGroup(null);\n }\n }, [user, setActiveUser, setActiveGroup]\n )\n \n useEffect(\n () => {\n if(group){\n setActiveUser(null);\n setActiveGroup(group);\n }\n }, [group, setActiveUser, setActiveGroup]\n )\n\n useEffect(\n () => {\n const audioCallButton = audioCallButtonRef.current;\n const videoCallButton = videoCallButtonRef.current;\n\n if(!audioCallButton && !videoCallButton) return;\n\n const audioCallButtonClicked = () => {\n const onVoiceCallClick = onVoiceCallClickRef.current;\n if (onVoiceCallClick) {\n onVoiceCallClick();\n }\n else {\n initiateAudioCall();\n }\n } \n\n const videoCallButtonClicked = () => {\n const onVideoCallClick = onVideoCallClickRef.current;\n if (onVideoCallClick) {\n onVideoCallClick();\n }\n else {\n initiateVideoCall();\n }\n }\n\n if(!disableButtons){\n audioCallButton?.addEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.addEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }else{\n audioCallButton?.removeEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.removeEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }\n\n return () => {\n audioCallButton?.removeEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.removeEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }\n }, [disableButtons, initiateAudioCall, initiateVideoCall, onVoiceCallClickRef, onVideoCallClickRef, audioCallButtonRef, videoCallButtonRef]\n )\n\n}\n\nexport { Hooks };","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n localize,\n DocumentIconAlignment,\n fontHelper,\n CometChatUIEvents,\n CometChatLocalize,\n MessageBubbleAlignment,\n CallWorkflow,\n} from \"@cometchat/uikit-resources\";\nimport {\n CallingDetailsUtils,\n CallButtonsStyle,\n CometChatUIKitCalls,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport {\n CometChatDocumentBubble,\n CometChatIconButton,\n CallscreenStyle,\n} from \"@cometchat/uikit-elements\";\nimport React from \"react\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { DataSource } from \"../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../Shared/Framework/DataSourceDecorator\";\nimport { CometChatOngoingCall } from \"./CometChatOngoingCall\";\nimport { CometChatCallButtons } from \"./CometChatCallButtons\";\nimport AudioCallIcon from \"./assets/Audio-Call.svg\";\nimport VideoCallIcon from \"./assets/Video-call.svg\";\nimport VideoCall2xIcon from \"./assets/Video-call2x.svg\";\n\nconst CallingConstants = Object.freeze({\n meeting: \"meeting\",\n ongoing: \"ongoing\",\n ended: \"ended\",\n initiated: \"initiated\",\n cancelled: \"cancelled\",\n rejected: \"rejected\",\n unanswered: \"unanswered\",\n});\n\nconst CometChatDefaultCallBubble = createComponent({\n tagName: \"cometchat-icon-button\",\n elementClass: CometChatIconButton,\n react: React,\n});\n\nexport class CallingExtensionDecorator extends DataSourceDecorator {\n public theme!: CometChatTheme;\n public loggedInUser: CometChat.User | null = null;\n\n constructor(dataSource: DataSource) {\n super(dataSource);\n this.addLoginListener();\n this.getLoggedInUser();\n }\n\n addLoginListener() {\n var listenerID: string = \"login_listener\";\n CometChat.addLoginListener(\n listenerID,\n new CometChat.LoginListener({\n logoutSuccess: () => {\n try {\n let call: CometChat.Call = CometChat.getActiveCall();\n if (call) {\n CometChat.endCall(call.getSessionId());\n }\n } catch (error) {\n console.log(\"error in endCall on logout\", error);\n }\n },\n })\n );\n }\n\n async getLoggedInUser() {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(CallingConstants.meeting)) {\n types.push(CallingConstants.meeting);\n }\n if (!types.includes(CometChatUIKitConstants.MessageTypes.audio)) {\n types.push(CometChatUIKitConstants.MessageTypes.audio);\n }\n if (!types.includes(CometChatUIKitConstants.MessageTypes.video)) {\n types.push(CometChatUIKitConstants.MessageTypes.video);\n }\n return types;\n }\n\n override getId(): string {\n return \"calling\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.call)) {\n categories.push(CometChatUIKitConstants.MessageCategory.call);\n }\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateTypeExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n checkIfTemplateCategoryExist(\n template: CometChatMessageTemplate[],\n category: string\n ): boolean {\n return template.some((obj) => obj.category === category);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n _theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateTypeExist(templates, CallingConstants.meeting)) {\n templates.push(this.getDirectCallTemplate(this.theme));\n }\n if (\n !this.checkIfTemplateCategoryExist(\n templates,\n CometChatUIKitConstants.MessageCategory.call\n )\n ) {\n templates.push(...this.getDefaultCallTemplate(this.theme));\n }\n return templates;\n }\n\n getDirectCallTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CallingConstants.meeting,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n if (message.getDeletedAt()) {\n return super.getDeleteMessageBubble(message, this.theme)\n }\n return this.getDirectCallMessageBubble(\n message as CometChat.CustomMessage,\n _alignment,\n _theme\n );\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getDefaultCallTemplate(_theme: CometChatTheme): CometChatMessageTemplate[] {\n let templates: CometChatMessageTemplate[] = [\n new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.audio,\n category: CometChatUIKitConstants.MessageCategory.call,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getDefaultAudioCallMessageBubble(\n message as CometChat.Call,\n _alignment,\n _theme\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n }),\n new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.video,\n category: CometChatUIKitConstants.MessageCategory.call,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getDefaultVideoCallMessageBubble(\n message as CometChat.Call,\n _alignment,\n _theme\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n }),\n ];\n return templates;\n }\n\n getCallBubbleStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment === MessageBubbleAlignment.left;\n if (!isLeftAligned) {\n return {\n titleFont: fontHelper(_theme.typography.text2),\n titleColor: _theme.palette.getAccent(\"dark\"),\n iconTint: _theme.palette.getAccent(\"dark\"),\n buttonTextFont: fontHelper(_theme.typography.text2),\n buttonTextColor: _theme.palette.getPrimary(),\n buttonBackground: _theme.palette.getAccent(\"dark\"),\n width: \"240px\",\n background: _theme.palette.getPrimary(),\n borderRadius: \"12px\",\n };\n } else {\n return {\n titleFont: fontHelper(_theme.typography.text2),\n titleColor: _theme.palette.getAccent(),\n iconTint: _theme.palette.getPrimary(),\n buttonTextFont: fontHelper(_theme.typography.text2),\n buttonTextColor: _theme.palette.getAccent(\"dark\"),\n buttonBackground: _theme.palette.getPrimary(),\n width: \"240px\",\n borderRadius: \"12px\",\n };\n }\n }\n\n getSessionId(_message: CometChat.CustomMessage) {\n let data = _message.getData();\n return data?.customData?.sessionID;\n }\n\n getCallBubbleTitle(_message: CometChat.CustomMessage) {\n if (\n !_message.getSender() ||\n _message.getSender().getUid() === this.loggedInUser?.getUid()\n ) {\n return localize(\"YOU_INITIATED_GROUP_CALL\");\n } else {\n return `${_message.getSender().getName()} ${localize(\n \"INITIATED_GROUP_CALL\"\n )}`;\n }\n }\n\n getDirectCallMessageBubble(\n _message: CometChat.CustomMessage,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n let callBubbleAlignment: DocumentIconAlignment = DocumentIconAlignment.left;\n let callBubbleStyle = this.getCallBubbleStyle(_alignment, _theme);\n let sessionId = this.getSessionId(_message);\n let directCallIconURL = VideoCall2xIcon;\n let callBubbleTitle = this.getCallBubbleTitle(_message);\n let joinCallButtonText = localize(\"JOIN\");\n\n const CometChatDirectCallBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n });\n\n return (\n {\n this.startDirectCall(sessionId, this.theme || _theme);\n }}\n />\n );\n }\n\n startDirectCall(sessionId: string, theme: CometChatTheme) {\n const style = new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n const ongoingCallScreen = (\n \n );\n CometChatUIEvents.ccShowOngoingCall.next({ child: ongoingCallScreen });\n }\n\n callStatusStyle(_message: CometChat.Call, theme: CometChatTheme) {\n\n if (this.loggedInUser) {\n\n return {\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: CallingDetailsUtils.isMissedCall(\n _message,\n this.loggedInUser\n )\n ? theme.palette.getError()\n : theme.palette.getAccent600(),\n borderRadius: \"10px\",\n border: CallingDetailsUtils.isMissedCall(_message, this.loggedInUser)\n ? `1px solid RGBA(255, 59, 48, 0.2)`\n : `1px solid ${theme.palette.getAccent100()}`,\n buttonIconTint: CallingDetailsUtils.isMissedCall(\n _message,\n this.loggedInUser\n )\n ? theme.palette.getError()\n : theme.palette.getAccent600(),\n background: \"transparent\",\n iconBackground: \"transparent\",\n padding: \"2px 12px 2px 0\",\n gap: \"0\",\n height: \"25px\",\n justifyContent: \"center\",\n };\n }\n return {};\n }\n\n getCallActionMessage(_message: CometChat.Call) {\n return CallingDetailsUtils.getCallStatus(_message, this.loggedInUser!);\n }\n\n getDefaultAudioCallMessageBubble(\n _message: CometChat.Call,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const style = this.callStatusStyle(_message, _theme);\n const actionMessage = this.getCallActionMessage(_message);\n return (\n \n );\n }\n\n getDefaultVideoCallMessageBubble(\n _message: CometChat.Call,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const style = this.callStatusStyle(_message, _theme);\n const actionMessage = this.getCallActionMessage(_message);\n return (\n \n );\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalParams?: any\n ): string {\n let actionMessage: string = \"\";\n\n if (\n conversation.getLastMessage() &&\n conversation.getLastMessage().category ==\n CometChatUIKitConstants.MessageCategory.call\n ) {\n let call: CometChat.Call = conversation.getLastMessage();\n\n actionMessage = CallingDetailsUtils.getCallStatus(call, loggedInUser);\n } else if (\n conversation?.getLastMessage() &&\n conversation.getLastMessage().type ==\n CometChatUIKitConstants.calls.meeting\n ) {\n let message: CometChat.CustomMessage = conversation.getLastMessage();\n if (\n !message.getSender() ||\n message?.getSender()?.getUid() == loggedInUser.getUid()\n ) {\n actionMessage = localize(\"YOU_INITIATED_GROUP_CALL\");\n } else {\n actionMessage = `${message.getSender().getName()} ${localize(\n \"INITIATED_GROUP_CALL\"\n )}`;\n }\n\n let messageObject = conversation.getLastMessage();\n if (\n messageObject &&\n messageObject.getMentionedUsers().length &&\n messageObject instanceof CometChat.TextMessage &&\n additionalParams &&\n !additionalParams.disableMentions\n ) {\n actionMessage = this.getMentionsFormattedText(\n messageObject,\n actionMessage,\n additionalParams\n );\n }\n } else {\n actionMessage = super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalParams\n );\n }\n return actionMessage;\n }\n\n override getAuxiliaryHeaderMenu(\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n let auxMenus: Array = [];\n let style: CallButtonsStyle = {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonPadding: \"0\",\n buttonBackground: \"transparent\",\n buttonBorder: \"0 4px\",\n buttonBorderRadius: \"8px\",\n };\n let callButtons = (\n \n );\n auxMenus.push(callButtons);\n return auxMenus;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nabstract class ExtensionsDataSource {\n abstract addExtension(): void;\n abstract getExtensionId(): string;\n\n enable(): void {\n CometChat.isExtensionEnabled(this.getExtensionId()).then(\n (enabled: Boolean) => {\n if (enabled) this.addExtension();\n }, error => {}\n );\n }\n}\n\nexport { ExtensionsDataSource };\n","import { DataSource } from '../Shared/Framework/DataSource';\nimport { CallingExtensionDecorator } from './CallingExtensionDecorator';\nimport { ChatConfigurator } from '../Shared/Framework/ChatConfigurator';\nimport { ExtensionsDataSource } from '../Shared/Framework/ExtensionsDataSource';\n\nexport class CallingExtension extends ExtensionsDataSource {\n enable(): void {\n ChatConfigurator.enable((dataSource: DataSource) =>\n new CallingExtensionDecorator(dataSource)\n );\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new CallingExtensionDecorator(dataSource));\n }\n \n override getExtensionId(): string {\n return \"calling\";\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Document%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Document%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.019664%2C11.0497498%20C20.2968766%2C11.0497498%2019.6037718%2C11.3372517%2019.0931699%2C11.8488579%20L11.9722287%2C18.9696649%20C11.8675218%2C19.07437%2011.7961523%2C19.207727%2011.7671152%2C19.3529288%20L11.0671938%2C22.8529288%20C10.9622469%2C23.3777219%2011.4249469%2C23.8404018%2011.9497354%2C23.7354323%20L15.4493424%2C23.0354323%20C15.5945931%2C23.0063789%2015.7279879%2C22.9349647%2015.8327036%2C22.830196%20L22.9504376%2C15.7088627%20C24.0147495%2C14.6469387%2024.0170552%2C12.9221237%2022.9548584%2C11.8566265%20L22.9136114%2C11.8181375%20C22.4355563%2C11.3372517%2021.7424514%2C11.0497498%2021.019664%2C11.0497498%20Z%20M21.019664%2C12.5497498%20C21.2977603%2C12.5497498%2021.5660731%2C12.6445675%2021.7814054%2C12.816289%20L21.9254022%2C12.9466625%20L22.00838%2C13.0404351%20C22.3677898%2C13.4966868%2022.3370963%2C14.2018865%2021.890239%2C14.6477416%20L14.931%2C21.609%20L12.758%2C22.043%20L13.193%2C19.869%20L20.1543459%2C12.9090017%20C20.3840891%2C12.6788071%2020.6952184%2C12.5497498%2021.019664%2C12.5497498%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.3982707%2C1.25%20C18.5339913%2C1.25%2019.463993%2C2.13072139%2019.5427157%2C3.24645803%20L19.5481135%2C3.4%20L19.5481135%2C9.7%20C19.5481135%2C10.1142136%2019.2123271%2C10.45%2018.7981135%2C10.45%20C18.4184177%2C10.45%2018.1046226%2C10.1678461%2018.0549601%2C9.80177056%20L18.0481135%2C9.7%20L18.0481135%2C3.4%20C18.0481135%2C3.07363278%2017.8076479%2C2.80347042%2017.4942955%2C2.75704724%20L17.3982707%2C2.75%20L3.39984279%2C2.75%20C3.07358878%2C2.75%202.80346372%2C2.99049261%202.75704639%2C3.30394351%20L2.75%2C3.4%20L2.75%2C18.8%20C2.75%2C19.1263672%202.99046561%2C19.3965296%203.30381804%2C19.4429528%20L3.39984279%2C19.45%20L8.99921396%2C19.45%20C9.41342753%2C19.45%209.74921396%2C19.7857864%209.74921396%2C20.2%20C9.74921396%2C20.5796958%209.46706008%2C20.893491%209.10098452%2C20.9431534%20L8.99921396%2C20.95%20L3.39984279%2C20.95%20C2.26412221%2C20.95%201.33412057%2C20.0692786%201.25539778%2C18.953542%20L1.25%2C18.8%20L1.25%2C3.4%20C1.25%2C2.26423244%202.13062249%2C1.33412985%203.24630755%2C1.25539838%20L3.39984279%2C1.25%20L17.3982707%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C5.45%20C15.0127987%2C5.45%2015.3485851%2C5.78578644%2015.3485851%2C6.2%20C15.3485851%2C6.57969577%2015.0664313%2C6.89349096%2014.7003557%2C6.94315338%20L14.5985851%2C6.95%20L8.99921396%2C6.95%20C8.5850004%2C6.95%208.24921396%2C6.61421356%208.24921396%2C6.2%20C8.24921396%2C5.82030423%208.53136785%2C5.50650904%208.89744341%2C5.45684662%20L8.99921396%2C5.45%20L14.5985851%2C5.45%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C9.65%20C15.0127987%2C9.65%2015.3485851%2C9.98578644%2015.3485851%2C10.4%20C15.3485851%2C10.7796958%2015.0664313%2C11.093491%2014.7003557%2C11.1431534%20L14.5985851%2C11.15%20L6.19952838%2C11.15%20C5.78531482%2C11.15%205.44952838%2C10.8142136%205.44952838%2C10.4%20C5.44952838%2C10.0203042%205.73168226%2C9.70650904%206.09775782%2C9.65684662%20L6.19952838%2C9.65%20L14.5985851%2C9.65%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.1987423%2C13.85%20C13.6129559%2C13.85%2013.9487423%2C14.1857864%2013.9487423%2C14.6%20C13.9487423%2C14.9796958%2013.6665885%2C15.293491%2013.3005129%2C15.3431534%20L13.1987423%2C15.35%20L6.19952838%2C15.35%20C5.78531482%2C15.35%205.44952838%2C15.0142136%205.44952838%2C14.6%20C5.44952838%2C14.2203042%205.73168226%2C13.906509%206.09775782%2C13.8568466%20L6.19952838%2C13.85%20L13.1987423%2C13.85%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatMessageTemplate,\n CometChatMessageComposerAction,\n fontHelper,\n CometChatUIKitConstants,\n localize,\n DocumentIconAlignment,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CollaborativeDocumentConstants,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { CometChatDocumentBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CollaborativeDocumentConfiguration } from \"./CollaborativeDocumentConfiguration\";\nimport DocumentIcon from \"./assets/collaborativedocument.svg\";\n\nconst CometChatDocumentExtensionBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n});\n\nexport class CollaborativeDocumentExtensionDecorator extends DataSourceDecorator {\n public configuration?: CollaborativeDocumentConfiguration;\n public newDataSource!: DataSource;\n public theme!: CometChatTheme;\n\n constructor(\n dataSource: DataSource,\n configuration?: CollaborativeDocumentConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(CollaborativeDocumentConstants.extension_document)) {\n types.push(CollaborativeDocumentConstants.extension_document);\n }\n return types;\n }\n\n override getId(): string {\n return \"collaborativedocument\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (\n !this.checkIfTemplateExist(\n templates,\n CollaborativeDocumentConstants.extension_document\n )\n ) {\n templates.push(this.getDocumentTemplate(this.theme));\n }\n return templates;\n }\n\n getDocumentTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CollaborativeDocumentConstants.extension_document,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let documentMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (documentMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(documentMessage, _theme);\n }\n return this.getDocumentContentView(documentMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getDocumentContentView(\n documentMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let documentBubbleAlignment: DocumentIconAlignment =\n DocumentIconAlignment.right;\n let configurationDocumentBubbleStyle =\n this.configuration?.getDocumentBubbleStyle();\n let documentBubbleStyle = {\n titleFont:\n configurationDocumentBubbleStyle?.titleFont ||\n fontHelper(this.theme.typography.text2),\n titleColor:\n configurationDocumentBubbleStyle?.titleColor ||\n this.theme.palette.getAccent(),\n subtitleFont:\n configurationDocumentBubbleStyle?.subtitleFont ||\n fontHelper(this.theme.typography.subtitle2),\n subtitleColor:\n configurationDocumentBubbleStyle?.subtitleColor ||\n this.theme.palette.getAccent600(),\n iconTint:\n configurationDocumentBubbleStyle?.iconTint ||\n this.theme.palette.getAccent700(),\n buttonTextFont:\n configurationDocumentBubbleStyle?.buttonTextFont ||\n fontHelper(this.theme.typography.text2),\n buttonTextColor:\n configurationDocumentBubbleStyle?.buttonTextColor ||\n this.theme.palette.getPrimary(),\n buttonBackground:\n configurationDocumentBubbleStyle?.buttonBackground || \"transparent\",\n separatorColor:\n configurationDocumentBubbleStyle?.separatorColor ||\n this.theme.palette.getAccent200(),\n };\n const documentURL = this.getDocumentURL(documentMessage);\n const documentTitle = localize(\"COLLABORATIVE_DOCUMENT\");\n const documentButtonText = localize(\"OPEN_DOCUMENT\");\n const documentSubitle = localize(\"DRAW_DOCUMENT_TOGETHER\");\n\n return (\n \n );\n }\n\n launchCollaborativeDocument(documentURL: string) {\n window.open(documentURL, \"\", \"fullscreen=yes, scrollbars=auto\");\n }\n\n getDocumentURL(message: CometChat.CustomMessage) {\n try {\n if (message?.getData()) {\n const data: any = message.getData();\n if (data?.metadata) {\n const metadata = data?.metadata;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(metadata, \"@injected\")\n ) {\n const injectedObject = metadata[\"@injected\"];\n if (injectedObject?.extensions) {\n const extensionObject = injectedObject.extensions;\n return extensionObject[CollaborativeDocumentConstants.document]\n ? extensionObject[CollaborativeDocumentConstants.document]\n .document_url\n : extensionObject[CollaborativeDocumentConstants.document]\n .board_url;\n }\n }\n }\n }\n } catch (error: any) {\n console.log(\"error in fetching document url\", error);\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let isUser = id?.user ? true : false;\n let receiverType: string = isUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let receiverId: string | undefined = isUser ? id.user : id.group;\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: CollaborativeDocumentConstants.document,\n title: localize(\"COLLABORATIVE_DOCUMENT\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : DocumentIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: () => {\n CometChat.callExtension(\n CollaborativeDocumentConstants.document,\n CollaborativeDocumentConstants.post,\n CollaborativeDocumentConstants.v1_create,\n { receiver: receiverId, receiverType: receiverType }\n ).then(\n (res: any) => {},\n (error: any) => {}\n );\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === CollaborativeDocumentConstants.extension_document &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_DOCUMENT\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { CollaborativeDocumentConfiguration } from \"./CollaborativeDocumentConfiguration\";\nimport { CollaborativeDocumentExtensionDecorator } from \"./CollaborativeDocumentExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeDocumentExtension extends ExtensionsDataSource {\n private configuration?: CollaborativeDocumentConfiguration;\n\n constructor(configuration?: CollaborativeDocumentConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new CollaborativeDocumentExtensionDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return ExtensionsId.document;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Whiteboard%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Whiteboard%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C1.25%20C4.2473527%2C1.25%202.65%2C2.77128829%202.65%2C4.66666667%20C2.65%2C6.56204505%204.2473527%2C8.08333333%206.2%2C8.08333333%20C8.1526473%2C8.08333333%209.75%2C6.56204505%209.75%2C4.66666667%20C9.75%2C2.77128829%208.1526473%2C1.25%206.2%2C1.25%20Z%20M6.2%2C2.75%20C7.3401473%2C2.75%208.25%2C3.61652638%208.25%2C4.66666667%20C8.25%2C5.71680695%207.3401473%2C6.58333333%206.2%2C6.58333333%20C5.0598527%2C6.58333333%204.15%2C5.71680695%204.15%2C4.66666667%20C4.15%2C3.61652638%205.0598527%2C2.75%206.2%2C2.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666667%20C6.57969577%2C7.91666667%206.89349096%2C8.19882055%206.94315338%2C8.56489611%20L6.95%2C8.66666667%20L6.95%2C14%20C6.95%2C14.4142136%206.61421356%2C14.75%206.2%2C14.75%20C5.82030423%2C14.75%205.50650904%2C14.4678461%205.45684662%2C14.1017706%20L5.45%2C14%20L5.45%2C8.66666667%20C5.45%2C8.2524531%205.78578644%2C7.91666667%206.2%2C7.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666673%20C3.47415406%2C7.91666673%201.25%2C10.0349087%201.25%2C12.6666667%20L1.25%2C15.3333333%20L1.25684662%2C15.4351039%20C1.30650904%2C15.8011795%201.62030423%2C16.0833333%202%2C16.0833333%20L2.725%2C16.083%20L3.3541005%2C22.0783194%20C3.39418895%2C22.4601142%203.71610639%2C22.75%204.1%2C22.75%20L8.3%2C22.75%20L8.40299648%2C22.7429615%20C8.74009489%2C22.6965339%209.00945546%2C22.4254056%209.0458995%2C22.0783194%20L9.674%2C16.083%20L10.4%2C16.0833333%20C10.8142136%2C16.0833333%2011.15%2C15.7475469%2011.15%2C15.3333333%20L11.15%2C12.6666667%20C11.15%2C10.0349087%208.92584594%2C7.91666673%206.2%2C7.91666673%20Z%20M6.39003599%2C9.42150275%20C8.21408216%2C9.514591%209.65%2C10.9396974%209.65%2C12.6666667%20L9.649%2C14.583%20L9%2C14.5833333%20L8.89700352%2C14.5903718%20C8.55990511%2C14.6367994%208.29054454%2C14.9079278%208.2541005%2C15.2550139%20L7.624%2C21.25%20L4.775%2C21.25%20L4.1458995%2C15.2550139%20L4.12814397%2C15.1533155%20C4.04676841%2C14.8229084%203.74899419%2C14.5833333%203.4%2C14.5833333%20L2.75%2C14.583%20L2.75%2C12.6666667%20C2.75%2C10.8801468%204.28665405%2C9.41666673%206.2%2C9.41666673%20L6.39003599%2C9.42150275%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.6%2C1.25%20C22.7281683%2C1.25%2023.6652093%2C2.09570502%2023.7445585%2C3.18354707%20L23.75%2C3.33333333%20L23.75%2C14.6666667%20C23.75%2C15.7752741%2022.8620097%2C16.6691795%2021.7525939%2C16.7448147%20L21.6%2C16.75%20L13.2%2C16.75%20C12.7857864%2C16.75%2012.45%2C16.4142136%2012.45%2C16%20C12.45%2C15.6203042%2012.7321539%2C15.306509%2013.0982294%2C15.2568466%20L13.2%2C15.25%20L21.6%2C15.25%20C21.9335897%2C15.25%2022.1978428%2C15.0272126%2022.2431318%2C14.7509728%20L22.25%2C14.6666667%20L22.25%2C3.33333333%20C22.25%2C3.04809641%2022.0160733%2C2.79937841%2021.6978472%2C2.75651429%20L21.6%2C2.75%20L11.8%2C2.75%20C11.3857864%2C2.75%2011.05%2C2.41421356%2011.05%2C2%20C11.05%2C1.62030423%2011.3321539%2C1.30650904%2011.6982294%2C1.25684662%20L11.8%2C1.25%20L21.6%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport {\n CometChatTheme,\n CometChatMessageTemplate,\n CometChatMessageComposerAction,\n fontHelper,\n CometChatUIKitConstants,\n localize,\n MessageBubbleAlignment,\n DocumentIconAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CollaborativeWhiteboardConstants,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CometChatDocumentBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CollaborativeWhiteboardConfiguration } from \"./CollaborativeWhiteboardConfiguration\";\nimport WhiteboardIcon from \"./assets/collaborativewhiteboard.svg\";\n\nconst CometChatWhiteboardExtensionBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n});\n\nexport class CollaborativeWhiteBoardExtensionDecorator extends DataSourceDecorator {\n public configuration?: CollaborativeWhiteboardConfiguration;\n public newDataSource!: DataSource;\n public theme!: CometChatTheme;\n\n constructor(\n dataSource: DataSource,\n configuration?: CollaborativeWhiteboardConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getAllMessageTypes(): string[] {\n let types: string[] = super.getAllMessageTypes();\n if (\n !types.some(\n (type) => type === CollaborativeWhiteboardConstants.extension_whiteboard\n )\n ) {\n types.push(CollaborativeWhiteboardConstants.extension_whiteboard);\n }\n return types;\n }\n\n override getId(): string {\n return \"collaborativewhiteboard\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (\n !this.checkIfTemplateExist(\n templates,\n CollaborativeWhiteboardConstants.extension_whiteboard\n )\n ) {\n templates.push(this.getWhiteBoardTemplate(this.theme));\n }\n return templates;\n }\n\n getWhiteBoardTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CollaborativeWhiteboardConstants.extension_whiteboard,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let whiteboardMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (whiteboardMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(whiteboardMessage, _theme);\n }\n return this.getWhiteboardContentView(whiteboardMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getWhiteboardContentView(\n whiteboardMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let documentBubbleAlignment: DocumentIconAlignment =\n DocumentIconAlignment.right;\n let configurationWhiteboardBubbleStyle =\n this.configuration?.getWhiteboardBubbleStyle();\n let documentBubbleStyle = {\n titleFont:\n configurationWhiteboardBubbleStyle?.titleFont ||\n fontHelper(this.theme.typography.text2),\n titleColor:\n configurationWhiteboardBubbleStyle?.titleColor ||\n this.theme.palette.getAccent(),\n subtitleFont:\n configurationWhiteboardBubbleStyle?.subtitleFont ||\n fontHelper(this.theme.typography.subtitle2),\n subtitleColor:\n configurationWhiteboardBubbleStyle?.subtitleColor ||\n this.theme.palette.getAccent600(),\n iconTint:\n configurationWhiteboardBubbleStyle?.iconTint ||\n this.theme.palette.getAccent700(),\n buttonTextFont:\n configurationWhiteboardBubbleStyle?.buttonTextFont ||\n fontHelper(this.theme.typography.text2),\n buttonTextColor:\n configurationWhiteboardBubbleStyle?.buttonTextColor ||\n this.theme.palette.getPrimary(),\n buttonBackground:\n configurationWhiteboardBubbleStyle?.buttonBackground || \"transparent\",\n separatorColor:\n configurationWhiteboardBubbleStyle?.separatorColor ||\n this.theme.palette.getAccent200(),\n };\n const whiteboardURL = this.getWhiteboardDocument(whiteboardMessage);\n const whiteboardTitle = localize(\"COLLABORATIVE_WHITEBOARD\");\n const whiteboardButtonText = localize(\"OPEN_WHITEBOARD\");\n const whiteboardSubitle = localize(\"DRAW_WHITEBOARD_TOGETHER\");\n\n return (\n \n );\n }\n\n launchCollaborativeWhiteboardDocument(whiteboardURL: string) {\n window.open(whiteboardURL, \"\", \"fullscreen=yes, scrollbars=auto\");\n }\n\n getWhiteboardDocument(message: CometChat.CustomMessage) {\n try {\n if (message?.getData()) {\n const data: any = message.getData();\n if (data?.metadata) {\n const metadata = data?.metadata;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(metadata, \"@injected\")\n ) {\n const injectedObject = metadata[\"@injected\"];\n if (injectedObject?.extensions) {\n const extensionObject = injectedObject.extensions;\n return extensionObject[\n CollaborativeWhiteboardConstants.whiteboard\n ]\n ? extensionObject[CollaborativeWhiteboardConstants.whiteboard]\n .board_url\n : extensionObject[CollaborativeWhiteboardConstants.whiteboard]\n .document_url;\n }\n }\n }\n }\n } catch (error: any) {\n console.log(\"error in getting whiteboard details\", error);\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let isUser = id?.user ? true : false;\n let receiverType: string = isUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let receiverId: string | undefined = isUser ? id.user : id.group;\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: CollaborativeWhiteboardConstants.whiteboard,\n title: localize(\"COLLABORATIVE_WHITEBOARD\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : WhiteboardIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: () => {\n CometChat.callExtension(\n CollaborativeWhiteboardConstants.whiteboard,\n CollaborativeWhiteboardConstants.post,\n CollaborativeWhiteboardConstants.v1_create,\n { receiver: receiverId, receiverType: receiverType }\n ).then(\n (res: any) => {},\n (error: any) => {\n console.log(\"error in sending whiteboard\", error);\n }\n );\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() ===\n CollaborativeWhiteboardConstants.extension_whiteboard &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_WHITEBOARD\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { CollaborativeWhiteboardConfiguration } from \"./CollaborativeWhiteboardConfiguration\";\nimport { CollaborativeWhiteBoardExtensionDecorator } from \"./CollaborativeWhiteboardExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeWhiteboardExtension extends ExtensionsDataSource {\n private configuration?: CollaborativeWhiteboardConfiguration;\n\n constructor(configuration?: CollaborativeWhiteboardConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new CollaborativeWhiteBoardExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.whiteboard;\n }\n}","import React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CometChatTheme, CometChatUIEvents, fontHelper, localize, MessageBubbleAlignment } from \"@cometchat/uikit-resources\";\nimport { ImageModeration } from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ImageModerationConfiguration } from \"./ImageModerationConfiguration\";\nimport { BaseStyle, CometChatBackdrop, CometChatConfirmDialog } from \"@cometchat/uikit-elements\";\nimport PlaceholderImage from './assets/placeholder.png';\nimport { CometChatImageBubble, CometChatFullScreenViewer } from '@cometchat/uikit-elements';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nimport Close2xIcon from './assets/close2x.svg';\n\nconst CometChatImageModerationBubble = createComponent({\n tagName: 'image-moderation',\n elementClass: ImageModeration,\n react: React,\n events: {\n CCShowDialog: 'cc-show-dialog'\n }\n});\n\nconst CometChatBackDropElement = createComponent({\n tagName: 'cometchat-backdrop',\n elementClass: CometChatBackdrop,\n react: React\n});\n\nconst CometChatConfirmDialogBox = createComponent({\n tagName: 'cometchat-confirm-dialog',\n elementClass: CometChatConfirmDialog,\n react: React,\n events: {\n ccCancelClicked: 'cc-cancel-clicked',\n ccConfirmClicked: 'cc-confirm-clicked'\n }\n});\n\nconst ImageMessageBubble = createComponent({\n tagName: 'cometchat-image-bubble',\n elementClass: CometChatImageBubble,\n react: React,\n events: {\n 'ccImageClicked': 'cc-image-clicked'\n }\n});\n\nconst FullScreenImageViewer = createComponent({\n tagName: 'cometchat-full-screen-viewer',\n elementClass: CometChatFullScreenViewer,\n react: React,\n events: {\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nexport class ImageModerationExtensionDecorator extends DataSourceDecorator {\n public configuration?: ImageModerationConfiguration;\n public newDataSource!: DataSource;\n private theme!: CometChatTheme;\n public loggedInUser!: CometChat.User;\n\n constructor(dataSource: DataSource, configuration?: ImageModerationConfiguration) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n }).catch((error: CometChat.CometChatException) => {\n console.error(error)\n })\n }\n\n override getId(): string {\n return \"imagemoderation\";\n }\n\n override getImageMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignment, theme: CometChatTheme) {\n\n\n if (this.loggedInUser?.getUid() !== undefined && this.loggedInUser?.getUid() === message?.getSender()?.getUid()) {\n\n return super.getImageMessageContentView(message, alignment, theme)\n }\n\n this.theme = theme;\n let metadata = message.getMetadata() as any;\n const style = this.getImageModerationStyle(theme);\n let imageUrl = message.getAttachments()[0]?.getUrl() || \"\";\n\n if (ChatConfigurator.names.includes(\"thumbnailgeneration\") && metadata && typeof metadata === \"object\" && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]) {\n imageUrl = (message.getMetadata() as any)[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n\n const fullScreenViewer = { CometChatUIEvents.ccHideDialog.next() }} />\n return (\n { this.showDialog(e) }}>\n { CometChatUIEvents.ccShowDialog.next({ child: fullScreenViewer, confirmCallback: null }) }} />\n \n );\n }\n\n showDialog(_event: any) {\n const confirmModal = this.getConfirmationModal(_event);\n\n CometChatUIEvents.ccShowDialog.next({\n confirmCallback: _event?.detail?.onConfirm,\n child: confirmModal\n });\n }\n\n getConfirmationModal(_event: any) {\n let configurationBackdropStyle = this.configuration?.getBackDropStyle();\n let configurationConfirmDialogStyle = this.configuration?.getConfirmDialogSyle();\n let backdropStyle: BaseStyle = {\n height: configurationBackdropStyle?.height || \"100%\",\n width: configurationBackdropStyle?.width || \"100%\",\n background: configurationBackdropStyle?.background || \"rgba(0, 0, 0, 0.5)\",\n border: configurationBackdropStyle?.border,\n borderRadius: configurationBackdropStyle?.borderRadius\n },\n warningText: string = localize(\"SHOW_UNSAFE_CONTENT\"),\n confirmText: string = localize(\"YES\"),\n cancelText: string = localize(\"NO\"),\n confirmDialogStyle = {\n confirmButtonBackground: configurationConfirmDialogStyle?.confirmButtonBackground || this.theme.palette.getError(),\n cancelButtonBackground: configurationConfirmDialogStyle?.cancelButtonBackground || this.theme.palette.getSecondary(),\n confirmButtonTextColor: configurationConfirmDialogStyle?.confirmButtonTextColor || this.theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: configurationConfirmDialogStyle?.confirmButtonTextFont || fontHelper(this.theme.typography.text2),\n cancelButtonTextColor: configurationConfirmDialogStyle?.cancelButtonTextColor || this.theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: configurationConfirmDialogStyle?.cancelButtonTextFont || fontHelper(this.theme.typography.text2),\n titleFont: configurationConfirmDialogStyle?.titleFont || fontHelper(this.theme.typography.title1),\n titleColor: configurationConfirmDialogStyle?.titleColor || this.theme.palette.getAccent(),\n messageTextFont: configurationConfirmDialogStyle?.messageTextFont || fontHelper(this.theme.typography.subtitle2),\n messageTextColor: configurationConfirmDialogStyle?.messageTextColor || this.theme.palette.getAccent600(),\n background: configurationConfirmDialogStyle?.background || this.theme.palette.getBackground(),\n height: configurationConfirmDialogStyle?.height || \"100%\",\n width: configurationConfirmDialogStyle?.width || \"100%\",\n border: configurationConfirmDialogStyle?.border || `1px solid ${this.theme.palette.getAccent100()}`,\n borderRadius: configurationConfirmDialogStyle?.borderRadius || \"8px\"\n };\n return (\n \n { this.onConfirmClicked(_event) }}\n />\n \n )\n }\n\n onConfirmClicked(_event: any) {\n if (_event?.detail?.onConfirm) {\n _event?.detail?.onConfirm();\n }\n CometChatUIEvents.ccHideDialog.next();\n }\n\n onCancelClicked() {\n CometChatUIEvents.ccHideDialog.next();\n }\n\n getImageModerationStyle(_theme: CometChatTheme) {\n let configurationImageModerationBubbleStyle = this.configuration?.getImageModerationStyle();\n return {\n filterColor: configurationImageModerationBubbleStyle?.filterColor || _theme.palette.getPrimary(),\n height: configurationImageModerationBubbleStyle?.height || \"100%\",\n width: configurationImageModerationBubbleStyle?.width || \"100%\",\n border: configurationImageModerationBubbleStyle?.border || \"none\",\n borderRadius: configurationImageModerationBubbleStyle?.borderRadius || \"8px\",\n warningTextColor: configurationImageModerationBubbleStyle?.warningTextColor || _theme.palette.getAccent(\"dark\"),\n warningTextFont: configurationImageModerationBubbleStyle?.warningTextFont || fontHelper(_theme.typography.title2)\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAA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EAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { ImageModerationConfiguration } from \"./ImageModerationConfiguration\";\nimport { ImageModerationExtensionDecorator } from \"./ImageModerationExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class ImageModerationExtension extends ExtensionsDataSource {\n private configuration?: ImageModerationConfiguration;\n\n constructor(configuration?: ImageModerationConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new ImageModerationExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.imageModeration\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n fontHelper,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n LinkPreview,\n LinkPreviewConstants,\n LinkPreviewStyle,\n CometChatUIKitLoginListener,\n CometChatTextFormatter,\n CometChatMentionsFormatter,\n CometChatUrlsFormatter,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { LinkPreviewConfiguration } from \"./LinkPreviewConfiguration\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatLinkPreviewBubble = createComponent({\n tagName: \"link-preview\",\n elementClass: LinkPreview,\n react: React,\n events: {\n ccLinkClicked: \"cc-link-clicked\",\n },\n});\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nexport class LinkPreviewExtensionDecorator extends DataSourceDecorator {\n public configuration?: LinkPreviewConfiguration;\n public newDataSource!: DataSource;\n\n constructor(\n dataSource: DataSource,\n configuration?: LinkPreviewConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getId(): string {\n return \"linkpreview\";\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n const linkPreviewObject: any = this.getLinkPreview(message);\n if (\n linkPreviewObject &&\n !message.getDeletedAt() &&\n message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n\n let textFormatters: Array = config.textFormatters;\n\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(\n {\n theme,\n alignment,\n }\n );\n textFormatters.push(urlTextFormatter);\n }\n\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n \n \n );\n } else {\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n }\n getLinkPreviewWrapperStyle() {\n return { height: \"inherit\", width: \"inherit\" };\n }\n\n openLink(event: any) {\n window.open(event?.detail?.url, \"_blank\");\n }\n\n getLinkPreviewStyle(_theme: CometChatTheme) {\n let configuarationLinkPreviewStyle =\n this.configuration?.getLinkPreviewStyle();\n return new LinkPreviewStyle({\n titleColor:\n configuarationLinkPreviewStyle?.titleColor ||\n _theme.palette.getAccent(),\n titleFont:\n configuarationLinkPreviewStyle?.titleFont ||\n fontHelper(_theme.typography.title2),\n descriptionColor:\n configuarationLinkPreviewStyle?.descriptionColor ||\n _theme.palette.getAccent600(),\n descriptionFont:\n configuarationLinkPreviewStyle?.descriptionFont ||\n fontHelper(_theme.typography.subtitle2),\n background: configuarationLinkPreviewStyle?.background || \"transparent\",\n height: configuarationLinkPreviewStyle?.height || \"100%\",\n width: configuarationLinkPreviewStyle?.width || \"100%\",\n });\n }\n\n getTextMessageStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n\n if (isLeftAligned) {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent900() || \"\",\n };\n } else {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent() || \"\",\n };\n }\n }\n\n getLinkPreview(message: CometChat.TextMessage): any {\n try {\n if (message?.getMetadata()) {\n const metadata: any = message.getMetadata();\n const injectedObject = metadata[LinkPreviewConstants.injected];\n if (injectedObject && injectedObject?.extensions) {\n const extensionsObject = injectedObject.extensions;\n if (\n extensionsObject &&\n CometChatUIKitUtility.checkHasOwnProperty(\n extensionsObject,\n LinkPreviewConstants.link_preview\n )\n ) {\n const linkPreviewObject =\n extensionsObject[LinkPreviewConstants.link_preview];\n if (\n linkPreviewObject &&\n CometChatUIKitUtility.checkHasOwnProperty(\n linkPreviewObject,\n LinkPreviewConstants.links\n ) &&\n linkPreviewObject[LinkPreviewConstants.links].length\n ) {\n return linkPreviewObject[LinkPreviewConstants.links][0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n } else {\n return null;\n }\n } catch (error: any) {\n console.log(\"error in getting link preview details\", error);\n }\n }\n\n getLinkPreviewDetails(linkPreviewObject: any, key: string): string {\n if (Object.keys(linkPreviewObject).length > 0) {\n return linkPreviewObject[key];\n } else {\n return \"\";\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { LinkPreviewConfiguration } from \"./LinkPreviewConfiguration\";\nimport { LinkPreviewExtensionDecorator } from \"./LinkPreviewExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class LinkPreviewExtension extends ExtensionsDataSource {\n private configuration?: LinkPreviewConfiguration;\n\n constructor(configuration?: LinkPreviewConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new LinkPreviewExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.linkPreview;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n fontHelper,\n localize,\n CometChatMessageEvents,\n CometChatActionsIcon,\n CometChatActionsView,\n MessageBubbleAlignment,\n MessageStatus,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUrlsFormatter,\n MessageTranslationBubble,\n MessageTranslationStyle,\n} from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { MessageTranslationConfiguration } from \"./MessageTranslationConfiguration\";\nimport TranslateIcon from \"./assets/translation.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatMessageTranslationBubble = createComponent({\n tagName: \"message-translation-bubble\",\n elementClass: MessageTranslationBubble,\n react: React,\n});\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nexport class MessageTranslationExtensionDecorator extends DataSourceDecorator {\n public configuration?: MessageTranslationConfiguration;\n public newDataSource!: DataSource;\n\n constructor(\n dataSource: DataSource,\n configuration?: MessageTranslationConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): (CometChatActionsIcon | CometChatActionsView)[] {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let options: (CometChatActionsIcon | CometChatActionsView)[] =\n super.getTextMessageOptions(loggedInUser, messageObject, theme, group);\n if (\n !this.checkIfOptionExist(\n options,\n CometChatUIKitConstants.MessageOption.translateMessage\n )\n ) {\n let newOption: CometChatActionsIcon = new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.translateMessage,\n title: localize(\"TRANSLATE\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : TranslateIcon,\n onClick: function () {\n CometChat.callExtension(\n \"message-translation\",\n \"POST\",\n \"v2/translate\",\n {\n msgId: messageObject.getId(),\n text: (messageObject as CometChat.TextMessage).getText(),\n languages: navigator.languages,\n }\n )\n .then((message_translations: any) => {\n if (\n message_translations &&\n message_translations.hasOwnProperty(\"translations\")\n ) {\n let translatedMessage =\n message_translations[\"translations\"]?.[0]?.[\n \"message_translated\"\n ];\n if (translatedMessage && translatedMessage.trim()) {\n let metadata: any =\n (messageObject as CometChat.TextMessage).getMetadata() ||\n {};\n metadata[\"translated_message\"] = translatedMessage;\n (messageObject as CometChat.TextMessage).setMetadata(\n metadata\n );\n CometChatMessageEvents.ccMessageTranslated.next({\n message: messageObject as CometChat.TextMessage,\n status: MessageStatus.success,\n });\n }\n }\n })\n .catch((error: any) => {\n console.log(\"error\", error);\n });\n },\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent600(),\n titleColor:\n configurationOptionStyle?.titleColor || theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n backgroundColor: configurationOptionStyle?.background || \"transparent\",\n });\n options.push(newOption);\n }\n return options;\n }\n\n getTranslationStyle = (\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) => {\n let configurationMessageTranslationStyle =\n this.configuration?.getMessageTranslationStyle();\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n if (isLeftAligned) {\n return new MessageTranslationStyle({\n translatedTextFont:\n configurationMessageTranslationStyle?.translatedTextFont ||\n fontHelper(_theme.typography.text3),\n translatedTextColor:\n configurationMessageTranslationStyle?.translatedTextColor ||\n _theme.palette.getAccent(\"dark\"),\n helpTextColor:\n configurationMessageTranslationStyle?.helpTextColor ||\n _theme.palette.getAccent700(\"dark\"),\n helpTextFont:\n configurationMessageTranslationStyle?.helpTextFont ||\n fontHelper(_theme.typography.caption2),\n background:\n configurationMessageTranslationStyle?.background || \"transparent\",\n });\n } else {\n return new MessageTranslationStyle({\n translatedTextFont:\n configurationMessageTranslationStyle?.translatedTextFont ||\n fontHelper(_theme.typography.text3),\n translatedTextColor:\n configurationMessageTranslationStyle?.translatedTextColor ||\n _theme.palette.getAccent(),\n helpTextColor:\n configurationMessageTranslationStyle?.helpTextColor ||\n _theme.palette.getAccent700(),\n helpTextFont:\n configurationMessageTranslationStyle?.helpTextFont ||\n fontHelper(_theme.typography.caption2),\n background:\n configurationMessageTranslationStyle?.background || \"transparent\",\n });\n }\n };\n\n getTextMessageStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n if (isLeftAligned) {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent900(\"light\") || \"\",\n };\n } else {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent() || \"\",\n };\n }\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n const metadata: any = message.getMetadata();\n if (\n metadata &&\n Object.prototype.hasOwnProperty.call(metadata, \"translated_message\") &&\n !message.getDeletedAt() &&\n message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n const translatedText = metadata[\"translated_message\"];\n\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n let textFormatters: Array = config.textFormatters;\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(\n {\n theme,\n alignment,\n }\n );\n textFormatters.push(urlTextFormatter);\n }\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n \n \n );\n } else {\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n }\n\n checkIfOptionExist(\n template: (CometChatActionsIcon | CometChatActionsView)[],\n id: string\n ): boolean {\n return template.some((obj) => obj.id === id);\n }\n\n override getId(): string {\n return \"messagetranslation\";\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FMessage%20Translation%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FMessage-Translation%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.66666667%2C4.91666667%20C7.7672341%2C4.91666667%208.66848034%2C5.77006215%208.74476911%2C6.85121684%20L8.75%2C7%20L8.75%2C9.66666667%20C8.75%2C10.0808802%208.41421356%2C10.4166667%208%2C10.4166667%20C7.62030423%2C10.4166667%207.30650904%2C10.1345128%207.25684662%2C9.76843722%20L7.25%2C9.66666667%20L7.25%2C7%20C7.25%2C6.6778339%206.98883277%2C6.41666667%206.66666667%2C6.41666667%20C6.37671717%2C6.41666667%206.13617677%2C6.62821212%206.09096818%2C6.9053803%20L6.08333333%2C7%20L6.08333333%2C9.66666667%20C6.08333333%2C10.0808802%205.7475469%2C10.4166667%205.33333333%2C10.4166667%20C4.95363757%2C10.4166667%204.63984237%2C10.1345128%204.59017995%2C9.76843722%20L4.58333333%2C9.66666667%20L4.58333333%2C7%20C4.58333333%2C5.84940677%205.51607344%2C4.91666667%206.66666667%2C4.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C7.58333333%20C8.41421356%2C7.58333333%208.75%2C7.91911977%208.75%2C8.33333333%20C8.75%2C8.7130291%208.46784612%2C9.02682429%208.10177056%2C9.07648672%20L8%2C9.08333333%20L5.33333333%2C9.08333333%20C4.91911977%2C9.08333333%204.58333333%2C8.7475469%204.58333333%2C8.33333333%20C4.58333333%2C7.95363757%204.86548721%2C7.63984237%205.23156278%2C7.59017995%20L5.33333333%2C7.58333333%20L8%2C7.58333333%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C10.9166667%20C16.3796958%2C10.9166667%2016.693491%2C11.1988205%2016.7431534%2C11.5648961%20L16.75%2C11.6666667%20L16.75%2C13%20C16.75%2C13.4142136%2016.4142136%2C13.75%2016%2C13.75%20C15.6203042%2C13.75%2015.306509%2C13.4678461%2015.2568466%2C13.1017706%20L15.25%2C13%20L15.25%2C11.6666667%20C15.25%2C11.2524531%2015.5857864%2C10.9166667%2016%2C10.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M18.6666667%2C12.25%20C19.0808802%2C12.25%2019.4166667%2C12.5857864%2019.4166667%2C13%20C19.4166667%2C13.3796958%2019.1345128%2C13.693491%2018.7684372%2C13.7431534%20L18.6666667%2C13.75%20L13.3333333%2C13.75%20C12.9191198%2C13.75%2012.5833333%2C13.4142136%2012.5833333%2C13%20C12.5833333%2C12.6203042%2012.8654872%2C12.306509%2013.2315628%2C12.2568466%20L13.3333333%2C12.25%20L18.6666667%2C12.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.6218209%2C12.7628292%20C16.7528067%2C12.3698717%2017.1775467%2C12.1575017%2017.5705042%2C12.2884875%20C17.9634616%2C12.4194734%2018.1758316%2C12.8442133%2018.0448458%2C13.2371708%20L17.9816285%2C13.4141354%20L17.8896351%2C13.6471999%20L17.768692%2C13.9296038%20C17.5442054%2C14.4346986%2017.2746722%2C14.9400735%2016.9573711%2C15.4160251%20C15.999232%2C16.8532338%2014.8035437%2C17.75%2013.3333333%2C17.75%20C12.9191198%2C17.75%2012.5833333%2C17.4142136%2012.5833333%2C17%20C12.5833333%2C16.6203042%2012.8654872%2C16.306509%2013.2315628%2C16.2568466%20L13.3333333%2C16.25%20C14.1964563%2C16.25%2015.000768%2C15.6467662%2015.7092956%2C14.5839749%20C15.9753278%2C14.1849265%2016.2057946%2C13.7528014%2016.3979747%2C13.3203962%20L16.4992538%2C13.0842816%20L16.6012322%2C12.8221175%20C16.6092157%2C12.7998646%2016.6160798%2C12.7800523%2016.6218209%2C12.7628292%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.5822706%2C14.8366574%20C15.9262877%2C14.6059518%2016.3921926%2C14.697809%2016.6228982%2C15.0418261%20C17.0961654%2C15.7475396%2017.8695647%2C16.1943066%2018.717337%2C16.2517136%20C19.1306041%2C16.279698%2019.4429375%2C16.6374031%2019.4149531%2C17.0506703%20C19.3869686%2C17.4639375%2019.0292635%2C17.7762708%2018.6159964%2C17.7482864%20C17.3049794%2C17.6595107%2016.1089745%2C16.9686186%2015.3771018%2C15.877285%20C15.1463962%2C15.5332678%2015.2382534%2C15.067363%2015.5822706%2C14.8366574%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20.6666667%2C8.91666667%20L11.3333333%2C8.91666667%20C10.1827401%2C8.91666667%209.25%2C9.84940677%209.25%2C11%20L9.25%2C17.6666667%20L9.25523089%2C17.8154498%20C9.33151966%2C18.8966045%2010.2327659%2C19.75%2011.3333333%2C19.75%20L15.022%2C19.749%20L18.8030032%2C23.5303301%20L18.8802248%2C23.598293%20C19.3582766%2C23.9666561%2020.0833333%2C23.6330113%2020.0833333%2C23%20L20.083%2C19.749%20L20.6666667%2C19.75%20C21.8172599%2C19.75%2022.75%2C18.8172599%2022.75%2C17.6666667%20L22.75%2C11%20C22.75%2C9.84940677%2021.8172599%2C8.91666667%2020.6666667%2C8.91666667%20Z%20M11.3333333%2C10.4166667%20L20.6666667%2C10.4166667%20C20.9888328%2C10.4166667%2021.25%2C10.6778339%2021.25%2C11%20L21.25%2C17.6666667%20C21.25%2C17.9888328%2020.9888328%2C18.25%2020.6666667%2C18.25%20L19.3333333%2C18.25%20L19.2315628%2C18.2568466%20C18.8654872%2C18.306509%2018.5833333%2C18.6203042%2018.5833333%2C19%20L18.583%2C21.189%20L15.8636634%2C18.4696699%20C15.7230111%2C18.3290176%2015.5322457%2C18.25%2015.3333333%2C18.25%20L11.3333333%2C18.25%20C11.0111672%2C18.25%2010.75%2C17.9888328%2010.75%2C17.6666667%20L10.75%2C11%20C10.75%2C10.6778339%2011.0111672%2C10.4166667%2011.3333333%2C10.4166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.6666667%2C2.25%20C13.7672341%2C2.25%2014.6684803%2C3.10339548%2014.7447691%2C4.18455017%20L14.75%2C4.33333333%20L14.75%2C7%20C14.75%2C7.41421356%2014.4142136%2C7.75%2014%2C7.75%20C13.6203042%2C7.75%2013.306509%2C7.46784612%2013.2568466%2C7.10177056%20L13.25%2C7%20L13.25%2C4.33333333%20C13.25%2C4.04338384%2013.0384545%2C3.80284343%2012.7612864%2C3.75763485%20L12.6666667%2C3.75%20L3.33333333%2C3.75%20C3.04338384%2C3.75%202.80284343%2C3.96154546%202.75763485%2C4.23871364%20L2.75%2C4.33333333%20L2.75%2C11%20C2.75%2C11.2899495%202.96154546%2C11.5304899%203.23871364%2C11.5756985%20L3.33333333%2C11.5833333%20L4.66666667%2C11.5833333%20C5.04636243%2C11.5833333%205.36015763%2C11.8654872%205.40982005%2C12.2315628%20L5.41666667%2C12.3333333%20L5.416%2C14.523%20L6.80300325%2C13.1363366%20C7.06926981%2C12.87007%207.48593349%2C12.845864%207.77954499%2C13.0637184%20L7.86366342%2C13.1363366%20C8.12992998%2C13.4026031%208.15413603%2C13.8192668%207.93628157%2C14.1128783%20L7.86366342%2C14.1969968%20L5.19699675%2C16.8636634%20C4.74939014%2C17.31127%204.00077515%2C17.0344999%203.92321348%2C16.4359943%20L3.91666667%2C16.3333333%20L3.916%2C13.083%20L3.33333333%2C13.0833333%20C2.2327659%2C13.0833333%201.33151966%2C12.2299379%201.25523089%2C11.1487832%20L1.25%2C11%20L1.25%2C4.33333333%20C1.25%2C3.2327659%202.10339548%2C2.33151966%203.18455017%2C2.25523089%20L3.33333333%2C2.25%20L12.6666667%2C2.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { MessageTranslationExtensionDecorator } from \"./MessageTranslationExtensionDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { MessageTranslationConfiguration } from \"./MessageTranslationConfiguration\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class MessageTranslationExtension extends ExtensionsDataSource {\n private configuration?: MessageTranslationConfiguration;\n\n constructor(configuration?: MessageTranslationConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new MessageTranslationExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.messageTranslation;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatMessageComposerAction,\n localize,\n fontHelper,\n MessageBubbleAlignment,\n CometChatUIEvents,\n} from \"@cometchat/uikit-resources\";\nimport {\n PollsConstants,\n PollsBubble,\n CreatePoll,\n CreatePollStyle,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { PollsConfiguration } from \"./PollsConfiguration\";\nimport PollsIcon from \"./assets/polls.svg\";\nimport CloseIcon from \"./assets/close.svg\";\nimport DeleteIcon from \"./assets/delete.svg\";\nimport AddAnswerIcon from \"./assets/plus.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatPollsBubble = createComponent({\n tagName: \"polls-bubble\",\n elementClass: PollsBubble,\n react: React,\n});\n\nconst CometChatCreatePollView = createComponent({\n tagName: \"create-poll\",\n elementClass: CreatePoll,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n});\n\nexport class PollsExtensionDecorator extends DataSourceDecorator {\n public theme!: CometChatTheme;\n private loggedInUser: CometChat.User | null = null;\n public configuration?: PollsConfiguration;\n public newDataSource!: DataSource;\n\n constructor(dataSource: DataSource, configuration?: PollsConfiguration) {\n super(dataSource);\n this.getLoggedInUser();\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n async getLoggedInUser() {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n\n override getId(): string {\n return \"polls\";\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(PollsConstants.extension_poll)) {\n types.push(PollsConstants.extension_poll);\n }\n return types;\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateExist(templates, PollsConstants.extension_poll)) {\n templates.push(this.getPollsTemplate(this.theme));\n }\n return templates;\n }\n\n getPollsTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: PollsConstants.extension_poll,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let pollsMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (pollsMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(pollsMessage, _theme);\n }\n return this.getPollsContentView(pollsMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getPollsContentView(\n message: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let configurationPollsBubbleStyle =\n this.configuration?.getPollsBubbleStyle();\n let pollBubbleStyle = {\n borderRadius: configurationPollsBubbleStyle?.borderRadius || \"8px\",\n background: configurationPollsBubbleStyle?.background || \"transparent\",\n votePercentTextFont:\n configurationPollsBubbleStyle?.votePercentTextFont ||\n fontHelper(_theme.typography.subtitle2),\n votePercentTextColor:\n configurationPollsBubbleStyle?.votePercentTextColor ||\n _theme.palette.getAccent600(),\n pollQuestionTextFont:\n configurationPollsBubbleStyle?.pollQuestionTextFont ||\n fontHelper(_theme.typography.subtitle1),\n pollQuestionTextColor:\n configurationPollsBubbleStyle?.pollQuestionTextColor ||\n _theme.palette.getAccent(),\n pollOptionTextFont:\n configurationPollsBubbleStyle?.pollOptionTextFont ||\n fontHelper(_theme.typography.text2),\n pollOptionTextColor:\n configurationPollsBubbleStyle?.pollOptionTextColor ||\n _theme.palette.getAccent(),\n pollOptionBackground:\n configurationPollsBubbleStyle?.pollOptionBackground || \"transparent\",\n optionsIconTint:\n configurationPollsBubbleStyle?.optionsIconTint ||\n _theme.palette.getAccent600(),\n totalVoteCountTextFont:\n configurationPollsBubbleStyle?.totalVoteCountTextFont ||\n fontHelper(_theme.typography.subtitle2),\n totalVoteCountTextColor:\n configurationPollsBubbleStyle?.totalVoteCountTextColor ||\n _theme.palette.getAccent600(),\n selectedPollOptionBackground:\n configurationPollsBubbleStyle?.selectedPollOptionBackground ||\n _theme.palette.getAccent200(),\n userSelectedOptionBackground:\n configurationPollsBubbleStyle?.userSelectedOptionBackground ||\n _theme.palette.getPrimary(),\n pollOptionBorder:\n configurationPollsBubbleStyle?.pollOptionBorder ||\n `1px solid ${_theme.palette.getAccent100()}`,\n pollOptionBorderRadius:\n configurationPollsBubbleStyle?.pollOptionBorderRadius || \"8px\",\n };\n\n return (\n \n );\n }\n\n getPollBubbleData(message: CometChat.CustomMessage, key?: string) {\n let data: any = message.getCustomData();\n if (key) {\n if (key === \"options\") {\n return Object.values(data[key]);\n } else {\n return data[key];\n }\n } else {\n return message.getSender().getUid();\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n this.theme = theme;\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: PollsConstants.extension_poll,\n title: localize(\"POLLS\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : PollsIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: (...args) => {\n this.onPollsButtonClicked(theme, ...args);\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n onPollsButtonClicked(theme: CometChatTheme, ...args: any[]) {\n const [data] = args;\n let user = data[0];\n let group = data[1];\n let configurationCreatePollStyle = this.configuration?.getCreatePollStyle();\n let createPollStyle = {\n placeholderTextFont:\n configurationCreatePollStyle?.placeholderTextFont ||\n fontHelper(theme.typography.subtitle1),\n placeholderTextColor:\n configurationCreatePollStyle?.placeholderTextColor ||\n theme.palette.getAccent600(),\n deleteIconTint:\n configurationCreatePollStyle?.deleteIconTint ||\n theme.palette.getAccent600(),\n titleFont:\n configurationCreatePollStyle?.titleFont ||\n fontHelper(theme.typography.title1),\n titleColor:\n configurationCreatePollStyle?.titleColor || theme.palette.getAccent(),\n closeIconTint:\n configurationCreatePollStyle?.closeIconTint ||\n theme.palette.getPrimary(),\n questionInputBackground:\n configurationCreatePollStyle?.questionInputBackground ||\n theme.palette.getAccent100(),\n optionInputBackground:\n configurationCreatePollStyle?.optionInputBackground ||\n theme.palette.getAccent100(),\n answerHelpTextFont:\n configurationCreatePollStyle?.answerHelpTextFont ||\n fontHelper(theme.typography.caption1),\n answerHelpTextColor:\n configurationCreatePollStyle?.answerHelpTextColor ||\n theme.palette.getAccent400(),\n addAnswerIconTint:\n configurationCreatePollStyle?.addAnswerIconTint ||\n theme.palette.getPrimary(),\n createPollButtonTextFont:\n configurationCreatePollStyle?.createPollButtonTextFont ||\n fontHelper(theme.typography.text2),\n createPollButtonTextColor:\n configurationCreatePollStyle?.createPollButtonTextColor ||\n theme.palette.getAccent(\"dark\"),\n createPollButtonBackground:\n configurationCreatePollStyle?.createPollButtonBackground ||\n theme.palette.getPrimary(),\n addAnswerTextFont:\n configurationCreatePollStyle?.addAnswerTextFont ||\n fontHelper(theme.typography.text2),\n addAnswerTextColor:\n configurationCreatePollStyle?.addAnswerTextColor ||\n theme.palette.getPrimary(),\n errorTextFont:\n configurationCreatePollStyle?.errorTextFont ||\n fontHelper(theme.typography.subtitle1),\n errorTextColor:\n configurationCreatePollStyle?.errorTextColor ||\n theme.palette.getError(),\n optionPlaceholderTextFont:\n configurationCreatePollStyle?.optionPlaceholderTextFont ||\n fontHelper(theme.typography.subtitle1),\n optionPlaceholderTextColor:\n configurationCreatePollStyle?.optionPlaceholderTextColor ||\n theme.palette.getAccent600(),\n questionInputTextFont:\n configurationCreatePollStyle?.questionInputTextFont ||\n fontHelper(theme.typography.subtitle2),\n questionInputTextColor:\n configurationCreatePollStyle?.questionInputTextColor ||\n theme.palette.getAccent600(),\n optionInputTextFont:\n configurationCreatePollStyle?.optionInputTextFont ||\n fontHelper(theme.typography.subtitle2),\n optionInputTextColor:\n configurationCreatePollStyle?.optionInputTextColor ||\n theme.palette.getAccent600(),\n width: configurationCreatePollStyle?.width || \"360px\",\n height: configurationCreatePollStyle?.height || \"440px\",\n border: configurationCreatePollStyle?.border || \"\",\n borderRadius: configurationCreatePollStyle?.borderRadius || \"8px\",\n background:\n configurationCreatePollStyle?.background ||\n theme.palette.getAccent900(),\n position: \"absolute\",\n zIndex: 1,\n };\n CometChatUIEvents.ccShowModal.next({\n child: this.getPollView(user, group, createPollStyle),\n });\n }\n\n getPollView(\n user: CometChat.User,\n group: CometChat.Group,\n createPollStyle: CreatePollStyle\n ) {\n return (\n \n \n \n );\n }\n\n triggerCloseEvent() {\n CometChatUIEvents.ccHideModal.next();\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === PollsConstants.extension_poll &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_POLL\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPolls%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPolls%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.779983%2C1.25%20C14.2709124%2C1.25043259%2014.7438187%2C1.42418565%2015.1167078%2C1.73706699%20L15.2516928%2C1.86085235%20L20.4715927%2C7.08218001%20C20.8991636%2C7.51561025%2021.1196388%2C8.11205589%2021.0768145%2C8.71941733%20C21.0476811%2C9.13260508%2020.689109%2C9.44394267%2020.2759212%2C9.41480928%20C19.8971658%2C9.38810367%2019.6039928%2C9.08457801%2019.580201%2C8.71591608%20L19.5805293%2C8.613916%20C19.5905393%2C8.47194719%2019.5513165%2C8.33202895%2019.4730888%2C8.21873863%20L19.4072645%2C8.13914765%20L14.1905599%2C2.92103945%20C14.1031809%2C2.83352807%2013.9908865%2C2.77665655%2013.8706878%2C2.75733888%20L13.7793226%2C2.75%20L4.33297476%2C2.75%20C4.04324415%2C2.75%203.80281908%2C2.96150888%203.75763137%2C3.23870267%20L3.75%2C3.33333333%20L3.75%2C20.6666667%20C3.75%2C20.9566568%203.961452%2C21.1971647%204.2384242%2C21.2423664%20L4.33297476%2C21.25%20L9.6648738%2C21.25%20C10.0790874%2C21.25%2010.4148738%2C21.5857864%2010.4148738%2C22%20C10.4148738%2C22.3796958%2010.1327199%2C22.693491%209.76664435%2C22.7431534%20L9.6648738%2C22.75%20L4.33297476%2C22.75%20C3.23255355%2C22.75%202.33150187%2C21.8965632%202.25522974%2C20.8154444%20L2.25%2C20.6666667%20L2.25%2C3.33333333%20C2.25%2C2.23280908%203.10320728%2C1.33152341%204.18421182%2C1.25523113%20L4.33297476%2C1.25%20L13.779983%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.6637981%2C1.25%20C14.0434938%2C1.25%2014.357289%2C1.53215388%2014.4069515%2C1.89822944%20L14.4137981%2C2%20L14.4137981%2C7.33333333%20C14.4137981%2C7.62332346%2014.6252501%2C7.86383136%2014.9022223%2C7.90903304%20L14.9967728%2C7.91666667%20L20.3286719%2C7.91666667%20C20.7428854%2C7.91666667%2021.0786719%2C8.2524531%2021.0786719%2C8.66666667%20C21.0786719%2C9.04636243%2020.796518%2C9.36015763%2020.4304424%2C9.40982005%20L20.3286719%2C9.41666667%20L14.9967728%2C9.41666667%20C13.8963516%2C9.41666667%2012.9952999%2C8.56322987%2012.9190278%2C7.4821111%20L12.9137981%2C7.33333333%20L12.9137981%2C2%20C12.9137981%2C1.58578644%2013.2495845%2C1.25%2013.6637981%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C9.420279%20C9.24921801%2C9.09111393%209.71989329%2C9.02810717%2010.0490584%2C9.27954946%20C10.3482993%2C9.50813337%2010.4275748%2C9.91790155%2010.2506031%2C10.2378223%20L10.1897879%2C10.3308321%20L8.25879925%2C12.8586842%20C8.01208284%2C13.1778547%207.64305532%2C13.3791966%207.21567496%2C13.4156509%20C6.86419538%2C13.4339623%206.52012946%2C13.3223779%206.23838713%2C13.0959918%20L6.12161623%2C12.9919845%20L5.12632841%2C11.9608734%20C4.838658%2C11.6628489%204.84705165%2C11.1880493%205.14507615%2C10.9003789%20C5.41600752%2C10.6388603%205.83303397%2C10.6220228%206.1227489%2C10.845033%20L6.20557062%2C10.9191266%20L7.125%2C11.871%20L8.99777572%2C9.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C15.420279%20C9.24921801%2C15.0911139%209.71989329%2C15.0281072%2010.0490584%2C15.2795495%20C10.3482993%2C15.5081334%2010.4275748%2C15.9179016%2010.2506031%2C16.2378223%20L10.1897879%2C16.3308321%20L8.25879925%2C18.8586842%20C8.01208284%2C19.1778547%207.64305532%2C19.3791966%207.21567496%2C19.4156509%20C6.86419538%2C19.4339623%206.52012946%2C19.3223779%206.23838713%2C19.0959918%20L6.12161623%2C18.9919845%20L5.12632841%2C17.9608734%20C4.838658%2C17.6628489%204.84705165%2C17.1880493%205.14507615%2C16.9003789%20C5.41600752%2C16.6388603%205.83303397%2C16.6220228%206.1227489%2C16.845033%20L6.20557062%2C16.9191266%20L7.125%2C17.871%20L8.99777572%2C15.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6632602%2C11.9166667%20C16.0774738%2C11.9166667%2016.4132602%2C12.2524531%2016.4132602%2C12.6666667%20C16.4132602%2C13.0463624%2016.1311063%2C13.3601576%2015.7650308%2C13.4098201%20L15.6632602%2C13.4166667%20L12.3308233%2C13.4166667%20C11.9166098%2C13.4166667%2011.5808233%2C13.0808802%2011.5808233%2C12.6666667%20C11.5808233%2C12.2869709%2011.8629772%2C11.9731757%2012.2290528%2C11.9235133%20L12.3308233%2C11.9166667%20L15.6632602%2C11.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.1106837%2C10.5779533%20C20.4095395%2C10.5779533%2019.7375424%2C10.8584991%2019.2444627%2C11.3570467%20L12.4669093%2C18.1364079%20C12.3622379%2C18.2411074%2012.2908946%2C18.3744435%2012.2618676%2C18.5196176%20L11.5953802%2C21.8529509%20C11.4904492%2C22.3777472%2011.953163%2C22.8404132%2012.4779485%2C22.7354279%20L15.8103854%2C22.0687612%20C15.9555979%2C22.0397109%2016.0889603%2C21.9683215%2016.1936616%2C21.8635921%20L22.9740599%2C15.0813699%20C23.4695748%2C14.5910412%2023.75%2C13.9189715%2023.75%2C13.2177778%20C23.75%2C12.516584%2023.4695748%2C11.8445143%2022.9711997%2C11.35134%20L22.8310414%2C11.2210775%20C22.3327458%2C10.7984458%2021.7321255%2C10.5779533%2021.1106837%2C10.5779533%20Z%20M21.1106837%2C12.0779533%20C21.3769595%2C12.0779533%2021.6343527%2C12.1724444%2021.8371937%2C12.3440921%20L21.9342889%2C12.4349375%20C22.129767%2C12.628969%2022.25%2C12.9171205%2022.25%2C13.2177778%20L22.242717%2C13.345678%20C22.2137413%2C13.5991981%2022.0992456%2C13.8367894%2021.9161173%2C14.0180067%20L15.293%2C20.642%20L13.287%2C21.043%20L13.688%2C19.035%20L20.3081104%2C12.4147032%20C20.5222805%2C12.1981735%2020.8102464%2C12.0779533%2021.1106837%2C12.0779533%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDelete%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { PollsConfiguration } from \"./PollsConfiguration\";\nimport { PollsExtensionDecorator } from \"./PollsExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class PollsExtension extends ExtensionsDataSource {\n private configuration?: PollsConfiguration;\n \n constructor(configuration?: PollsConfiguration) {\n super();\n this.configuration = configuration;\n }\n \n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new PollsExtensionDecorator(dataSource, this.configuration)\n );\n }\n \n override getExtensionId(): string {\n return ExtensionsId.polls;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessageEvents, CometChatTheme, CometChatUIEvents, CometChatUIKitConstants, fontHelper, MessageStatus, PanelAlignment } from \"@cometchat/uikit-resources\";\nimport { IActiveChatChanged } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility, SmartRepliesConstants, SmartReplies } from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React, { CSSProperties } from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { SmartRepliesConfiguration } from \"./SmartRepliesConfiguration\";\n\nconst CometChatSmartReplyBubble = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nexport class SmartReplyExtensionDecorator extends DataSourceDecorator {\n public configuration?: SmartRepliesConfiguration;\n public theme?: CometChatTheme;\n private LISTENER_ID: string = \"smartreply__listener\";\n private activeUser!: CometChat.User;\n private activeGroup!: CometChat.Group;\n public currentMessage: CometChat.BaseMessage | null = null;\n public loggedInUser!: CometChat.User | null;\n\n constructor(dataSource: DataSource, configuration?: SmartRepliesConfiguration, theme?: CometChatTheme) {\n super(dataSource)\n this.configuration = configuration;\n this.theme = theme || new CometChatTheme({});\n this.addMessageListener();\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user\n }\n }\n );\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage: CometChat.TextMessage) => {\n if (textMessage != null && this.loggedInUser && this.loggedInUser?.getUid() != textMessage.getSender().getUid()) {\n this.currentMessage = textMessage;\n if (textMessage.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user && this.activeUser != null) {\n if (textMessage.getSender() !== null && textMessage.getSender().getUid() !== null && this.activeUser.getUid() === textMessage.getSender().getUid()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: textMessage, child: this.getSmartReplyView(textMessage), position: PanelAlignment.messageListFooter });\n }\n } else if (textMessage.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.group && this.activeGroup != null) {\n if (this.activeGroup.getGuid() !== null && this.activeGroup.getGuid() === textMessage.getReceiverId()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: textMessage, child: this.getSmartReplyView(textMessage), position: PanelAlignment.messageListFooter });\n }\n }\n }\n })\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.activeUser = data.user!;\n this.activeGroup = data.group!;\n if (this.currentMessage instanceof CometChat.TextMessage && this.currentMessage !== null && this.currentMessage.getSender() !== null && this.loggedInUser !== null && this.currentMessage.getSender().getUid() !== null && this.currentMessage.getSender().getUid() !== this.loggedInUser.getUid()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: this.getSmartReplyView(this.currentMessage) });\n }\n }\n )\n CometChatMessageEvents.ccMessageSent.subscribe(\n () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n )\n }\n\n getReplies(message: CometChat.TextMessage) {\n let smartReply: any = message;\n const smartReplyObject = smartReply?.metadata?.[SmartRepliesConstants.injected]?.extensions?.[SmartRepliesConstants.smart_reply];\n if (smartReplyObject?.reply_positive && smartReplyObject?.reply_neutral && smartReplyObject?.reply_negative) {\n const { reply_positive, reply_neutral, reply_negative } = smartReplyObject;\n return [reply_positive, reply_neutral, reply_negative];\n }\n\n return null;\n }\n\n getSmartReplyStyle() {\n const configurationSmartRepliesStyle = this.configuration?.getSmartRepliesStyle();\n return {\n replyTextFont: configurationSmartRepliesStyle?.replyTextFont || fontHelper((this.theme as CometChatTheme).typography.caption1),\n replyTextColor: configurationSmartRepliesStyle?.replyTextColor || this.theme?.palette.getAccent(),\n replyBackground: configurationSmartRepliesStyle?.replyBackground || \"inherit\",\n boxShadow: configurationSmartRepliesStyle?.boxShadow || `0px 0px 1px ${this.theme?.palette.getAccent600()}`,\n closeIconTint: configurationSmartRepliesStyle?.closeIconTint || this.theme?.palette.getAccent600(),\n background: configurationSmartRepliesStyle?.background || \"inherit\",\n width: configurationSmartRepliesStyle?.width || \"100%\",\n height: configurationSmartRepliesStyle?.height || \"100%\",\n border: configurationSmartRepliesStyle?.border || \"none\",\n display: \"flex\",\n justifyContent: \"flex-start\"\n }\n }\n\n sendSmartReply(_event: any) {\n let receiverType: string = this.activeUser ? CometChatUIKitConstants.MessageReceiverType.user : CometChatUIKitConstants.MessageReceiverType.group;\n let reply = _event?.detail?.reply;\n let _message = this.currentMessage;\n if (reply && reply.trim().length > 0 && _message) {\n let newMessage: CometChat.TextMessage;\n if (_message.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user) {\n newMessage = new CometChat.TextMessage(_message.getSender().getUid(), reply.trim(), receiverType);\n newMessage.setReceiver(this.activeUser);\n } else {\n const group: CometChat.Group = _message.getReceiver() as CometChat.Group;\n newMessage = new CometChat.TextMessage(group.getGuid(), reply.trim(), receiverType);\n newMessage.setReceiver(this.activeGroup);\n }\n if (_message.getParentMessageId() > 0) {\n newMessage.setParentMessageId(_message.getParentMessageId());\n }\n newMessage.setCategory(CometChatUIKitConstants.MessageCategory.message as CometChat.MessageCategory);\n newMessage.setSender(this.loggedInUser!);\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(CometChatUIKitUtility.ID());\n CometChatMessageEvents.ccMessageSent.next({ message: newMessage, status: MessageStatus.inprogress });\n CometChat.sendMessage(newMessage).then(\n (message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success })\n }, (error: CometChat.CometChatException) => {\n newMessage.setMetadata({ error: true })\n CometChatMessageEvents.ccMessageSent.next({ message: newMessage, status: MessageStatus.error })\n }\n )\n }\n }\n\n closeSmartReply() {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n\n getSmartReplyButtonStyle() {\n return {\n \"background\": \"inherit\"\n } as CSSProperties;\n }\n\n getSmartReplyView(message: CometChat.TextMessage) {\n\n if (!this.getReplies(message)) {\n return null;\n }\n\n return (\n
    \n { e[\"msg\"] = message; this.sendSmartReply(e) }}\n ccCloseClicked={this.closeSmartReply}\n >\n
    \n )\n }\n\n override getId(): string {\n return \"smartreply\";\n }\n}\n","import { SmartReplyExtensionDecorator } from \"./SmartRepliesExtensionDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { SmartRepliesConfiguration } from \"./SmartRepliesConfiguration\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class SmartReplyExtension extends ExtensionsDataSource {\n private configuration?: SmartRepliesConfiguration;\n private theme?: CometChatTheme;\n\n constructor(configuration?: SmartRepliesConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new SmartReplyExtensionDecorator(dataSource, this.configuration, this.theme)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.smartReply;\n }\n}","import {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n localize,\n MessageBubbleAlignment,\n Placement,\n fontHelper,\n CometChatMessageEvents,\n MessageStatus,\n} from \"@cometchat/uikit-resources\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n StickersConstants,\n CometChatUIKitUtility,\n StickersKeyboard,\n} from \"@cometchat/uikit-shared\";\nimport { PopoverStyle, CometChatImageBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { StickersConfiguration } from \"./StickersConfiguration\";\nimport StickerIcon from \"./assets/Stickers.svg\";\nimport CloseIcon from \"./assets/close.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatStickersKeyboard = createComponent({\n tagName: \"stickers-keyboard\",\n elementClass: StickersKeyboard,\n react: React,\n events: {\n ccStickerClicked: \"cc-sticker-clicked\",\n },\n});\n\nconst CometChatImageMessageBubble = createComponent({\n tagName: \"cometchat-image-bubble\",\n elementClass: CometChatImageBubble,\n react: React,\n});\n\nexport class StickersExtensionDecorator extends DataSourceDecorator {\n public configuration?: StickersConfiguration;\n public newDataSource!: DataSource;\n public showStickerKeyboard: boolean = false;\n public theme!: CometChatTheme;\n private id: any;\n private user: any;\n private group: any;\n\n constructor(dataSource: DataSource, configuration?: StickersConfiguration) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n getDataSource() {\n return this.newDataSource;\n }\n\n override getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = theme as CometChatTheme;\n let template: CometChatMessageTemplate[] = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateExist(template, StickersConstants.sticker)) {\n template.push(this.getStickerTemplate(this.theme));\n return template;\n }\n return template;\n }\n\n override getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n this.id = id;\n this.user = user;\n this.group = group;\n let auxiliaryOptions = super.getAuxiliaryOptions(id, theme, user, group);\n auxiliaryOptions.push(\n this.getStickerAuxiliaryButton(id, theme, user, group)\n );\n return auxiliaryOptions;\n }\n\n getStickerAuxiliaryButton(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n let configurationStickersStyle = this.configuration?.getStickersStyle();\n\n let emojiButtonStyle: any = {\n height: configurationStickersStyle?.sticketButtonHeight || \"24px\",\n width: configurationStickersStyle?.stickerButtonWidth || \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint:\n configurationStickersStyle?.stickerButtonIconTint ||\n theme.palette.getAccent500(),\n background: \"transparent\",\n };\n\n let style = new PopoverStyle({\n width: configurationStickersStyle?.width || \"300px\",\n height: configurationStickersStyle?.height || \"400px\",\n background: theme?.palette?.getBackground(),\n borderRadius: \"12px\",\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n\n let stickerKeyboardStyle = {\n width: configurationStickersStyle?.width || \"300px\",\n height: configurationStickersStyle?.height || \"400px\",\n border: configurationStickersStyle?.border || \"none\",\n emptyStateTextFont:\n configurationStickersStyle?.emptyStateTextFont ||\n fontHelper(theme.typography.title1),\n emptyStateTextColor:\n configurationStickersStyle?.emptyStateTextColor ||\n theme.palette.getAccent600(),\n errorStateTextFont:\n configurationStickersStyle?.errorStateTextFont ||\n fontHelper(theme.typography.title1),\n errorStateTextColor:\n configurationStickersStyle?.errorStateTextColor ||\n theme.palette.getAccent600(),\n loadingIconTint:\n configurationStickersStyle?.loadingIconTint ||\n theme.palette.getAccent600(),\n background:\n configurationStickersStyle?.background || theme.palette.getBackground(),\n borderRadius: configurationStickersStyle?.borderRadius || \"12px\",\n };\n\n let openIconURL = this.configuration?.getStickerIconURL() || StickerIcon;\n let closeIconURL = this.configuration?.getCloseIconURL() || CloseIcon;\n\n return (\n \n
    \n \n
    \n
    \n this.sendSticker(e)}\n />\n
    \n \n );\n }\n\n sendSticker(event: any) {\n try {\n let details = event?.detail;\n let sticker = {\n name: details?.stickerName,\n URL: details?.stickerURL,\n };\n const receiverId: string = this.user?.getUid() || this.group?.getGuid();\n const receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n const { parentMessageId } = this.id;\n\n const customData = {\n sticker_url: sticker.URL,\n sticker_name: sticker.name,\n };\n\n const customType = StickersConstants.sticker;\n\n const customMessage: CometChat.CustomMessage =\n new CometChat.CustomMessage(\n receiverId,\n receiverType,\n customType,\n customData\n );\n\n if (parentMessageId) {\n customMessage.setParentMessageId(parentMessageId);\n }\n\n customMessage.setMetadata({ incrementUnreadCount: true });\n customMessage.shouldUpdateConversation(true);\n (customMessage as any).setSentAt(\n CometChatUIKitUtility.getUnixTimestamp()\n );\n\n customMessage.setMuid(CometChatUIKitUtility.ID());\n\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.inprogress,\n });\n\n CometChat.sendCustomMessage(customMessage).then(\n (message) => {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.success,\n });\n },\n (error) => {\n customMessage.setMetadata({ error: true });\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.error,\n });\n }\n );\n } catch (error: any) {\n console.log(\"error in sending sticker\", error);\n }\n }\n\n getSticker(message: CometChat.CustomMessage) {\n let stickerData: any;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(\n message,\n StickersConstants.data\n ) &&\n CometChatUIKitUtility.checkHasOwnProperty(\n (message as CometChat.CustomMessage).getData(),\n StickersConstants.custom_data\n )\n ) {\n stickerData = message.getCustomData();\n if (\n CometChatUIKitUtility.checkHasOwnProperty(\n stickerData,\n StickersConstants.sticker_url\n )\n ) {\n return stickerData?.sticker_url;\n } else {\n return \"\";\n }\n } else {\n return \"\";\n }\n }\n\n getStickerMessageContentView(\n stickerMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n const imageBubbleStyle: any = {\n height: \"128px\",\n width: \"128px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n };\n return (\n \n );\n }\n\n getStickerTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: StickersConstants.sticker,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let stickerMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (stickerMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(stickerMessage, _theme);\n }\n return this.getStickerMessageContentView(stickerMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageCategories(): string[] {\n let categories: string[] = super.getAllMessageCategories();\n if (\n !categories.some(\n (category) =>\n category === CometChatUIKitConstants.MessageCategory.custom\n )\n ) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n override getAllMessageTypes(): string[] {\n let types: string[] = super.getAllMessageTypes();\n if (!types.some((type) => type === StickersConstants.sticker)) {\n types.push(StickersConstants.sticker);\n }\n return types;\n }\n\n override getId(): string {\n return \"stickers\";\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === StickersConstants.sticker &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_STICKER\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FStickers%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FStickers%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.67349142%2C7.33338221%20C5.86012572%2C7.33338221%206.01142272%2C7.48460989%206.01142272%2C7.67115869%20C6.01142272%2C7.85770748%205.86012572%2C8.00893516%205.67349142%2C8.00893516%20C5.48685711%2C8.00893516%205.33556012%2C7.85770748%205.33556012%2C7.67115869%20C5.33556012%2C7.58157479%205.37116349%2C7.49566003%205.4345379%2C7.43231465%20C5.49791231%2C7.36896927%205.58386646%2C7.33338221%205.67349142%2C7.33338221%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.23283692%2C13.0400269%20C5.36112225%2C15.1816508%207.58282264%2C16.5229567%2010.0043478%2C16.5244579%20C10.2778756%2C16.5227578%2010.5510655%2C16.5049493%2010.8224973%2C16.4711247%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20%2C9.57337357%20C19.7666207%2C4.11103074%2015.187631%2C-0.151378825%209.72001617%2C0.00412271646%20C4.25240139%2C0.159624258%20-0.0767041446%2C4.67538425%200.00103066029%2C10.1421537%20C0.0787654651%2C15.6089231%204.5345202%2C20%2010.0043478%2C20%20L10.4489943%2C20%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.1831154%2C7.92004661%20C12.559175%2C7.32283168%2013.215699%2C6.96047481%2013.921683%2C6.96047481%20C14.6276671%2C6.96047481%2015.2841911%2C7.32283168%2015.6602507%2C7.92004661%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2220%22%20y1%3D%229.57337357%22%20x2%3D%2210.4489943%22%20y2%3D%2219.9911111%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.4489943%2C19.9911111%20L10.4489943%2C19.1022257%20C10.4588042%2C13.8367116%2014.7320632%2C9.57337357%2020%2C9.57337357%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { StickersConfiguration } from \"./StickersConfiguration\";\nimport { StickersExtensionDecorator } from './StickersExtensionDecorator';\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class StickersExtension extends ExtensionsDataSource {\n private configuration?: StickersConfiguration;\n\n constructor(configuration?: StickersConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new StickersExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.stickers;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n MentionsTargetElement,\n MessageBubbleAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nexport class TextModeratorExtensionDecorator extends DataSourceDecorator {\n override getId(): string {\n return \"textmoderator\";\n }\n\n getModeratedtext(message: CometChat.TextMessage): string {\n let text: string = CometChatUIKitUtility.getExtensionData(message);\n if (text?.trim()?.length > 0) {\n return text;\n } else {\n return message.getText();\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n const message: CometChat.TextMessage = conversation.getLastMessage();\n\n if (\n message &&\n !message.getDeletedAt() &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message\n ) {\n let subtitle = this.getModeratedtext(message);\n let messageObj = conversation.getLastMessage();\n\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : [this.getMentionsTextFormatter({ theme: additionalConfigurations.theme, disableMentions: additionalConfigurations.disableMentions })],\n };\n\n let textFormatters: Array = config.textFormatters;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(messageObj);\n if (messageObj.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n messageObj.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n messageObj,\n ...config,\n alignment: null,\n theme: additionalConfigurations.theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n }\n\n if (\n messageObj &&\n messageObj instanceof CometChat.TextMessage\n ) {\n for (let i = 0; i < textFormatters.length; i++) {\n subtitle = textFormatters[i].getFormattedText(subtitle, { mentionsTargetElement: MentionsTargetElement.conversation })!;\n }\n }\n if (\n message &&\n conversation?.getConversationType() != CometChat.RECEIVER_TYPE.USER\n ) {\n if (\n message?.getSender().getUid() ==\n CometChatUIKitLoginListener?.getLoggedInUser()?.getUid()\n ) {\n subtitle = `${localize(\"YOU\")}: ${subtitle}`;\n } else {\n subtitle = `${message?.getSender().getName()}: ${subtitle}`;\n }\n }\n return subtitle;\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n let moderatedText = this.getModeratedtext(message);\n if (this.getModeratedtext(message) !== message.getText()) {\n message.setText(moderatedText);\n }\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\"; \nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\"; \nimport {TextModeratorExtensionDecorator} from \"./TextModeratorExtensionDecorator\"; \nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nexport class TextModeratorExtension extends ExtensionsDataSource {\n\n override addExtension(): void {\n ChatConfigurator.enable(dataSource => new TextModeratorExtensionDecorator(dataSource));\n }\n\n override getExtensionId(): string {\n return ExtensionsId.profanityFilter;\n }\n\n override enable(): void {\n const promise1 = CometChat.isExtensionEnabled(ExtensionsId.profanityFilter);\n const promise2 = CometChat.isExtensionEnabled(ExtensionsId.dataMasking);\n Promise.all([promise1, promise2]).then((values) => {\n if(values.includes(true))\n {\n this.addExtension();\n }\n }).catch(error => {});\n }\n \n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { BaseStyle, ImageBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport PlaceholderImage from './assets/placeholder.png';\n\nexport class ThumbnailGenerationExtensionDecorator extends DataSourceDecorator {\n override getId(): string {\n return \"thumbnailgeneration\";\n }\n\n override getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, theme: CometChatTheme, onClick?: Function, style?: ImageBubbleStyle) {\n if(ChatConfigurator.names.includes(\"imagemoderation\")){\n return super.getImageMessageBubble(imageUrl, placeholderImage, message, theme);\n }else{\n let imageUrl = message.getAttachments()[0].getUrl();\n let metadata : any = message.getMetadata();\n if(metadata && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]){\n imageUrl = metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n return super.getImageMessageBubble(imageUrl, PlaceholderImage, message, theme);\n }\n }\n\n override getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, theme: CometChatTheme, thumbnailUrl?: string, onClick?: Function, style?: BaseStyle) {\n let metadata : any = message.getMetadata();\n let thumbnailImage = thumbnailUrl;\n if(metadata && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]){\n thumbnailImage = metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n return super.getVideoMessageBubble(videoUrl, message, theme, thumbnailImage);\n }\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAuYAAAOBCAYAAAC9H2UFAAAABHNCSVQICAg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ABIQJgDAEACwhwAABIQ5gAAkIAwBwCABIQ5AAAkIMwBACABYQ4AAAkIcwAASECYAwBAAsIcAAASEOYAAJCAMAcAgASEOQAAJCDMAQAgAWEOAAAJCHMAAEhAmAMAQALCHAAAEhDmAACQgDAHAIAEhDkAACQgzAEAIAFhDgAACQhzAABIQJgDAEACwhwAABIQ5gAA/H/t1rEAAAAAwCB/62nsKIoYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgIlsjTWURiJ80AAAAASUVORK5CYII=\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { ThumbnailGenerationExtensionDecorator } from \"./ThumbnailGenerationExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class ThumbnailGenerationExtension extends ExtensionsDataSource {\n \n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new ThumbnailGenerationExtensionDecorator(dataSource)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.thumbnailGeneration;\n }\n}","import { CardMessage, ChatSdkEventInitializer, CometChatLocalize, CometChatMessageEvents, CustomInteractiveMessage, FormMessage, MessageStatus, SchedulerMessage } from \"@cometchat/uikit-resources\";\nimport { CometChatSoundManager, CometChatUIKitCalls, CometChatUIKitLoginListener, CometChatUIKitSharedSettings, CometChatUIKitUtility, InteractiveMessageUtils, UIKitSettings } from '@cometchat/uikit-shared';\n\nimport { AIAssistBotExtension } from \"../../AI/AIAssistBot/AIAssistBotExtension\";\nimport { AIConversationStarterExtension } from \"../../AI/AIConversationStarter/AIConversationStarterExtension\";\nimport { AIConversationSummaryExtension } from \"../../AI/AIConversationSummary/AIConversationSummaryExtension\";\nimport { AIExtensionDataSource } from \"../Framework/AIExtensionDataSource\";\nimport { AISmartRepliesExtension } from \"../../AI/AISmartReplies/AISmartRepliesExtension\";\nimport { CallingExtension } from \"../../Calling/CallingExtension\";\nimport { ChatConfigurator } from \"../Framework/ChatConfigurator\";\nimport { CollaborativeDocumentExtension } from \"../../Extensions/CollaborativeDocument/CollaborativeDocumentExtension\";\nimport { CollaborativeWhiteboardExtension } from \"../../Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { ExtensionsDataSource } from \"../Framework/ExtensionsDataSource\";\nimport { ImageModerationExtension } from \"../../Extensions/ImageModeration/ImageModerationExtension\";\nimport { LinkPreviewExtension } from \"../../Extensions/LinkPreview/LinkPreviewExtension\";\nimport { MessageTranslationExtension } from \"../../Extensions/MessageTranslation/MessageTranslationExtension\";\nimport { PollsExtension } from \"../../Extensions/Polls/PollsExtension\";\nimport { SmartReplyExtension } from \"../../Extensions/SmartReplies/SmartRepliesExtension\";\nimport { StickersExtension } from \"../../Extensions/Stickers/StickersExtension\";\nimport { TextModeratorExtension } from \"../../Extensions/TextModerator/TextModeratorExtension\";\nimport { ThumbnailGenerationExtension } from \"../../Extensions/ThumbnailGeneration/ThumbnailGenerationExtension\";\n\nclass CometChatUIKit {\n static uiKitSettings: UIKitSettings | null;\n static SoundManager: typeof CometChatSoundManager = CometChatSoundManager;\n static Localize: typeof CometChatLocalize = CometChatLocalize;\n static conversationUpdateSettings: CometChat.ConversationUpdateSettings;\n static init(uiKitSettings: UIKitSettings | null): Promise | undefined {\n CometChatUIKit.uiKitSettings = uiKitSettings\n if (!CometChatUIKit.checkAuthSettings()) return undefined;\n const appSettingsBuilder = new CometChat.AppSettingsBuilder();\n if (uiKitSettings!.getRoles()) {\n appSettingsBuilder.subscribePresenceForRoles(uiKitSettings!.getRoles());\n } else if (uiKitSettings!.getSubscriptionType() === \"ALL_USERS\") {\n appSettingsBuilder.subscribePresenceForAllUsers();\n } else if (uiKitSettings!.getSubscriptionType() === \"FRIENDS\") {\n appSettingsBuilder.subscribePresenceForFriends();\n }\n appSettingsBuilder.autoEstablishSocketConnection(uiKitSettings!.isAutoEstablishSocketConnection());\n appSettingsBuilder.setRegion(uiKitSettings!.getRegion());\n appSettingsBuilder.overrideAdminHost(uiKitSettings!.getAdminHost());\n appSettingsBuilder.overrideClientHost(uiKitSettings!.getClientHost());\n\n const appSettings = appSettingsBuilder.build();\n if (CometChat.setSource) {\n CometChat.setSource(\"uikit-v4\", \"web\", \"reactjs\");\n }\n CometChatUIKitSharedSettings.uikitSettings = CometChatUIKit.uiKitSettings;\n return new Promise((resolve, reject) => {\n (window).CometChatUiKit = {\n name: \"@cometchat/chat-uikit-react\",\n version: \"4.3.16\",\n };\n CometChat.init(uiKitSettings?.appId, appSettings).then(() => {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n this.initiateAfterLogin()\n }\n return resolve(user!)\n }).catch((error: CometChat.CometChatException) => {\n console.log(error)\n return reject(error)\n })\n })\n .catch((error: CometChat.CometChatException) => {\n return reject(error)\n })\n });\n }\n\n static defaultExtensions: ExtensionsDataSource[] = [\n new StickersExtension(),\n new SmartReplyExtension(),\n new CollaborativeWhiteboardExtension(),\n new CollaborativeDocumentExtension(),\n new MessageTranslationExtension(),\n new TextModeratorExtension(),\n new ThumbnailGenerationExtension(),\n new LinkPreviewExtension(),\n new PollsExtension(),\n new ImageModerationExtension()\n ]\n\n static defaultAIFeatures: AIExtensionDataSource[] = [\n new AISmartRepliesExtension(),\n new AIConversationStarterExtension(),\n new AIConversationSummaryExtension(),\n new AIAssistBotExtension()\n ]\n\n static enableCalling() {\n try {\n if (CometChatUIKitCalls) {\n const callAppSetting = new CometChatUIKitCalls.CallAppSettingsBuilder()\n .setAppId(CometChatUIKit.uiKitSettings?.appId)\n .setRegion(CometChatUIKit.uiKitSettings?.region)\n .build();\n CometChatUIKitCalls.init(callAppSetting).then(\n () => {\n new CallingExtension().enable()\n },\n (error: any) => {\n console.log('CometChatCalls initialization failed with error:', error);\n },\n );\n }\n } catch (e) {\n console.log(e);\n }\n }\n\n private static initiateAfterLogin() {\n\n\n if (CometChatUIKit.uiKitSettings != null) {\n CometChat.getConversationUpdateSettings().then((res: CometChat.ConversationUpdateSettings) => {\n this.conversationUpdateSettings = res;\n })\n let extensionList: ExtensionsDataSource[] = this.uiKitSettings?.extensions || this.defaultExtensions;\n ChatSdkEventInitializer.attachListeners();\n CometChatUIKitLoginListener.attachListener();\n let aiFeaturesList: AIExtensionDataSource[] = this.uiKitSettings?.aiFeatures || this.defaultAIFeatures;\n\n if (extensionList.length > 0) {\n extensionList.forEach((extension: ExtensionsDataSource) => {\n extension?.enable();\n });\n }\n\n if (aiFeaturesList.length > 0) {\n aiFeaturesList.forEach((aiFeatures: AIExtensionDataSource) => {\n aiFeatures.enable();\n })\n }\n\n this.enableCalling();\n }\n }\n\n static login(uid: string): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChatUIKit.getLoggedinUser()?.then((user) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n this.initiateAfterLogin();\n return resolve(user);\n } else {\n CometChat.login(uid, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n CometChatUIKitLoginListener.setLoggedInUser(user);\n this.initiateAfterLogin();\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n }\n });\n });\n }\n\n static loginWithAuthToken(authToken: string): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.login(authToken).then((user: CometChat.User) => {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n this.initiateAfterLogin();\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static getLoggedinUser(): Promise {\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n }\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n })\n }\n\n static createUser(user: CometChat.User): Promise {\n\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.createUser(user, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static updateUser(user: CometChat.User): Promise {\n\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.updateUser(user, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static logout(): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) {\n const error = {\n code: \"ERROR_UIKIT_NOT_INITIALISED\",\n message: \"UIKItSettings not available\"\n }\n return reject(error);\n }\n CometChat.logout().then((message: object) => {\n CometChatUIKitLoginListener.removeLoggedInUser();\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static checkAuthSettings(): boolean {\n if (CometChatUIKit.uiKitSettings == null) {\n return false;\n }\n\n if (CometChatUIKit.uiKitSettings!.appId == null) {\n return false;\n }\n\n return true;\n }\n\n\n /**\n * Sends a form message and emits events based on the message status.\n * @param message - The form message to be sent.\n * @param disableLocalEvents - A boolean indicating whether to disable local events or not. Default value is false.\n */\n static sendFormMessage(\n message: FormMessage,\n disableLocalEvents: boolean = false\n ) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: FormMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as FormMessage;\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCardMessage(message: CardMessage, disableLocalEvents: boolean = false) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: CardMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as CardMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCustomInteractiveMessage(message: CustomInteractiveMessage, disableLocalEvents: boolean = false) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: CustomInteractiveMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as CustomInteractiveMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCustomMessage(message: CometChat.CustomMessage) {\n\n return new Promise((resolve, reject) => {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendCustomMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n });\n }\n\n static sendTextMessage(message: CometChat.TextMessage) {\n\n return new Promise((resolve, reject) => {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n });\n }\n\n static sendMediaMessage(message: CometChat.MediaMessage) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n return new Promise((resolve, reject) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendMediaMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n })\n\n }\n\n\n static sendSchedulerMessage(message: SchedulerMessage, disableLocalEvents: boolean = false) {\n return new Promise((resolve, reject) => {\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: SchedulerMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as SchedulerMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n resolve(message);\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n reject(error);\n });\n });\n }\n\n static getDataSource() {\n return ChatConfigurator.getDataSource();\n }\n\n}\n\nexport { CometChatUIKit };\n","import { CSSProperties } from \"react\";\nimport { BaseStyle, TabItemStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTabItem, TabAlignment } from \"@cometchat/uikit-resources\";\nimport { TabsStyle } from \"./TabsStyle\";\n\nexport const TabsWrapperStyle = (tabStyle: BaseStyle | undefined) => {\n\n return {\n height: tabStyle?.height || \"100%\", \n width: tabStyle?.width || \"100%\", \n borderRadius: tabStyle?.borderRadius || \"0\",\n border: tabStyle?.border || \"0 none\",\n background: tabStyle?.background || \"transparent\",\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'flex-start',\n position: 'relative'\n } as CSSProperties;\n}\n\nexport const ButtonStyle = (style: TabItemStyle, active: boolean, iconURL?: string) => {\n \n return {\n background: \"inherit\",\n buttonTextFont: active ? style?.activeTitleTextFont ?? style?.titleTextFont : style?.titleTextFont,\n buttonTextColor: active ? style?.activeTitleTextColor ?? style?.titleTextColor : style?.titleTextColor,\n buttonIconTint: active ? style?.activeIconTint ?? style?.iconTint : style?.iconTint,\n height: \"100%\",\n width: \"100%\",\n border: style?.border,\n borderRadius: style?.borderRadius,\n gap: \"8px\",\n padding: \"0\",\n justifyContent: !iconURL ? \"center\" : \"\",\n };\n}\n\nexport const getTabListStyle = (tabsStyle: TabsStyle | undefined, tabAlignment: TabAlignment) : CSSProperties => {\n let positionProperties;\n if(tabAlignment === TabAlignment.top || tabAlignment === TabAlignment.left){\n positionProperties = {\n top: \"0\",\n left: \"0\"\n };\n }else if(tabAlignment === TabAlignment.bottom){\n positionProperties = {\n bottom: \"2px\",\n left: \"2px\"\n };\n }else{\n positionProperties = {\n top: \"0\",\n right: \"0\"\n };\n }\n \n return {\n ...positionProperties,\n position: 'absolute',\n zIndex: \"2\",\n height: tabsStyle?.tabListHeight || '100%', \n width: tabsStyle?.tabListWidth || '100%', \n border: tabsStyle?.tabListBorder || '0 none', \n borderRadius: tabsStyle?.tabListBorderRadius || '0', \n background: tabsStyle?.tabListBackground || 'transparent',\n boxShadow: tabsStyle?.tabListBoxShadow || \"0\", \n padding: tabsStyle?.tabListPadding || \"0\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function getTabContentStyle(tabsStyle: TabsStyle | undefined) {\n\n return {\n height: tabsStyle?.tabPaneHeight || \"100%\",\n width: tabsStyle?.tabPaneWidth || \"100%\",\n display: \"flex\",\n position: \"absolute\",\n bottom: \"0\"\n } as CSSProperties;\n}\n\nexport function tabItemWrapperStyle() {\n return {\n display: 'flex',\n justifyContent: \"center\",\n height: '100%', \n width: '100%', \n }\n}\n\nexport const getTabItemStyle = (tabAlignment: TabAlignment | undefined, tab: CometChatTabItem, activeTab: CometChatTabItem | null, placement: string,tabsStyle:TabsStyle|undefined) => {\n\n let active = activeTab?.id === tab?.id;\n let style = tab?.style as TabItemStyle;\n let alignment: string = tabAlignment === TabAlignment.top || tabAlignment === TabAlignment.bottom ? \"row\" : \"column\";\n let borderRadiusStyle = style?.borderRadius;\n let borderRadius = placement === 'first' ? `${borderRadiusStyle} 0 0 ${borderRadiusStyle}` : placement === 'last' ? `0 ${borderRadiusStyle} ${borderRadiusStyle} 0` : '0';\n if(active && style.activeBorderRadius) {\n borderRadius = style.activeBorderRadius;\n }\n\n let boxShadow = \"0\";\n if(active && style?.boxShadow) {\n boxShadow = style.boxShadow;\n }\n\n return {\n display: \"flex\",\n flexDirection: alignment,\n justifyContent: \"center\",\n width: style?.width,\n height: style?.height,\n backgroundColor: active ? style?.activeBackground ?? style?.background : style?.background,\n borderRadius: borderRadius,\n boxShadow: boxShadow,\n } as CSSProperties;\n}\n\nexport const TabPaneContentViewStyle = (tabStyle: BaseStyle | undefined) => { \n\n let {borderRadius} = tabStyle ?? {};\n return {\n height: '100%', \n width: '100%', \n borderRadius\n } as CSSProperties;\n};\n\nexport function draggableStyle() {\n return {\n width: '100%',\n height: '100%',\n background: 'transparent'\n }\n}\n\nexport function tabPaneContentStyle(tab: CometChatTabItem, activeTab: CometChatTabItem | null) {\n return (tab.id !== activeTab?.id) \n ? {\n display:\"none\"\n } : {\n display: \"flex\", \n height: '100%', \n width: '100%', \n }\n}","import { ButtonStyle, TabPaneContentViewStyle, TabsWrapperStyle, draggableStyle, getTabContentStyle, getTabItemStyle, getTabListStyle, tabItemWrapperStyle, tabPaneContentStyle } from \"./style\";\nimport { CometChatDraggable, CometChatIconButton } from \"@cometchat/uikit-elements\";\nimport { CometChatTabItem, IconButtonAlignment, TabAlignment } from \"@cometchat/uikit-resources\";\nimport React, { useCallback, useRef, useState } from \"react\";\n\nimport { TabItemStyle } from \"@cometchat/uikit-shared\";\nimport { TabsStyle } from \"./TabsStyle\";\nimport { createComponent } from \"@lit-labs/react\";\n\ninterface TabsProps {\n tabAlignment?: TabAlignment,\n tabsStyle?: TabsStyle,\n tabs: CometChatTabItem[],\n // isDraggable?: boolean,\n keepAlive? : boolean,\n tabIconAlignment?: IconButtonAlignment\n}\n\nconst defaultProps: TabsProps = {\n tabAlignment: TabAlignment.bottom,\n tabsStyle: {},\n tabs: [],\n // isDraggable: false,\n keepAlive: false,\n tabIconAlignment: IconButtonAlignment.top\n}\n\nconst CometChatIconButtonBubble = createComponent({\n tagName: 'cometchat-icon-button',\n elementClass: CometChatIconButton,\n react: React,\n events: {\n 'ccButtonClicked': 'cc-button-clicked'\n }\n});\n\n// const CometChatDraggableComponent = createComponent({\n// tagName: \"cometchat-draggable\",\n// elementClass: CometChatDraggable,\n// react: React\n// })\n\nconst CometChatTabs = (props: TabsProps) => {\n const {\n tabAlignment,\n tabIconAlignment,\n tabsStyle,\n tabs,\n // isDraggable,\n keepAlive\n } = props;\n \n const [activeTab, setActiveTab] = useState(null);\n const [activeTabId, setActiveTabId] = useState(\"\");\n const childViewRef = useRef(null);\n\n const openViewOnCLick = useCallback((tabItem: CometChatTabItem) => {\n \n if(tabs && tabs.length > 0){\n childViewRef.current = null;\n let index = tabs.findIndex(\n (item: CometChatTabItem) => item.id === tabItem.id\n );\n \n if (index > -1 ) {\n setActiveTab(tabItem);\n setActiveTabId(tabItem.id!);\n childViewRef.current = tabs[index].childView;\n }\n }\n }, [childViewRef, tabs])\n\n React.useEffect(() => {\n if (activeTabId) {\n const tabItem = tabs?.find((item: CometChatTabItem) => item.id === activeTabId);\n if (tabItem) {\n openViewOnCLick(tabItem);\n }\n }else{\n const tabItem = tabs?.find((item: CometChatTabItem) => item.isActive);\n if(tabItem) {\n openViewOnCLick(tabItem);\n }\n }\n \n }, [activeTabId, openViewOnCLick, tabs]);\n\n const getButtonStyle = useCallback((tab: CometChatTabItem) => {\n const { style, iconURL } = tab || {};\n const { id } = activeTab || {};\n const active = id === tab?.id;\n return ButtonStyle(style as TabItemStyle, active, iconURL);\n }, [activeTab]);\n\n const getTabItems = useCallback(() => {\n\n return tabs?.map((tab, index) => {\n\n const placement = index === 0 ? 'first' : index === (tabs.length - 1) ? 'last' : '';\n let key = `${tab.id}-${Math.floor((Math.random() * 10) + 1)}`;\n return (\n //
    \n
    \n openViewOnCLick(tab)}\n /> \n
    \n )\n })\n }, [activeTab]);\n\n\n const getTabList = () => {\n\n const tabWrapperView = (\n
    \n {getTabItems()}\n
    \n );\n // return isDraggable ? (\n // {tabWrapperView}\n // ) : (tabWrapperView);\n return tabWrapperView;\n };\n\n const getTabPane = useCallback(() => {\n\n if(keepAlive) {\n\n return tabs.map((tab) => {\n\n return (\n
    \n {tab?.childView ?
    {tab?.childView}
    : null} \n
    \n );\n\n });\n\n } else {\n return childViewRef?.current ?
    {childViewRef?.current}
    : null\n }\n }, [activeTab])\n \n return (\n
    \n
    \n {getTabList()}\n
    \n
    \n {getTabPane()}\n
    \n
    \n )\n}\n\nCometChatTabs.defaultProps = defaultProps;\nexport { CometChatTabs };","import { CreatePollStyle, OptionsStyle, PollsBubbleStyle } from \"@cometchat/uikit-shared\";\n\nexport class PollsConfiguration {\n private style: PollsBubbleStyle;\n private createPollStyle: CreatePollStyle\n private createPollIconURL: string;\n private deleteIconURL: string;\n private closeIconURL: string;\n private optionIconURL: string;\n private addAnswerIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: PollsBubbleStyle, createPollStyle?: CreatePollStyle, createPollIconURL?: string, deleteIconURL?: string, closeIconURL?: string, optionIconURL?: string, addAnswerIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, createPollStyle, createPollIconURL, deleteIconURL, closeIconURL, optionIconURL, addAnswerIconURL, optionStyle } = configuration;\n this.style = (style as PollsBubbleStyle);\n this.createPollStyle = (createPollStyle as CreatePollStyle);\n this.createPollIconURL = (createPollIconURL as string);\n this.deleteIconURL = (deleteIconURL as string);\n this.closeIconURL = (closeIconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.addAnswerIconURL = (addAnswerIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getPollsBubbleStyle(): PollsBubbleStyle {\n return this.style;\n }\n\n getCreatePollStyle(): CreatePollStyle {\n return this.createPollStyle;\n }\n\n getCreatePollIconURL(): string {\n return this.createPollIconURL;\n }\n\n getDeleteIconURL(): string {\n return this.deleteIconURL;\n }\n\n getCloseIconURL(): string {\n return this.closeIconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getAddAnswerIconURL(): string {\n return this.addAnswerIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import {CSSProperties} from 'react';\nimport { AvatarStyle, ListItemStyle, CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { fontHelper, CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { IncomingCallStyle } from \"@cometchat/uikit-shared\";\n\nexport const IncomingCallWrapperStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n height: incomingCallStyle?.height,\n width: incomingCallStyle?.width,\n background: incomingCallStyle?.background,\n border: incomingCallStyle?.border,\n borderRadius: incomingCallStyle?.borderRadius,\n padding: \"8px\",\n position: \"absolute\",\n left: \"8px\",\n top: \"8px\",\n minHeight: \"95px\",\n minWidth: \"230px\",\n zIndex: 100,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n gap: \"8px\",\n alignItems: \"flex-start\"\n } as CSSProperties\n}\n\nexport const IncomingCallSubtitleStyle = { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-start\", gap: \"6px\" }\n\nexport const IncomingCallLabelStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n textFont: incomingCallStyle?.subtitleTextFont,\n textColor: incomingCallStyle?.subtitleTextColor\n }\n}\n\nexport const IncomingCallListItemStyle = { \n width: \"100%\", \n marginLeft: \"-4px\" \n}\n\nexport const IncomingCallTailViewStyle = { \n position: 'relative'\n} as CSSProperties\n\nexport const IncomingCallButtonsStyle = { \n display: 'flex', \n gap: '8px', \n paddingLeft: '8px', \n paddingRight: '8px'\n}\n\nexport const buttonStyle = {\n height:\"100%\",\n width:\"100%\",\n display:\"flex\",\n flexDirection:\"column\",\n justifyContent:\"center\",\n alignItems:\"center\",\n padding:\"8px 28px\"\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme): AvatarStyle => {\n return new AvatarStyle({\n borderRadius: \"16px\",\n width: \"38px\",\n height: \"38px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n });\n}\n\nexport const defaultIncomingCallStyle = (theme: CometChatTheme): IncomingCallStyle => {\n return new IncomingCallStyle({\n width: \"fit-content\",\n height: \"fit-content\",\n background: theme.palette.getAccent800(),\n border: \"none\",\n borderRadius: \"8px\",\n titleTextFont: fontHelper(theme.typography.title2),\n titleTextColor: theme.palette.getAccent(\"dark\"),\n subtitleTextFont: fontHelper(theme.typography.subtitle2),\n subtitleTextColor: theme.palette.getAccent(\"dark\"),\n acceptButtonTextFont: fontHelper(theme.typography.text2),\n acceptButtonTextColor: theme.palette.getAccent(\"dark\"),\n acceptButtonBackground: theme.palette.getPrimary(),\n acceptButtonBorderRadius: \"8px\",\n acceptButtonBorder: \"none\",\n declineButtonTextFont: fontHelper(theme.typography.text2),\n declineButtonTextColor: theme.palette.getAccent(\"dark\"),\n declineButtonBackground: theme.palette.getError(),\n declineButtonBorderRadius: \"8px\",\n declineButtonBorder: \"none\",\n });\n}\n\nexport const defaultListItemStyle = (incomingCallStyle : IncomingCallStyle, theme: CometChatTheme): ListItemStyle => {\n return new ListItemStyle({\n height: \"100%\",\n width: \"100%\",\n background: \"transparent\",\n activeBackground: \"transparent\",\n borderRadius: \"0\",\n titleFont: incomingCallStyle?.titleTextFont,\n titleColor: incomingCallStyle?.titleTextColor,\n border: \"none\",\n separatorColor: theme.palette.getAccent200(),\n hoverBackground: \"transparent\"\n });\n}\n\nexport const AcceptButtonStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n border: incomingCallStyle?.acceptButtonBorder,\n borderRadius: incomingCallStyle?.acceptButtonBorderRadius,\n background: incomingCallStyle?.acceptButtonBackground,\n buttonTextFont: incomingCallStyle?.acceptButtonTextFont,\n buttonTextColor: incomingCallStyle?.acceptButtonTextColor,\n ...buttonStyle\n };\n}\n\nexport const DeclineButtonStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n border: incomingCallStyle?.declineButtonBorder,\n borderRadius: incomingCallStyle?.declineButtonBorderRadius,\n background: incomingCallStyle?.declineButtonBackground,\n buttonTextFont: incomingCallStyle?.declineButtonTextFont,\n buttonTextColor: incomingCallStyle?.declineButtonTextColor,\n ...buttonStyle\n }\n}\n\nexport const defaultOngoingCallStyle = (theme: CometChatTheme) => {\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n}\n\nexport const IconStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n height: \"16px\",\n width: \"16px\",\n iconTint: incomingCallStyle?.subtitleTextColor || \"RGBA(20, 20, 20, 0.68)\"\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants, localize } from \"@cometchat/uikit-resources\";\n\nexport function isSentByMe(call: any, loggedInUser: CometChat.User) {\n const senderUid: string = call.getInitiator()?.getUid();\n return !senderUid || senderUid === loggedInUser?.getUid();\n}\n\nexport function isMissedCall(\n call: CometChat.Call,\n loggedInUser: CometChat.User\n) {\n const callStatus = call.getStatus();\n const sentByMe = isSentByMe(call, loggedInUser);\n\n if (sentByMe && callStatus === CometChatUIKitConstants.calls.unanswered) {\n return false;\n }\n\n const missedStatuses = [\n CometChatUIKitConstants.calls.unanswered,\n CometChatUIKitConstants.calls.cancelled,\n CometChatUIKitConstants.calls.busy,\n CometChatUIKitConstants.calls.rejected,\n ];\n\n // If the user didn't send the call and the status matches one of the missed statuses, it's a missed call\n return !sentByMe && missedStatuses.includes(callStatus);\n}\n\nexport function verifyCallUser(call: any, loggedInUser: CometChat.User) {\n if (call.getInitiator().getUid() === loggedInUser.getUid()) {\n return call.getReceiver();\n } else {\n return call.getInitiator();\n }\n}\n\nexport function getCallStatusWithType(\n call: any,\n loggedInUser: CometChat.User,\n includeType: boolean = false\n): string {\n if (!call || !loggedInUser) {\n return \"\";\n }\n\n let callMessageText = \"\";\n const callStatus = call.getStatus();\n const sentByMe = isSentByMe(call, loggedInUser);\n const missedCall = isMissedCall(call, loggedInUser);\n const callTypeKey = \"_\";\n\n if (missedCall) {\n callMessageText = `MISSED${callTypeKey}CALL`;\n } else {\n switch (callStatus) {\n case CometChatUIKitConstants.calls.initiated:\n callMessageText = sentByMe\n ? `OUTGOING${callTypeKey}CALL`\n : `INCOMING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.ongoing:\n callMessageText = sentByMe\n ? `ONGOING${callTypeKey}CALL`\n : `ONGOING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.ended:\n callMessageText = sentByMe\n ? `OUTGOING${callTypeKey}CALL`\n : `INCOMING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.unanswered:\n callMessageText = sentByMe\n ? `UNANSWERED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.cancelled:\n callMessageText = sentByMe\n ? `CANCELLED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.rejected:\n callMessageText = sentByMe\n ? `REJECTED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.busy:\n callMessageText = sentByMe\n ? `UNANSWERED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n default:\n callMessageText = `INCOMING${callTypeKey}CALL`;\n }\n }\n\n return localize(callMessageText);\n}\n\nexport function convertMinutesToHoursMinutesSeconds(minutes: number): string {\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = Math.floor(minutes % 60);\n const seconds = Math.floor((minutes - Math.floor(minutes)) * 60);\n\n let hoursString = \"\";\n let minutesString = \"\";\n let secondsString = \"\";\n\n if (hours > 0) {\n hoursString = `${hours}h`;\n }\n\n if (remainingMinutes > 0) {\n minutesString = `${remainingMinutes}m`;\n }\n\n if (seconds >= 0) {\n secondsString = `${seconds}s`;\n }\n\n return `${hoursString} ${minutesString} ${secondsString}`;\n}\n\nexport function convertSecondsToHoursMinutesSeconds(seconds: number): string {\n const hours = Math.floor(seconds / 3600);\n const remainingMinutes = Math.floor((seconds % 3600) / 60);\n const remainingSeconds = Math.floor((seconds % 3600) % 60);\n\n let hoursString = \"\";\n let minutesString = \"\";\n let secondsString = \"\";\n\n if (hours > 0) {\n hoursString = `${hours}h`;\n }\n\n if (remainingMinutes > 0) {\n minutesString = `${remainingMinutes}m`;\n }\n\n if (remainingSeconds >= 0) {\n secondsString = `${remainingSeconds}s`;\n }\n\n return `${hoursString} ${minutesString} ${secondsString}`;\n}\n\nexport function downloadRecordingFromURL(url: string) {\n fetch(url)\n .then((response) => {\n return response.blob();\n })\n .then((blob) => {\n const blobURL = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = blobURL;\n a.download = \"recording.mp4\";\n document.body.appendChild(a);\n a.click();\n })\n .catch((error: any) => console.error(error));\n}\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { CallLogsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { isMissedCall } from \"../Utils/utils\";\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.callStatusTextColor || theme.palette.getAccent600(),\n font: style?.callStatusTextFont || fontHelper(theme.typography.caption1),\n alignItems: \"center\",\n gap: \"4px\",\n };\n}\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n call: any,\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle,\n loggedInUser?: CometChat.User\n) {\n const missedCall = isMissedCall(call, loggedInUser!);\n const titleColor = missedCall\n ? theme.palette.getError()\n : theme.palette.getAccent();\n return new ListItemStyle({\n height: listItemStyle?.height || \"50px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || titleColor,\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogsStyle\n): ListStyle {\n return new ListStyle({\n height: \"100%\",\n titleTextFont:\n callLogsStyle.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle.titleColor || theme.palette.getAccent(),\n emptyStateTextColor:\n callLogsStyle.emptyStateTextColor || theme.palette.getAccent600(),\n emptyStateTextFont:\n callLogsStyle.emptyStateTextFont || fontHelper(theme.typography.caption1),\n errorStateTextColor:\n callLogsStyle.errorStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont:\n callLogsStyle.errorStateTextFont || fontHelper(theme.typography.caption1),\n loadingIconTint:\n callLogsStyle.loadingIconTint || theme.palette.getAccent600(),\n });\n}\n\nexport function getCallDateStyle(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n background: \"transparent\",\n };\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n position: \"absolute\",\n top: \"7px\",\n right: \"12px\",\n };\n}\n\nexport function getDirectionIconStyle(\n call: any,\n theme: CometChatTheme,\n style: CallLogsStyle,\n loggedInUser: CometChat.User\n) {\n let tint;\n const missedCall = isMissedCall(call, loggedInUser);\n if (missedCall) {\n tint = style?.missedCallIconTint || theme.palette.getAccent600();\n } else if (call.getInitiator().getUid() === loggedInUser.getUid()) {\n tint = style?.outgoingCallIconTint || theme.palette.getAccent600();\n } else {\n tint = style?.incomingCallIconTint || theme.palette.getAccent600();\n }\n\n return {\n height: \"18px\",\n width: \"18px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: tint,\n };\n}\n\nexport function getInfoButtonStyle(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n height: \"20px\",\n width: \"20px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.infoIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDateSeparator(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n textFont:\n style?.dateSeparatorTextFont || fontHelper(theme.typography.text2),\n textColor: style?.dateSeparatorTextColor || theme.palette.getAccent700(),\n background: \"transparent\",\n padding: \"0\",\n };\n}\n","import { AvatarStyle, CallscreenStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogsStyle, CometChatUIKitCalls, OutgoingCallConfiguration, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CallWorkflow, CometChatCallEvents, CometChatMessageEvents, CometChatUIKitConstants, DatePatterns, MessageStatus, States, TitleAlignment, fontHelper, localize } from \"@cometchat/uikit-resources\";\nimport { getAvatarStyle, getCallDateStyle, getContainerStyle, getDateSeparator, getDirectionIconStyle, getInfoButtonStyle, getListItemStyle, getListStyle, getSubtitleStyle } from \"./style\";\nimport { getCallStatusWithType, isMissedCall, isSentByMe, verifyCallUser } from \"../Utils/utils\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport {CometChat} from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatOutgoingCall } from \"../CometChatOutgoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport IncomingAudioCallIcon from \"./assets/IncomingAudio.svg\";\nimport IncomingVideoCallIcon from \"./assets/IncomingVideo.svg\";\nimport InfoIcon from \"./assets/Info.svg\"\nimport LoadingIcon from \"./assets/LoadingIcon.svg\";\nimport MissedAudioCallIcon from \"./assets/MissedAudio.svg\";\nimport MissedVideoCallIcon from \"./assets/MissedVideo.svg\";\nimport OutgoingAudioCallIcon from \"./assets/OutgoingAudio.svg\";\nimport OutgoingVideoCallIcon from \"./assets/OutgoingVideo.svg\";\n\ninterface ICallLogsProps {\n title?: string;\n titleAlignment?: TitleAlignment;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n emptyStateView?: any;\n errorStateView?: any;\n loadingStateView?: any;\n emptyStateText?: string;\n errorStateText?: string;\n loadingIconURL?: string;\n incomingAudioCallIconUrl?: string;\n incomingVideoCallIconUrl?: string;\n outgoingAudioCallIconUrl?: string;\n outgoingVideoCallIconUrl?: string;\n missedAudioCallIconUrl?: string;\n missedVideoCallIconUrl?: string;\n infoIconUrl?: string;\n activeCall?: any;\n callLogRequestBuilder?: any;\n onItemClick?: Function;\n onInfoClick?: Function;\n onError?: Function;\n hideSeparator?: boolean;\n datePattern?: DatePatterns;\n dateSeparatorPattern?: DatePatterns;\n callLogsStyle?: CallLogsStyle;\n avatarStyle?: AvatarStyle;\n listItemStyle?: ListItemStyle;\n outgoingCallConfiguration?: OutgoingCallConfiguration;\n}\n\nconst defaultProps: ICallLogsProps = {\n title: localize(\"CALLS\"),\n titleAlignment: TitleAlignment.left,\n listItemView: null,\n subtitleView: null,\n tailView: null,\n emptyStateView: null,\n errorStateView: null,\n loadingStateView: null,\n emptyStateText: localize(\"NO_CALLS_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n loadingIconURL: LoadingIcon,\n incomingAudioCallIconUrl: IncomingAudioCallIcon,\n incomingVideoCallIconUrl: IncomingVideoCallIcon,\n outgoingAudioCallIconUrl: OutgoingAudioCallIcon,\n outgoingVideoCallIconUrl: OutgoingVideoCallIcon,\n missedAudioCallIconUrl: MissedAudioCallIcon,\n missedVideoCallIconUrl: MissedVideoCallIcon,\n infoIconUrl: InfoIcon,\n callLogRequestBuilder: undefined,\n onItemClick: undefined,\n onInfoClick: undefined,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n hideSeparator: true,\n activeCall: undefined,\n datePattern: DatePatterns.time,\n dateSeparatorPattern: DatePatterns.DayDate,\n callLogsStyle: {} as CallLogsStyle,\n avatarStyle: {} as AvatarStyle,\n listItemStyle: {} as ListItemStyle,\n outgoingCallConfiguration: {} as OutgoingCallConfiguration,\n};\n\nconst CometChatCallLogs = (props: ICallLogsProps) => {\n const {\n title,\n titleAlignment,\n listItemView,\n subtitleView,\n tailView,\n errorStateView,\n emptyStateView,\n loadingStateView,\n emptyStateText,\n errorStateText,\n loadingIconURL,\n incomingAudioCallIconUrl,\n incomingVideoCallIconUrl,\n outgoingAudioCallIconUrl,\n outgoingVideoCallIconUrl,\n missedAudioCallIconUrl,\n missedVideoCallIconUrl,\n infoIconUrl,\n activeCall,\n callLogRequestBuilder,\n onItemClick,\n onInfoClick,\n onError,\n hideSeparator,\n datePattern,\n dateSeparatorPattern,\n callLogsStyle,\n avatarStyle,\n listItemStyle,\n outgoingCallConfiguration\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [callList, setCallList] = useState([]);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [callListState, setCallListState] = useState(States.loading);\n const [showOutgoingCallScreen, setShowOutgoingCallScreen] = useState(false);\n const [callInitiated, setCallInitiated] = useState(undefined);\n const [call, setCall] = useState(undefined);\n const [sessionId, setSessionId] = useState(null);\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const listenerId = \"callLogsScreen_\" + new Date().getTime();\n const requestBuilder = useRef(null);\n const initiatedCallRef = useRef(undefined);\n initiatedCallRef.current = callInitiated;\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const setCallLogRequestBuilder = useCallback((): any => {\n try {\n if (callLogRequestBuilder) {\n return callLogRequestBuilder.build();\n } else {\n const authToken = loggedInUser!.getAuthToken();\n return new CometChatUIKitCalls.CallLogRequestBuilder()\n .setLimit(30)\n .setCallCategory(\"call\")\n .setAuthToken(authToken)\n .build();\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [callLogRequestBuilder, loggedInUser, onErrorCallback]);\n\n const fetchNextCallList = useCallback(async (): Promise => {\n try {\n const calls = await requestBuilder?.current?.fetchNext();\n return calls;\n } catch (e) {\n onErrorCallback(e);\n throw e;\n }\n }, [requestBuilder, onErrorCallback]);\n\n const getCallList = useCallback(async () => {\n try {\n const calls = await fetchNextCallList();\n if (calls && calls.length) {\n setCallList((prevCallList) => {\n return [...prevCallList, ...calls]\n })\n setCallListState(States.loaded);\n } else {\n if (callList.length === 0) {\n setCallListState(States.empty);\n }\n }\n } catch (e) {\n if (callList.length === 0) {\n setCallListState(States.error);\n }\n onErrorCallback(e);\n }\n }, [fetchNextCallList, callList, setCallList, setCallListState, onErrorCallback])\n\n const cancelOutgoingCall = useCallback(() => {\n CometChat.rejectCall(call?.getSessionId()!, CometChatUIKitConstants.calls.cancelled).then(\n () => {\n setCall(undefined);\n setShowOutgoingCallScreen(false);\n CometChatMessageEvents.ccMessageSent.next({\n message: call!,\n status: MessageStatus.success,\n });\n })\n .catch((error: CometChat.CometChatException) => {\n setShowOutgoingCallScreen(false);\n onErrorCallback(error);\n });\n }, [call, setCall, setShowOutgoingCallScreen, onErrorCallback])\n const initiateCall = useCallback((type: string, uid: string) => {\n\n const receiverType: string = CometChatUIKitConstants.MessageReceiverType.user;\n const receiverId: string = uid;\n let callType: string = \"\";\n if (type === CometChat.CALL_TYPE.AUDIO) {\n callType = CometChat.CALL_TYPE.AUDIO;\n } else {\n callType = CometChat.CALL_TYPE.VIDEO;\n }\n const callTmp: CometChat.Call = new CometChat.Call(receiverId, callType, receiverType);\n CometChat.initiateCall(callTmp).then(\n (outgoingCall: CometChat.Call) => {\n setCallInitiated(outgoingCall)\n setCall(outgoingCall);\n setShowOutgoingCallScreen(true);\n CometChatMessageEvents.ccMessageSent.next({\n message: outgoingCall,\n status: MessageStatus.inprogress,\n });\n })\n .catch((error: CometChat.CometChatException) => {\n\n onErrorCallback(error);\n });\n }, [setCall, setShowOutgoingCallScreen, onErrorCallback, setCallInitiated])\n\n const handleItemClick = useCallback((call: any) => {\n try {\n if (onItemClick) {\n onItemClick(call);\n } else {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity.uid) {\n initiateCall(call?.type, entity.uid);\n }\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onItemClick, loggedInUser, initiateCall, onErrorCallback])\n\n const handleInfoClick = useCallback((call: any) => {\n try {\n if (onInfoClick) onInfoClick(call);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onInfoClick, onErrorCallback])\n\n const getActiveCall = useCallback((call: any) => {\n try {\n if (activeCall) {\n if (activeCall.getSessionID() === call.getSessionID()) {\n return true;\n }\n }\n return false;\n } catch (e) {\n onErrorCallback(e);\n return false;\n }\n }, [activeCall, onErrorCallback])\n\n const getCallDirectionIcon = useCallback((call: any) => {\n try {\n const missedCall = isMissedCall(call, loggedInUser!);\n let callType = call.getType();\n if (call.getType() === CometChat.CALL_TYPE.AUDIO) {\n callType = CometChat.CALL_TYPE.AUDIO;\n } else {\n callType = CometChat.CALL_TYPE.VIDEO;\n }\n let icon;\n\n if (missedCall) {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? missedAudioCallIconUrl : missedVideoCallIconUrl;\n } else if (isSentByMe(call, loggedInUser!)) {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? outgoingAudioCallIconUrl : outgoingVideoCallIconUrl;\n } else {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? incomingAudioCallIconUrl : incomingVideoCallIconUrl;\n }\n\n return icon;\n } catch (e) {\n onErrorCallback(e);\n }\n }, [loggedInUser, missedAudioCallIconUrl, missedVideoCallIconUrl, outgoingAudioCallIconUrl, outgoingVideoCallIconUrl, incomingAudioCallIconUrl, incomingVideoCallIconUrl, onErrorCallback])\n\n const isDateDifferent = useCallback((firstDate: number, secondDate: number) => {\n try {\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate * 1000);\n secondDateObj = new Date(secondDate * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback])\n\n const getMessageBubbleDate = useCallback((item: any, i: number) => {\n try {\n if (i === 0) {\n return (\n
    \n \n
    \n );\n } else {\n if (\n isDateDifferent(callList[i - 1]?.getInitiatedAt(), item.getInitiatedAt())\n ) {\n return (\n
    \n \n
    \n );\n } else {\n return null;\n }\n }\n } catch (e) {\n onErrorCallback(e);\n return null;\n }\n }, [dateSeparatorPattern, callLogsStyle, isDateDifferent, callList, theme, onErrorCallback])\n\n const getOutGoingCallStyle = useCallback(() => {\n return new OutgoingCallStyle({\n background: outgoingCallConfiguration?.outgoingCallStyle?.background || theme.palette.getBackground(),\n border: outgoingCallConfiguration?.outgoingCallStyle?.border || \"none\",\n borderRadius: outgoingCallConfiguration?.outgoingCallStyle?.borderRadius || \"8px\",\n declineButtonIconBackground: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonIconBackground || theme.palette.getError(),\n declineButtonIconTint: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonIconTint || theme.palette.getBackground(),\n declineButtonTextColor: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonTextColor || theme.palette.getAccent600(),\n declineButtonTextFont: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonTextFont || fontHelper(theme.typography.caption2),\n height: outgoingCallConfiguration?.outgoingCallStyle?.height || \"580px\",\n width: outgoingCallConfiguration?.outgoingCallStyle?.width || \"320px\",\n subtitleTextColor: outgoingCallConfiguration?.outgoingCallStyle?.subtitleTextColor || theme.palette.getAccent600(),\n subtitleTextFont: outgoingCallConfiguration?.outgoingCallStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle1),\n titleTextColor: outgoingCallConfiguration?.outgoingCallStyle?.titleTextColor || theme.palette.getAccent(),\n titleTextFont: outgoingCallConfiguration?.outgoingCallStyle?.titleTextFont || fontHelper(theme.typography.heading),\n });\n }, [outgoingCallConfiguration, theme])\n\n const getOngoingCallStyle = useCallback(()=>{\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n },[theme])\n\n const openOngoingCallScreen = useCallback((callObj: any) => {\n setShowOutgoingCallScreen(false);\n setCall(callObj);\n setSessionId(callObj?.getSessionId());\n setShowOngoingCall(true);\n }, [setShowOutgoingCallScreen, setCall, setSessionId, setShowOngoingCall])\n\n\n\n const attachListeners = useCallback(() => {\n try {\n CometChat.addCallListener(\n listenerId,\n new CometChat.CallListener({\n onOutgoingCallRejected: (callObj: CometChat.Call) => {\n if (initiatedCallRef.current && callObj.getSessionId() == initiatedCallRef.current.getSessionId()) {\n setCall(undefined);\n setShowOutgoingCallScreen(false);\n setShowOngoingCall(false);\n setCallInitiated(undefined)\n }\n },\n onOutgoingCallAccepted: (callObj: CometChat.Call) => {\n if (initiatedCallRef.current && callObj.getSessionId() == initiatedCallRef.current.getSessionId()) {\n setCall(undefined);\n openOngoingCallScreen(callObj);\n setShowOutgoingCallScreen(false);\n setCallInitiated(undefined);\n }\n },\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [listenerId, openOngoingCallScreen, onErrorCallback]);\n const closeCallScreen = useCallback(() => {\n setShowOngoingCall(false);\n setSessionId(null);\n setCall(undefined);\n }, [setShowOngoingCall, setSessionId, setCall])\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n () => {\n closeCallScreen();\n }\n );\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [closeCallScreen, onErrorCallback])\n\n const detachListeners = useCallback(() => {\n try {\n CometChat.removeCallListener(listenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [listenerId, onErrorCallback])\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView !== null) {\n return (\n <>\n {subtitleView(item)}\n \n );\n }\n return (\n <>\n
    \n \n {getCallStatusWithType(item, loggedInUser!)}\n
    \n \n );\n }, [subtitleView, callLogsStyle, loggedInUser, theme, getCallDirectionIcon])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if (tailView !== null) {\n return (\n <>\n {tailView(item)}\n \n );\n }\n return (\n <>\n
    \n \n { onInfoClick ?\n handleInfoClick(item)}\n /> :\n null\n }\n\n
    \n \n );\n }, [tailView, theme, callLogsStyle, datePattern, onInfoClick, infoIconUrl, handleInfoClick])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if (listItemView) {\n return listItemView(item);\n } else {\n return (\n <>\n {getMessageBubbleDate(item, index) ? getMessageBubbleDate(item, index) : null}\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n };\n }, [listItemView, getMessageBubbleDate, loggedInUser, theme, listItemStyle, avatarStyle, hideSeparator, loadingIconURL, getActiveCall, getListItemSubtitleView, getListItemTailView, handleItemClick]);\n\n\n Hooks(loggedInUser, setLoggedInUser, requestBuilder, setCallLogRequestBuilder, getCallList, attachListeners, subscribeToEvents, detachListeners, onErrorCallback);\n\n return (\n
    \n {\n showOutgoingCallScreen ?\n \n \n :\n null\n }\n\n {\n showOngoingCall && !activeCall ?\n :\n null\n }\n\n \n
    \n );\n}\n\nCometChatCallLogs.defaultProps = defaultProps;\nexport { CometChatCallLogs };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAA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fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34856%209.89458C4.64141%2010.1873%205.03856%2010.3518%205.45265%2010.3518C5.86675%2010.3518%206.2639%2010.1873%206.55675%209.89458L7.38496%209.06639C7.45752%208.99388%207.51508%208.90778%207.55435%208.81301C7.59362%208.71825%207.61383%208.61667%207.61383%208.51409C7.61383%208.41151%207.59362%208.30993%207.55435%208.21517C7.51508%208.1204%207.45752%208.0343%207.38496%207.96179L5.77488%206.35123C5.69603%206.27169%205.601%206.21005%205.49623%206.17048C5.39146%206.13091%205.27941%206.11434%205.16767%206.1219C5.05593%206.12945%204.94713%206.16095%204.84864%206.21426C4.75015%206.26757%204.66428%206.34145%204.59686%206.43087C2.90974%208.72127%203.93211%2011.1335%206.00548%2013.2073C8.07886%2015.2812%2010.4927%2016.3025%2012.7847%2014.6154C12.8739%2014.5477%2012.9475%2014.4617%2013.0005%2014.3631C13.0536%2014.2645%2013.0848%2014.1556%2013.092%2014.0439C13.0993%2013.9322%2013.0824%2013.8202%2013.0426%2013.7155C13.0028%2013.6109%2012.9409%2013.516%2012.8612%2013.4374L11.2506%2011.8268C11.1781%2011.7543%2011.092%2011.6967%2010.9972%2011.6574C10.9025%2011.6182%2010.8009%2011.598%2010.6983%2011.598C10.5957%2011.598%2010.4941%2011.6182%2010.3994%2011.6574C10.3046%2011.6967%2010.2185%2011.7543%2010.146%2011.8268L9.31778%2012.655C9.17274%2012.8%209.05768%2012.9722%208.97918%2013.1617C8.90068%2013.3512%208.86028%2013.5543%208.86028%2013.7594C8.86028%2013.9645%208.90068%2014.1676%208.97918%2014.357C9.05768%2014.5465%209.17274%2014.7187%209.31778%2014.8637L9.89039%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3872%208.82531L15.4626%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.5105%208.82517H10.3872V5.7019%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.41384%2012.5186H5.1875V9.29224%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3776%207.31396L5.28149%2012.41%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4623%203.75L10.387%208.82531%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.3391%203.75H15.4624V6.87327%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M7.15111%207.31395H10.3774V10.5403%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M5.18738%2012.5186L10.2834%207.42248%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4622%204.53082L12.3389%207.65409L8.43481%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.43481%206.09245V3.75H10.7773%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.1573%2011.9539C13.907%2011.8167%2013.7515%2011.5541%2013.7515%2011.2687V8.73221C13.7515%208.44682%2013.907%208.18413%2014.1573%208.04701L16.9757%206.50318C17.4963%206.21798%2018.1322%206.59473%2018.1322%207.18836V12.8125C18.1322%2013.4061%2017.4963%2013.7829%2016.9757%2013.4977L14.1573%2011.9539Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M11.3834%209.1351L8.17601%2012.3425L4.16675%208.33325%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.16675%2010.7388V8.33325H6.5723%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.22925%2015.883C2.3663%2015.883%201.66675%2015.1834%201.66675%2014.3205V5.729C1.66675%204.86606%202.3663%204.1665%203.22925%204.1665H11.9874C12.8503%204.1665%2013.5499%204.86606%2013.5499%205.729V14.3205C13.5499%2015.1834%2012.8503%2015.883%2011.9874%2015.883H3.22925Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n requestBuilder: any,\n setCallBuilder: Function,\n getCallList: Function,\n attachListeners: Function,\n subscribeToEvents: Function,\n detachListeners: Function,\n onErrorCallback: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents?.();\n requestBuilder.current = setCallBuilder();\n getCallList?.();\n attachListeners?.();\n subscribeToEvents?.();\n }\n return () => {\n detachListeners?.()\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser]);\n}\n\nexport { Hooks };","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CallLogDetailsStyle } from \"@cometchat/uikit-shared\";\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\n\nexport function getProfileContainerStyle(): React.CSSProperties {\n return {\n height: \"auto\",\n width: \"100%\",\n minHeight: \"150px\",\n padding: \"16px\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n boxSizing: \"border-box\",\n gap: \"8px\",\n }\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n position: \"absolute\",\n top: \"15px\",\n left: \"15px\",\n display: \"flex\",\n gap: \"8px\",\n justifyContent: \"center\",\n };\n}\n\nexport function getBackButtonStyle(theme: CometChatTheme, style: CallLogDetailsStyle) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getContainerStyle(theme: CometChatTheme, style: CallLogDetailsStyle): React.CSSProperties {\n return {\n height: style?.height || \"100%\",\n width: style?.width || \"100%\",\n background: style?.background || theme.palette.getBackground(),\n borderRadius: style?.borderRadius || \"0\",\n border: style?.border || \"none\",\n position: \"relative\",\n };\n}\n\nexport function getTitleStyle(theme: CometChatTheme, style: CallLogDetailsStyle) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n\nexport function getListItemStyle(theme: CometChatTheme, style: any){\n const { backgroundColor, titleColor, titleFont } = style;\n return new ListItemStyle({\n background: backgroundColor || \"transparent\",\n activeBackground: backgroundColor || \"transparent\",\n border: \"none\",\n hoverBackground: backgroundColor || \"transparent\",\n titleColor: titleColor || theme.palette.getAccent(),\n borderRadius: \"0\",\n titleFont: titleFont || fontHelper(theme.typography.text1),\n separatorColor: theme.palette.getAccent200()\n })\n}","import { CometChatCallDetailsOption, CometChatCallDetailsTemplate, CometChatTheme, DatePatterns, fontHelper, localize } from \"@cometchat/uikit-resources\";\nimport { DateStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { convertMinutesToHoursMinutesSeconds, getCallStatusWithType } from \"./utils\";\n\nimport { CallButtonsStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatCallButtons } from \"../CometChatCallButtons\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport RightArrowIcon from \"../assets/side-arrow.svg\";\n\nexport class CallingDetailsUtils {\n\n public static getDefaultCallTemplate(callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme): Array {\n return [\n this.getPrimaryDetailsTemplate(callLog, loggedInUser, theme),\n this.getSecondaryDetailsTemplate(callLog, loggedInUser, theme),\n ]\n }\n\n private static getCallButtons(user?: CometChat.User, group?: CometChat.Group) {\n let style: CallButtonsStyle = {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonPadding: \"8px 32px\",\n buttonBackground: \"RGBA(20, 20, 20, 0.04)\",\n buttonBorder: \"0 4px\",\n buttonBorderRadius: \"10px\"\n }\n return (\n \n )\n }\n\n public static getPrimaryDetailsTemplate(callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme): CometChatCallDetailsTemplate {\n let template: CometChatCallDetailsTemplate = new CometChatCallDetailsTemplate({\n id: \"callControls\",\n hideSectionSeparator: true,\n options: (user: CometChat.User | null, group: CometChat.Group | null) => {\n return this.getPrimaryOptions(user ?? undefined, group ?? undefined, callLog ?? undefined, loggedInUser ?? undefined, theme ?? undefined);\n }\n });\n return template;\n }\n\n public static getSecondaryDetailsTemplate(\n callLog: any,\n loggedInUser: CometChat.User,\n theme: CometChatTheme\n ): CometChatCallDetailsTemplate {\n const template: CometChatCallDetailsTemplate =\n new CometChatCallDetailsTemplate({\n id: \"callOptions\",\n hideSectionSeparator: true,\n options: () => {\n return this.getSecondaryOptions(\n callLog ?? undefined,\n theme ?? undefined\n );\n },\n });\n return template;\n }\n\n private static getPrimaryOptions(user?: CometChat.User, group?: CometChat.Group, callLog?: any, loggedInUser?: CometChat.User, theme?: CometChatTheme): CometChatCallDetailsOption[] {\n let options: CometChatCallDetailsOption[] = [];\n if (user) {\n options.push(\n new CometChatCallDetailsOption({\n id: 'callControls',\n customView: this.getCallButtons(user, group),\n })\n )\n }\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"callStatus\",\n customView: this.generateCallDetailsHTML(callLog, callLog?.getInitiatedAt(), loggedInUser, theme!)\n })\n );\n\n return options;\n }\n\n private static getSecondaryOptions(\n callLog?: any,\n theme?: CometChatTheme\n ): CometChatCallDetailsOption[] {\n const options: CometChatCallDetailsOption[] = [];\n\n const localizedParticipants = \"Participants\";\n const localizedRecording = \"Recordings\";\n const localizedHistory = \"History\";\n\n if (callLog?.participants && callLog?.participants.length > 0) {\n const count = (callLog?.participants || [])?.length;\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"participants\",\n customView: this.generateCallOptionsHTML(localizedParticipants, count, theme!),\n })\n );\n }\n\n\n if (callLog?.hasRecording) {\n const count = (callLog?.getRecordings() || [])?.length;\n options.push(\n new CometChatCallDetailsOption({\n id: \"recordings\",\n customView: this.generateCallOptionsHTML(localizedRecording, count, theme!),\n })\n );\n }\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"callHistory\",\n customView: this.generateCallOptionsHTML(localizedHistory, 0, theme!),\n })\n );\n\n return options;\n }\n\n private static generateCallDetailsHTML(callLog: any, initiatedAt: number, loggedInUser: any, theme: CometChatTheme): JSX.Element {\n const listItemStyle = new ListItemStyle({\n height: \"auto\",\n width: \"100%\",\n background: theme?.palette?.getAccent100(),\n hoverBackground: theme?.palette?.getAccent100(),\n borderRadius: \"8px\",\n border: \"none\",\n padding: \"10px\",\n });\n\n const headingDateStyle = new DateStyle({\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.text3),\n padding: \"0px\",\n background: \"transparent\",\n });\n\n const dateStyle = new DateStyle({\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.subtitle2),\n padding: \"0px\",\n background: \"transparent\",\n });\n\n const status = getCallStatusWithType(callLog, loggedInUser, true);\n\n const subtitleView =
    \n \n
    \n \n\n
    \n {status}\n
    \n
    \n
    ;\n\n const tailView =
    {convertMinutesToHoursMinutesSeconds(callLog?.getTotalDurationInMinutes())}
    ;\n\n return (\n
    \n \n
    \n );\n }\n\n private static generateCallOptionsHTML(\n title: string,\n count: number,\n theme: CometChatTheme\n ): JSX.Element {\n const buttonStyle = {\n iconHeight: \"18px\",\n iconWidth: \"18px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getAccent600(),\n };\n\n const containerStyle = {\n margin: \"10px\",\n marginBottom: \"5px\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n background: theme?.palette?.getAccent100(),\n borderRadius: \"8px\", display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n cursor: \"pointer\",\n width: '100%'\n } as React.CSSProperties;\n\n const titleStyle = {\n font: fontHelper(theme?.typography?.text2),\n color: theme?.palette?.getAccent()\n };\n\n const buttonContainerStyle = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n font: fontHelper(theme?.typography?.text3),\n color: theme?.palette?.getAccent600()\n };\n\n return (\n
    \n {title}\n \n {count > 0 ? count : \"\"}\n \n \n
    \n )\n }\n}","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%28-1%200%200%20-1%2024%2024%29%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%280%201%20-1%200%2024%20-0%29%22%3E%3Ctitle%3EIcons%2F24%2FClose%20Chat%3C%2Ftitle%3E%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20id%3D%22Icons%2F24%2FClose-Chat%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.700000%2C%208.000000%29%22%3E%3Cpath%20d%3D%22M20.625%2C0%20L10.7983333%2C9.82575%20C10.669546%2C9.9547209%2010.4947627%2C10.0271915%2010.3125%2C10.0271915%20C10.1302373%2C10.0271915%209.95545401%2C9.9547209%209.82666667%2C9.82575%20L0%2C0%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n DateStyle,\n ListItemStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CallLogHistoryStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n): DateStyle {\n return {\n background: \"transparent\",\n textColor: style?.dateTextColor || theme.palette.getAccent600(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.subtitle2),\n };\n}\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getCallStatusStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.callStatusTextFont || fontHelper(theme.typography.text2),\n color: style?.callStatusTextColor || theme.palette.getAccent(),\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogHistoryStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogHistoryStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n emptyStateTextColor:\n callLogsStyle?.emptyStateTextColor || theme.palette.getAccent600(),\n emptyStateTextFont:\n callLogsStyle?.emptyStateTextFont || fontHelper(theme.typography.caption1),\n errorStateTextColor:\n callLogsStyle?.errorStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont:\n callLogsStyle?.errorStateTextFont || fontHelper(theme.typography.caption1),\n loadingIconTint:\n callLogsStyle?.loadingIconTint || theme.palette.getAccent600(),\n });\n}\n\nexport function getCallDurationStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.callDurationTextColor || fontHelper(theme.typography.caption1),\n color: style?.callDurationTextColor || theme.palette.getAccent500(),\n };\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDateSeparator(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n textFont:\n style?.dateSeparatorTextFont || fontHelper(theme.typography.text3),\n textColor: style?.dateSeparatorTextColor || theme.palette.getAccent700(),\n background: \"transparent\",\n };\n}\n\nexport function getDividerStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n height: \"1px\",\n width: \"100%\",\n background: style?.dividerColor || theme.palette.getAccent200(),\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { CallLogHistoryStyle, CometChatUIKitCalls } from \"@cometchat/uikit-shared\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport { convertMinutesToHoursMinutesSeconds, getCallStatusWithType } from \"../Utils/utils\";\nimport { getBackButtonStyle, getButtonContainerStyle, getCallDurationStyle, getCallStatusStyle, getContainerStyle, getDateSeparator, getDividerStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport {CometChat} from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport LoadingIcon from \"./assets/LoadingIcon.svg\";\nimport backIcon from \"./assets/backbutton.svg\";\n\ninterface ICallLogHistoryProps {\n title?: string;\n emptyStateText?: string;\n errorStateText?: string;\n backIconUrl?: string;\n loadingIconURL?: string;\n emptyStateView?: any;\n loadingStateView?: any;\n errorStateView?: any;\n subtitleView?: any;\n tailView?: any;\n callLogRequestBuilder?: any;\n callUser?: any;\n callGroup?: any;\n onItemClick?: Function;\n onBackClick?: Function;\n onError?: Function;\n datePattern?: DatePatterns;\n dateSeparatorPattern?: DatePatterns;\n listItemStyle?: ListItemStyle;\n callLogHistoryStyle?: CallLogHistoryStyle;\n}\n\nconst defaultProps: ICallLogHistoryProps = {\n title: localize(\"CALL_HISTORY\"),\n emptyStateText: localize(\"NO_CALLS_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n backIconUrl: backIcon,\n loadingIconURL: LoadingIcon,\n emptyStateView: null,\n loadingStateView: null,\n errorStateView: null,\n subtitleView: null,\n tailView: null,\n callLogRequestBuilder: undefined,\n callUser: undefined,\n callGroup: undefined,\n onItemClick: undefined,\n onBackClick: undefined,\n onError: () => { },\n datePattern: DatePatterns.time,\n dateSeparatorPattern: DatePatterns.DayDate,\n listItemStyle: {} as ListItemStyle,\n callLogHistoryStyle: {} as CallLogHistoryStyle,\n}\n\nconst CometChatCallLogHistory = (props: ICallLogHistoryProps) => {\n const {\n title,\n emptyStateText,\n errorStateText,\n backIconUrl,\n loadingIconURL,\n emptyStateView,\n errorStateView,\n loadingStateView,\n subtitleView,\n tailView,\n callLogRequestBuilder,\n callUser,\n callGroup,\n onItemClick,\n onBackClick,\n onError,\n datePattern,\n dateSeparatorPattern,\n listItemStyle,\n callLogHistoryStyle\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [callList, setCallList] = useState([]);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [callListState, setCallListState] = useState(States.loading);\n const requestBuilder = useRef(null);\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const setCallLogRequestBuilder = useCallback((): any => {\n try {\n let builder;\n if (callLogRequestBuilder) {\n builder = callLogRequestBuilder;\n } else {\n const authToken = loggedInUser!.getAuthToken() || \"\";\n builder = new CometChatUIKitCalls.CallLogRequestBuilder()\n .setLimit(30)\n .setCallCategory(\"call\")\n .setAuthToken(authToken);\n }\n\n if(callGroup) {\n builder = builder.setGuid(callGroup?.getGuid());\n } else if(callUser) {\n builder = builder.setUid(callUser?.getUid());\n }\n\n return builder.build();\n } catch (e) {\n onErrorCallback(e);\n }\n }, [callLogRequestBuilder, callGroup, callUser, loggedInUser, onErrorCallback]);\n\n const fetchNextCallList = useCallback(async (): Promise => {\n try {\n const calls = await requestBuilder?.current?.fetchNext();\n return calls;\n } catch (e) {\n onErrorCallback(e);\n throw new Error(\"Error while fetching call list\");\n }\n }, [requestBuilder, onErrorCallback]);\n\n const getCallList = useCallback(async () => {\n try {\n const calls = await fetchNextCallList();\n if (calls && calls.length > 0) {\n setCallList((prevCallList) => {\n return [...prevCallList, ...calls]\n })\n setCallListState(States.loaded);\n } else if (callList.length === 0) {\n setCallListState(States.empty);\n }\n } catch (e) {\n if (callList.length === 0) {\n setCallListState(States.error);\n }\n onErrorCallback(e);\n }\n }, [fetchNextCallList, setCallList, setCallListState, callList, onErrorCallback])\n\n const handleItemClick = useCallback((call: any) => {\n try {\n if (onItemClick) onItemClick(call);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onItemClick, onErrorCallback])\n\n const isDateDifferent = useCallback((firstDate: number, secondDate: number) => {\n try{\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate * 1000);\n secondDateObj = new Date(secondDate * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (e) {\n onErrorCallback(e);\n return false\n }\n }, [onErrorCallback])\n\n const getMessageBubbleDate = useCallback((item: any, i: number) => {\n try {\n if (i === 0) {\n return (\n
    \n \n
    \n );\n } else {\n if (\n isDateDifferent(callList[i - 1]?.getInitiatedAt(), item.getInitiatedAt())\n ) {\n return (\n <>\n \n
    \n \n
    \n \n );\n } else {\n return null;\n }\n }\n } catch (e) {\n onErrorCallback(e);\n return null;\n }\n }, [dateSeparatorPattern, theme, callLogHistoryStyle, isDateDifferent, callList, onErrorCallback])\n\n const getCallDuration = useCallback((item: any) => {\n try{\n if (item?.getTotalDurationInMinutes()) {\n return convertMinutesToHoursMinutesSeconds(item?.getTotalDurationInMinutes());\n } else {\n return false;\n }\n }catch(e){\n onErrorCallback(e);\n return false;\n }\n }, [onErrorCallback]);\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView) {\n return subtitleView(item);\n } else {\n return (\n <>\n
    \n \n
    {getCallStatusWithType(item, loggedInUser!, true)}
    \n
    \n \n );\n }\n }, [subtitleView, theme, callLogHistoryStyle, datePattern, loggedInUser])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if(tailView){\n return tailView(item);\n }else{\n return (\n <>\n
    \n { getCallDuration(item) ? getCallDuration(item) : '00:00' }\n
    \n \n );\n }\n }, [tailView, theme, callLogHistoryStyle, getCallDuration])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n return (\n <>\n {getMessageBubbleDate(item, index) ?
    {getMessageBubbleDate(item, index)}
    : null}\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n hideSeparator={true}\n />\n \n )\n };\n }, [getMessageBubbleDate, loadingIconURL, theme, listItemStyle, getListItemSubtitleView, getListItemTailView, handleItemClick]);\n\n Hooks(loggedInUser, setLoggedInUser, requestBuilder, setCallLogRequestBuilder, getCallList, onErrorCallback);\n\n return(\n <>\n
    \n
    \n {\n onBackClick ?\n
    \n \n
    :\n null\n }\n
    \n { title }\n
    \n
    \n\n \n
    \n \n )\n}\n\nCometChatCallLogHistory.defaultProps = defaultProps;\nexport { CometChatCallLogHistory };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n requestBuilder: any,\n setRequestBuilder: Function,\n getCallList: Function,\n onErrorCallback: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n \n useEffect(()=>{\n if(loggedInUser){\n requestBuilder.current = setRequestBuilder();\n getCallList?.();\n }\n }, [loggedInUser]);\n}\n\nexport { Hooks };","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogParticipantsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogParticipantsStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n titleTextFont:\n callLogsStyle?.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle?.titleColor || theme.palette.getAccent(),\n });\n}\n\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.callStatusColor || theme.palette.getAccent600(),\n font: style?.callStatusFont || fontHelper(theme.typography.caption1),\n };\n}\n\nexport function getCallDateStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n font: style?.dateTextFont || fontHelper(theme.typography.caption1),\n color: style?.dateTextColor || theme.palette.getAccent500(),\n background: \"transparent\",\n padding: \"3px 10px\",\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogParticipantsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { CallLogParticipantsStyle } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { useCallback, useContext, useMemo } from \"react\";\nimport { convertMinutesToHoursMinutesSeconds } from \"../Utils/utils\";\nimport { getAvatarStyle, getBackButtonStyle, getButtonContainerStyle, getCallDateStyle, getContainerStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\n\ninterface ICallLogParticipantsProps {\n title?: string;\n backIconUrl?: string;\n call: any;\n datePattern?: DatePatterns;\n avatarStyle?: AvatarStyle;\n listItemStyle?: ListItemStyle;\n callLogParticipantsStyle?: CallLogParticipantsStyle;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n onBackClick?: Function;\n onItemClick?: Function;\n}\n\nconst defaultProps: ICallLogParticipantsProps = {\n title: localize(\"PARTICIPANTS\"),\n backIconUrl: backIcon,\n call: undefined,\n datePattern: DatePatterns.time,\n avatarStyle: {} as AvatarStyle,\n listItemStyle: {} as ListItemStyle,\n callLogParticipantsStyle: {} as CallLogParticipantsStyle,\n listItemView: null,\n subtitleView: null,\n tailView: null,\n onBackClick: undefined,\n onItemClick: undefined\n\n}\n\nconst CometChatCallLogParticipants = (props: ICallLogParticipantsProps) => {\n const {\n title,\n backIconUrl,\n call,\n datePattern,\n avatarStyle,\n listItemStyle,\n callLogParticipantsStyle,\n listItemView,\n subtitleView,\n tailView,\n onBackClick,\n onItemClick\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const handleItemClick = useCallback((item: any) => {\n if (onItemClick) {\n onItemClick(item);\n }\n }, [onItemClick])\n\n const getCallParticipants = useCallback(() => {\n return call?.getParticipants();\n }, [call])\n\n const getCallInitiatedAt = useCallback(() => {\n return call?.getInitiatedAt();\n }, [call])\n\n const getDurationOfCall = (item: any) => {\n if (item?.getHasJoined() || item?.getJoinedAt()) {\n return convertMinutesToHoursMinutesSeconds(item?.getTotalDurationInMinutes());\n } else {\n return convertMinutesToHoursMinutesSeconds(0);\n }\n }\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if(subtitleView){\n return subtitleView(item);\n }else{\n return (\n <>\n
    \n { getDurationOfCall(item) }\n
    \n \n );\n }\n }, [subtitleView, theme, callLogParticipantsStyle])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if(tailView){\n return tailView(item);\n }else{\n return (\n <>\n {\n
    \n \n
    \n }\n \n );\n }\n }, [tailView, theme, callLogParticipantsStyle, datePattern, getCallInitiatedAt])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if(listItemView){\n return listItemView(item);\n }else{\n return (\n <>\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n }\n }, [listItemView, theme, listItemStyle, avatarStyle, getListItemSubtitleView, getListItemTailView, handleItemClick])\n\n return (\n <>\n
    \n
    \n { onBackClick ?\n
    \n \n
    :\n null \n }\n
    \n {title}\n
    \n
    \n \n
    \n \n )\n\n}\n\nCometChatCallLogParticipants.defaultProps = defaultProps;\nexport { CometChatCallLogParticipants };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogRecordingsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogRecordingsStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n titleTextFont:\n callLogsStyle?.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle?.titleColor || theme.palette.getAccent(),\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.recordingDurationColor || theme.palette.getAccent600(),\n font: style?.recordingDurationFont || fontHelper(theme.typography.caption1),\n };\n}\n\nexport function getCallDateStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n background: \"transparent\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDownloadButtonStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.downloadIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogRecordingsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { useCallback, useContext, useMemo } from \"react\";\nimport { convertSecondsToHoursMinutesSeconds, downloadRecordingFromURL } from \"../Utils/utils\";\nimport { CallLogRecordingsStyle } from \"@cometchat/uikit-shared\";\nimport { getBackButtonStyle, getButtonContainerStyle, getCallDateStyle, getContainerStyle, getDownloadButtonStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport downloadIcon from \"./assets/download.svg\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\n\ninterface ICallLogRecordingsProps {\n title?: string;\n backIconUrl?: string;\n downloadIconUrl?: string;\n hideDownloadButton?: boolean;\n call: any;\n datePattern?: DatePatterns;\n listItemStyle?: ListItemStyle;\n callLogRecordingsStyle?: CallLogRecordingsStyle;\n onBackClick?: Function;\n onItemClick?: Function;\n onDownloadClick?: Function;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n}\n\nconst defaultProps: ICallLogRecordingsProps = {\n title: localize(\"RECORDING\"),\n backIconUrl: backIcon,\n downloadIconUrl: downloadIcon,\n hideDownloadButton: false,\n call: undefined,\n datePattern: DatePatterns.time,\n listItemStyle: {} as ListItemStyle,\n callLogRecordingsStyle: {} as CallLogRecordingsStyle,\n onBackClick: undefined,\n onItemClick: undefined,\n onDownloadClick: undefined,\n listItemView: null,\n subtitleView: null,\n tailView: null\n}\n\nconst CometChatCallLogRecordings = (props: ICallLogRecordingsProps) => {\n const {\n title,\n backIconUrl,\n downloadIconUrl,\n hideDownloadButton,\n call,\n datePattern,\n listItemStyle,\n callLogRecordingsStyle,\n onBackClick,\n onItemClick,\n onDownloadClick,\n listItemView,\n subtitleView,\n tailView\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const handleItemClick = useCallback((item: any) => {\n if (onItemClick) {\n onItemClick(item);\n }\n }, [onItemClick])\n\n const handleDownloadClick = useCallback((item: any) => {\n if (onDownloadClick) {\n onDownloadClick(item);\n } else {\n downloadRecordingFromURL(item?.getRecordingURL())\n }\n }, [onDownloadClick])\n\n const getRecordings = useCallback(() => {\n try {\n return call?.getRecordings();\n } catch (e) {\n console.log(e);\n }\n }, [call])\n\n const getRecordingStartTime = (item: any) => {\n try {\n return item?.getStartTime();\n } catch (e) {\n console.log(e);\n }\n }\n\n const getRecordingDuration = (item: any) => {\n try {\n return convertSecondsToHoursMinutesSeconds(item?.getDuration());\n } catch (e) {\n console.log(e);\n }\n }\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView) {\n return subtitleView(item);\n } else {\n return (\n <>\n
    \n {getRecordingDuration(item)}\n
    \n \n );\n }\n }, [subtitleView, theme, callLogRecordingsStyle])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if (tailView) {\n return tailView(item);\n } else {\n return (\n <>\n
    \n \n {\n !hideDownloadButton ?\n handleDownloadClick(item)}\n /> :\n null\n }\n
    \n \n );\n }\n }, [tailView, theme, callLogRecordingsStyle, datePattern, hideDownloadButton, downloadIconUrl, handleDownloadClick])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if (listItemView) {\n return listItemView(item);\n } else {\n return (\n <>\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n }\n }, [listItemView, theme, listItemStyle, getListItemSubtitleView, getListItemTailView, handleItemClick])\n\n return (\n <>\n
    \n
    \n { onBackClick ?\n
    \n \n
    :\n null\n }\n
    \n {title}\n
    \n
    \n \n
    \n \n )\n}\n\nCometChatCallLogRecordings.defaultProps = defaultProps;\nexport { CometChatCallLogRecordings };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CallLogDetailsStyle, CallLogHistoryConfiguration, CallLogParticipantsConfiguration, CallLogRecordingsConfiguration, } from \"@cometchat/uikit-shared\";\nimport { CometChatCallDetailsOption, CometChatDetailsTemplate, CometChatTheme, fontHelper, localize, } from \"@cometchat/uikit-resources\";\nimport { getBackButtonStyle, getButtonContainerStyle, getContainerStyle, getListItemStyle, getProfileContainerStyle, getTitleStyle } from \"./style\";\n/* eslint-disable react-hooks/exhaustive-deps */\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport { CallingDetailsUtils } from \"../Utils/CallDetailsUtils\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatCallLogHistory } from \"../CometChatCallLogHistory\";\nimport { CometChatCallLogParticipants } from \"../CometChatCallLogParticipants\";\nimport { CometChatCallLogRecordings } from \"../CometChatCallLogRecordings\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport { verifyCallUser } from \"../Utils/utils\";\n\ninterface ICallLogDetailsProps {\n title?: string;\n backIconUrl?: string;\n call: CometChat.Call;\n onBackClick?: Function;\n avatarStyle?: AvatarStyle;\n data?: (callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme) => CometChatDetailsTemplate[];\n callLogHistoryConfiguration?: CallLogHistoryConfiguration;\n callLogParticipantsConfiguration?: CallLogParticipantsConfiguration;\n callLogRecordingsConfiguration?: CallLogRecordingsConfiguration;\n callLogDetailsStyle?: CallLogDetailsStyle;\n}\n\nconst defaultProps = {\n title: localize(\"CALL_DETAIL\"),\n backIconUrl: backIcon,\n onBackClick: undefined,\n avatarStyle: {} as AvatarStyle,\n data: (callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme) => [] as CometChatDetailsTemplate[],\n callLogHistoryConfiguration: {} as CallLogHistoryConfiguration,\n callLogParticipantsConfiguration: {} as CallLogParticipantsConfiguration,\n callLogRecordingsConfiguration: {} as CallLogRecordingsConfiguration,\n callLogDetailsStyle: {} as CallLogDetailsStyle,\n};\n\nconst CometChatCallLogDetails = (props: ICallLogDetailsProps) => {\n const {\n title,\n backIconUrl,\n call,\n onBackClick,\n avatarStyle,\n data,\n callLogHistoryConfiguration,\n callLogParticipantsConfiguration,\n callLogRecordingsConfiguration,\n callLogDetailsStyle\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [detailsTemplates, setDetailsTemplates] = useState([]);\n const [showParticipants, setShowParticipants] = useState(false);\n const [showRecordings, setShowRecordings] = useState(false);\n const [showCallHistory, setShowCallHistory] = useState(false);\n\n\n const getAvatarStyle = useCallback(() => {\n return { ...new AvatarStyle(defaultAvatarStyle(theme)), ...avatarStyle };\n }, [avatarStyle, theme]);\n\n\n const defaultAvatarStyle = (theme: CometChatTheme) => {\n return{\n borderRadius: \"24px\",\n width: \"50px\",\n height: \"50px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorder: \"\",\n outerViewBorderSpacing: \"\"\n };\n }\n\n const getAvatarTitleStyle = (theme: CometChatTheme, style: CallLogDetailsStyle) => {\n return {\n color: style?.nameTextColor || theme.palette.getAccent(),\n font: style?.nameTextFont || fontHelper(theme.typography.title1),\n };\n }\n\n const setTemplates = useCallback(() => {\n let templatesArray = data?.(call!, loggedInUser!, theme);\n if (!templatesArray || !templatesArray.length) {\n templatesArray = CallingDetailsUtils.getDefaultCallTemplate(call, loggedInUser!, theme);\n }\n\n setDetailsTemplates([...templatesArray]);\n }, [setDetailsTemplates, call, loggedInUser, theme]);\n\n const getOptionsForTemplate = useCallback((template: CometChatDetailsTemplate): CometChatCallDetailsOption[] => {\n const { options, id } = template;\n let curOptions: CometChatCallDetailsOption[] = [];\n if (options && id !== undefined) {\n const callEntity = verifyCallUser(call, loggedInUser!);\n if (callEntity?.getUid) {\n curOptions = options(callEntity, null, id);\n } else {\n curOptions = options(null, callEntity, id);\n }\n }\n return curOptions;\n }, [call, loggedInUser])\n\n const handleOptionClick = useCallback((option: CometChatCallDetailsOption) => {\n if (option?.onClick) {\n option.onClick(call);\n } else {\n switch (option.id) {\n case \"participants\":\n setShowParticipants(true);\n break;\n case \"recordings\":\n setShowRecordings(true);\n break;\n case \"callHistory\":\n setShowCallHistory(true);\n break;\n default:\n break;\n }\n }\n }, [call, setShowParticipants, setShowRecordings, setShowCallHistory])\n\n const showDetailsPage = useCallback(() => {\n return (\n loggedInUser && (\n !showParticipants &&\n !showRecordings &&\n !showCallHistory)\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showParticipantsPage = useCallback(() => {\n return (\n loggedInUser &&\n showParticipants &&\n !showRecordings &&\n !showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showRecordingsPage = useCallback(() => {\n return (\n loggedInUser &&\n !showParticipants &&\n showRecordings &&\n !showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showCallHistoryPage = useCallback(() => {\n return (\n loggedInUser &&\n !showParticipants &&\n !showRecordings &&\n showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const handlePageOnBackClick = useCallback(() => {\n setShowParticipants(false);\n setShowRecordings(false);\n setShowCallHistory(false);\n }, [setShowParticipants, setShowRecordings, setShowCallHistory])\n\n const getCallUser = useCallback(() => {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity?.getUid) {\n return entity;\n } else {\n return undefined;\n }\n }, [call, loggedInUser])\n\n const getCallGroup = useCallback(() => {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity?.getGuid) {\n return entity;\n } else {\n return undefined;\n }\n }, [call, loggedInUser])\n\n const getTemplatesUI = useCallback(() => {\n return (\n <>\n {\n detailsTemplates.map((template) => {\n return (\n
    \n {getOptionsForTemplate(template).map((option) => {\n\n const listItemStyle = {\n backgroundColor: option.backgroundColor,\n titleColor: option.titleColor,\n titleFont: option.titleFont\n }\n\n return (\n
    \n
    \n {\n option.customView ?\n
    handleOptionClick(option)}>\n {option.customView}\n
    :\n handleOptionClick(option)}\n listItemStyle={getListItemStyle(theme, listItemStyle)}\n hideSeparator={template.hideItemSeparator}\n avatarStyle={new AvatarStyle({\n backgroundColor: option.iconTint,\n })}\n id={option.id}\n key={option.id}\n tailView={option.tail}\n />\n }\n
    \n
    \n )\n })}\n {template.title}\n
    \n )\n })\n }\n \n )\n }, [detailsTemplates, getOptionsForTemplate, handleOptionClick])\n\n Hooks(loggedInUser, setLoggedInUser, call, setTemplates);\n\n return (\n <>\n
    \n {\n showDetailsPage() ?\n
    \n {\n onBackClick ?\n
    \n \n
    \n {title}\n
    \n
    :\n null\n }\n {/*
    */}\n
    \n \n {verifyCallUser(call, loggedInUser!).name}\n
    \n {getTemplatesUI()}\n
    :\n null\n }\n {\n showParticipantsPage() ?\n { return callLogParticipantsConfiguration?.onBackClick || handlePageOnBackClick }}\n onItemClick={callLogParticipantsConfiguration?.onItemClick || undefined}\n datePattern={callLogParticipantsConfiguration?.datePattern || undefined}\n listItemStyle={callLogParticipantsConfiguration?.listItemStyle || undefined}\n callLogParticipantsStyle={callLogParticipantsConfiguration?.callLogParticipantsStyle || undefined}\n listItemView={callLogParticipantsConfiguration?.listItemView || null}\n subtitleView={callLogParticipantsConfiguration?.subtitleView || null}\n tailView={callLogParticipantsConfiguration?.tailView || null}\n /> :\n null\n }\n\n {\n showRecordingsPage() ?\n { return callLogRecordingsConfiguration?.onBackClick || handlePageOnBackClick }}\n onItemClick={callLogRecordingsConfiguration?.onItemClick || undefined}\n datePattern={callLogRecordingsConfiguration?.datePattern || undefined}\n listItemStyle={callLogRecordingsConfiguration?.listItemStyle || undefined}\n callLogRecordingsStyle={callLogRecordingsConfiguration?.callLogRecordingsStyle || undefined}\n downloadIconUrl={callLogRecordingsConfiguration?.downloadIconUrl || undefined}\n hideDownloadButton={callLogRecordingsConfiguration?.hideDownloadButton || undefined}\n onDownloadClick={callLogRecordingsConfiguration?.onDownloadClick || undefined}\n listItemView={callLogRecordingsConfiguration?.listItemView || null}\n subtitleView={callLogRecordingsConfiguration?.subtitleView || null}\n tailView={callLogRecordingsConfiguration?.tailView || null}\n /> :\n null\n }\n\n {\n showCallHistoryPage() ?\n { return callLogHistoryConfiguration?.onBackClick || handlePageOnBackClick }}\n datePattern={callLogHistoryConfiguration?.datePattern || undefined}\n dateSeparatorPattern={callLogHistoryConfiguration?.dateSeparatorPattern || undefined}\n callLogHistoryStyle={callLogHistoryConfiguration?.callLogHistoryStyle || undefined}\n onError={callLogHistoryConfiguration?.onError || undefined}\n /> :\n null\n }\n
    \n \n )\n\n}\n\nCometChatCallLogDetails.defaultProps = defaultProps;\nexport { CometChatCallLogDetails };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n call: any,\n setTemplates: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n }\n );\n },\n [setLoggedInUser]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n setTemplates?.()\n }\n }, [loggedInUser, call]);\n}\n\nexport { Hooks };","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { LabelStyle } from \"@cometchat/uikit-elements\";\nimport { WithDetailsStyle } from \"@cometchat/uikit-shared\";\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n style: WithDetailsStyle\n): React.CSSProperties {\n return {\n height: style?.height || \"100%\",\n width: style?.width || \"100%\",\n border: style?.border || `none`,\n borderRadius: style?.borderRadius || \"0px\",\n background: style?.background || theme.palette.getBackground(),\n display: \"flex\",\n boxSizing: \"border-box\",\n position: \"relative\",\n };\n}\n\nexport function getLabelStyle(theme: CometChatTheme, style: WithDetailsStyle) {\n return new LabelStyle({\n background: \"transparent\",\n textFont: style?.messageTextFont || fontHelper(theme.typography.heading),\n textColor: style?.messageTextColor || theme.palette.getAccent700(),\n });\n}\n\nexport function getEmptyContainerStyle() {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: \"100%\",\n width: \"100%\",\n };\n}\n","import { CallLogDetailsConfiguration, CallLogsConfiguration, WithDetailsStyle } from '@cometchat/uikit-shared';\nimport { getContainerStyle, getEmptyContainerStyle, getLabelStyle } from \"./style\";\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { CometChatCallLogDetails } from \"../CometChatCallLogDetails\";\nimport { CometChatCallLogs } from \"../CometChatCallLogs\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { localize } from \"@cometchat/uikit-resources\";\n\ninterface ICallLogWithDetailsProps {\n isMobileView?: boolean;\n messageText?: string;\n withDetailsStyle?: WithDetailsStyle;\n callLogDetailsConfiguration?: CallLogDetailsConfiguration;\n callLogsConfiguration?: CallLogsConfiguration\n}\n\nconst defaultProps: ICallLogWithDetailsProps = {\n isMobileView: false,\n messageText: localize(\"NO_CALLS_SELECTED\"),\n withDetailsStyle: {} as WithDetailsStyle,\n callLogDetailsConfiguration: {} as CallLogDetailsConfiguration,\n callLogsConfiguration: {} as CallLogsConfiguration\n};\n\nconst CometChatCallLogsWithDetails = (props: ICallLogWithDetailsProps) => {\n const {\n isMobileView,\n messageText,\n withDetailsStyle,\n callLogDetailsConfiguration,\n callLogsConfiguration\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [activeCall, setActiveCall] = useState(null);\n\n const handleInfoClick = useCallback((call: any) => {\n setActiveCall(call);\n }, [setActiveCall])\n\n const getCallLogStyle = useCallback(() => {\n if (isMobileView) {\n return {\n width: \"100%\",\n display: !activeCall ? \"block\" : \"none\",\n }\n } else {\n return {\n width: \"280px\",\n minWidth: \"max(25%, 280px)\",\n }\n }\n }, [isMobileView, activeCall])\n\n const getCallDetailStyle = useCallback(() => {\n if (isMobileView) {\n return {\n width: \"100%\",\n display: activeCall ? \"block\" : \"none\"\n }\n } else {\n return {\n width: \"calc(100% - 280px)\",\n }\n }\n }, [isMobileView, activeCall])\n\n const getBackClick = useCallback(() => {\n setActiveCall(null);\n }, [setActiveCall])\n\n Hooks(callLogDetailsConfiguration!, callLogsConfiguration!, setActiveCall, isMobileView!, theme);\n\n return (\n
    \n
    \n \n
    \n
    \n {\n activeCall ?\n { return callLogDetailsConfiguration?.onBackClick || getBackClick }}\n backIconUrl={callLogDetailsConfiguration?.backIconUrl}\n avatarStyle={callLogDetailsConfiguration?.avatarStyle}\n data={callLogDetailsConfiguration?.data || undefined}\n callLogHistoryConfiguration={callLogDetailsConfiguration?.callLogHistoryConfiguration}\n callLogParticipantsConfiguration={callLogDetailsConfiguration?.callLogParticipantsConfiguration}\n callLogRecordingsConfiguration={callLogDetailsConfiguration?.callLogRecordingsConfiguration}\n callLogDetailsStyle={callLogDetailsConfiguration?.callLogDetailsStyle}\n /> :\n
    \n \n
    \n }\n
    \n
    \n )\n}\n\n\nCometChatCallLogsWithDetails.defaultProps = defaultProps;\nexport { CometChatCallLogsWithDetails };\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { CallLogDetailsConfiguration, CallLogsConfiguration } from \"@cometchat/uikit-shared\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n callLogDetailsConfiguration: CallLogDetailsConfiguration,\n callLogsConfiguration: CallLogsConfiguration,\n setActiveCall: Function,\n isMobileView: boolean,\n theme: CometChatTheme\n) {\n useEffect(\n () => {\n callLogDetailsConfiguration.callLogDetailsStyle = { ...callLogDetailsConfiguration.callLogDetailsStyle, border: `1px solid ${theme?.palette?.getAccent100()}` };\n\n if (isMobileView) {\n const overrideOnBackClick = () => {\n setActiveCall(null);\n };\n callLogDetailsConfiguration.onBackClick = overrideOnBackClick;\n }\n },\n [callLogDetailsConfiguration, isMobileView, setActiveCall]\n );\n\n useEffect(\n () => {\n callLogsConfiguration.callLogsStyle = { ...callLogsConfiguration.callLogsStyle, border: `1px solid ${theme?.palette?.getAccent100()}` };\n },\n [callLogsConfiguration]\n );\n}\n\nexport { Hooks };\n","import { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { AddMembersStyle, UsersStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string};\n\nexport function addMembersStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n width: addMembersStyleObject?.width || \"100%\",\n height: addMembersStyleObject?.height || \"100%\",\n background: addMembersStyleObject?.background || theme.palette.getBackground(),\n border: addMembersStyleObject?.border || \"none\",\n borderRadius: addMembersStyleObject?.borderRadius || \"0\",\n boxShadow: addMembersStyleObject?.boxShadow,\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n padding: addMembersStyleObject?.padding || '0',\n overflow: \"hidden\"\n };\n}\n\nexport function usersStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : UsersStyle {\n return new UsersStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"inherit\",\n titleTextFont: addMembersStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: addMembersStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: addMembersStyleObject?.emptyStateTextFont || fontHelper(theme.typography.title1),\n emptyStateTextColor: addMembersStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: addMembersStyleObject?.errorStateTextFont || fontHelper(theme.typography.title1),\n errorStateTextColor: addMembersStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n loadingIconTint: addMembersStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n onlineStatusColor: addMembersStyleObject?.onlineStatusColor || theme.palette.getSuccess(),\n separatorColor: addMembersStyleObject?.separatorColor || theme.palette.getAccent50(),\n searchIconTint: addMembersStyleObject?.searchIconTint || theme.palette.getAccent400(),\n searchBorder: addMembersStyleObject?.searchBorder || `1px solid ${theme.palette.getAccent50()}`,\n searchBorderRadius: addMembersStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: addMembersStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchPlaceholderTextFont: addMembersStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: addMembersStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent400(),\n searchTextFont: addMembersStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: addMembersStyleObject?.searchTextColor || theme.palette.getAccent(),\n sectionHeaderTextFont: addMembersStyleObject?.sectionHeaderTextFont,\n sectionHeaderTextColor: addMembersStyleObject?.sectionHeaderTextColor\n });\n}\n\nexport function addMembersButtonStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : any {\n return { \n background: addMembersStyleObject?.addMembersButtonBackground || theme.palette.getPrimary(),\n buttonTextColor: addMembersStyleObject?.addMembersButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: addMembersStyleObject?.addMembersButtonTextFont || fontHelper(theme.typography.title2),\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px\",\n padding: \"16px 0\",\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\"\n };\n}\n\nexport function defaultBackBtnStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: addMembersStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n left: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function closeBtnStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: addMembersStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n top: \"19px\",\n right: \"19px\"\n }; \n}\n\nexport function getAddMembersBtnStyle() {\n return {\n padding: '16px',\n boxSizing: 'border-box'\n } as CSSProperties;\n}\n\n/*\nexport function contentWrapperStyle(addMembersStyleObject : AddMembersStyle | null) : CSSProperties {\n return { \n height: \"100%\",\n width: \"100%\",\n boxSizing: \"border-box\",\n display: \"flex\", \n flexDirection: \"column\", \n rowGap: \"8px\",\n padding: addMembersStyleObject?.padding,\n };\n}\n*/\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AddMembersStyle, CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useRef } from \"react\";\nimport { CometChatGroupEvents, CometChatOption, CometChatUIKitConstants, SelectionMode, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { addMembersButtonStyle, addMembersStyle, closeBtnStyle, defaultBackBtnStyle, getAddMembersBtnStyle, usersStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport closeButton from \"./assets/close2x.svg\";\n\ninterface IAddMembersProps {\n /**\n * Image URL for the back button\n *\n * @remarks\n * This prop will also be used if `backButton` prop is not provided\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string,\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean,\n /**\n * Function to call when the back button is clicked\n */\n onBack?: () => void,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"ADD_MEMBERS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Show alphabetical header\n *\n * @defaultValue `false`\n */\n showSectionHeader?: boolean,\n /**\n * Property on the user object\n *\n * @remarks\n * This property will be used to extract the section header character from the user object\n *\n * @defaultValue `getName`\n */\n sectionHeaderField?: keyof CometChat.User,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (user: CometChat.User) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.multiple`\n */\n selectionMode?: SelectionMode,\n /**\n * Function to call when a user from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (user: CometChat.User, selected: boolean) => void,\n /**\n * Request builder to fetch users\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n usersRequestBuilder?: CometChat.UsersRequestBuilder,\n /**\n * Request builder with search parameters to fetch users\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.UsersRequestBuilder,\n /**\n * Custom list item view to be rendered for each user in the fetched list\n */\n listItemView?: (user: CometChat.User) => JSX.Element,\n /**\n * Custom subtitle view to be rendered for each user in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (user: CometChat.User) => JSX.Element,\n /**\n * Group to add members to\n */\n group: CometChat.Group,\n /**\n * Function to call when add button of the component is clicked\n *\n * @remarks\n * This function won't be call if no users are selected\n */\n onAddMembersButtonClick?: (guid: string, membersToAdd: CometChat.GroupMember[]) => void,\n /**\n * Text to display for the default add button\n *\n * @defaultValue `localize(\"ADD_MEMBERS\")`\n */\n buttonText?: string,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n addMembersStyle?: AddMembersStyle\n};\n\n/**\n * Renders a scrollable list of users to add to a group of a CometChat App\n */\nexport function CometChatAddMembers(props: IAddMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n title = localize(\"ADD_MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n hideSearch = false,\n searchIconURL = SearchIcon,\n searchPlaceholder = localize(\"SEARCH\"),\n showSectionHeader = false,\n sectionHeaderField = \"getName\",\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n disableUsersPresence = false,\n hideSeparator = false,\n onError,\n menus,\n options,\n selectionMode = SelectionMode.multiple,\n onSelect,\n usersRequestBuilder,\n searchRequestBuilder,\n listItemView,\n subtitleView,\n group,\n onAddMembersButtonClick = null,\n buttonText = localize(\"ADD_MEMBERS\"),\n closeButtonIconURL = closeButton,\n onClose,\n statusIndicatorStyle,\n avatarStyle,\n listItemStyle,\n addMembersStyle: addMembersStyleObject = null\n } = props;\n\n const membersToAddRef = useRef([]);\n const selectionModeRef = useRef(selectionMode);\n const loggedInUserRef = useRef(null);\n const onSelectPropRef = useRefSync(onSelect);\n const groupPropRef = useRefSync(group);\n const onBackPropRef = useRefSync(onBack);\n const onAddMembersButtonClickPropRef = useRefSync(onAddMembersButtonClick);\n const errorHandler = useCometChatErrorHandler(onError!);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Creates a `CometChat.GroupMember` instance from the provided `user`\n */\n const createGroupMemberFromUser = useCallback((user: CometChat.User): CometChat.GroupMember => {\n const groupMember = new CometChat.GroupMember(user.getUid(), CometChatUIKitConstants.groupMemberScope.participant);\n groupMember.setName(user.getName());\n groupMember.setGuid(groupPropRef.current.getGuid());\n return groupMember;\n }, [groupPropRef]);\n\n /**\n * Updates `membersToAddRef`\n *\n * @remarks\n * This function makes sure `membersToAddRef` is in sync with the UI\n */\n const onSelectWrapper = useCallback((user: CometChat.User, selected: boolean): void => {\n if (onSelectPropRef.current) {\n return onSelectPropRef.current(user, selected);\n }\n if (selectionModeRef.current === SelectionMode.single) {\n membersToAddRef.current = [createGroupMemberFromUser(user)];\n }\n else if (selectionModeRef.current === SelectionMode.multiple) {\n const targetUid = user.getUid();\n const tmpMembersToAddList: CometChat.GroupMember[] = [];\n let updated = false;\n for (let i = 0; i < membersToAddRef.current.length; i++) {\n const curMember = membersToAddRef.current[i];\n if (targetUid === curMember.getUid()) {\n updated = true;\n }\n else {\n tmpMembersToAddList.push(curMember);\n }\n }\n if (!updated) {\n tmpMembersToAddList.push(createGroupMemberFromUser(user));\n }\n membersToAddRef.current = tmpMembersToAddList;\n }\n }, [createGroupMemberFromUser, onSelectPropRef]);\n\n /**\n * Creates a `CometChat.Action` instance\n */\n const createActionMessage = useCallback((actionOn: CometChat.GroupMember, loggedInUser: CometChat.User, group: CometChat.Group): CometChat.Action => {\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory.action as CometChat.MessageCategory\n );\n actionMessage.setAction(CometChatUIKitConstants.groupMemberAction.ADDED);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(actionOn));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setMessage(`${loggedInUser.getName()} added ${actionOn.getUid()}`);\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n return actionMessage;\n }, []);\n\n /**\n * Provides a default behaviour to the `onAddMembersButtonClick` prop\n */\n const onAddBtnClickWrapper = useCallback(async (): Promise => {\n if (membersToAddRef.current.length === 0) {\n return;\n }\n try {\n const group = groupPropRef.current;\n const onAddBtnClick = onAddMembersButtonClickPropRef.current;\n if (onAddBtnClick) {\n onAddBtnClick(group.getGuid(), membersToAddRef.current);\n membersToAddRef.current = [];\n return;\n }\n const UIDsToRemove: Set = new Set();\n const response = await CometChat.addMembersToGroup(group.getGuid(), membersToAddRef.current, []);\n if (response) {\n for (const key in response) {\n if ((response as any)[key] === \"success\") {\n UIDsToRemove.add(key);\n }\n }\n }\n const addedMembers: CometChat.GroupMember[] = [];\n for (let i = 0; i < membersToAddRef.current.length; i++) {\n const curMember = membersToAddRef.current[i];\n if (UIDsToRemove.has(curMember.getUid())) {\n addedMembers.push(curMember);\n }\n }\n const loggedInUser = loggedInUserRef.current;\n if (loggedInUser) {\n const groupClone = CometChatUIKitUtility.clone(group);\n groupClone.setMembersCount(group.getMembersCount() + addedMembers.length);\n CometChatGroupEvents.ccGroupMemberAdded.next({\n messages: addedMembers.map(addedMember => createActionMessage(addedMember, loggedInUser, groupClone)),\n usersAdded: addedMembers,\n userAddedIn: groupClone,\n userAddedBy: CometChatUIKitUtility.clone(loggedInUser)\n });\n }\n membersToAddRef.current = [];\n onBackPropRef.current?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }, [errorHandler, createActionMessage, groupPropRef, onAddMembersButtonClickPropRef, onBackPropRef]);\n\n /**\n * Creates back button view\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates add members button view\n */\n function getAddMembersBtnView() {\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Creates close button view\n */\n function getCloseBtnView() {\n return (\n \n );\n }\n\n Hooks({\n loggedInUserRef,\n errorHandler,\n selectionMode,\n selectionModeRef,\n membersToAddRef\n });\n\n return (\n \n \n {getAddMembersBtnView()}\n {getBackBtnView()}\n {getCloseBtnView()}\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { SelectionMode } from \"@cometchat/uikit-resources\";\n\ntype Args = {\n loggedInUserRef : React.MutableRefObject,\n errorHandler : (error : unknown) => void,\n selectionMode : SelectionMode,\n selectionModeRef : React.MutableRefObject,\n membersToAddRef : React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n loggedInUserRef,\n errorHandler,\n selectionMode,\n selectionModeRef,\n membersToAddRef\n } = args;\n\n useEffect(() => {\n if (selectionModeRef.current !== selectionMode) {\n selectionModeRef.current = selectionMode;\n membersToAddRef.current = [];\n }\n }, [selectionMode, membersToAddRef, selectionModeRef]);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n loggedInUserRef.current = await CometChat.getLoggedinUser();\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, loggedInUserRef]);\n}\n","import { AvatarStyle, ListItemStyle, MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { BannedMembersStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint: string};\n\nexport function bannedMembersWrapperStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n height: bannedMemberStyleObject?.height || \"100%\",\n width: bannedMemberStyleObject?.width || \"100%\",\n background: bannedMemberStyleObject?.background || theme.palette.getBackground(),\n border: bannedMemberStyleObject?.border || \"none\",\n borderRadius: bannedMemberStyleObject?.borderRadius || \"0\",\n boxShadow: bannedMemberStyleObject?.boxShadow || \"\",\n padding: bannedMemberStyleObject?.padding || \"0\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function listStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: bannedMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: bannedMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: bannedMemberStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: bannedMemberStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: bannedMemberStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: bannedMemberStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n loadingIconTint: bannedMemberStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n searchIconTint: bannedMemberStyleObject?.searchIconTint || theme.palette.getAccent500(),\n searchBorder: bannedMemberStyleObject?.searchBorder || \"none\",\n searchBorderRadius: bannedMemberStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: bannedMemberStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchPlaceholderTextFont: bannedMemberStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: bannedMemberStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: bannedMemberStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: bannedMemberStyleObject?.searchTextColor || theme.palette.getAccent(),\n separatorColor: bannedMemberStyleObject?.separatorColor || theme.palette.getAccent400()\n });\n}\n\nexport function menusContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"12px\",\n top: \"8px\",\n cursor: \"pointer\"\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject ? statusIndicatorStyleObject : {};\n\n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || \"none\",\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || 'inherit',\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || bannedMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent()\n });\n}\n\nexport function defaultBackBtnStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n left: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function closeBtnStyle(bannedMemberStyleObject : BannedMembersStyle| null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n right: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function unbanBtnStyle(bannedMemberStyleObject : BannedMembersStyle| null, theme : CometChatTheme) : ButtonStyle {\n return {\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.unbanIconTint || theme.palette.getPrimary()!,\n background: \"transparent\"\n };\n}\n\nexport function menuListStyle(theme : CometChatTheme) : MenuListStyle {\n return new MenuListStyle({\n border: \"none\",\n borderRadius: \"8px\",\n background: theme.palette.getBackground(),\n moreIconTint: theme.palette.getPrimary(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground()\n });\n}\n\nexport function listWrapperStyle() : CSSProperties {\n return {\n position: \"relative\",\n height: \"100%\"\n };\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { Action } from \".\";\nimport React from \"react\";\n\ntype Args = {\n bannedMembersRequestBuilder: CometChat.BannedMembersRequestBuilder | null,\n searchRequestBuilder: CometChat.BannedMembersRequestBuilder | null,\n searchText: string,\n groupGuid: string,\n bannedMembersSearchText:React.MutableRefObject\n};\n\nexport class BannedMembersManager {\n private bannedMembersRequest: CometChat.BannedMembersRequest;\n\n /**\n * Set `bannedMembersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupGuid,\n bannedMembersSearchText\n } = args;\n let finalBannedMembersRequestBuilder = bannedMembersRequestBuilder || new CometChat.BannedMembersRequestBuilder(groupGuid).setLimit(30);\n if(searchText && searchRequestBuilder) {\n finalBannedMembersRequestBuilder = searchRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && bannedMembersRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && bannedMembersRequestBuilder && searchRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else if(!searchText && bannedMembersRequestBuilder && !searchRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else if(!searchText && !bannedMembersRequestBuilder && searchRequestBuilder){\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else{\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }\n this.bannedMembersRequest = finalBannedMembersRequestBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `bannedMembersRequest`\n */\n fetchNext(): Promise {\n return this.bannedMembersRequest.fetchNext();\n }\n\n /**\n * Creates `CometChat.GroupMember` instance\n */\n static createGroupMemberFromUser(user: CometChat.User, group: CometChat.Group): CometChat.GroupMember {\n const groupMember = new CometChat.GroupMember(user.getUid());\n groupMember.setName(user.getName());\n groupMember.setAvatar(user.getAvatar());\n groupMember.setGuid(group.getGuid());\n return groupMember;\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n static attachSDKGroupListener(groupRef: React.MutableRefObject, dispatch: React.Dispatch): () => void {\n const listenerId = \"BannedMembers_GroupListener_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberBanned: (\n message: CometChat.Action,\n bannedUser: CometChat.User,\n bannedBy: CometChat.User,\n bannedFrom: CometChat.Group\n ) => {\n if (groupRef.current.getGuid() !== bannedFrom.getGuid()) {\n return;\n }\n dispatch({ type: \"addMember\", member: BannedMembersManager.createGroupMemberFromUser(bannedUser, groupRef.current) });\n },\n onGroupMemberUnbanned: (\n message: CometChat.Action,\n unbannedUser: CometChat.User,\n unbannedBy: CometChat.User,\n unbannedFrom: CometChat.Group\n ) => {\n if (groupRef.current.getGuid() !== unbannedFrom.getGuid()) {\n return;\n }\n dispatch({ type: \"removeBannedMemberIfPresent\", bannedMemberUid: unbannedUser.getUid() });\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n static attachSDKUserListener(dispatch: React.Dispatch): () => void {\n const listenerId = \"BannedMembers_UserListener_\" + String(Date.now());\n const cb = (user: CometChat.User) => dispatch({ type: \"updateMemberStatusIfPresent\", member: user });\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: cb,\n onUserOffline: cb\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useReducer, useRef } from \"react\";\nimport { CometChatOption, CometChatUIKitConstants, SelectionMode, States, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, bannedMembersWrapperStyle, closeBtnStyle, defaultBackBtnStyle, listItemStyle, listStyle, listWrapperStyle, menuListStyle, menusContainerStyle, statusIndicatorStyle, unbanBtnStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { BannedMembersManager } from \"./controller\";\nimport { BannedMembersStyle } from \"@cometchat/uikit-shared\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport closeButton from \"./assets/close2x.svg\";\n\ninterface IBannedMembersProps {\n /**\n * Image URL for the back button\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string,\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean,\n /**\n * Function to call when the back button is clicked\n */\n onBack?: () => void,\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"BANNED_MEMBERS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `true`\n */\n hideSearch?: boolean,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Group to ban members from\n */\n group: CometChat.Group,\n /**\n * Request builder to fetch banned members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n bannedMembersRequestBuilder?: CometChat.BannedMembersRequestBuilder,\n /**\n * Request builder with search parameters to fetch banned members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.BannedMembersRequestBuilder,\n /**\n * Custom list item view to be rendered for each banned member in the fetched list\n */\n listItemView?: (bannedMember: CometChat.GroupMember) => JSX.Element,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `true`\n */\n disableUsersPresence?: boolean,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Custom subtitle view to be rendered for each banned member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (bannedMember: CometChat.GroupMember) => JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (bannedMember: CometChat.GroupMember) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode,\n /**\n *\n */\n unbanIconURL?: string,\n /**\n * Function to call on click of the default list item view of a banned member\n */\n onItemClick?: (bannedMember: CometChat.GroupMember) => void,\n /**\n * Function to call when a banned member from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (bannedMember: CometChat.GroupMember, selected: boolean) => void,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n bannedMemberStyle?: BannedMembersStyle\n};\n\ntype State = {\n searchText: string,\n bannedMembers: CometChat.GroupMember[],\n fetchState: States\n};\n\nexport type Action = { type: \"setSearchText\", searchText: string } |\n{ type: \"setFetchState\", fetchState: States } |\n{ type: \"appendBannedMembers\", bannedMembers: CometChat.GroupMember[] } |\n{ type: \"setBannedMembers\", bannedMembers: [] } |\n{ type: \"removeBannedMemberIfPresent\", bannedMemberUid: string } |\n{ type: \"addMember\", member: CometChat.GroupMember } |\n{ type: \"updateMemberStatusIfPresent\", member: CometChat.User };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"appendBannedMembers\": {\n const { bannedMembers } = action;\n if (bannedMembers.length !== 0) {\n newState = { ...state, bannedMembers: [...state.bannedMembers, ...bannedMembers] };\n }\n break;\n }\n case \"setBannedMembers\": {\n newState = { ...state, bannedMembers: action.bannedMembers };\n break;\n }\n case \"removeBannedMemberIfPresent\": {\n const { bannedMembers } = state;\n const targetUid = action.bannedMemberUid;\n const targetIdx = bannedMembers.findIndex(bannedMember => bannedMember.getUid() === targetUid);\n if (targetIdx > -1) {\n newState = { ...state, bannedMembers: bannedMembers.filter((bannedMember, i) => i !== targetIdx) };\n }\n break;\n }\n case \"addMember\": {\n newState = { ...state, bannedMembers: [...state.bannedMembers, action.member] };\n break;\n }\n case \"updateMemberStatusIfPresent\": {\n const { member } = action;\n const { bannedMembers } = state;\n const targetUid = member.getUid();\n const targetIdx = bannedMembers.findIndex(bannedMember => bannedMember.getUid() === targetUid);\n if (targetIdx > -1) {\n newState = {\n ...state, bannedMembers: bannedMembers.map((bannedMember, i) => {\n if (i === targetIdx) {\n bannedMember.setStatus(member.getStatus());\n }\n return bannedMember;\n })\n }\n }\n break;\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of banned members related to a group of a CometChat App\n */\nexport function CometChatBannedMembers(props: IBannedMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n menus = null,\n title = localize(\"BANNED_MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n searchPlaceholder = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = true,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_BANNED_MEMBERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n onError,\n group,\n bannedMembersRequestBuilder = null,\n searchRequestBuilder = null,\n listItemView = null,\n hideSeparator = false,\n disableUsersPresence = true,\n closeButtonIconURL = closeButton,\n onClose,\n subtitleView = null,\n options = null,\n selectionMode = SelectionMode.none,\n unbanIconURL = Close2xIcon,\n onItemClick = null,\n onSelect = null,\n hideError = false,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n bannedMemberStyle: bannedMemberStyleObject = null,\n listItemStyle: listItemStyleObject = null\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n bannedMembers: [],\n fetchState: States.loading\n });\n const bannedMembersManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError!);\n const groupPropRef = useRefSync(group);\n const { theme } = useContext(CometChatThemeContext);\n const bannedMembersSearchText = useRef(\"\");\n\n /**\n * Updates the `searchText` state\n */\n const onSearchTextChange = useCallback((searchText: string): void => {\n const trimmedText = searchText.trim();\n if (searchText.length === 0 || (trimmedText.length === searchText.length && trimmedText.length > 0)) {\n bannedMembersSearchText.current = \"\"; \n dispatch({ type: \"setSearchText\", searchText });\n }\n }, [dispatch]);\n\n /**\n * Initiates a fetch request and appends the fetched banned members to the `bannedMembers` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `bannedMembers` state\n */\n const fetchNextAndAppendBannedMembers = useCallback(async (fetchId: string): Promise => {\n if (!bannedMembersManagerRef.current) {\n return;\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loading });\n try {\n const bannedMembers = await bannedMembersManagerRef.current.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n if (bannedMembers.length !== 0) {\n dispatch({ type: \"appendBannedMembers\", bannedMembers });\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n }\n catch (error) {\n if (fetchId === fetchNextIdRef.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n errorHandler(error);\n }\n }\n }, [errorHandler, dispatch]);\n\n /**\n * Calls `unbanGroupMember` SDK function & updates the `bannedMembers` state\n */\n const unbanMember = useCallback(async (bannedMember: CometChat.GroupMember): Promise => {\n try {\n await CometChat.unbanGroupMember(groupPropRef.current.getGuid(), bannedMember.getUid());\n dispatch({ type: \"removeBannedMemberIfPresent\", bannedMemberUid: bannedMember.getUid() });\n }\n catch (error) {\n errorHandler(error);\n }\n }, [dispatch, errorHandler, groupPropRef]);\n\n /**\n * Creates back button view\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates menus view\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n \n {menus}\n \n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(bannedMember: CometChat.GroupMember): string | null {\n if (disableUsersPresence || bannedMember.getStatus() === CometChatUIKitConstants.userStatusType.offline) {\n return null;\n }\n return bannedMemberStyleObject?.onlineStatusColor || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n }\n\n /**\n * Creates menu view for the default list item view\n */\n function getDefaultListItemMenuView(bannedMember: CometChat.GroupMember): JSX.Element | null {\n const bannedMemberOptions = options?.(bannedMember);\n if (!bannedMemberOptions?.length) {\n return null;\n }\n return (\n {\n const { onClick } = e.detail.data;\n onClick?.();\n }}\n />\n );\n }\n\n /**\n * Creates tail view for the default list item view\n */\n function getDefaultListTailView(bannedMember: CometChat.GroupMember): JSX.Element | null {\n switch (selectionMode) {\n case SelectionMode.none:\n return (\n unbanMember(bannedMember)}\n hoverText={localize('UNBAN')}\n buttonStyle={unbanBtnStyle(bannedMemberStyleObject, theme)}\n />\n );\n case SelectionMode.single:\n return (\n onSelect?.(bannedMember, e.detail.checked)}\n />\n );\n case SelectionMode.multiple:\n return (\n onSelect?.(bannedMember, e.detail.checked)}\n />\n );\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x = selectionMode;\n return null;\n }\n }\n }\n\n /**\n * Creates default list item view\n */\n function getDefaultListItemView(): (bannedMember: CometChat.GroupMember) => JSX.Element {\n return function (bannedMember: CometChat.GroupMember) {\n return (\n onItemClick?.(bannedMember)}\n />\n );\n };\n }\n\n /**\n * Creates close button view\n */\n function getCloseBtnView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates `listItem` prop for the `CometChatList` component\n */\n function getListItem(): (bannedMember: CometChat.GroupMember) => JSX.Element {\n return listItemView || getDefaultListItemView();\n }\n\n Hooks({\n groupGuid: group.getGuid(), // This is important\n searchText: state.searchText,\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n bannedMembersManagerRef,\n dispatch,\n fetchNextAndAppendBannedMembers,\n fetchNextIdRef,\n groupPropRef,\n bannedMembersSearchText\n });\n\n return (\n \n \n {getMenusView()}\n fetchNextAndAppendBannedMembers(fetchNextIdRef.current = \"onScrolledToBottom_\" + String(Date.now()))}\n state={state.fetchState === States.loaded && state.bannedMembers.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n emptyStateText={emptyStateText}\n errorStateText={errorStateText}\n loadingView={loadingStateView}\n emptyStateView={emptyStateView}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={listStyle(bannedMemberStyleObject, theme)}\n />\n \n {getBackBtnView()}\n {getCloseBtnView()}\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatGroupEvents } from \"@cometchat/uikit-resources\";\nimport { Action } from \".\";\nimport { BannedMembersManager } from \"./controller\";\n\ntype Args = {\n bannedMembersManagerRef : React.MutableRefObject,\n groupGuid : string,\n searchText : string,\n bannedMembersRequestBuilder : CometChat.BannedMembersRequestBuilder | null,\n searchRequestBuilder : CometChat.BannedMembersRequestBuilder | null,\n dispatch : React.Dispatch,\n fetchNextAndAppendBannedMembers : (fetchId : string) => Promise,\n fetchNextIdRef : React.MutableRefObject,\n groupPropRef : React.MutableRefObject,\n bannedMembersSearchText:React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n bannedMembersManagerRef,\n groupGuid,\n searchText,\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n fetchNextAndAppendBannedMembers,\n fetchNextIdRef,\n groupPropRef,\n bannedMembersSearchText\n } = args;\n\n useEffect(() => {\n if(bannedMembersRequestBuilder?.searchKeyword){\n bannedMembersSearchText.current = bannedMembersRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n bannedMembersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n }, []);\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `bannedMembers` state -> initiates a new fetch\n */\n () => {\n bannedMembersManagerRef.current = new BannedMembersManager({groupGuid, bannedMembersRequestBuilder, searchRequestBuilder, searchText,bannedMembersSearchText});\n dispatch({type: \"setBannedMembers\", bannedMembers: []});\n fetchNextAndAppendBannedMembers(fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()));\n }, [groupGuid, bannedMembersRequestBuilder, searchRequestBuilder, searchText, fetchNextAndAppendBannedMembers, dispatch, bannedMembersManagerRef, fetchNextIdRef]);\n\n useEffect(\n /**\n * Subscribes to some Group UI events\n */\n () => {\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe(item => {\n const { kickedFrom, kickedUser } = item;\n if (kickedFrom.getGuid() === groupPropRef.current.getGuid()) {\n dispatch({type: \"addMember\", member: BannedMembersManager.createGroupMemberFromUser(kickedUser, kickedFrom)});\n } \n });\n const groupMemberUnbannedSub = CometChatGroupEvents.ccGroupMemberUnbanned.subscribe(item => {\n const { unbannedFrom, unbannedUser } = item;\n if (unbannedFrom.getGuid() === groupPropRef.current.getGuid()) {\n dispatch({type: \"removeBannedMemberIfPresent\", bannedMemberUid: unbannedUser.getUid()});\n }\n });\n return () => {\n groupMemberBannedSub.unsubscribe();\n groupMemberUnbannedSub.unsubscribe();\n };\n }, [dispatch, groupPropRef]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n * \n * @returns - Function to remove the added SDK group listener\n */\n () => BannedMembersManager.attachSDKGroupListener(groupPropRef, dispatch), \n [dispatch, groupPropRef]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n * \n * @returns - Function to remove the added SDK user listener\n */\n () => BannedMembersManager.attachSDKUserListener(dispatch),\n [dispatch]);\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { AvatarStyle, BackdropStyle, BadgeStyle, BaseStyle, ConfirmDialogStyle, DateStyle, IconStyle, LabelStyle, ListItemStyle, MenuListStyle, ReceiptStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { ConversationsStyle, ListStyle } from \"@cometchat/uikit-shared\";\n\nexport function conversationsWrapperStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): CSSProperties {\n return {\n width: conversationsStyleObject?.width || \"100%\",\n height: conversationsStyleObject?.height || \"100%\",\n border: conversationsStyleObject?.border || `1px solid ${theme.palette.getAccent400()}`,\n borderRadius: conversationsStyleObject?.borderRadius || \"0\",\n background: conversationsStyleObject?.background || theme.palette.getBackground(),\n boxShadow: conversationsStyleObject?.boxShadow || \"\",\n position: \"relative\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function menusStyle(): CSSProperties {\n return {\n position: \"absolute\",\n top: \"19px\",\n right: \"12px\",\n cursor: \"pointer\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n width: \"24px\"\n };\n}\n\nexport function confirmDialogStyle(deleteConversationDialogStyle: ConfirmDialogStyle | null, theme: CometChatTheme): ConfirmDialogStyle {\n return new ConfirmDialogStyle({\n confirmButtonBackground: deleteConversationDialogStyle?.confirmButtonBackground || theme.palette.getError(),\n cancelButtonBackground: deleteConversationDialogStyle?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: deleteConversationDialogStyle?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: deleteConversationDialogStyle?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: deleteConversationDialogStyle?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: deleteConversationDialogStyle?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: deleteConversationDialogStyle?.titleFont || fontHelper(theme.typography.title1),\n titleColor: deleteConversationDialogStyle?.titleColor || theme.palette.getAccent(),\n messageTextFont: deleteConversationDialogStyle?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: deleteConversationDialogStyle?.messageTextColor || theme.palette.getAccent600(),\n background: deleteConversationDialogStyle?.background || theme.palette.getBackground(),\n height: deleteConversationDialogStyle?.height || \"auto\",\n width: deleteConversationDialogStyle?.width || \"auto\",\n border: deleteConversationDialogStyle?.border || \"none\",\n borderRadius: deleteConversationDialogStyle?.borderRadius || \"12px\",\n boxShadow: deleteConversationDialogStyle?.boxShadow || `0 0 1px 1px ${theme.palette.getAccent50()}`\n });\n}\n\nexport function listStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListStyle {\n return new ListStyle({\n background: \"inherit\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: conversationsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: conversationsStyleObject?.titleTextColor || theme.palette.getAccent(),\n separatorColor: conversationsStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: conversationsStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: conversationsStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: conversationsStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: conversationsStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: conversationsStyleObject?.errorStateTextColor || theme.palette.getAccent600()\n });\n}\n\nexport function avatarStyle(avatarStyleObject: AvatarStyle | null, theme: CometChatTheme): AvatarStyle {\n return new AvatarStyle({\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject: CSSProperties | null): CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n\n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject: ListItemStyle | null, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"auto\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n separatorColor: listItemStyleObject?.separatorColor || conversationsStyleObject?.separatorColor || theme.palette.getAccent200(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function badgeStyle(badgeStyleObject: BadgeStyle | null, theme: CometChatTheme): BadgeStyle {\n return new BadgeStyle({\n textFont: badgeStyleObject?.textFont || fontHelper(theme.typography.subtitle2),\n textColor: badgeStyleObject?.textColor || theme.palette.getAccent(\"dark\"),\n background: badgeStyleObject?.background || theme.palette.getPrimary(),\n borderRadius: badgeStyleObject?.borderRadius || \"16px\",\n width: badgeStyleObject?.width || \"24px\",\n height: badgeStyleObject?.height || \"16px\",\n border: badgeStyleObject?.border || \"none\"\n });\n}\n\nexport function itemThreadIndicatorStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): LabelStyle {\n return new LabelStyle({\n background: \"transparent\",\n textFont: conversationsStyleObject?.threadIndicatorTextFont || fontHelper(theme.typography.caption2),\n textColor: conversationsStyleObject?.threadIndicatorTextColor || theme.palette.getAccent400()\n });\n}\n\nexport function iconStyle(theme: CometChatTheme): IconStyle {\n return new IconStyle({\n width: \"24px\",\n height: \"24px\",\n iconTint: theme.palette.getAccent400()\n });\n}\n// export function mentionIconStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): IconStyle{\n// return new IconStyle({\n// height: \"16px\",\n// width: \"16px\",\n// iconTint: conversationsStyleObject?.mentionIconTint ?? theme.palette.getPrimary(),\n// })\n// }\n\nexport function receiptStyle(receiptStyleObject: ReceiptStyle | null, theme: CometChatTheme): ReceiptStyle { \n return new ReceiptStyle({\n waitIconTint: receiptStyleObject?.waitIconTint || theme.palette.getAccent700(),\n sentIconTint: receiptStyleObject?.sentIconTint || theme.palette.getAccent600(),\n deliveredIconTint: receiptStyleObject?.deliveredIconTint || theme.palette.getAccent600(),\n readIconTint: receiptStyleObject?.readIconTint || theme.palette.getPrimary(),\n errorIconTint: receiptStyleObject?.errorIconTint || theme.palette.getError(),\n height: receiptStyleObject?.height || '20px',\n width: receiptStyleObject?.width || '20px',\n border:receiptStyleObject?.border || \"none\",\n borderRadius:receiptStyleObject?.borderRadius || \"inherit\",\n background:receiptStyleObject?.background || \"inherit\",\n });\n}\n\nexport function subtitleTextStyle(conversation: CometChat.Conversation, typingIndicatorMap: Map, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): { font: string, color: string, width?: string, overflow?: string, textOverflow?: string } {\n const convWith = conversation.getConversationWith();\n const id = convWith instanceof CometChat.User ? convWith.getUid() : convWith.getGuid();\n if (typingIndicatorMap.get(id) !== undefined) {\n return {\n font: conversationsStyleObject?.typingIndictorTextFont || fontHelper(theme.typography.subtitle2),\n color: conversationsStyleObject?.typingIndictorTextColor || theme.palette.getSuccess() || \"\",\n width: \"100%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n }\n\n return {\n font: conversationsStyleObject?.lastMessageTextFont || fontHelper(theme.typography.subtitle2),\n color: conversationsStyleObject?.lastMessageTextColor || theme.palette.getAccent600() || \"\",\n width: \"100%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n}\n\nexport function menuListStyle(theme: CometChatTheme): MenuListStyle {\n return new MenuListStyle({\n width: \"\",\n height: \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n moreIconTint: \"grey\",\n submenuWidth: \"70px\",\n submenuHeight: \"20px\",\n submenuBorder: \"1px solid #e8e8e8\",\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground()\n });\n}\n\nexport function dateStyle(dateStyleObject: DateStyle | null, theme: CometChatTheme): DateStyle {\n const obj = dateStyleObject !== null ? dateStyleObject : {};\n\n return {\n ...new DateStyle({\n textFont: dateStyleObject?.textFont || fontHelper(theme.typography.caption2),\n textColor: dateStyleObject?.textColor || theme.palette.getAccent600(),\n background: \"transparent\"\n }), ...obj\n };\n}\n\nexport function subtitleReceiptAndTextContainerStyle(): CSSProperties {\n return {\n display: \"flex\",\n columnGap: \"4px\",\n alignItems: \"center\"\n };\n}\n\nexport function getBackdropStyle(backdropStyleObject: BaseStyle | null, conversationsStyle: ConversationsStyle | null): BackdropStyle {\n\n return {\n width: backdropStyleObject?.width || conversationsStyle?.width,\n height: backdropStyleObject?.height || conversationsStyle?.height,\n background: backdropStyleObject?.background || \"rgba(0, 0, 0, 0.5)\",\n border: backdropStyleObject?.border,\n borderRadius: backdropStyleObject?.borderRadius,\n position: \"absolute\"\n };\n}\n\nexport function defaultSelectionModeNoneTailViewContainerStyle(): CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-end\"\n };\n}\nexport function getUnreadBadgeStyle(): CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }\n}\n\nexport function threadViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n columnGap: \"4px\"\n };\n}\n","import { CardMessage, CometChatMessageEvents, CometChatUIKitConstants, CustomInteractiveMessage, FormMessage, SchedulerMessage } from \"@cometchat/uikit-resources\"\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKit } from \"../Shared/CometChatUIKit/CometChatUIKit\";\n\ntype Args = {\n conversationsRequestBuilder : CometChat.ConversationsRequestBuilder | null\n};\n\nexport class ConversationsManager {\n private static limit = 30;\n private conversationsRequest : CometChat.ConversationsRequest;\n private static conversationType: string | undefined = undefined;\n /**\n * Set `conversationsRequest` of the instance\n */\n constructor(args : Args) {\n const {\n conversationsRequestBuilder\n } = args;\n const convRequestBuilder = conversationsRequestBuilder || new CometChat.ConversationsRequestBuilder().setLimit(ConversationsManager.limit);\n this.conversationsRequest = convRequestBuilder.build();\n if (conversationsRequestBuilder) {\n ConversationsManager.conversationType = conversationsRequestBuilder\n .build()\n .getConversationType();\n }\n }\n\n /**\n * Calls `fetchNext` method of the set `conversationsRequest`\n */\n fetchNext() {\n return this.conversationsRequest.fetchNext();\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachUserListener(callback : (user : CometChat.User) => void) {\n const listenerId = \"ConversationList_User_\" + String(Date.now());\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: callback,\n onUserOffline: callback\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns Function to call to remove the attached SDK group listener\n */\n static attachGroupListener(callback : (message : CometChat.BaseMessage, remove? : boolean) => Promise, loggedInUser : CometChat.User | null) {\n const listenerId = \"ConversationList_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberJoined: (message : CometChat.Action) => {\n callback(message);\n },\n onGroupMemberLeft: (message : CometChat.Action, leavingUser : CometChat.User) => {\n if (loggedInUser?.getUid() === leavingUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberKicked: (message : CometChat.Action, kickedUser : CometChat.User) => {\n if (loggedInUser?.getUid() === kickedUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberBanned: (message : CometChat.Action, bannedUser : CometChat.User) => {\n if (loggedInUser?.getUid() === bannedUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberUnbanned: (message : CometChat.Action) => {\n callback(message);\n },\n onMemberAddedToGroup: (message : CometChat.Action) => {\n callback(message);\n },\n onGroupMemberScopeChanged: (message : CometChat.Action) => {\n callback(message);\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n /**\n * Attaches an SDK message received listener\n *\n * @returns - Function to remove the added SDK message received listener\n */\n static attachMessageReceivedListener(callback : (message : CometChat.BaseMessage) => Promise) {\n\n const onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage : CometChat.TextMessage) => {\n callback(textMessage);\n });\n\n const onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage : CometChat.MediaMessage) => {\n callback(mediaMessage);\n });\n\n const onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage : CometChat.CustomMessage) => {\n callback(customMessage);\n });\n\n const onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage: FormMessage) => {\n callback(formMessage);\n });\n\n const onSchedulerMessageReceived = CometChatMessageEvents.onSchedulerMessageReceived.subscribe((schedulerMessage: SchedulerMessage) => {\n callback(schedulerMessage);\n });\n\n const onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage: CardMessage) => {\n callback(cardMessage);\n });\n\n const onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customMessage : CustomInteractiveMessage) => {\n callback(customMessage);\n });\n\n return () => {\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message receipt listener\n *\n * @returns - Function to remove the added SDK message receipt listener\n */\n static attachMessageReceiptListener(callback : (receipt : CometChat.MessageReceipt, updateReadAt : boolean) => void) {\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt : CometChat.MessageReceipt) => {\n callback(messageReceipt, true);\n });\n const onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt : CometChat.MessageReceipt) => {\n callback(messageReceipt, false);\n });\n\n return () => {\n onMessagesRead?.unsubscribe();\n onMessagesDelivered?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message typing listener\n *\n * @returns - Function to remove the added SDK message typing listener\n */\n static attachMessageTypingListener(callback : (typingIndicator : CometChat.TypingIndicator, typingStarted : boolean) => void) {\n const onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator : CometChat.TypingIndicator) => {\n callback(typingIndicator, true);\n });\n const onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator : CometChat.TypingIndicator) => {\n callback(typingIndicator, false);\n });\n return () => {\n onTypingStarted?.unsubscribe();\n onTypingEnded?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message modified listener\n *\n * @returns - Function to remove the added SDK message modified listener\n */\n static attachMessageModifiedListener(callback : (message : CometChat.BaseMessage) => void) {\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((message : CometChat.BaseMessage) => {\n callback(message);\n });\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((message : CometChat.BaseMessage) => {\n callback(message);\n });\n\n return () => {\n onMessageEdited?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK call listener\n *\n * @returns - Function to remove the added SDK call listener\n */\n static attachCallListener(callback : (message : CometChat.BaseMessage) => void) {\n const listenerId = \"ConversationList_Call_\" + String(Date.now());\n CometChat.addCallListener(\n listenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: callback,\n onOutgoingCallAccepted: callback,\n onOutgoingCallRejected: callback,\n onIncomingCallCancelled: callback\n })\n );\n return () => CometChat.removeCallListener(listenerId);\n }\n /**\n * Attaches an SDK websocket listener\n *\n * @returns - Function to remove the added SDK websocket listener\n */\n static attachConnestionListener(callback : () => void) {\n const listenerId = \"ConversationList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if(callback){\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n\n /**\n * Determines if the last message should trigger an update based on its category and type.\n *\n * @param message - The last message sent or received in the conversation.\n * @returns {boolean} - Returns true if the message should trigger an update, false otherwise.\n */\n\n static shouldLastMessageAndUnreadCountBeUpdated = (message : CometChat.BaseMessage) => {\n\n // check if the provided conversation type(passed from request builder via props) is equal to message receiverType\n if (\n this.conversationType &&\n this.conversationType != message.getReceiverType()\n ) {\n return false;\n }\n // Checking if the message is a custom message\n let isCustomMessage = message?.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n // Check if the message is a reply to another message\n if (message?.getParentMessageId() && !CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnMessageReplies()) {\n return false;\n }\n if (isCustomMessage) {\n if (message?.getParentMessageId() && CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnMessageReplies() && this.shouldIncrementForCustomMessage(message as CometChat.CustomMessage)) {\n return true\n }\n return this.shouldIncrementForCustomMessage(message as CometChat.CustomMessage);\n }\n // Check if the message is an action message\n if (message?.getCategory() === CometChatUIKitConstants.MessageCategory.action) {\n // Check if the message is a group member action\n if (message.getType() === CometChatUIKitConstants.MessageTypes.groupMember) {\n return CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnGroupActions();\n }\n // By default, action messages should trigger an update\n return true\n }\n // Check if the message is a call (either audio or video)\n if (message?.getCategory() === CometChatUIKitConstants.MessageCategory.call &&\n (message.getType() === CometChatUIKitConstants.MessageTypes.audio ||\n message.getType() === CometChatUIKitConstants.MessageTypes.video)) {\n return CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnCallActivities();\n }\n // By default, messages should trigger an update\n return true;\n }\n\n static shouldIncrementForCustomMessage(message: CometChat.CustomMessage) {\n const metadata: any = message.getMetadata();\n // Checking if the custom message should increment the unread message counter\n return message.willUpdateConversation()\n || (metadata && metadata.hasOwnProperty(\"incrementUnreadCount\") && metadata.incrementUnreadCount) || CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnCustomMessages();\n }\n\n\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M17.6377%207L9.87922%2016.3095L6%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n BadgeStyle,\n BaseStyle,\n ConfirmDialogStyle,\n DateStyle,\n IconStyle,\n ListItemStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useReducer,\n useRef,\n} from \"react\";\nimport {\n CometChatMentionsFormatter,\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n ConversationUtils,\n ConversationsStyle,\n MessageReceiptUtils,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatOption,\n CometChatTheme,\n CometChatUIKitConstants,\n DatePatterns,\n MentionsTargetElement,\n SelectionMode,\n States,\n TitleAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n avatarStyle,\n badgeStyle,\n confirmDialogStyle,\n conversationsWrapperStyle,\n dateStyle,\n defaultSelectionModeNoneTailViewContainerStyle,\n getBackdropStyle,\n getUnreadBadgeStyle,\n iconStyle,\n itemThreadIndicatorStyle,\n listItemStyle,\n listStyle,\n menuListStyle,\n menusStyle,\n receiptStyle,\n statusIndicatorStyle,\n subtitleReceiptAndTextContainerStyle,\n subtitleTextStyle,\n threadViewStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { ConversationsManager } from \"./controller\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport MentionIcon from \"./assets/mention-icon.svg\";\nimport MessageDeliveredIcon from \"./assets/message-delivered.svg\";\nimport MessageReadIcon from \"./assets/message-read.svg\";\nimport MessageSentIcon from \"./assets/message-sent.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport ThreadIcon from \"./assets/thread-arrow.svg\";\nimport WaitIcon from \"./assets/wait.svg\";\nimport WarningSmallIcon from \"./assets/warning-small.svg\";\n\ntype Message =\n | CometChat.TextMessage\n | CometChat.MediaMessage\n | CometChat.CustomMessage\n | CometChat.Action\n | CometChat.Call;\n\ninterface IConversationsProps {\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"CHATS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Request builder to fetch conversations\n * @defaultValue Default request builder having the limit set to 30\n */\n conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: (error: CometChat.CometChatException) => void;\n /**\n * Custom list item view to be rendered for each conversation in the fetched list\n */\n listItemView?: (conversation: CometChat.Conversation) => JSX.Element;\n /**\n * Custom subtitle view to be rendered for each conversation in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (conversation: CometChat.Conversation) => JSX.Element;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed for conversation objects related to users\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean;\n /**\n * Conversation to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeConversation?: CometChat.Conversation;\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Disable receipt status\n *\n * @remarks\n * If set to true, the receipt status of the sent message won't be displayed, and received messages won't be marked as delivered\n *\n * @defaultValue `false`\n */\n disableReceipt?: boolean;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?:\n | ((conversation: CometChat.Conversation) => CometChatOption[])\n | null;\n /**\n * Date format for the date component\n *\n * @remarks\n * The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n datePattern?: DatePatterns;\n\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n\n protectedGroupIcon?: string;\n\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group\n *\n * @defaultValue {undefined}\n */\n\n passwordGroupIcon?: string;\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string;\n /**\n * Image URL for the read status of the sent message\n *\n * @defaultValue `./assets/message-read.svg`\n */\n readIcon?: string;\n /**\n * Image URL for the delivered status of the sent message\n *\n * @defaultValue `./assets/message-delivered.svg`\n */\n deliveredIcon?: string;\n /**\n * Image URL for the wait status of the sent message\n *\n * @defaultValue `./assets/wait.svg`\n */\n waitIcon?: string;\n /**\n * Image URL for the error status of the sent message\n *\n * @defaultValue `./assets/warning-small.svg`\n */\n errorIcon?: string;\n /**\n * Image URL for the sent status of the sent message\n *\n * @defaultValue `./assets/message-sent.svg`\n */\n sentIcon?: string;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_CHATS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Function to call on click of the default list item view of a conversation\n */\n onItemClick?: (conversation: CometChat.Conversation) => void;\n /**\n * Function to call when a conversation from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (conversation: CometChat.Conversation, selected: boolean) => void;\n /**\n * Disable sound for incoming messages\n *\n * @defaulValue `false`\n */\n disableSoundForMessages?: boolean;\n /**\n * Disable typing indicator display\n *\n * @defaultValue `false`\n */\n disableTyping?: boolean;\n /**\n * Custom audio sound for incoming messages\n */\n customSoundForMessages?: string;\n /**\n * Styles to apply to this component\n */\n conversationsStyle?: ConversationsStyle;\n /**\n * Styles to apply to the delete conversation dialog component\n */\n deleteConversationDialogStyle?: ConfirmDialogStyle;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * Styles to apply to the badge component\n *\n * @remarks\n * The badge component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n badgeStyle?: BadgeStyle;\n /**\n * Styles to apply to the receipt component\n *\n * @remarks\n * The receipt component is rendered conditionally inside the subtitle view of the default list item view\n */\n receiptStyle?: ReceiptStyle;\n /**\n * Styles to apply to the date component\n *\n * @remarks\n * The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n dateStyle?: DateStyle;\n /**\n * Styles to apply to the backdrop component\n */\n backdropStyle?: BaseStyle;\n confirmDialogTitle?: string;\n confirmDialogMessage?: string;\n cancelButtonText?: string;\n confirmButtonText?: string;\n disableMentions?: boolean;\n textFormatters?: CometChatTextFormatter[];\n}\n\ntype State = {\n conversationList: CometChat.Conversation[];\n fetchState: States;\n typingIndicatorMap: Map;\n conversationToBeDeleted: CometChat.Conversation | null;\n loggedInUser: CometChat.User | null;\n isFirstReload: boolean;\n unreadMentions: boolean;\n};\n\nexport type Action =\n | {\n type: \"appendConversations\";\n conversations: CometChat.Conversation[];\n removeOldConversation?: boolean;\n }\n | { type: \"setConversationList\"; conversationList: CometChat.Conversation[] }\n | { type: \"setFetchState\"; fetchState: States }\n | {\n type: \"setConversationToBeDeleted\";\n conversation: CometChat.Conversation | null;\n }\n | { type: \"removeConversation\"; conversation: CometChat.Conversation }\n | { type: \"updateConversationWithUser\"; user: CometChat.User }\n | {\n type: \"fromUpdateConversationListFn\";\n conversation: CometChat.Conversation;\n }\n | { type: \"addTypingIndicator\"; typingIndicator: CometChat.TypingIndicator }\n | {\n type: \"removeTypingIndicator\";\n typingIndicator: CometChat.TypingIndicator;\n }\n | { type: \"updateConversationLastMessage\"; message: CometChat.BaseMessage }\n | {\n type: \"updateConversationLastMessageAndPlaceAtTheTop\";\n message: CometChat.BaseMessage;\n }\n | {\n type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\";\n group: CometChat.Group;\n message: CometChat.Action;\n }\n | { type: \"removeConversationOfTheGroup\"; group: CometChat.Group }\n | { type: \"removeConversationOfTheUser\"; user: CometChat.User }\n | {\n type: \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\";\n message: CometChat.BaseMessage;\n conversation: CometChat.Conversation;\n }\n | {\n type: \"resetUnreadCountAndSetReadAtIfLastMessage\";\n message: CometChat.BaseMessage;\n }\n | {\n type: \"setLastMessageReadOrDeliveredAt\";\n updateReadAt: boolean;\n messageReceipt: CometChat.MessageReceipt;\n }\n | { type: \"setLoggedInUser\"; loggedInUser: CometChat.User | null }\n | { type: \"setIsFirstReload\"; isFirstReload: boolean };\n\n/**\n * Checks if `message` is a base message\n *\n * @remarks\n * `CometChat.BaseMessage` is private hence, can't use it with `instanceOf`.\n * This function is identical to `message instanceOf CometChat.BaseMessage` if `CometChat.BaseMessage` wasn't private\n *\n * @param message - A pontential Base message object\n * @returns Is `message` a base message\n */\nfunction isAMessage(message: unknown): message is Message {\n return (\n message instanceof CometChat.TextMessage ||\n message instanceof CometChat.MediaMessage ||\n message instanceof CometChat.CustomMessage ||\n message instanceof CometChat.InteractiveMessage ||\n message instanceof CometChat.Action ||\n message instanceof CometChat.Call\n );\n}\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendConversations\":\n if (action.conversations.length > 0) {\n let conversations: CometChat.Conversation[] = [];\n if (action.removeOldConversation) {\n state.conversationList = [];\n conversations = action.conversations;\n } else {\n conversations = [...state.conversationList, ...action.conversations];\n }\n newState = { ...state, conversationList: conversations };\n }\n break;\n case \"setConversationList\": {\n const { typingIndicatorMap } = state;\n const { conversationList } = action;\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >();\n for (let i = 0; i < conversationList.length; i++) {\n const convWith = conversationList[i].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap.set(\n convWithId,\n typingIndicatorMap.get(convWithId)!\n );\n }\n }\n newState = {\n ...state,\n conversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n break;\n }\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"setConversationToBeDeleted\":\n newState = { ...state, conversationToBeDeleted: action.conversation };\n break;\n case \"removeConversation\": {\n const { typingIndicatorMap, conversationList } = state;\n const targetConvId = action.conversation.getConversationId();\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConvId\n );\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = state.conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"updateConversationWithUser\": {\n const { user } = action;\n const { conversationList } = state;\n const targetUid = user.getUid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.User && convWith?.getUid() === targetUid\n );\n });\n if (targetIdx > -1) {\n const newConversationList = conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setConversationWith(user);\n return newConv;\n }\n return conv;\n });\n newState = { ...state, conversationList: newConversationList };\n }\n break;\n }\n case \"fromUpdateConversationListFn\": {\n const { conversation } = action;\n const targetId = conversation.getConversationId();\n const conversations = state.conversationList.filter((conv) => {\n if (conv.getConversationId() !== targetId) {\n return true;\n }\n // conversation.setUnreadMessageCount(conversation.getUnreadMessageCount() + conv.getUnreadMessageCount());\n return false;\n });\n newState = {\n ...state,\n conversationList: [conversation, ...conversations],\n };\n break;\n }\n case \"setLastMessageReadOrDeliveredAt\": {\n const { conversationList } = state;\n const { messageReceipt, updateReadAt } = action;\n const targetMessageId = messageReceipt.getMessageId();\n const targetIdx = conversationList.findIndex((conv) => {\n if (conv.getConversationWith() instanceof CometChat.User) {\n const lastMessage = conv.getLastMessage();\n if (\n isAMessage(lastMessage) &&\n String(lastMessage.getId()) === targetMessageId\n ) {\n return updateReadAt\n ? !lastMessage.getReadAt()\n : !lastMessage.getDeliveredAt();\n }\n }\n return false;\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n const lastMessage = newConv.getLastMessage();\n if (isAMessage(lastMessage)) {\n if (updateReadAt) {\n lastMessage.setReadAt(messageReceipt.getReadAt());\n newConv.setUnreadMessageCount(0);\n } else {\n lastMessage.setDeliveredAt(messageReceipt.getDeliveredAt());\n }\n }\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"addTypingIndicator\": {\n // Make sure sender is not the logged-in user before executing this block\n const { typingIndicator } = action;\n const senderId = typingIndicator.getSender()?.getUid();\n const isReceiverTypeGroup =\n typingIndicator.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group;\n const receiverId = typingIndicator.getReceiverId();\n let id: string | undefined;\n const { conversationList, typingIndicatorMap } = state;\n for (let i = 0; i < conversationList.length; i++) {\n const convWith = conversationList[i].getConversationWith();\n if (isReceiverTypeGroup) {\n if (\n convWith instanceof CometChat.Group &&\n convWith.getGuid() === receiverId\n ) {\n id = convWith.getGuid();\n break;\n }\n } else if (\n convWith instanceof CometChat.User &&\n convWith?.getUid() === senderId\n ) {\n id = convWith?.getUid();\n break;\n }\n }\n if (id !== undefined) {\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >(typingIndicatorMap);\n newTypingIndicatorMap.set(id, typingIndicator);\n newState = { ...state, typingIndicatorMap: newTypingIndicatorMap };\n }\n break;\n }\n case \"removeTypingIndicator\": {\n const { typingIndicatorMap } = state;\n const { typingIndicator } = action;\n const senderId = typingIndicator.getSender()?.getUid();\n const receiverId = typingIndicator.getReceiverId();\n let id: string | undefined;\n if (\n typingIndicator.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n if (typingIndicatorMap.has(senderId)) {\n id = senderId;\n }\n } else if (\n typingIndicatorMap.get(receiverId)?.getSender()?.getUid() === senderId\n ) {\n id = receiverId;\n }\n if (id !== undefined) {\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >(typingIndicatorMap);\n newTypingIndicatorMap.delete(id);\n newState = { ...state, typingIndicatorMap: newTypingIndicatorMap };\n }\n break;\n }\n case \"updateConversationLastMessage\": {\n const { message } = action;\n const targetMessageId = message?.getId();\n const { conversationList } = state;\n const targetIdx = conversationList.findIndex((conv) => {\n const lastMessage = conv.getLastMessage();\n return (\n isAMessage(lastMessage) && lastMessage.getId() === targetMessageId\n );\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setLastMessage(message);\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\": {\n const { conversationList } = state;\n const { group, message } = action;\n const targetConversationId = message.getConversationId();\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)){\n return state;\n }\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConversationId\n );\n if (targetIdx > -1) {\n const newConv = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n newConv.setConversationWith(group);\n newConv.setLastMessage(message);\n newState = {\n ...state,\n conversationList: [\n newConv,\n ...conversationList.filter((conv, i) => i !== targetIdx),\n ],\n };\n }\n break;\n }\n case \"removeConversationOfTheGroup\": {\n const { conversationList, typingIndicatorMap } = state;\n const targetGuidId = action.group.getGuid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.Group &&\n convWith.getGuid() === targetGuidId\n );\n });\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"removeConversationOfTheUser\": {\n const { conversationList, typingIndicatorMap } = state;\n const targetUid = action.user.getUid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.User && convWith?.getUid() === targetUid\n );\n });\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\": {\n const { conversationList } = state;\n const { message, conversation } = action;\n const targetConvId = message.getConversationId();\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)){\n return state;\n }\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConvId\n );\n if (targetIdx > -1) {\n const targetConversation = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n targetConversation.setLastMessage(message);\n targetConversation.setUnreadMessageCount(0);\n // targetConversation.setUnreadMentionInMessageCount(0);\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: [targetConversation, ...newConversationList],\n };\n } else {\n conversation.setUnreadMessageCount(0);\n // conversation.setUnreadMentionInMessageCount(0);\n const newConversationList = [conversation, ...conversationList];\n newState = { ...state, conversationList: newConversationList };\n }\n break;\n }\n case \"resetUnreadCountAndSetReadAtIfLastMessage\": {\n const { conversationList } = state;\n const { message } = action;\n const messageReadAt = message.getReadAt() || Date.now();\n const targetIdx = conversationList.findIndex((conv) => {\n return conv.getConversationId() === message.getConversationId();\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setUnreadMessageCount(0);\n // newConv.setUnreadMentionInMessageCount(0);\n if (newConv.getLastMessage()) {\n newConv.getLastMessage().setReadAt(messageReadAt);\n }\n\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"updateConversationLastMessageAndPlaceAtTheTop\": {\n const { message } = action;\n const targetMessageId = message?.getId();\n const { conversationList } = state;\n\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)){\n return state;\n }\n const targetIdx = conversationList.findIndex((conv) => {\n const lastMessage = conv.getLastMessage();\n return (\n isAMessage(lastMessage) && lastMessage.getId() === targetMessageId\n );\n });\n if (targetIdx > -1) {\n const newConv = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n newConv.setLastMessage(message);\n newState = {\n ...state,\n conversationList: [\n newConv,\n ...conversationList.filter((conv, i) => i !== targetIdx),\n ],\n };\n }\n break;\n }\n case \"setLoggedInUser\":\n newState = { ...state, loggedInUser: action.loggedInUser };\n break;\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of conversations that has been created in a CometChat app\n */\nexport function CometChatConversations(props: IConversationsProps) {\n const {\n menus = null,\n title = localize(\"CHATS\"),\n titleAlignment = TitleAlignment.left,\n conversationsRequestBuilder = null,\n onError,\n listItemView = null,\n subtitleView = null,\n disableUsersPresence = false,\n hideSeparator = false,\n activeConversation = null,\n selectionMode = SelectionMode.none,\n disableReceipt = false,\n options = null,\n datePattern = DatePatterns.DayDateTime,\n protectedGroupIcon = LockedIcon,\n passwordGroupIcon = undefined,\n privateGroupIcon = PrivateIcon,\n readIcon = MessageReadIcon,\n deliveredIcon = MessageDeliveredIcon,\n waitIcon = WaitIcon,\n errorIcon = WarningSmallIcon,\n sentIcon = MessageSentIcon,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_CHATS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n onItemClick = null,\n onSelect = null,\n disableSoundForMessages = false,\n disableTyping = false,\n customSoundForMessages = null,\n confirmDialogTitle = localize(\"DELETE_CONVERSATION\"),\n confirmDialogMessage = localize(\n \"WOULD__YOU_LIKE_TO_DELETE_THIS_CONVERSATION\"\n ),\n cancelButtonText = localize(\"CANCEL\"),\n confirmButtonText = localize(\"DELETE\"),\n conversationsStyle = null,\n deleteConversationDialogStyle = null,\n avatarStyle: avatarStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n badgeStyle: badgeStyleObject = null,\n receiptStyle: receiptStyleObject = null,\n dateStyle: dateStyleObject = null,\n backdropStyle: backDropStyleObject = null,\n disableMentions = false,\n textFormatters = [],\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n conversationList: [],\n fetchState: States.loading,\n typingIndicatorMap: new Map(),\n conversationToBeDeleted: null,\n loggedInUser: null,\n isFirstReload: false,\n unreadMentions: false,\n });\n const [confirmDialogElement, setConfirmDialogRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null\n >(null);\n const conversationsManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError);\n const customSoundForMessagesRef = useRefSync(customSoundForMessages);\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n\n (() => {\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Initiates a fetch request and appends the fetched conversations to the `conversationList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `conversationList` state\n */\n const fetchNextAndAppendConversations = useCallback(\n async (fetchId: string): Promise => {\n const conversationManager = conversationsManagerRef.current;\n if (!conversationManager) {\n return;\n }\n let initialState = isConnectionReestablished.current\n ? States.loaded\n : States.loading;\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const conversations = await conversationManager.fetchNext();\n\n if (conversations.length !== 0 && fetchNextIdRef.current === fetchId) {\n let removeOldConversation = isConnectionReestablished.current\n ? true\n : false;\n dispatch({\n type: \"appendConversations\",\n conversations,\n removeOldConversation,\n });\n }\n if (attachListenerOnFetch.current) {\n ConversationsManager.attachConnestionListener(() => {\n conversationsManagerRef.current = new ConversationsManager({\n conversationsRequestBuilder,\n });\n isConnectionReestablished.current = true;\n fetchNextAndAppendConversations(\n (fetchNextIdRef.current =\n \"initialFetchNext_\" + String(Date.now()))\n );\n });\n attachListenerOnFetch.current = false;\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } else {\n isConnectionReestablished.current = false;\n }\n } catch (error) {\n if (state.conversationList.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n },\n [errorHandler, dispatch]\n );\n\n const getIncrementUnreadCountBoolFromMetaData = useCallback(\n (message: CometChat.BaseMessage) => {\n const metaDataGetterName = \"metadata\";\n const willUpdateConversation = message instanceof CometChat.CustomMessage && message.willUpdateConversation();\n const incrementUnreadCountFieldName = \"incrementUnreadCount\";\n let metaData: any;\n return (\n metaDataGetterName in message &&\n (metaData = message[metaDataGetterName]) &&\n ( incrementUnreadCountFieldName in metaData || willUpdateConversation)&&\n Boolean(metaData[incrementUnreadCountFieldName])\n );\n },\n []\n );\n\n /**\n * Updates the unreadCount of `conversation` & moves it to the top of the `conversationList`\n */\n const updateConversationList = useCallback(\n (\n conversation: CometChat.Conversation,\n newMessage: CometChat.BaseMessage\n ): void => {\n const message = newMessage || conversation.getLastMessage();\n if (!isAMessage(message)) {\n return;\n }\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)){\n return ;\n }\n const incrementUnreadCount =\n (message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message ||\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.call ||\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive ||\n getIncrementUnreadCountBoolFromMetaData(message)) &&\n message.getSender().getUid() !== state.loggedInUser?.getUid();\n conversation.setUnreadMessageCount(\n (conversation.getUnreadMessageCount() ?? 0) +\n Number(incrementUnreadCount)\n );\n if (message instanceof CometChat.Action &&\n message.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.group &&\n conversation.getConversationType() === CometChatUIKitConstants.MessageReceiverType.group) {\n\n const isSameGroup = (message.getReceiver() as CometChat.Group).getGuid() ===\n (message.getActionFor() as CometChat.Group).getGuid();\n\n if (isSameGroup) {\n let updatedGroup = conversation.getConversationWith() as CometChat.Group;\n updatedGroup.setMembersCount((message.getActionFor() as CometChat.Group).getMembersCount());\n conversation.setConversationWith(updatedGroup);\n }\n }\n conversation.setLastMessage(message);\n // conversation.setUnreadMentionInMessageCount(\n // newMessage.getMentionedUsers()\n // ? (conversation.getUnreadMentionInMessageCount() + newMessage.getMentionedUsers().length)\n // : 0\n // );\n dispatch({ type: \"fromUpdateConversationListFn\", conversation });\n },\n [dispatch, state.loggedInUser, getIncrementUnreadCountBoolFromMetaData]\n );\n\n /**\n * Removes or updates the conversation in the `conversationList` state\n */\n const refreshSingleConversation = useCallback(\n async (message: CometChat.BaseMessage, removeConversation: boolean = false): Promise => {\n\n try {\n const targetIdx = state.conversationList.findIndex((conv) => {\n return conv.getConversationId() === message.getConversationId();\n });\n if (targetIdx >= 0) {\n const conversation = state.conversationList[targetIdx];\n if (removeConversation) {\n dispatch({ type: \"removeConversation\", conversation: conversation });\n }\n else {\n updateConversationList(conversation, message);\n }\n } else {\n CometChat.CometChatHelper.getConversationFromMessage(message).then(\n (conversation) => {\n updateConversationList(conversation, message);\n }\n );\n\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [errorHandler, updateConversationList, state.conversationList]\n );\n\n /**\n * Handles new received messages\n */\n const onMessageReceived = useCallback(\n async (message: CometChat.BaseMessage): Promise => {\n if (\n message.getSender().getUid() !== state.loggedInUser?.getUid() &&\n !disableReceipt &&\n !message.getDeliveredAt()\n ) {\n try {\n CometChat.markAsDelivered(message);\n } catch (error) {\n errorHandler(error);\n }\n }\n if (\n !disableSoundForMessages &&\n !(\n (message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.custom &&\n !getIncrementUnreadCountBoolFromMetaData(message)) ||\n (activeConversation &&\n activeConversation.getConversationId() ===\n message.getConversationId())\n )\n ) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage,\n customSoundForMessagesRef.current\n );\n }\n refreshSingleConversation(message);\n },\n [\n disableReceipt,\n disableSoundForMessages,\n refreshSingleConversation,\n errorHandler,\n state.loggedInUser,\n activeConversation,\n getIncrementUnreadCountBoolFromMetaData,\n customSoundForMessagesRef,\n ]\n );\n\n /**\n * Updates `readAt` or `deliveredAt` of a conversation's last message\n */\n const setReceipts = useCallback(\n (messageReceipt: CometChat.MessageReceipt, updateReadAt: boolean): void => {\n dispatch({\n type: \"setLastMessageReadOrDeliveredAt\",\n updateReadAt,\n messageReceipt,\n });\n },\n [dispatch]\n );\n\n /**\n * Handles new typing indicators\n */\n const setTypingIndicator = useCallback(\n (\n typingIndicator: CometChat.TypingIndicator,\n typingStarted: boolean\n ): void => {\n if (\n state.loggedInUser?.getUid() === typingIndicator.getSender()?.getUid()\n ) {\n return;\n }\n if (typingStarted) {\n dispatch({ type: \"addTypingIndicator\", typingIndicator });\n } else {\n dispatch({ type: \"removeTypingIndicator\", typingIndicator });\n }\n },\n [state.loggedInUser]\n );\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n
    \n {menus}\n
    \n );\n }\n\n /**\n * Get avatar URL for the default list item view\n */\n function getListItemAvatarURL(conversation: CometChat.Conversation): string {\n const convWith = conversation.getConversationWith();\n return convWith instanceof CometChat.User\n ? convWith.getAvatar()\n : convWith.getIcon();\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getListItemStatusIndicatorColor(\n conversation: CometChat.Conversation\n ): string | null {\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.User) {\n if (\n !disableUsersPresence &&\n convWith.getStatus() === CometChatUIKitConstants.userStatusType.online\n ) {\n return (\n conversationsStyle?.onlineStatusColor ||\n theme.palette.getSuccess() ||\n \"rgb(0, 200, 111)\"\n );\n }\n return null;\n } else {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n return (\n conversationsStyle?.passwordGroupIconBackground ||\n \"rgb(247, 165, 0)\"\n );\n case CometChatUIKitConstants.GroupTypes.private:\n return (\n conversationsStyle?.privateGroupIconBackground ||\n theme.palette.getSuccess() ||\n \"rgb(0, 200, 111)\"\n );\n default:\n return null;\n }\n }\n }\n\n /**\n * Get the status indicator icon for the default list item view\n */\n function getListItemStatusIndicatorIcon(\n conversation: CometChat.Conversation\n ): string {\n let statusIndicatorIcon:string | undefined = \"\";\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.Group) {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n statusIndicatorIcon = passwordGroupIcon || protectedGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n statusIndicatorIcon = privateGroupIcon;\n break;\n default:\n break;\n }\n }\n return statusIndicatorIcon;\n }\n\n /**\n * Creates subtitle thread view\n */\n function getSubtitleThreadView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n const lastMessage = conversation.getLastMessage();\n if (!isAMessage(lastMessage) || !lastMessage.getParentMessageId()) {\n // parentMessageId is falsy, it is not a valid parent message id\n return null;\n }\n return (\n
    \n \n \n
    \n );\n }\n\n function shouldDisplaySubtitleReceipt(\n conversation: CometChat.Conversation\n ): boolean {\n const lastMessage = conversation.getLastMessage();\n const convWith = conversation.getConversationWith();\n const id =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n return (\n !disableReceipt &&\n isAMessage(lastMessage) &&\n !lastMessage.getDeletedAt() &&\n lastMessage.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n lastMessage.getSender()?.getUid() === state.loggedInUser?.getUid() &&\n state.typingIndicatorMap.get(id) === undefined\n );\n }\n\n /**\n * Creates subtitle receipt view\n */\n function getSubtitleReadReceiptView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n if (!shouldDisplaySubtitleReceipt(conversation)) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates subtitle text\n */\n function getSubtitleText(\n conversation: CometChat.Conversation\n ): string | JSX.Element {\n const convWith = conversation.getConversationWith();\n const id =\n convWith instanceof CometChat.Group\n ? convWith.getGuid()\n : convWith?.getUid();\n const typingIndicator = state.typingIndicatorMap.get(id);\n if (typingIndicator !== undefined) {\n if (convWith instanceof CometChat.Group) {\n return `${typingIndicator.getSender().getName()} ${localize(\n \"IS_TYPING\"\n )}`;\n } else {\n return localize(\"IS_TYPING\");\n }\n }\n if (state.loggedInUser) {\n let icon = \"\";\n const lastMessage = conversation.getLastMessage();\n if (\n lastMessage &&\n lastMessage.getCategory() ===\n CometChatUIKitConstants.MessageCategory.call\n ) {\n icon = `${lastMessage.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? \"📞\"\n : \"📹\"\n } `;\n }\n let messageObject = conversation.getLastMessage();\n let subtitle =\n ChatConfigurator.getDataSource().getLastConversationMessage(\n conversation,\n state.loggedInUser!,\n {\n disableMentions,\n theme,\n mentionsTargetElement: MentionsTargetElement.conversation,\n textFormattersList: textFormatters\n }\n );\n if (\n messageObject &&\n conversation?.getConversationType() !== CometChat.RECEIVER_TYPE.USER\n ) {\n if (\n messageObject?.getSender().getUid() ===\n (state.loggedInUser as CometChat.User)?.getUid()\n ) {\n subtitle = `${subtitle}`;\n } else {\n subtitle = `${subtitle}`;\n }\n }\n return (\n \n );\n }\n return \"\";\n }\n\n /**\n * Creates subtitle text view\n */\n function getSubtitleTextView(\n conversation: CometChat.Conversation\n ): JSX.Element {\n return (\n \n {getSubtitleText(conversation)}\n \n );\n }\n\n /**\n * Creates subtitle view for the default list item view\n */\n function getListItemSubtitleView(\n conversation: CometChat.Conversation\n ): JSX.Element {\n if (subtitleView !== null) {\n return <>{subtitleView(conversation)};\n }\n return (\n <>\n {getSubtitleThreadView(conversation)}\n \n {getSubtitleReadReceiptView(conversation)}\n {getSubtitleTextView(conversation)}\n \n \n );\n }\n\n /**\n * Sets the `conversationToBeDeleted` state to the given `conversation`\n */\n function deleteOptionCallback(conversation: CometChat.Conversation): void {\n dispatch({ type: \"setConversationToBeDeleted\", conversation });\n }\n\n /**\n * Creates menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of view is handled by the default list item view\n */\n function getListItemMenuView(\n conversation: CometChat.Conversation,\n theme: CometChatTheme\n ) {\n if (selectionMode !== SelectionMode.none) {\n return null;\n }\n let curOptions;\n if (!options) {\n const defaultOptions = ConversationUtils.getDefaultOptions();\n for (let i = 0; i < defaultOptions.length; i++) {\n if (\n defaultOptions[i].id ===\n CometChatUIKitConstants.ConversationOptions.delete\n ) {\n defaultOptions[i].onClick = () => deleteOptionCallback(conversation);\n defaultOptions[i].iconTint = theme.palette.getAccent600();\n }\n }\n curOptions = defaultOptions;\n } else {\n curOptions = options?.(conversation);\n }\n if (curOptions?.length === 0) {\n return null;\n }\n return (\n {\n const { onClick } = e.detail.data;\n onClick?.();\n }}\n />\n );\n }\n\n /**\n * Creates tail content view for the default list item view\n */\n function getListItemTailContentView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n switch (selectionMode) {\n case SelectionMode.none: {\n const lastMessage = conversation.getLastMessage();\n if (!lastMessage) {\n return null;\n }\n // const isUnreadMentions = conversation.getUnreadMentionInMessageCount() > 0;\n return (\n \n \n
    \n {/* {isUnreadMentions && (\n
    \n \n
    \n )} */}\n \n
    \n \n );\n }\n case SelectionMode.single:\n return (\n
    \n onSelect?.(conversation, e.detail.checked)}\n />\n
    \n );\n case SelectionMode.multiple:\n return (\n
    \n onSelect?.(conversation, e.detail.checked)}\n />\n
    \n );\n default:\n return null;\n }\n }\n\n const setStatusIndicatorStyle = (conversation: CometChat.Conversation) => {\n\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.User) {\n if (\n !disableUsersPresence &&\n convWith.getStatus() === CometChatUIKitConstants.userStatusType.online\n ) {\n return (\n statusIndicatorStyle(\n statusIndicatorStyleObject\n )\n );\n }\n return null;\n }else {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.private:\n case CometChatUIKitConstants.GroupTypes.password:\n return (\n statusIndicatorStyle(\n statusIndicatorStyleObject\n )\n );\n default:\n return null;\n }\n }\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (\n conversation: CometChat.Conversation\n ) => JSX.Element {\n if (listItemView !== null) {\n return listItemView;\n }\n return function (conversation: CometChat.Conversation) {\n return (\n onItemClick?.(conversation)}\n subtitleView={getListItemSubtitleView(conversation)}\n subtitleViewClassName='cc-conversations__subtitle-view'\n menuView={getListItemMenuView(conversation, theme)}\n menuViewClassName='cc-conversations__options-view'\n tailView={getListItemTailContentView(conversation)}\n tailViewClassName='cc-conversations__tail-view'\n />\n );\n };\n }\n\n /**\n * Creates conversation delete view\n */\n function getConversationDeleteView(): JSX.Element | null {\n if (state.conversationToBeDeleted === null) {\n return null;\n }\n return (\n \n \n \n );\n }\n\n Hooks({\n conversationsRequestBuilder,\n conversationsManagerRef,\n fetchNextAndAppendConversations,\n fetchNextIdRef,\n dispatch,\n confirmDialogElement,\n conversationToBeDeleted: state.conversationToBeDeleted,\n errorHandler,\n refreshSingleConversation,\n onMessageReceived,\n setReceipts,\n setTypingIndicator,\n disableTyping,\n loggedInUser: state.loggedInUser,\n isFirstReload: false,\n });\n\n return (\n \n {getMenusView()}\n \n fetchNextAndAppendConversations(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n showSectionHeader={false}\n state={\n state.fetchState === States.loaded &&\n state.conversationList.length === 0\n ? States.empty\n : state.fetchState\n }\n loadingIconURL={loadingIconURL}\n loadingView={loadingStateView}\n emptyStateText={emptyStateText}\n emptyStateView={emptyStateView}\n errorStateText={errorStateText}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={listStyle(conversationsStyle, theme)}\n />\n {getConversationDeleteView()}\n \n );\n}\n","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-corner-right-down%22%3E%3Cpolyline%20points%3D%2210%2015%2015%2020%2020%2015%22%3E%3C%2Fpolyline%3E%3Cpath%20d%3D%22M4%204h7a4%204%200%200%201%204%204v12%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\"","import { CometChatCallEvents, CometChatConversationEvents, CometChatGroupEvents, CometChatMessageEvents, CometChatUserEvents, MessageStatus } from \"@cometchat/uikit-resources\";\nimport React, { JSX, useEffect } from \"react\";\n\nimport { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { ConversationsManager } from \"./controller\";\n\ntype Args = {\n conversationsRequestBuilder : CometChat.ConversationsRequestBuilder | null,\n conversationsManagerRef : React.MutableRefObject,\n fetchNextAndAppendConversations : (fetchId : string) => Promise,\n fetchNextIdRef : React.MutableRefObject,\n dispatch : React.Dispatch,\n confirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n conversationToBeDeleted : CometChat.Conversation | null,\n errorHandler : (error: unknown) => void,\n refreshSingleConversation : (message : CometChat.BaseMessage, remove? : boolean) => Promise,\n onMessageReceived : (message : CometChat.BaseMessage) => Promise,\n setReceipts : (messageReceipt : CometChat.MessageReceipt, updateReadAt : boolean) => void,\n setTypingIndicator : (typingIndicator : CometChat.TypingIndicator, typingStarted : boolean) => void,\n disableTyping : boolean,\n loggedInUser : CometChat.User | null,\n isFirstReload: boolean\n};\n\nexport function Hooks(args : Args) {\n const {\n conversationsRequestBuilder,\n conversationsManagerRef,\n fetchNextAndAppendConversations,\n fetchNextIdRef,\n dispatch,\n confirmDialogElement,\n conversationToBeDeleted,\n errorHandler,\n refreshSingleConversation,\n onMessageReceived,\n setReceipts,\n setTypingIndicator,\n disableTyping,\n loggedInUser,\n isFirstReload\n } = args;\n\n\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `conversationList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n conversationsManagerRef.current = new ConversationsManager({conversationsRequestBuilder});\n dispatch({type: \"setConversationList\", conversationList: []});\n fetchNextAndAppendConversations(fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()));\n\n\n\n }, [conversationsRequestBuilder, fetchNextAndAppendConversations, dispatch, conversationsManagerRef, fetchNextIdRef]);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n dispatch({type: \"setLoggedInUser\", loggedInUser: await CometChat.getLoggedinUser()});\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, dispatch]);\n\n useEffect(\n /**\n * Attaches event listeners to elements related to the conversation delete view\n */\n () => {\n if (confirmDialogElement === null) {\n return;\n }\n const confirmClickEventName = \"cc-confirm-clicked\";\n const cancelClickEventName = \"cc-cancel-clicked\";\n async function handleConfirmClick() {\n if (conversationToBeDeleted) {\n const convWith = conversationToBeDeleted.getConversationWith();\n const id = convWith instanceof CometChat.Group ? convWith.getGuid() : convWith.getUid();\n\n try {\n await CometChat.deleteConversation(id, conversationToBeDeleted.getConversationType());\n CometChatConversationEvents.ccConversationDeleted.next(CometChatUIKitUtility.clone(conversationToBeDeleted));\n dispatch({type: \"removeConversation\", conversation: conversationToBeDeleted});\n dispatch({type: \"setConversationToBeDeleted\", conversation: null});\n }\n catch(error) {\n errorHandler(error);\n }\n }\n }\n function handleCancelClick() {\n dispatch({type: \"setConversationToBeDeleted\", conversation: null});\n }\n confirmDialogElement.addEventListener(confirmClickEventName, handleConfirmClick);\n confirmDialogElement.addEventListener(cancelClickEventName, handleCancelClick);\n return () => {\n confirmDialogElement.removeEventListener(confirmClickEventName, handleConfirmClick);\n confirmDialogElement.removeEventListener(cancelClickEventName, handleCancelClick);\n };\n }, [conversationToBeDeleted, confirmDialogElement, errorHandler, dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return ConversationsManager.attachUserListener((user : CometChat.User) => dispatch({type: \"updateConversationWithUser\", user}));\n }, [dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return ConversationsManager.attachGroupListener(refreshSingleConversation, loggedInUser);\n }, [refreshSingleConversation, loggedInUser]);\n\n useEffect(\n /**\n * Attaches an SDK message received listener\n *\n * @returns - Function to remove the added SDK message received listener\n */\n () => {\n return ConversationsManager.attachMessageReceivedListener(onMessageReceived);\n }, [onMessageReceived]);\n\n useEffect(\n /**\n * Attaches an SDK message modified listener\n *\n * @returns - Function to remove the added SDK message modified listener\n */\n () => {\n return ConversationsManager.attachMessageModifiedListener((message : CometChat.BaseMessage) => {\n dispatch({type: \"updateConversationLastMessage\", message});\n })\n }, [dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK message receipt listener\n *\n * @returns - Function to remove the added SDK message receipt listener\n */\n () => {\n return ConversationsManager.attachMessageReceiptListener(setReceipts);\n }, [setReceipts]);\n\n useEffect(\n /**\n * Attaches an SDK message typing listener\n *\n * @returns - Function to remove the added SDK message typing listener\n */\n () => {\n if (disableTyping) {\n return;\n }\n return ConversationsManager.attachMessageTypingListener(setTypingIndicator);\n }, [disableTyping, setTypingIndicator]);\n\n useEffect(\n /**\n * Attaches an SDK call listener\n *\n * @returns - Function to remove the added SDK call listener\n */\n () => {\n return ConversationsManager.attachCallListener(refreshSingleConversation);\n }, [refreshSingleConversation]);\n\n useEffect(\n /**\n * Subscribes to User, Group, Message & Call UI events\n */\n () => {\n const groupMemberScopeChangedSub = CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe(item => { \n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message: item.message});\n });\n const groupMemberAddedSub = CometChatGroupEvents.ccGroupMemberAdded.subscribe(item => {\n const message = item.messages[item.messages.length - 1];\n if (message) {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.userAddedIn, message});\n }\n });\n const groupMemberKickedSub = CometChatGroupEvents.ccGroupMemberKicked.subscribe(item => {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.kickedFrom, message: item.message});\n });\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe(item => {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.kickedFrom, message: item.message});\n });\n const groupDeletedSub = CometChatGroupEvents.ccGroupDeleted.subscribe(group => {\n dispatch({type: \"removeConversationOfTheGroup\", group});\n });\n const groupLeftSub = CometChatGroupEvents.ccGroupLeft.subscribe(item => {\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(item.message)){\n return ;\n }\n dispatch({type: \"removeConversationOfTheGroup\", group: item.leftGroup});\n });\n const userBlockedSub = CometChatUserEvents.ccUserBlocked.subscribe(user => {\n dispatch({type: \"removeConversationOfTheUser\", user});\n });\n const messageEditedSub = CometChatMessageEvents.ccMessageEdited.subscribe(item => {\n if (item.status === MessageStatus.success) {\n dispatch({type: \"updateConversationLastMessage\", message: item.message});\n }\n });\n const messageSentSub = CometChatMessageEvents.ccMessageSent.subscribe(item => {\n if (item.status === MessageStatus.success) {\n CometChat.CometChatHelper.getConversationFromMessage(item.message).then(conversation => {\n dispatch({type: \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\", message: item.message , conversation: conversation});\n });\n }\n });\n const messageDeletedSub = CometChatMessageEvents.ccMessageDeleted.subscribe(message => {\n dispatch({type: \"updateConversationLastMessage\", message: CometChatUIKitUtility.clone(message)}); // Cloning message since I don't know if the developer is passing a cloned copy\n });\n const messageReadSub = CometChatMessageEvents.ccMessageRead.subscribe(message => {\n dispatch({type: \"resetUnreadCountAndSetReadAtIfLastMessage\", message});\n });\n const callAcceptedSub = CometChatCallEvents.ccCallAccepted.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const outgoingCallSub = CometChatCallEvents.ccOutgoingCall.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const callRejectedSub = CometChatCallEvents.ccCallRejected.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const callEndedSub = CometChatCallEvents.ccCallEnded.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n return () => {\n groupMemberScopeChangedSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n groupMemberKickedSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupDeletedSub.unsubscribe();\n groupLeftSub.unsubscribe();\n userBlockedSub.unsubscribe();\n messageEditedSub.unsubscribe();\n messageSentSub.unsubscribe();\n messageDeletedSub.unsubscribe();\n messageReadSub.unsubscribe();\n callAcceptedSub.unsubscribe();\n outgoingCallSub.unsubscribe();\n callRejectedSub.unsubscribe();\n callEndedSub.unsubscribe();\n };\n }, [dispatch]);\n}\n","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport {\n ConversationsConfiguration,\n MessageHeaderStyle,\n MessagesConfiguration,\n MessagesStyle,\n WithMessagesStyle,\n} from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { LabelStyle } from \"@cometchat/uikit-elements\";\n\nconst labelStyle: LabelStyle = {\n height: \"100%\",\n width: \"100%\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: \"flex\",\n height: \"100%\",\n width: \"100%\",\n boxSizing: \"border-box\",\n position: \"relative\",\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: \"calc(100% - 280px)\",\n height: \"100%\",\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n width: \"100%\",\n height: \"auto\",\n} as CSSProperties;\n\nconst WithMessagesSidebarStyle = {\n width: \"280px\",\n height: \"100%\",\n position: \"relative\",\n} as CSSProperties;\n\nexport const getConversationsWrapperStyles = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n ...WithMessagesWrapperStyle,\n width: \"100%\",\n height: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"0\",\n background: theme.palette.getBackground(),\n ...conversationsWithMessagesStyle,\n } as CSSProperties;\n};\n\nexport const getWithMessagesSidebarStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme,\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeUser, activeGroup);\n } else {\n return getDesktopViewSidebarStyle(conversationsWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n const visibility =\n activeUser || activeGroup\n ? { visibility: \"hidden\" }\n : { visibility: \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nconst getDesktopViewSidebarStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight:\n conversationsWithMessagesStyle?.border ||\n `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`,\n } as CSSProperties;\n};\n\nexport const getWithMessagesMainStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeUser, activeGroup);\n } else {\n return getDesktopViewMainStyle(conversationsWithMessagesStyle);\n }\n};\n\nconst getMobileViewMainStyle = (\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n const visibility =\n activeUser || activeGroup\n ? { visibility: \"visible\" }\n : { visibility: \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nconst getDesktopViewMainStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`,\n };\n};\n\nexport const getLabelStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n ...labelStyle,\n textFont:\n conversationsWithMessagesStyle?.messageTextFont ||\n fontHelper(theme.typography.title1),\n textColor:\n conversationsWithMessagesStyle?.messageTextColor ||\n theme.palette.getAccent600(),\n } as LabelStyle;\n};\n\nexport const getConversationsStyle = (\n conversationsConfiguration: ConversationsConfiguration | undefined\n) => {\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...conversationsConfiguration?.conversationsStyle,\n };\n};\n\nexport const getMessageHeaderStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n messagesConfiguration: MessagesConfiguration | undefined,\n isMobileView: boolean | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView\n ? `${borderRadius} ${borderRadius} 0 0`\n : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle,\n } as MessageHeaderStyle;\n};\n\nexport const getMessageComposerStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n messagesConfiguration: MessagesConfiguration | undefined,\n isMobileView: boolean | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView\n ? `0 0 ${borderRadius} ${borderRadius}`\n : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration\n ?.messageComposerStyle,\n };\n};\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n conversationsWithMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: conversationsWithMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n let visibility = { visibility: \"hidden\" };\n if (!activeUser && !activeGroup && !isMobileView) {\n visibility = { visibility: \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`,\n } as CSSProperties;\n};\n\nexport const getBackdropStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n conversationsConfiguration: ConversationsConfiguration | undefined\n) => {\n return {\n height:\n conversationsConfiguration?.backdropStyle?.height ||\n conversationsWithMessagesStyle?.height,\n width:\n conversationsConfiguration?.backdropStyle?.width ||\n conversationsWithMessagesStyle?.width,\n background:\n conversationsConfiguration?.backdropStyle?.background ||\n \"rgba(0, 0, 0, 0.5)\",\n border: conversationsConfiguration?.backdropStyle?.border || \"0 none\",\n borderRadius:\n conversationsConfiguration?.backdropStyle?.borderRadius || \"0\",\n };\n};\n\nexport const getButtonStyle = (\n showCometChatContacts: boolean,\n theme: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: showCometChatContacts\n ? theme.palette.getAccent600()\n : theme.palette.getPrimary(),\n };\n};\n","import {\n CometChatTheme,\n fontHelper,\n TabsVisibility,\n} from \"@cometchat/uikit-resources\";\nimport { ContactsStyle, TabItemStyle } from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { TabsStyle } from \"../Shared/Views/CometChatTabs/TabsStyle\";\n\ntype ButtonStyle = CSSProperties & { buttonIconTint?: string };\ntype HeaderStyle = CSSProperties;\ntype WrapperStyle = CSSProperties;\ntype ContentStyle = CSSProperties;\n\nexport function closeBtnStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: contactsStyle?.closeIconTint || theme.palette.getPrimary(),\n background: \"transparent\",\n position: \"absolute\",\n top: \"8px\",\n right: \"12px\",\n };\n}\n\nexport function submitBtnWrapperStyle() {\n return {\n boxSizing: 'border-box',\n } as CSSProperties;\n}\n\n\nexport function submitBtnStyle(contactsStyle : ContactsStyle | null, theme : CometChatTheme) : any {\n return { \n background: contactsStyle?.submitButtonBackground || theme.palette.getPrimary(),\n buttonTextColor: contactsStyle?.submitButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: contactsStyle?.submitButtonTextFont || fontHelper(theme.typography.title2),\n height:\"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px\",\n padding: \"8px\",\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\"\n };\n}\n\nexport function contactsHeaderStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): HeaderStyle {\n return {\n height: \"30px\",\n textAlign: \"center\",\n font: contactsStyle?.titleTextFont || fontHelper(theme.typography.title1),\n padding: \"10px 0px\",\n color: contactsStyle?.titleTextColor || theme.palette.getAccent(),\n };\n}\n\nexport function contactsWrapperStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): WrapperStyle {\n return {\n height: contactsStyle?.height || \"94%\",\n width: contactsStyle?.width || \"100%\",\n background: contactsStyle?.background || theme.palette.getBackground(),\n border: contactsStyle?.border || \"none\",\n borderRadius: contactsStyle?.borderRadius || \"none\",\n boxShadow: contactsStyle?.boxShadow || \"0\",\n padding: contactsStyle?.padding || \"0\",\n display: \"flex\",\n zIndex:1\n };\n}\n\nexport function getContactsStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): CSSProperties {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n //margin: \"0 auto\",\n //height:\"100%\"\n };\n}\n\nexport function contactsContentStyle(): ContentStyle {\n return {\n height: \"calc(100% - 50px)\",\n };\n}\n\nexport function getTabsStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n) {\n return {\n height: \"100%\",\n width: \"100%\",\n tabListHeight: \"30px\",\n tabListBackground: \"#ececec\",\n tabListPadding: \"2px 2px\",\n tabListBorderRadius: \"8px\",\n tabPaneWidth: \"100%\",\n tabPaneHeight: \"calc(100% - 30px)\",\n } as TabsStyle;\n}\n\nexport const getTabItemStyling = (\n contactsStyle: ContactsStyle,\n theme: CometChatTheme,\n tabVisibility: TabsVisibility | undefined,\n isActive: boolean\n) => {\n return {\n width: tabVisibility === TabsVisibility.usersAndGroups ? \"50%\" : \"100%\",\n height: contactsStyle.tabHeight ||\"100%\",\n borderRadius: contactsStyle.tabBorderRadius || \"0\",\n border:contactsStyle.tabBorder||\"none\",\n titleTextFont: contactsStyle.tabTitleTextFont || fontHelper(theme.typography.text2),\n titleTextColor: contactsStyle.tabTitleTextColor || theme.palette.getAccent(),\n activeTitleTextFont: contactsStyle.activeTabTitleTextFont || fontHelper(theme.typography.text2),\n activeTitleTextColor: contactsStyle.activeTabTitleTextColor || theme.palette.getAccent(),\n activeBackground: contactsStyle.activeTabBackground || theme.palette.getBackground(),\n activeBorderRadius: \"8px\",\n activeBorder: \"2px solid red\" || contactsStyle.activeTabBorder || \"\",\n background:contactsStyle.tabBackground || \"#ececec\",\n boxShadow:\n \"0px 3px 8px rgba(20, 20, 20, 0.12), 0 3px 1px rgba(20, 20, 20, 0.04)\",\n } as TabItemStyle;\n};\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { GroupsStyle } from \"@cometchat/uikit-shared\";\n\nexport function groupsWrapperStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n boxSizing: \"border-box\",\n background: groupsStyleObject?.background || theme.palette.getBackground(),\n width: groupsStyleObject?.width || \"100%\",\n height: groupsStyleObject?.height || \"100%\",\n border: groupsStyleObject?.border || `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: groupsStyleObject?.borderRadius || \"0\",\n overflow: \"hidden\"\n };\n}\n\nexport function menusStyle() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"16px\",\n right: \"16px\",\n cursor: \"pointer\",\n display: \"flex\",\n flexDirection: \"row-reverse\",\n width: \"24px\"\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | undefined) : CSSProperties {\n const obj = statusIndicatorStyleObject !== undefined ? statusIndicatorStyleObject : {}; \n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | undefined, theme : CometChatTheme) : AvatarStyle {\n\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.caption1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | undefined, groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : ListItemStyle {\n \n return new ListItemStyle({\n height: listItemStyleObject?.height || \"auto\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n padding: listItemStyleObject?.padding || \"0\",\n separatorColor: listItemStyleObject?.separatorColor || groupsStyleObject?.separatorColor || theme.palette.getAccent100(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function groupsStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : GroupsStyle {\n return new GroupsStyle({\n background: \"inherit\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: groupsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupsStyleObject?.titleTextColor || theme.palette.getAccent(),\n searchPlaceholderTextFont: groupsStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: groupsStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: groupsStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: groupsStyleObject?.searchTextColor || theme.palette.getAccent(),\n searchBorder: groupsStyleObject?.searchBorder || \"none\",\n searchBorderRadius: groupsStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: groupsStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchIconTint: groupsStyleObject?.searchIconTint || theme.palette.getAccent500(),\n separatorColor: groupsStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: groupsStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: groupsStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: groupsStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: groupsStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: groupsStyleObject?.errorStateTextColor || theme.palette.getAccent600()\n });\n}\n\nexport function subtitleStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : CSSProperties {\n return {\n font: groupsStyleObject?.subTitleTextFont || fontHelper(theme.typography.subtitle2),\n color: groupsStyleObject?.subTitleTextColor || theme.palette.getAccent600(),\n };\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport { Action } from \".\";\n\ntype Args = {\n searchText: string,\n groupsRequestBuilder: CometChat.GroupsRequestBuilder | null,\n searchRequestBuilder: CometChat.GroupsRequestBuilder | null,\n groupsSearchText:React.MutableRefObject\n};\n\nexport class GroupsManager {\n private groupsRequest: CometChat.GroupsRequest;\n private static loggedInUser: CometChat.User | null | undefined;\n private static defaultLimit = 30;\n\n /**\n * Set `groupsRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n groupsRequestBuilder,\n searchRequestBuilder,\n groupsSearchText\n } = args;\n let tmpGrpReqBuilder = groupsRequestBuilder || this.getDefaultRequestBuilder();\n if(searchText && searchRequestBuilder) {\n tmpGrpReqBuilder = searchRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && groupsRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }else if(!searchText && groupsRequestBuilder && searchRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else if(!searchText && groupsRequestBuilder && !searchRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else if(!searchText && !groupsRequestBuilder && searchRequestBuilder){\n tmpGrpReqBuilder = this.getDefaultRequestBuilder();\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else{\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }\n this.groupsRequest = tmpGrpReqBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `groupsRequest`\n */\n fetchNext() {\n return this.groupsRequest.fetchNext();\n }\n\n\n private getDefaultRequestBuilder() {\n return new CometChat.GroupsRequestBuilder().setLimit(GroupsManager.defaultLimit);\n }\n\n /**\n * Sets `loggedInUser` of the instance\n * @returns The logged-in user\n */\n private static async getLoggedInUser() {\n if (this.loggedInUser === undefined) {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n return this.loggedInUser;\n }\n\n /**\n * Creates an SDK group listener\n */\n private static createGroupListener(dispatch: React.Dispatch) {\n return new CometChat.GroupListener({\n onGroupMemberJoined: async (message: CometChat.Action, joinedUser: CometChat.User, joinedGroup: CometChat.Group) => {\n if (joinedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n joinedGroup.setHasJoined(true);\n }\n dispatch({ type: \"updateGroup\", group: joinedGroup });\n },\n onGroupMemberLeft: async (message: CometChat.Action, leavingUser: CometChat.User, groupLeft: CometChat.Group) => {\n if (leavingUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n groupLeft.setHasJoined(false);\n }\n dispatch({ type: \"updateGroup\", group: groupLeft });\n },\n onMemberAddedToGroup: async (message: CometChat.Action, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group) => {\n if (userAdded.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n userAddedIn.setHasJoined(true);\n }\n dispatch({ type: \"updateGroup\", group: userAddedIn });\n },\n onGroupMemberKicked: async (message: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group) => {\n if (kickedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n kickedFrom.setHasJoined(false);\n }\n dispatch({ type: \"updateGroup\", group: kickedFrom });\n },\n onGroupMemberBanned: async (message: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group) => {\n if (bannedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n dispatch({ type: \"removeGroup\", guid: bannedFrom.getGuid() });\n }\n else {\n dispatch({ type: \"updateGroup\", group: bannedFrom });\n }\n },\n onGroupMemberUnbanned: async (message: CometChat.Action, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group) => {\n if (unbannedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n unbannedFrom.setHasJoined(false);\n dispatch({ type: \"prependGroup\", group: unbannedFrom });\n }\n },\n onGroupMemberScopeChanged: async (message: CometChat.Action, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group) => {\n if (changedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n changedGroup.setScope(newScope);\n }\n dispatch({ type: \"updateGroup\", group: changedGroup });\n }\n });\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns Function to call to remove the attached SDK group listener\n */\n static attachListeners(dispatch: React.Dispatch) {\n const listenerId = \"GroupsList_\" + String(Date.now());\n CometChat.addGroupListener(listenerId, GroupsManager.createGroupListener(dispatch));\n return () => CometChat.removeGroupListener(listenerId);\n }\n /**\n* Attaches an SDK websocket listener\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnestionListener(callback: () => void) {\n const listenerId = \"GroupsList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useEffect, useReducer, useRef } from \"react\";\nimport { CometChatOption, CometChatUIKitConstants, SelectionMode, States, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, groupsStyle, groupsWrapperStyle, listItemStyle, menusStyle, statusIndicatorStyle, subtitleStyle } from \"./style\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { GroupsManager } from \"./controller\";\nimport { GroupsStyle } from \"@cometchat/uikit-shared\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\n\ninterface IGroupsProps {\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"GROUPS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholderText?: string,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Request builder to fetch groups\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupsRequestBuilder?: CometChat.GroupsRequestBuilder,\n /**\n * Request builder with search parameters to fetch groups\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupsRequestBuilder,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Custom list item view to be rendered for each group in the fetched list\n */\n listItemView?: (group: CometChat.Group) => JSX.Element,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Custom subtitle view to be rendered for each group in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (group: CometChat.Group) => JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (group: CometChat.Group) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode,\n /**\n * Function to call when a group from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (group: CometChat.Group, selected: boolean) => void,\n /**\n * Function to call on click of the default list item view of a group\n */\n onItemClick?: (group: CometChat.Group) => void,\n /**\n * Group to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeGroup?: CometChat.Group,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_GROUPS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Image URL for the status indicator icon in the default list item view of a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n passwordGroupIcon?: string,\n /**\n * Image URL for the status indicator icon in the default list item view of a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n groupsStyle?: GroupsStyle\n};\n\ntype State = {\n searchText: string,\n groupList: CometChat.Group[],\n fetchState: States,\n isFirstReload: boolean\n};\n\nexport type Action = { type: \"appendGroups\", groups: CometChat.Group[], removeOldGroups?: boolean } |\n{ type: \"setGroupList\", groupList: CometChat.Group[] } |\n{ type: \"setFetchState\", fetchState: States } |\n{ type: \"updateGroup\", group: CometChat.Group } |\n{ type: \"removeGroup\", guid: string } |\n{ type: \"prependGroup\", group: CometChat.Group } |\n{ type: \"setSearchText\", searchText: string } |\n{ type: \"setIsFirstReload\", isFirstReload: boolean };\n\nvar stateReducer = (state: State, action: Action): State => {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendGroups\":\n if (action.groups.length > 0) {\n let groups: CometChat.Group[] = []\n if (action.removeOldGroups) {\n state.groupList = [];\n groups = action.groups;\n }\n else {\n groups = [...state.groupList, ...action.groups]\n }\n\n newState = { ...state, groupList: groups };\n }\n newState = { ...state, groupList: [...state.groupList, ...action.groups] };\n break;\n case \"setGroupList\":\n newState = { ...state, groupList: action.groupList };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"updateGroup\": {\n const { groupList } = state;\n const { group: targetGroup } = action;\n const targetGuid = targetGroup.getGuid();\n const targetIdx = groupList.findIndex(group => group.getGuid() === targetGuid);\n if (targetIdx > -1) {\n newState = {\n ...state, groupList: groupList.map((group, i) => {\n return i === targetIdx ? targetGroup : group;\n })\n };\n }\n break;\n }\n case \"removeGroup\": {\n const { groupList } = state;\n const targetGuid = action.guid;\n const targetIdx = groupList.findIndex(group => group.getGuid() === targetGuid);\n if (targetIdx > -1) {\n newState = { ...state, groupList: groupList.filter((group, i) => i !== targetIdx) };\n }\n break;\n }\n case \"prependGroup\":\n newState = { ...state, groupList: [action.group, ...state.groupList] };\n break;\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of groups that has been created in a CometChat app\n */\nexport function CometChatGroups(props: IGroupsProps) {\n const {\n menus = null,\n title = localize(\"GROUPS\"),\n titleAlignment = TitleAlignment.left,\n searchPlaceholderText = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = false,\n groupsRequestBuilder = null,\n searchRequestBuilder = null,\n onError,\n listItemView = null,\n hideSeparator = false,\n subtitleView = null,\n options = null,\n selectionMode = SelectionMode.none,\n onSelect,\n onItemClick,\n activeGroup = null,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_GROUPS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n passwordGroupIcon = LockedIcon,\n privateGroupIcon = PrivateIcon,\n statusIndicatorStyle: statusIndicatorStyleObject,\n avatarStyle: avatarStyleObject,\n listItemStyle: listItemStyleObject,\n groupsStyle: groupsStyleObject\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n groupList: [],\n fetchState: States.loading,\n isFirstReload: false\n });\n const groupsManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n const groupsSearchText = useRef(\"\");\n\n \n\n (() => {\n if (state.searchText !== groupsSearchText.current && state.searchText.trim().length > 0 && state.searchText.trim().length == state.searchText.length) {\n groupsSearchText.current = state.searchText;\n }\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Updates the `searchText` state\n */\n const onSearch = useCallback((searchText: string): void => {\n const trimmedText = searchText.trim();\n if (searchText.length === 0 || (trimmedText.length === searchText.length && trimmedText.length > 0)) {\n groupsSearchText.current = \"\" \n dispatch({ type: \"setSearchText\", searchText }); \n }\n }, [dispatch]);\n\n /**\n * Initiates a fetch request and appends the fetched groups to the `groupList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `groupList` state\n */\n const fetchNextAndAppendGroups = useCallback(async (fetchId: string): Promise => {\n const groupsManager = groupsManagerRef.current;\n if (!groupsManager) {\n return;\n }\n let initialState = isConnectionReestablished.current ? States.loaded : States.loading\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const groups = await groupsManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n if (groups.length !== 0) {\n let removeOldGroups = isConnectionReestablished.current ? true : false;\n dispatch({ type: \"appendGroups\", groups, removeOldGroups });\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n if (attachListenerOnFetch.current) {\n GroupsManager.attachConnestionListener(() => {\n const requestBuilder = groupsRequestBuilder === null ? new CometChat.GroupsRequestBuilder().setLimit(30) : groupsRequestBuilder;\n groupsManagerRef.current = new GroupsManager({ searchText: groupsSearchText.current, groupsRequestBuilder: requestBuilder, searchRequestBuilder,groupsSearchText });\n isConnectionReestablished.current = true;\n });\n attachListenerOnFetch.current = false;\n\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n }\n else {\n isConnectionReestablished.current = false;\n }\n }\n catch (error: unknown) {\n if (fetchId === fetchNextIdRef.current && state.groupList?.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n }, [errorHandler, dispatch]);\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenus(): JSX.Element | null {\n if (menus === null) {\n return menus;\n }\n return (\n \n {menus}\n \n );\n }\n\n /**\n * Get a status icon based on the `group` passed to it\n */\n function getGroupStatusIcon(group: CometChat.Group): string {\n let statusIconURL: string = \"\";\n switch (group.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n statusIconURL = passwordGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n statusIconURL = privateGroupIcon;\n break;\n }\n return statusIconURL;\n }\n\n /**\n * Creates a subtitle view for the default list item view\n */\n function getSubtitleView(group: CometChat.Group): JSX.Element {\n if (subtitleView !== null) {\n return subtitleView(group);\n }\n const membersCount = group.getMembersCount();\n return (\n \n {`${membersCount} ${membersCount > 1 ? localize(\"MEMBERS\") : localize(\"MEMBER\")}`}\n \n );\n }\n\n /**\n * Creates a menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of view is handled by the default list item view\n */\n function getMenuView(group: CometChat.Group): JSX.Element | null {\n let curOptions: CometChatOption[] | undefined;\n if (!(curOptions = options?.(group))?.length) {\n return null;\n }\n return (\n e.detail.data.onClick?.()}\n />\n );\n }\n\n /**\n * Creates a tail view for the default list item view\n */\n function getTailView(group: CometChat.Group): JSX.Element | null | undefined {\n switch (selectionMode) {\n case SelectionMode.none:\n return null;\n case SelectionMode.single: {\n return (\n onSelect?.(group, e.detail.checked)}\n />\n );\n }\n case SelectionMode.multiple: {\n return (\n onSelect?.(group, e.detail.checked)}\n />\n );\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = selectionMode;\n }\n }\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(group: CometChat.Group): string | null {\n switch (group.getType()) {\n case CometChatUIKitConstants.GroupTypes.private:\n return groupsStyleObject?.privateGroupIconBackground || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n case CometChatUIKitConstants.GroupTypes.password:\n return groupsStyleObject?.passwordGroupIconBackground || \"rgb(247, 165, 0)\";\n default:\n return null;\n }\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (group: CometChat.Group) => JSX.Element {\n if (listItemView !== null) {\n return listItemView;\n }\n return function (group: CometChat.Group) {\n return (\n onItemClick?.(group)}\n />\n );\n };\n }\n\n Hooks({\n searchText: state.searchText,\n groupsRequestBuilder,\n searchRequestBuilder,\n fetchNextIdRef,\n groupsManagerRef,\n dispatch,\n fetchNextAndAppendGroups,\n groupsSearchText\n });\n\n return (\n \n {getMenus()}\n fetchNextAndAppendGroups(fetchNextIdRef.current = \"onScrolledToBottom_\" + String(Date.now()))}\n listItemKey=\"getGuid\"\n showSectionHeader={false}\n state={state.fetchState === States.loaded && state.groupList.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n loadingView={loadingStateView}\n emptyStateText={emptyStateText}\n emptyStateView={emptyStateView}\n errorStateText={errorStateText}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={groupsStyle(groupsStyleObject, theme)}\n />\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatGroupEvents, CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { Action } from \".\";\nimport { GroupsManager } from \"./controller\";\n\ntype Args = {\n groupsRequestBuilder : CometChat.GroupsRequestBuilder | null,\n searchRequestBuilder : CometChat.GroupsRequestBuilder | null,\n searchText: string,\n fetchNextIdRef : React.MutableRefObject,\n groupsManagerRef : React.MutableRefObject,\n dispatch : React.Dispatch,\n fetchNextAndAppendGroups : (fetchId : string) => Promise,\n groupsSearchText:React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n groupsRequestBuilder,\n searchRequestBuilder,\n searchText,\n fetchNextIdRef,\n groupsManagerRef,\n dispatch,\n fetchNextAndAppendGroups,\n groupsSearchText\n } = args;\n\n useEffect(() => {\n if(groupsRequestBuilder?.searchKeyword){\n groupsSearchText.current = groupsRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n groupsSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n }, []);\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `groupList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n dispatch({type: \"setGroupList\", groupList: []});\n groupsManagerRef.current = new GroupsManager({searchText, groupsRequestBuilder, searchRequestBuilder,groupsSearchText});\n fetchNextAndAppendGroups(fetchNextIdRef.current = \"initialFetch_\" + String(Date.now()));\n }, [fetchNextAndAppendGroups, groupsRequestBuilder, searchRequestBuilder, searchText, dispatch, fetchNextIdRef, groupsManagerRef,groupsSearchText]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return GroupsManager.attachListeners(dispatch);\n }, [dispatch]);\n\n useEffect(\n /**\n * Subscribes to Group UI events\n */\n () => {\n const groupCreatedSub = CometChatGroupEvents.ccGroupCreated.subscribe((group : CometChat.Group) => {\n dispatch({type: \"prependGroup\", group: CometChatUIKitUtility.clone(group)});\n });\n const groupDeletedSub = CometChatGroupEvents.ccGroupDeleted.subscribe((group : CometChat.Group) => {\n dispatch({type: \"removeGroup\", guid: group.getGuid()});\n });\n const groupMemberJoinedSub = CometChatGroupEvents.ccGroupMemberJoined.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: CometChatUIKitUtility.clone(item.joinedGroup)});\n });\n const groupMemberKickedSub = CometChatGroupEvents.ccGroupMemberKicked.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: CometChatUIKitUtility.clone(item.kickedFrom)});\n });\n const groupMemberLeftSub = CometChatGroupEvents.ccGroupLeft.subscribe((item) => {\n if (item.leftGroup.getType() === CometChatUIKitConstants.GroupTypes.private) {\n dispatch({type: \"removeGroup\", guid: item.leftGroup.getGuid()});\n }\n else {\n dispatch({type: \"updateGroup\", group: item.leftGroup});\n }\n });\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.kickedFrom});\n });\n const groupMemberAddedSub = CometChatGroupEvents.ccGroupMemberAdded.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.userAddedIn});\n });\n const groupOwnershipChangedSub = CometChatGroupEvents.ccOwnershipChanged.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.group});\n });\n return () => {\n groupCreatedSub.unsubscribe();\n groupDeletedSub.unsubscribe();\n groupMemberJoinedSub.unsubscribe();\n groupMemberKickedSub.unsubscribe();\n groupMemberLeftSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n groupOwnershipChangedSub.unsubscribe();\n };\n }, [dispatch]);\n}\n","import {\n BaseStyle,\n ContactsStyle,\n GroupsConfiguration,\n TabItemStyle,\n UsersConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatTabItem,\n CometChatTheme,\n SelectionMode,\n TabAlignment,\n TabsVisibility,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n closeBtnStyle,\n contactsContentStyle,\n contactsHeaderStyle,\n getContactsStyle,\n contactsWrapperStyle,\n getTabsStyle,\n getTabItemStyling,\n submitBtnStyle,\n submitBtnWrapperStyle,\n} from \"./style\";\n\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroups } from \"../CometChatGroups\";\nimport { CometChatTabs } from \"../Shared/Views/CometChatTabs/index\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { useContext, useRef } from \"react\";\nimport React from \"react\";\n\ninterface ContactsProps {\n title?: string;\n usersTabTitle?: string;\n groupsTabTitle?: string;\n usersConfiguration?: UsersConfiguration;\n groupsConfiguration?: GroupsConfiguration;\n onSubmitButtonClick?: (users? : CometChat.User[],groups?:CometChat.Group[]) => void,\n closeIconURL?: string;\n onClose?: () => void;\n onItemClick?: (user?: CometChat.User, group?: CometChat.Group) => void;\n onError: ((error: CometChat.CometChatException) => void) | null;\n submitButtonText?: string,\n hideSubmitButton?: boolean,\n selectionLimit?: number,\n tabVisibility?: TabsVisibility;\n contactsStyle: ContactsStyle;\n selectionMode?:SelectionMode;\n}\n\nconst defaultProps: ContactsProps = {\n title: localize(\"NEW_CHAT\"),\n usersTabTitle: localize(\"USERS\"),\n groupsTabTitle: localize(\"GROUPS\"),\n groupsConfiguration: new GroupsConfiguration({}),\n usersConfiguration: new UsersConfiguration({}),\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n tabVisibility: TabsVisibility.usersAndGroups,\n contactsStyle: {},\n selectionLimit : 5,\n hideSubmitButton : true,\n submitButtonText : \"Submit\",\n selectionMode : SelectionMode.none\n};\n\nconst CometChatContacts = (props: ContactsProps) => {\n const [tabs, setTabs] = React.useState([]);\n const groupsListRef = useRef([]);\n const usersListRef = useRef([]);\n const [isActiveUsersTab, setIsActiveUsersTab] = React.useState(true);\n const [isLimitReached, setIsLimitReached] = React.useState(true);\n const [isActiveGroupsTab, setIsActiveGroupsTab] = React.useState(false);\n const usersTabRef = React.useRef();\n const groupsTabRef = React.useRef();\n const { theme } = useContext(CometChatThemeContext);\n const {\n title,\n usersTabTitle,\n groupsTabTitle,\n closeIconURL,\n onClose,\n usersConfiguration,\n groupsConfiguration,\n onItemClick,\n tabVisibility,\n contactsStyle,\n selectionLimit,\n hideSubmitButton,\n submitButtonText,\n selectionMode,\n onSubmitButtonClick\n } = props;\n\n React.useEffect(() => {\n\n const usersRequestBuilder = new CometChat.UsersRequestBuilder()\n .setLimit(30)\n .hideBlockedUsers(true);\n const usersSearchRequestBuilder = new CometChat.UsersRequestBuilder()\n .setLimit(30)\n .hideBlockedUsers(true);\n \n const groupsRequestBuilder = new CometChat.GroupsRequestBuilder()\n .setLimit(30)\n .joinedOnly(true);\n const groupsSearchRequestBuilder = new CometChat.GroupsRequestBuilder()\n .setLimit(30)\n .joinedOnly(true);\n\n usersTabRef.current = new CometChatTabItem({\n id: \"users\",\n title: usersTabTitle,\n style: getTabItemStyling(contactsStyle,theme, tabVisibility, isActiveUsersTab),\n childView: (\n //
    \n \n //
    \n ),\n isActive: isActiveUsersTab,\n });\n\n groupsTabRef.current = new CometChatTabItem({\n id: \"groups\",\n title: groupsTabTitle,\n style: getTabItemStyling(contactsStyle,theme, tabVisibility, isActiveGroupsTab),\n childView: (\n \n ),\n isActive: isActiveGroupsTab,\n });\n\n setTabs([usersTabRef.current, groupsTabRef.current]);\n\n }, []);\n\n React.useEffect(() => {\n\n if (tabVisibility === TabsVisibility.groups) {\n setIsActiveGroupsTab(true);\n setIsActiveUsersTab(false);\n setTabs([groupsTabRef.current!]);\n } else if (tabVisibility === TabsVisibility.users) {\n setIsActiveGroupsTab(false);\n setIsActiveUsersTab(true);\n setTabs([usersTabRef.current!]);\n } else if (tabVisibility === TabsVisibility.usersAndGroups) {\n setIsActiveGroupsTab(false);\n setIsActiveUsersTab(true);\n setTabs([usersTabRef.current!, groupsTabRef.current!]);\n }\n\n }, [tabVisibility])\n\n const onUserClicked = (user: CometChat.User) => {\n if (onItemClick) {\n onItemClick(user, undefined);\n }\n };\n\n const onGroupClicked = (group: CometChat.Group) => {\n if (onItemClick) {\n onItemClick(undefined, group);\n }\n };\n\n const submitClicked = () => {\n if (onSubmitButtonClick) {\n onSubmitButtonClick(usersListRef.current, groupsListRef.current);\n }\n };\n\n\n const onGroupSelected = (group: CometChat.Group) => {\n var key = groupsListRef.current.findIndex((m: any) => m?.getGuid() === group.getGuid());\n if (key >= 0) {\n groupsListRef.current.splice(key, 1);\n } else {\n groupsListRef.current.push(group);\n }\n setIsLimitReached((usersListRef.current.length + groupsListRef.current.length) > selectionLimit!)\n\n };\n const onUserSelected = (user: CometChat.User) => {\n var key = usersListRef.current.findIndex((m: any) => m?.getUid() === user.getUid());\n if (key >= 0) {\n usersListRef.current.splice(key, 1);\n } else {\n usersListRef.current.push(user);\n }\n\n setIsLimitReached((usersListRef.current.length + groupsListRef.current.length) > selectionLimit!)\n };\n\n\n function getCloseBtnView() {\n if (closeIconURL === \"\") return <>;\n return (\n \n );\n }\n function submitBtnView() {\n if ((selectionMode === SelectionMode.none && hideSubmitButton)) return <>;\n return (\n
    \n \n
    \n );\n }\n\n return tabs.length ? (\n
    \n
    \n
    {title}
    \n
    \n \n {getCloseBtnView()}\n
    \n {submitBtnView()}\n
    \n
    \n ) : <>;\n};\n\nCometChatContacts.defaultProps = defaultProps;\nexport { CometChatContacts };\n","import {\n DetailsConfiguration,\n DetailsStyle,\n MessageComposerConfiguration,\n MessageComposerStyle,\n MessageHeaderConfiguration,\n MessageHeaderStyle,\n MessageListConfiguration,\n MessageListStyle,\n MessagesStyle,\n} from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\n\nexport const MessagesWrapperStyle = (\n messagesStyle: MessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n display: \"flex\",\n position: \"relative\",\n width: messagesStyle?.width || \"100%\",\n height: messagesStyle?.height || \"100%\",\n border: messagesStyle?.border || \"0 none\",\n borderRadius: messagesStyle?.borderRadius || \"inherit\",\n background: messagesStyle?.background || theme.palette.getBackground(),\n } as CSSProperties;\n};\n\nexport const MessagesDivStyle = () => {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n position: \"relative\",\n boxSizing: \"border-box\",\n justifyContent: \"space-between\",\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesDivStyle = {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n height: \"100%\",\n width: \"100%\",\n maxHeight: \"100%\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n maxWidth: \"100%\",\n zIndex: \"1\",\n} as CSSProperties;\n\nexport const MessagesDetailsDivStyle = {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n height: \"100%\",\n width: \"100%\",\n maxHeight: \"100%\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n maxWidth: \"100%\",\n zIndex: \"1\",\n borderRadius: \"inherit\",\n} as CSSProperties;\n\nexport const MessagesHeaderDivStyle = {\n // height: \"60px\",\n width: \"100%\",\n borderRadius: \"inherit\",\n} as CSSProperties;\n\nexport const MessagesListDivStyle = {\n // height: \"calc(100% - 160px\",\n height: \"100%\",\n width: \"100%\",\n overflow: \"hidden\",\n} as CSSProperties;\n\nexport const CometChatThreadedMessagesDivStyle = {\n height: \"100%\",\n display: \"flex\",\n} as CSSProperties;\n\nexport const MessagesComposerDivStyle = (theme: CometChatTheme) => {\n return {\n // height: \"96px\",\n width: \"100%\",\n display: \"flex\",\n } as CSSProperties;\n};\n\nexport const liveReactionStyle = () => {\n return {\n position: \"absolute\",\n bottom: \"50px\",\n right: \"20px\",\n width: \"50%\",\n height: \"100%\",\n } as CSSProperties;\n};\n\nexport const getMessageHeaderStyle = (\n messageHeaderConfiguration: MessageHeaderConfiguration | undefined\n) => {\n return {\n border: \"0 none\",\n background: \"inherit\",\n borderRadius: \"inherit\",\n ...messageHeaderConfiguration?.messageHeaderStyle,\n } as MessageHeaderStyle;\n};\n\nexport const getMessageListStyle = (\n messageListConfiguration: MessageListConfiguration | undefined\n) => {\n return {\n ...{\n border: \"0 none\",\n background: \"inherit\",\n borderRadius: \"inherit\",\n }, ...messageListConfiguration?.messageListStyle\n } as MessageListStyle;\n};\n\nexport const getMessageComposerStyle = (\n messageComposerConfiguration: MessageComposerConfiguration | undefined\n) => {\n return {\n ...messageComposerConfiguration?.messageComposerStyle,\n } as MessageComposerStyle;\n};\n\nexport const getDetailsStyle = (\n detailsConfiguration: DetailsConfiguration | undefined,\n messagesStyle: MessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n // border: \"0 none\",\n // background: theme.palette.getBackground(),\n // borderRadius: \"inherit\",\n ...detailsConfiguration?.detailsStyle,\n } as DetailsStyle;\n};\n\nexport function detailsButtonStyle(theme: CometChatTheme) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getPrimary(),\n padding: 0,\n };\n}\n\n\nexport const panelDivStyle = {\n position: \"absolute\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n width: \"100%\",\n justifyContent: \"center\",\n zIndex: 1000,\n overflow: \"hidden\",\n} as React.CSSProperties;\n","import { AvatarStyle, BackdropStyle, BaseStyle, ConfirmDialogStyle, LabelStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatDetailsOption, CometChatDetailsTemplate, CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { AddMembersConfiguration, AddMembersStyle, BannedMembersConfiguration, BannedMembersStyle, DetailsStyle, GroupMembersConfiguration, GroupMembersStyle, TransferOwnershipConfiguration, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string, buttonTextFont? : string, buttonTextColor? : string};\n\nexport function detailsStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : CSSProperties {\n \n return {\n boxSizing: \"border-box\",\n width: detailsStyleObject?.width || \"100%\",\n height: detailsStyleObject?.height || \"100%\",\n border: detailsStyleObject?.border || \"none\",\n borderRadius: detailsStyleObject?.borderRadius || \"0\",\n background: detailsStyleObject?.background || theme.palette.getBackground(),\n position: \"relative\",\n padding: \"19px\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowY: \"auto\",\n overflowX: \"hidden\"\n };\n}\n\nexport function detailsContentWrapperStyle(detailsStyleObject : DetailsStyle | null) : CSSProperties {\n return {\n // padding: detailsStyleObject?.padding || \"0\",\n flexGrow: \"1\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowY: \"auto\"\n };\n}\n\nexport function headerStyle() : CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n width: '100%',\n paddingBottom: \"19px\"\n };\n}\n\nexport function profileStyle() : CSSProperties {\n return {\n overflowX: \"auto\"\n };\n}\n\nexport function titleStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : LabelStyle {\n return {\n background: \"inherit\",\n textFont: detailsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n textColor: detailsStyleObject?.titleTextColor || theme.palette.getAccent()\n } as LabelStyle\n}\n\nexport function closeBtnStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n width: \"24px\",\n height: \"24px\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: detailsStyleObject?.closeButtonIconTint || theme.palette.getPrimary(),\n position: \"absolute\",\n right: \"12px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, theme : CometChatTheme) : ListItemStyle {\n return {\n width: listItemStyleObject?.width || \"100%\",\n height: listItemStyleObject?.height || \"fit-content\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || \"transparent\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"transparent\",\n separatorColor: listItemStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent()\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null, theme : CometChatTheme) : CSSProperties {\n const obj = statusIndicatorStyleObject ?? {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return {\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || \"none\",\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n };\n}\n\nexport function subtitleStyle(isUserOnline : boolean, detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : LabelStyle {\n return {\n background: \"inherit\",\n textFont: detailsStyleObject?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n textColor: isUserOnline ? theme.palette.getPrimary() : detailsStyleObject?.subtitleTextColor\n };\n}\n\nexport function sectionListStyle() : CSSProperties {\n return {\n flexGrow: \"1\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"28px 0\"\n // rowGap: \"32px\"\n };\n}\n\nexport function sectionHeaderWrapperStyle() : CSSProperties {\n return {\n textAlign: 'left'\n };\n}\n\nexport function sectionHeaderStyle(template : CometChatDetailsTemplate) : LabelStyle {\n\n return {\n background: \"inherit\",\n textFont: template.titleFont,\n textColor: template.titleColor,\n };\n}\n\nexport function optionsStyle() : CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n // rowGap: \"8px\"\n };\n}\n\nexport function optionBtnStyle(option : CometChatDetailsOption) : ButtonStyle {\n\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n buttonTextFont: option.titleFont,\n buttonTextColor: option.titleColor,\n backgroundColor: option.backgroundColor || \"inherit\",\n buttonIconTint: option.iconTint,\n padding: '18px 0 16px 0'\n };\n}\n\nexport function defaultOptionContentStyle() : CSSProperties {\n return {\n position: \"relative\"\n };\n}\n\nexport function tailWrapperStyle() : CSSProperties {\n return {\n position: \"absolute\", \n right: \"8px\", \n top: \"50%\", \n transform: \"translateY(-50%)\"\n };\n}\n\nexport function defaultOptionStyle() : CSSProperties {\n return {\n display: \"flex\", \n flexDirection: \"column\", \n // rowGap: \"4px\"\n };\n}\n\nexport function pageWrapperStyle() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n boxSizing: \"border-box\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\"\n };\n}\n\nexport function backdropStyle(backdropStyleObject : BaseStyle | null, detailsStyle: DetailsStyle | null) : BackdropStyle {\n return {\n background: 'rgba(0, 0, 0, 0.5)',\n position: 'absolute',\n width: detailsStyle?.width,\n height: detailsStyle?.height,\n ...backdropStyleObject,\n };\n}\n\nexport function leaveDialogStyle(confirmDialogStyleObject : ConfirmDialogStyle | null, detailsStyle: DetailsStyle | null, theme : CometChatTheme) : ConfirmDialogStyle {\n return {\n confirmButtonBackground: confirmDialogStyleObject?.confirmButtonBackground || theme.palette.getPrimary(),\n cancelButtonBackground: confirmDialogStyleObject?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: confirmDialogStyleObject?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: confirmDialogStyleObject?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: confirmDialogStyleObject?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: confirmDialogStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: confirmDialogStyleObject?.titleFont || fontHelper(theme.typography.title1),\n titleColor: confirmDialogStyleObject?.titleColor || theme.palette.getAccent(),\n messageTextFont: confirmDialogStyleObject?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: confirmDialogStyleObject?.messageTextColor || theme.palette.getAccent600(),\n background: confirmDialogStyleObject?.background || detailsStyle?.background || theme.palette.getBackground(),\n width: confirmDialogStyleObject?.width || \"320px\",\n height: confirmDialogStyleObject?.height || \"100%\",\n border: confirmDialogStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: confirmDialogStyleObject?.borderRadius || \"8px\",\n boxShadow: confirmDialogStyleObject?.boxShadow\n }\n}\n\nexport function deleteDialogStyle(confirmDialogStyleObject : ConfirmDialogStyle | null, theme : CometChatTheme) : ConfirmDialogStyle {\n return {\n confirmButtonBackground: confirmDialogStyleObject?.confirmButtonBackground || theme.palette.getError(),\n cancelButtonBackground: confirmDialogStyleObject?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: confirmDialogStyleObject?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: confirmDialogStyleObject?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: confirmDialogStyleObject?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: confirmDialogStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: confirmDialogStyleObject?.titleFont || fontHelper(theme.typography.title1),\n titleColor: confirmDialogStyleObject?.titleColor || theme.palette.getAccent(),\n messageTextFont: confirmDialogStyleObject?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: confirmDialogStyleObject?.messageTextColor || theme.palette.getAccent600(),\n background: confirmDialogStyleObject?.background || theme.palette.getBackground(),\n width: confirmDialogStyleObject?.width || \"320px\",\n height: confirmDialogStyleObject?.height || \"100%\",\n border: confirmDialogStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: confirmDialogStyleObject?.borderRadius || \"8px\",\n boxShadow: confirmDialogStyleObject?.boxShadow\n }\n}\n\nexport function dividerStyle(separatorColor : string | undefined, isSectionSeparatorStyle : boolean, theme : CometChatTheme) : BaseStyle {\n return {\n width: \"100%\",\n height: (isSectionSeparatorStyle ? \"2\" : \"1\") + \"px\",\n background: separatorColor || theme.palette.getAccent200()\n };\n}\n\nexport const getSectionStyle = () => {\n return {\n padding: '16px 0'\n }\n}\n\nexport const getGroupMembersStyle = (groupMembersConfiguration: GroupMembersConfiguration | null, detailsStyle: DetailsStyle | null) : GroupMembersStyle => {\n\n const groupMembersStyle = groupMembersConfiguration?.groupMembersStyle;\n\n return {\n background: groupMembersStyle?.background || detailsStyle?.background,\n ...groupMembersStyle\n };\n}\n\nexport const getAddMembersStyle = (addMembersConfiguration: AddMembersConfiguration | null, detailsStyle: DetailsStyle | null) : AddMembersStyle => {\n\n const addMembersStyle = addMembersConfiguration?.addMembersStyle;\n return {\n background: addMembersStyle?.background || detailsStyle?.background,\n ...addMembersStyle\n }\n}\n\nexport const getBannedMembersStyle = (bannedMembersConfiguration: BannedMembersConfiguration | null, detailsStyle: DetailsStyle | null) : BannedMembersStyle => {\n\n const bannedMembersStyle = bannedMembersConfiguration?.bannedMembersStyle;\n return {\n background: bannedMembersStyle?.background || detailsStyle?.background,\n ...bannedMembersStyle\n }\n}\n\nexport const getTransferOwnershipStyle = (transferOwnershipConfiguration: TransferOwnershipConfiguration | null, detailsStyle: DetailsStyle | null) : TransferOwnershipStyle => {\n const transferOwnershipStyle = transferOwnershipConfiguration?.transferOwnershipStyle;\n return {\n background: transferOwnershipStyle?.background || detailsStyle?.background,\n ...transferOwnershipStyle\n }\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, LabelStyle, ListItemStyle, RadioButtonStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { GroupMembersStyle, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string};\n\nexport function transferOwnershipStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n boxSizing: \"border-box\",\n width: transferOwnershipStyleObject?.width || \"max(100%, 360px)\",\n height: transferOwnershipStyleObject?.height || \"100%\",\n border: transferOwnershipStyleObject?.border || \"none\",\n borderRadius: transferOwnershipStyleObject?.borderRadius || \"8px\",\n background: transferOwnershipStyleObject?.background || theme.palette.getBackground(),\n display: \"flex\",\n flexDirection: \"column\",\n };\n}\n\nexport function scopeLabelStyle(\n transferOwnershipStyleObject: TransferOwnershipStyle | null,\n theme: CometChatTheme,\n isRadioButton: boolean\n): LabelStyle {\n const style: RadioButtonStyle | LabelStyle = {\n height: \"14px\",\n width: \"14px\",\n border: \"none\",\n borderRadius: \"4px\",\n background: \"inherit\",\n };\n\n if (isRadioButton) {\n return new RadioButtonStyle({\n ...style,\n labelTextColor:\n transferOwnershipStyleObject?.MemberScopeTextColor ||\n theme.palette.getAccent600(),\n labelTextFont:\n transferOwnershipStyleObject?.MemberScopeTextFont ||\n fontHelper(theme.typography.text2),\n });\n } else {\n return new LabelStyle({\n ...style,\n textColor:\n transferOwnershipStyleObject?.MemberScopeTextColor ||\n theme.palette.getAccent600(),\n textFont:\n transferOwnershipStyleObject?.MemberScopeTextFont ||\n fontHelper(theme.typography.text2),\n });\n }\n}\n\nexport function transferBtnStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : ButtonStyle {\n \n return {\n width: \"100%\",\n background: theme.palette.getPrimary(),\n padding: \"16px\",\n buttonTextColor: transferOwnershipStyleObject?.transferButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: transferOwnershipStyleObject?.transferButtonTextFont || fontHelper(theme.typography.title2),\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n border: \"none\",\n borderRadius: \"8px\"\n } as ButtonStyle ;\n}\n\nexport function btnsWrapperStyle() : CSSProperties {\n return {\n flexShrink: \"0\",\n display: \"flex\",\n flexDirection: \"column\",\n rowGap: \"8px\",\n padding: '4px 28px 20px 28px',\n boxSizing: 'border-box'\n };\n}\n\nexport function cancelBtnStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n width: \"100%\",\n background: '#f1f1f1',\n padding: \"16px\",\n color: transferOwnershipStyleObject?.cancelButtonTextColor || theme.palette.getAccent(),\n font: transferOwnershipStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.title2),\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n border: \"0 none\",\n borderRadius: \"8px\"\n };\n} \n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || theme.palette.getBackground(),\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent() \n });\n}\n\nexport function groupMembersStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : GroupMembersStyle {\n return new GroupMembersStyle({\n height: groupMemberStyleObject?.height || \"100%\",\n width: groupMemberStyleObject?.width || \"100%\",\n border: groupMemberStyleObject?.border || \"none\",\n borderRadius: groupMemberStyleObject?.borderRadius || \"inherit\",\n background: groupMemberStyleObject?.background || 'inherit',\n titleTextFont: groupMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: groupMemberStyleObject?.emptyStateTextFont || \"\",\n emptyStateTextColor: groupMemberStyleObject?.emptyStateTextColor || \"\",\n errorStateTextFont: groupMemberStyleObject?.errorStateTextFont || \"\", \n errorStateTextColor: groupMemberStyleObject?.errorStateTextColor || \"\", \n loadingIconTint: groupMemberStyleObject?.loadingIconTint || \"\", \n searchIconTint: groupMemberStyleObject?.searchIconTint || \"\", \n searchBorder: groupMemberStyleObject?.searchBorder || \"\", \n searchBorderRadius: groupMemberStyleObject?.searchBorderRadius || \"\", \n searchBackground: groupMemberStyleObject?.searchBackground || \"\", \n searchPlaceholderTextFont: groupMemberStyleObject?.searchPlaceholderTextFont || \"\", \n searchPlaceholderTextColor: groupMemberStyleObject?.searchPlaceholderTextColor || \"\", \n searchTextFont: groupMemberStyleObject?.searchTextFont || \"\", \n searchTextColor: groupMemberStyleObject?.searchTextColor || \"\",\n onlineStatusColor: groupMemberStyleObject?.onlineStatusColor || theme.palette.getSuccess(),\n backButtonIconTint: groupMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary(),\n closeButtonIconTint: groupMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary(),\n padding: groupMemberStyleObject?.padding || \"0\",\n separatorColor: groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n boxShadow: groupMemberStyleObject?.boxShadow\n });\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, useCallback, useContext, useRef, useState } from \"react\";\nimport { CometChatGroupEvents, CometChatOption, CometChatUIKitConstants, SelectionMode, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility, GroupMembersStyle, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\nimport { avatarStyle, btnsWrapperStyle, cancelBtnStyle, groupMembersStyle, listItemStyle, scopeLabelStyle, transferBtnStyle, transferOwnershipStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroupMembers } from \"../CometChatGroupMembers\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\n\ninterface ITransferOwnershipProps {\n /**\n * Group to transfer ownership of\n */\n group: CometChat.Group,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"TRANSFER_OWNERSHIP\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Request builder to fetch group members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupMembersRequestBuilder?: CometChat.GroupMembersRequestBuilder,\n /**\n * Request builder with search parameters to fetch group members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupMembersRequestBuilder,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Custom list item view to be rendered for each group member in the fetched list\n */\n listItemView?: (groupMember: CometChat.GroupMember) => JSX.Element,\n /**\n * Custom subtitle view to be rendered for each group member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (groupMember: CometChat.GroupMember) => JSX.Element,\n // Later\n transferButtonText?: string,\n // Later\n onTransferOwnership?: (groupMember: CometChat.GroupMember) => void,\n /**\n * Text to display for the cancel button\n */\n cancelButtonText?: string,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (group: CometChat.Group, groupMember: CometChat.GroupMember) => CometChatOption[],\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to the `CometChatGroupMembers` component\n */\n groupMemberStyle?: GroupMembersStyle,\n /**\n * Styles to apply to this component\n */\n transferOwnershipStyle?: TransferOwnershipStyle\n};\n\n/**\n * Renders transfer ownership view related to a group of a CometChat App\n */\nexport function CometChatTransferOwnership(props: ITransferOwnershipProps) {\n const {\n group,\n title = localize(\"TRANSFER_OWNERSHIP\"),\n titleAlignment = TitleAlignment.center,\n searchIconURL = SearchIcon,\n searchPlaceholder = localize(\"SEARCH\"),\n hideSearch = false,\n groupMembersRequestBuilder,\n searchRequestBuilder,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n onError,\n hideSeparator = false,\n disableUsersPresence = false,\n closeButtonIconURL,\n onClose,\n listItemView,\n subtitleView,\n transferButtonText = localize(\"TRANSFER_OWNERSHIP\"),\n onTransferOwnership,\n cancelButtonText = localize(\"CANCEL\"),\n options,\n statusIndicatorStyle,\n avatarStyle: avatarStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n groupMemberStyle: groupMembersStyleObject = null,\n transferOwnershipStyle: transferOwnershipStyleObject = null\n } = props;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [isDisabled, setIsDisabled] = useState(true);\n const selectedMemberRef = useRef(null);\n const errorHandler = useCometChatErrorHandler(onError);\n const onTransferOwnershipPropRef = useRefSync(onTransferOwnership);\n const groupPropRef = useRefSync(group);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Changes `selectedMemberRef` reference\n */\n function onSelect(groupMember: CometChat.GroupMember): void {\n if (isDisabled) {\n setIsDisabled(false);\n }\n selectedMemberRef.current = groupMember;\n }\n\n /**\n * Creates tail view\n */\n function tailView(groupMember: CometChat.GroupMember): JSX.Element {\n const scope = group.getOwner() === groupMember.getUid() ? CometChatUIKitConstants.groupMemberScope.owner : groupMember.getScope();\n if (group.getOwner() === groupMember.getUid()) {\n return (\n \n );\n } else {\n return (\n onSelect(groupMember)}\n />\n );\n }\n }\n\n /**\n * Provides a default behavior to the `onTransferOwnership` prop\n */\n const onTransferOwnershipWrapper = useCallback(async (): Promise => {\n const selectedMember = selectedMemberRef.current;\n if (!selectedMember) {\n return;\n }\n try {\n const onTransferOwnershipProp = onTransferOwnershipPropRef.current;\n if (onTransferOwnershipProp) {\n onTransferOwnershipProp(selectedMember);\n }\n else {\n const currentGroup = groupPropRef.current;\n await CometChat.transferGroupOwnership(currentGroup.getGuid(), selectedMember.getUid());\n if (loggedInUser) {\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setOwner(selectedMember.getUid());\n CometChatGroupEvents.ccOwnershipChanged.next({\n group: groupClone,\n newOwner: CometChatUIKitUtility.clone(selectedMember)\n });\n if (onClose) {\n onClose()\n }\n }\n }\n selectedMemberRef.current = null;\n }\n catch (error) {\n errorHandler(error);\n }\n }, [errorHandler, loggedInUser, groupPropRef, onTransferOwnershipPropRef]);\n\n /**\n * Creates confirm button view\n */\n function getConfirmButtonView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates cancel button view\n */\n function getCancelButtonView(): JSX.Element {\n return (\n \n );\n }\n\n Hooks({\n errorHandler,\n setLoggedInUser\n });\n\n return (\n \n \n
    \n {getConfirmButtonView()}\n {getCancelButtonView()}\n
    \n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\n\ntype Args = {\n errorHandler : (error : unknown) => void,\n setLoggedInUser : React.Dispatch>\n};\n\nexport function Hooks(args : Args) {\n const {\n errorHandler,\n setLoggedInUser\n } = args;\n\n useEffect(\n /**\n * Sets `loggedInUser` state to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n setLoggedInUser(await CometChat.getLoggedinUser());\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, setLoggedInUser]);\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AddMembersConfiguration, BannedMembersConfiguration, CometChatUIKitUtility, DetailsStyle, DetailsUtils, GroupMembersConfiguration, TransferOwnershipConfiguration } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, BaseStyle, ConfirmDialogStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useState } from \"react\";\nimport { CometChatDetailsOption, CometChatDetailsTemplate, CometChatGroupEvents, CometChatUIKitConstants, CometChatUserEvents, SelectionMode, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, backdropStyle, closeBtnStyle, defaultOptionContentStyle, defaultOptionStyle, deleteDialogStyle, detailsContentWrapperStyle, detailsStyle, dividerStyle, getAddMembersStyle, getBannedMembersStyle, getGroupMembersStyle, getSectionStyle, getTransferOwnershipStyle, headerStyle, leaveDialogStyle, listItemStyle, optionBtnStyle, optionsStyle, pageWrapperStyle, profileStyle, sectionHeaderStyle, sectionHeaderWrapperStyle, sectionListStyle, statusIndicatorStyle, subtitleStyle, tailWrapperStyle, titleStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync, useStateRef } from \"../CometChatCustomHooks\";\n\nimport BackButtonIcon from \"./assets/backbutton.svg\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatAddMembers } from \"../CometChatAddMembers\";\nimport { CometChatBannedMembers } from \"../CometChatBannedMembers\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroupMembers } from \"../CometChatGroupMembers\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatTransferOwnership } from \"../CometChatTransferOwnership\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\n\ninterface IDetailsProps {\n /**\n * User to display details of\n */\n user?: CometChat.User,\n /**\n * Group to display details of\n *\n * @remarks\n * This prop is used if `user` prop is not provided\n */\n group?: CometChat.Group,\n /**\n * Custom profile view\n *\n * @remarks\n * This prop is used only if `hideProfile` is set to `false`\n */\n customProfileView?: (user?: CometChat.User, group?: CometChat.Group) => JSX.Element,\n /**\n * Custom subtitle view for the `user` or `group` prop\n *\n * @remarks\n * This prop is used only if `hideProfile` is set `false` & `customProfileView` prop is not provided\n */\n subtitleView?: (user?: CometChat.User, group?: CometChat.Group) => JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"DETAILS\")`\n */\n title?: string,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Text to display for the cancel button\n */\n cancelButtonText?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default profile view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Hide profile\n *\n * @defaultValue `false`\n */\n hideProfile?: boolean,\n /**\n * Image URL for the status indicator icon of a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string,\n /**\n * @deprecated\n * \n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n /**\n * Image URL for the status indicator icon of a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n protectedGroupIcon?: string,\n /**\n * Image URL for the status indicator icon of a password-protected group\n *\n * @defaultValue {undefined}\n */\n passwordGroupIcon?: string,\n /**\n * Function to create a list of `CometChatTemplate` instances from the `user` or `group` prop\n */\n data?: CometChatDetailsTemplate[],\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: (error: CometChat.CometChatException) => void,\n /**\n * Text to display for the confirm button of the leave confirm modal\n *\n * @defaultValue `localize(\"LEAVE_GROUP\")`\n */\n leaveButtonText?: string,\n /**\n * Message to display for the leave confirm modal\n *\n * @defaultValue `localize(\"LEAVE_CONFIRM\")`\n */\n leaveConfirmDialogMessage?: string,\n /**\n * Text to display for the confirm button of the transfer ownership confirm modal\n *\n * @defaultValue `localize(\"TRANSFER_OWNERSHIP\")`\n */\n transferButtonText?: string,\n /**\n * Message to display for the transfer onwership confirm modal\n *\n * @defaultValue `localize(\"LEAVE_CONFIRM\")`\n */\n transferConfirmDialogMessage?: string,\n /**\n * Text to display for the confirm button of the delete confirm modal\n *\n * @defaultValue `localize(\"DELETE\")`\n */\n deleteButtonText?: string,\n /**\n * Message to display for the delete confirm modal\n *\n * @defaultValue `localize(\"DELETE_CONFIRM\")`\n */\n deleteConfirmDialogMessage?: string,\n /**\n * `CometChatAddMembers` configuration\n */\n addMembersConfiguration?: AddMembersConfiguration,\n /**\n * `CometChatBannedMembers` configuration\n */\n bannedMembersConfiguration?: BannedMembersConfiguration,\n /**\n * `CometChatGroupMembers` configuration\n */\n groupMembersConfiguration?: GroupMembersConfiguration,\n /**\n * `CometChatTransferOwnership` configuration\n */\n transferOwnershipConfiguration?: TransferOwnershipConfiguration,\n /**\n * Styles to apply to the default profile view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to the status indicator component of the default profile view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default profile view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the leave group confirm dialog component\n */\n leaveDialogStyle?: ConfirmDialogStyle,\n deleteDialogStyle?: ConfirmDialogStyle,\n /**\n * Styles to apply to the backdrop component\n */\n backdropStyle?: BaseStyle,\n /**\n * Styles to apply to this component\n */\n detailsStyle?: DetailsStyle\n};\n\ntype PageToShow = \"none\" | \"addMembers\" | \"bannedMembers\" | \"groupMembers\";\nexport type ModalInfo = { type: \"leaveOrTransferConfirm\" | \"deleteConfirm\", buttonText: string, confirmDialogMessage: string } |\n{ type: \"transferOwnership\" } |\n null;\n\n/**\n * Renders details view of a user or group of a CometChat App\n */\nexport function CometChatDetails(props: IDetailsProps) {\n const {\n user,\n group,\n title = localize(\"DETAILS\"),\n closeButtonIconURL = Close2xIcon,\n cancelButtonText = localize(\"CANCEL\"),\n onClose,\n disableUsersPresence = false,\n customProfileView = null,\n hideProfile = false,\n privateGroupIcon = PrivateIcon,\n protectedGroupIcon = LockedIcon,\n passwordGroupIcon = undefined,\n subtitleView = null,\n data = undefined,\n onError,\n leaveButtonText = localize(\"LEAVE_GROUP\"),\n leaveConfirmDialogMessage = localize(\"LEAVE_CONFIRM\"),\n transferButtonText = localize(\"TRANSFER_OWNERSHIP\"),\n transferConfirmDialogMessage = localize(\"TRANSFER_CONFIRM\"),\n deleteButtonText = localize(\"DELETE\"),\n deleteConfirmDialogMessage = localize(\"DELETE_CONFIRM\"),\n addMembersConfiguration = null,\n bannedMembersConfiguration = null,\n groupMembersConfiguration = null,\n transferOwnershipConfiguration = null,\n listItemStyle: listItmeStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n leaveDialogStyle: leaveDialogStyleObject = null,\n deleteDialogStyle: deleteDialogStyleObject = null,\n backdropStyle: backdropStyleObject = null,\n detailsStyle: detailsStyleObject = null\n } = props;\n\n const [pageToShow, setPageToShow] = useState(\"none\");\n const [modalInfo, setModalInfo] = useState(null);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [userOrGroup, setUserOrGroup] = useState(undefined);\n //const userOrGroup = user ?? group;\n const [leaveOrTransferConfirmDialogElement, setLeaveOrTransferConfirmDialog] = useStateRef(null);\n const [deleteConfirmDialogElement, setDeleteConfirmDialog] = useStateRef(null);\n const onClosePropRef = useRefSync(onClose);\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Creates group member left action message\n */\n const createGroupMemberLeftActionMessage = useCallback((group: CometChat.Group, loggedInUser: CometChat.User): CometChat.Action => {\n const action = CometChatUIKitConstants.groupMemberAction.LEFT;\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory.action as CometChat.MessageCategory\n );\n actionMessage.setAction(action);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setMessage(`${loggedInUser.getName()} ${action} ${loggedInUser.getUid()}`);\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n return actionMessage;\n }, []);\n\n /**\n * Handles leave or transfer ownership confirm click\n */\n const handleLeaveOrTransferConfirmClick = useCallback(async (userOrGroup: CometChat.User | CometChat.Group): Promise => {\n if (userOrGroup instanceof CometChat.User) {\n return;\n }\n if (userOrGroup.getOwner() === loggedInUser?.getUid()) {\n setModalInfo({ type: \"transferOwnership\" });\n }\n else {\n setModalInfo(null);\n try {\n if (loggedInUser) {\n await CometChat.leaveGroup(userOrGroup.getGuid());\n const groupClone = CometChatUIKitUtility.clone(userOrGroup);\n groupClone.setHasJoined(false);\n CometChatGroupEvents.ccGroupLeft.next({\n userLeft: CometChatUIKitUtility.clone(loggedInUser),\n leftGroup: groupClone,\n message: createGroupMemberLeftActionMessage(groupClone, loggedInUser)\n });\n onClosePropRef.current?.();\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }, [loggedInUser, setModalInfo, errorHandler, createGroupMemberLeftActionMessage, onClosePropRef]);\n\n /**\n * Handles delete confirm click\n */\n const handleDeleteConfirmClick = useCallback(async (userOrGroup: CometChat.User | CometChat.Group): Promise => {\n if (userOrGroup instanceof CometChat.User) {\n return;\n }\n setModalInfo(null);\n try {\n await CometChat.deleteGroup(userOrGroup.getGuid());\n CometChatGroupEvents.ccGroupDeleted.next(CometChatUIKitUtility.clone(userOrGroup));\n onClosePropRef.current?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }, [setModalInfo, errorHandler, onClosePropRef]);\n\n\n /**\n * Blocks the provided `user`\n */\n async function blockUser(user: CometChat.User): Promise {\n if (!user.getBlockedByMe()) {\n try {\n await CometChat.blockUsers([user.getUid()]);\n const userClone = CometChatUIKitUtility.clone(user);\n userClone.setBlockedByMe(true);\n CometChatUserEvents.ccUserBlocked.next(userClone);\n setUserOrGroup(userClone);\n //onClose?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }\n\n /**\n * Unblocks the provided `user`\n */\n async function unblockUser(user: CometChat.User): Promise {\n if (user.getBlockedByMe()) {\n try {\n await CometChat.unblockUsers([user.getUid()]);\n const userClone = CometChatUIKitUtility.clone(user);\n userClone.setBlockedByMe(false);\n CometChatUserEvents.ccUserUnblocked.next(userClone);\n setUserOrGroup(userClone);\n //onClose?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }\n\n /**\n * Creates templates\n */\n function getTemplates(userOrGroup: CometChat.User | CometChat.Group): CometChatDetailsTemplate[] {\n let res!: CometChatDetailsTemplate[];\n if (data) {\n res = data;\n }\n if (!res) {\n res = DetailsUtils.getDefaultDetailsTemplate(loggedInUser, props?.user, props?.group, theme);\n }\n return res;\n }\n\n /**\n * Gets the status indicator color\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(userOrGroup: CometChat.User | CometChat.Group): string | null {\n if (userOrGroup instanceof CometChat.User) {\n if (!disableUsersPresence && userOrGroup.getStatus() === CometChatUIKitConstants.userStatusType.online) {\n return detailsStyleObject?.onlineStatusColor || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n }\n }\n else {\n const groupType = userOrGroup.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n return detailsStyleObject?.privateGroupIconBackground || \"#F7A500\";\n }\n if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n return detailsStyleObject?.passwordGroupIconBackground || \"#F7A500\";\n }\n }\n return null;\n }\n\n /**\n * Gets the status indicator icon\n */\n function getStatusIndicatorIcon(userOrGroup: CometChat.User | CometChat.Group): string {\n let res = \"\";\n if (userOrGroup instanceof CometChat.Group) {\n const groupType = userOrGroup.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n res = privateGroupIcon;\n }\n else if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n res = passwordGroupIcon || protectedGroupIcon;\n }\n }\n return res;\n }\n\n /**\n * Creates header view\n */\n function getHeaderView(): JSX.Element {\n return (\n
    \n \n \n
    \n );\n }\n\n /**\n * Creates subtitle text for the default profile view\n */\n function getDefaultProfileSubtitleText(userOrGroup: CometChat.User | CometChat.Group): string {\n if (userOrGroup instanceof CometChat.User) {\n return disableUsersPresence ? \"\" : localize(userOrGroup.getStatus().toUpperCase());\n }\n const numGroupMembers = userOrGroup.getMembersCount();\n return `${numGroupMembers} ${localize(numGroupMembers > 1 ? \"MEMBERS\" : \"MEMBER\")}`;\n }\n\n /**\n * Creates subtitle view for the default profile view\n */\n function getDefaultProfileSubtitleView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element {\n if (subtitleView) {\n if (userOrGroup instanceof CometChat.User) {\n return subtitleView(userOrGroup);\n }\n return subtitleView(undefined, userOrGroup);\n }\n const isUserOnline = userOrGroup instanceof CometChat.User &&\n userOrGroup.getStatus() === CometChatUIKitConstants.userStatusType.online;\n return (\n \n );\n }\n\n /**\n * Creates default profile view\n */\n function getDefaultProfileView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates profile view\n */\n function getProfileView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (hideProfile) {\n return null;\n }\n let profileViewJSX: JSX.Element;\n if (customProfileView) {\n if (userOrGroup instanceof CometChat.User) {\n profileViewJSX = customProfileView(userOrGroup);\n }\n else {\n profileViewJSX = customProfileView(undefined, userOrGroup);\n }\n }\n else {\n profileViewJSX = getDefaultProfileView(userOrGroup);\n }\n return (\n
    \n {profileViewJSX}\n
    \n );\n }\n\n /**\n * Creates details options\n */\n function getTemplateOptions(template: CometChatDetailsTemplate, userOrGroup: CometChat.User | CometChat.Group): CometChatDetailsOption[] | undefined {\n const { id } = template;\n if (id !== undefined) {\n return userOrGroup instanceof CometChat.User ? template.options?.(userOrGroup, null, id) : template.options?.(null, userOrGroup, id);\n }\n }\n\n /**\n * Handles details option click\n */\n function onOptionClick(option: CometChatDetailsOption, userOrGroup: CometChat.User | CometChat.Group): void {\n const { id, onClick } = option;\n if (onClick) {\n onClick(userOrGroup);\n }\n else {\n switch (id) {\n case CometChatUIKitConstants.UserOptions.viewProfile:\n if (userOrGroup instanceof CometChat.User && userOrGroup.getLink()) {\n window.open(userOrGroup.getLink(), '_blank')\n }\n break;\n case CometChatUIKitConstants.UserOptions.block:\n if (userOrGroup instanceof CometChat.User) {\n blockUser(userOrGroup);\n }\n break;\n case CometChatUIKitConstants.UserOptions.unblock:\n if (userOrGroup instanceof CometChat.User) {\n unblockUser(userOrGroup);\n }\n break;\n case CometChatUIKitConstants.GroupOptions.viewMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"groupMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.addMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"addMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.bannedMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"bannedMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.leave:\n if (userOrGroup instanceof CometChat.Group) {\n const isLoggedInUserGroupOwner = userOrGroup.getOwner() === loggedInUser?.getUid();\n setModalInfo({\n type: \"leaveOrTransferConfirm\",\n buttonText: isLoggedInUserGroupOwner ? transferButtonText : leaveButtonText,\n confirmDialogMessage: isLoggedInUserGroupOwner ? transferConfirmDialogMessage : leaveConfirmDialogMessage\n });\n }\n break;\n case CometChatUIKitConstants.GroupOptions.delete:\n if (userOrGroup instanceof CometChat.Group) {\n setModalInfo({\n type: \"deleteConfirm\",\n buttonText: deleteButtonText,\n confirmDialogMessage: deleteConfirmDialogMessage\n });\n }\n break;\n }\n }\n }\n\n /**\n * Creates option view with root element's key set to the provided `key`\n */\n function getOptionJSXWithKeyAdded(option: CometChatDetailsOption, userOrGroup: CometChat.User | CometChat.Group, hideSeparator: boolean, separatorColor: string | undefined): JSX.Element { \n const { id, customView } = option;\n if (customView) {\n return (\n
    {customView}
    \n );\n }\n const { title, tail, iconURL } = option;\n const buttonJSX = (\n onOptionClick(option, userOrGroup)}\n />\n );\n let contentJSX: JSX.Element = buttonJSX;\n if (tail) {\n contentJSX = (\n \n {buttonJSX}\n \n {tail}\n \n \n );\n }\n return (\n \n {contentJSX}\n {getSeparator(hideSeparator, separatorColor, false)}\n \n );\n }\n\n /**\n * Creates a separator that can be used inside an option view or a section view of the component\n */\n function getSeparator(hideSeparator: boolean, separatorColor: string | undefined, isTemplateSeparator: boolean): JSX.Element | null {\n if (!separatorColor) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates section view with root element's key set to the provided `key`\n */\n function getSectionJSXWithKeyAdded(template: CometChatDetailsTemplate, userOrGroup: CometChat.User | CometChat.Group): JSX.Element {\n const { title, id, hideSectionSeparator = true, sectionSeparatorColor, hideItemSeparator = false, itemSeparatorColor } = template;\n let titleJSX: JSX.Element | null = null;\n if (!!title) {\n titleJSX = (\n
    \n \n
    \n );\n }\n let optionsJSX: JSX.Element | null = null;\n const templateOptions = getTemplateOptions(template, userOrGroup);\n if (templateOptions?.length) {\n optionsJSX = (\n
    \n {templateOptions.map((templateOption, i) => getOptionJSXWithKeyAdded(templateOption, userOrGroup, hideItemSeparator, itemSeparatorColor))}\n
    \n );\n }\n return (\n
    \n {titleJSX}\n {optionsJSX}\n {getSeparator(hideSectionSeparator, sectionSeparatorColor, true)}\n
    \n );\n }\n\n /**\n * Creates section view container\n */\n function getSectionList(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n const templateJSXList: JSX.Element[] = getTemplates(userOrGroup).map((template, i) => getSectionJSXWithKeyAdded(template, userOrGroup));\n if (templateJSXList.length === 0) {\n return null;\n }\n return (\n
    \n {templateJSXList}\n
    \n );\n }\n\n /**\n * Sets `pageToShow` state to `\"none\"`\n */\n function setPageToShowToNone(): void {\n setPageToShow(\"none\");\n }\n\n /**\n * Checks provided `key` is a key of `CometChat.User` instance\n */\n function isUserKey(key: string | undefined): key is keyof CometChat.User {\n return key !== undefined && key in new CometChat.User(\"anyString\");\n }\n\n /**\n * Creates AddMembers view\n */\n function getCometChatAddMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const sectionHeaderField = addMembersConfiguration?.sectionHeaderField;\n const options = addMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n buttonText? : string\n */\n return (\n \n );\n }\n\n /**\n * Create BannedMembers view\n */\n function getCometChatBannedMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const options = bannedMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n unbanIconURL? : string,\n onItemClick? : (bannedMember : CometChat.GroupMember) => void,\n theme? : CometChatTheme\n */\n return (\n \n );\n }\n\n /**\n * Creates GroupMembers view\n */\n function getCometChatGroupMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n\n const options = groupMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n backButton? : JSX.Element,\n title? : string,\n searchPlaceholder? : string,\n group : CometChat.Group,\n emptyStateText? : string,\n errorStateText? : string,\n tailView? : (groupMember : CometChat.GroupMember) => JSX.Element,\n onItemClick? : (groupMember : CometChat.GroupMember) => void,\n theme? : CometChatTheme\n\n The below properties were present in the configuration but not the component\n backdropStyle: BaseStyle\n */\n return (\n options(groupMember)}\n backButtonIconURL={groupMembersConfiguration?.backButtonIconURL || BackButtonIcon}\n closeButtonIconURL={groupMembersConfiguration?.closeButtonIconURL || Close2xIcon}\n showBackButton={groupMembersConfiguration?.showBackButton || true}\n hideSeparator={groupMembersConfiguration?.hideSeparator}\n selectionMode={groupMembersConfiguration?.selectionMode}\n hideError={groupMembersConfiguration?.hideError}\n searchIconURL={groupMembersConfiguration?.searchIconURL}\n dropDownIconURL={groupMembersConfiguration?.dropdownIconURL}\n hideSearch={groupMembersConfiguration?.hideSearch}\n onError={groupMembersConfiguration?.onError ?? undefined}\n onSelect={groupMembersConfiguration?.onSelect}\n emptyStateView={groupMembersConfiguration?.emptyStateView}\n errorStateView={groupMembersConfiguration?.errorStateView}\n loadingIconURL={groupMembersConfiguration?.loadingIconURL}\n loadingStateView={groupMembersConfiguration?.loadingStateView}\n titleAlignment={groupMembersConfiguration?.titleAlignment}\n statusIndicatorStyle={groupMembersConfiguration?.statusIndicatorStyle}\n avatarStyle={groupMembersConfiguration?.avatarStyle}\n groupMembersStyle={getGroupMembersStyle(groupMembersConfiguration, detailsStyleObject)}\n groupScopeStyle={groupMembersConfiguration?.groupScopeStyle}\n listItemStyle={groupMembersConfiguration?.listItemStyle}\n />\n );\n }\n\n /**\n * Creates view of the page to show\n */\n function getSelectedPage(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | undefined {\n try {\n let resJSX: JSX.Element | null = null;\n switch (pageToShow) {\n case \"addMembers\":\n resJSX = getCometChatAddMembers(userOrGroup);\n break;\n case \"bannedMembers\":\n resJSX = getCometChatBannedMembers(userOrGroup);\n break;\n case \"groupMembers\":\n resJSX = getCometChatGroupMembers(userOrGroup);\n break;\n case \"none\":\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = pageToShow;\n }\n }\n if (resJSX !== null) {\n return (\n \n {resJSX}\n \n );\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n\n /**\n * Set `modalInfo` state to `null`\n */\n function closeModal(): void {\n setModalInfo(null);\n }\n\n /**\n * Creates TransferOwnership view\n */\n function getCometChatTransferOwnership(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const options = transferOwnershipConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n backButton? : JSX.Element,\n showBackButton? : boolean,\n onBack? : () => void,\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n backButtonIconURL? : string,\n transferButtonText? : string,\n cancelButtonText? : string\n */\n return (\n options(groupMember)}\n statusIndicatorStyle={transferOwnershipConfiguration?.statusIndicatorStyle}\n avatarStyle={transferOwnershipConfiguration?.avatarStyle}\n listItemStyle={transferOwnershipConfiguration?.listItemStyle}\n groupMemberStyle={transferOwnershipConfiguration?.groupMemberStyle}\n transferOwnershipStyle={getTransferOwnershipStyle(transferOwnershipConfiguration, detailsStyleObject)}\n />\n );\n }\n\n /**\n * Creates modal view\n */\n function getModal(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null | undefined {\n if (!modalInfo) {\n return null;\n }\n const { type } = modalInfo;\n try {\n switch (type) {\n case \"leaveOrTransferConfirm\":\n return (\n \n \n \n );\n case \"transferOwnership\":\n return (\n \n {getCometChatTransferOwnership(userOrGroup)}\n \n );\n case \"deleteConfirm\":\n return (\n \n \n \n );\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n\n Hooks({\n setLoggedInUser,\n errorHandler,\n leaveOrTransferConfirmDialogElement,\n setModalInfo,\n handleLeaveOrTransferConfirmClick,\n deleteConfirmDialogElement,\n handleDeleteConfirmClick,\n userOrGroup,\n user,\n group,\n setUserOrGroup,\n });\n\n if (!userOrGroup) {\n return null;\n }\n\n return (\n
    \n {getHeaderView()}\n
    \n {getProfileView(userOrGroup)}\n {getSectionList(userOrGroup)}\n
    \n {getSelectedPage(userOrGroup)}\n {getModal(userOrGroup)}\n
    \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect, JSX } from \"react\";\nimport { ModalInfo } from \".\";\n\ntype Args = {\n setLoggedInUser : React.Dispatch>,\n errorHandler : (error : unknown) => void,\n leaveOrTransferConfirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n setModalInfo : React.Dispatch>,\n handleLeaveOrTransferConfirmClick : (userOrGroup : CometChat.User | CometChat.Group) => Promise,\n deleteConfirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n handleDeleteConfirmClick : (userOrGroup : CometChat.User | CometChat.Group) => Promise,\n userOrGroup : CometChat.User | CometChat.Group | undefined,\n user: CometChat.User | undefined,\n group: CometChat.Group | undefined,\n setUserOrGroup: React.Dispatch>,\n};\n\nexport function Hooks(args : Args) {\n const {\n setLoggedInUser,\n errorHandler,\n leaveOrTransferConfirmDialogElement,\n setModalInfo,\n handleLeaveOrTransferConfirmClick,\n deleteConfirmDialogElement,\n handleDeleteConfirmClick,\n userOrGroup,\n user,\n group,\n setUserOrGroup,\n } = args;\n\n useEffect(() => {\n\n if (user instanceof CometChat.User) {\n\n if(!user.getStatus?.()) {\n CometChat.getUser(user.getUid()).then((user: CometChat.User) => {\n setUserOrGroup(user);\n }).catch(error => errorHandler(error))\n } else {\n setUserOrGroup(user);\n }\n }\n if (group instanceof CometChat.Group) {\n if(!group.getOwner?.()) {\n CometChat.getGroup(group.getGuid()).then((group: CometChat.Group) => {\n setUserOrGroup(group);\n }).catch(error => errorHandler(error))\n } else {\n setUserOrGroup(group);\n }\n } \n }, [user, group, setUserOrGroup, errorHandler])\n\n useEffect(\n /**\n * Adds `cc-confirm-clicked` to the leave or transfer confirm dialog element\n */\n () => {\n if (!leaveOrTransferConfirmDialogElement) {\n return;\n }\n const confirmClickEventName = \"cc-confirm-clicked\";\n const handleEvent = () => {\n if (userOrGroup) {\n handleLeaveOrTransferConfirmClick(userOrGroup);\n }\n };\n leaveOrTransferConfirmDialogElement.addEventListener(confirmClickEventName, handleEvent);\n return () => {\n leaveOrTransferConfirmDialogElement.removeEventListener(confirmClickEventName, handleEvent);\n };\n }, [leaveOrTransferConfirmDialogElement, handleLeaveOrTransferConfirmClick, userOrGroup]);\n\n useEffect(\n /**\n * Adds `cc-cancel-clicked` event handler to the leave or transfer confirm dialog element\n */\n () => {\n if (!leaveOrTransferConfirmDialogElement) {\n return;\n }\n const cancelClickEventName = \"cc-cancel-clicked\";\n const handleCancelClick = () => setModalInfo(null);\n leaveOrTransferConfirmDialogElement.addEventListener(cancelClickEventName, handleCancelClick);\n return () => {\n leaveOrTransferConfirmDialogElement.removeEventListener(cancelClickEventName, handleCancelClick);\n };\n }, [leaveOrTransferConfirmDialogElement, setModalInfo]);\n\n useEffect(\n /**\n * Adds `cc-confirm-clicked` to the delete confirm dialog element\n */\n () => {\n if (!deleteConfirmDialogElement) {\n return;\n }\n const eventName = \"cc-confirm-clicked\";\n const handleEvent = () => {\n if (userOrGroup) {\n handleDeleteConfirmClick(userOrGroup);\n }\n };\n deleteConfirmDialogElement.addEventListener(eventName, handleEvent);\n return () => {\n deleteConfirmDialogElement.removeEventListener(eventName, handleEvent);\n };\n }, [deleteConfirmDialogElement, handleDeleteConfirmClick, userOrGroup]);\n\n useEffect(\n /**\n * Adds `cc-cancel-clicked` event handler to the delete confirm dialog element\n */\n () => {\n if (!deleteConfirmDialogElement) {\n return;\n }\n const eventName = \"cc-cancel-clicked\";\n const handleEvent = function() {\n setModalInfo(null);\n };\n deleteConfirmDialogElement.addEventListener(eventName, handleEvent);\n return () => {\n deleteConfirmDialogElement.removeEventListener(eventName, handleEvent);\n };\n }, [deleteConfirmDialogElement, setModalInfo]);\n\n useEffect(\n /**\n * Sets the `loggedInUser` state to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n setLoggedInUser(await CometChat.getLoggedinUser());\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, setLoggedInUser]);\n}\n","import {\n AIOptionsStyle,\n CreatePollStyle,\n MessageComposerStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n EmojiKeyboardStyle,\n MediaRecorderStyle,\n PopoverStyle,\n PreviewStyle,\n TextInputStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const LIVE_REACTION_ICON_TINT = \"red\";\nconst RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN = \"10px\";\n\nexport type mentionIconStyleType = CSSProperties | { buttonTextFont: string, buttonTextColor: string, buttonIconTint: string, iconBackground: string, iconHeight: string, iconWidth: string, };\n\n\n\nexport function getMessageComposerStyle(messageComposerStyle: MessageComposerStyle | undefined, theme: CometChatTheme): CSSProperties {\n return {\n width: messageComposerStyle?.width || \"100%\",\n height: messageComposerStyle?.height || \"100%\",\n boxSizing: \"border-box\",\n padding: \"14px 16px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n };\n}\nexport function previewStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): PreviewStyle {\n return new PreviewStyle({\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent200()}`,\n background: theme.palette.getBackground(),\n previewTitleFont:\n messageComposerStyle?.previewTitleFont ||\n fontHelper(theme.typography.caption1),\n previewTitleColor:\n messageComposerStyle?.previewTitleColor || theme.palette.getAccent600(),\n previewSubtitleFont:\n messageComposerStyle?.previewSubtitleFont ||\n fontHelper(theme.typography.subtitle2),\n previewSubtitleColor:\n messageComposerStyle?.previewSubtitleColor ||\n theme.palette.getAccent400(),\n closeButtonIconTint:\n messageComposerStyle?.closePreviewTint || theme.palette.getAccent600(),\n borderRadius: '12px'\n });\n}\n\n\n\nexport function getMentionsViewStyle(): CSSProperties {\n return {\n maxHeight: '196px',\n overflowY: 'hidden',\n display: \"flex !important\",\n flexDirection: 'column',\n justifyContent: 'flex-end !important',\n zIndex: 2,\n height: \"auto\",\n minHeight: '45px',\n padding: '0px 0px 1px 0px',\n width: '100%',\n };\n}\n\nexport function getMentionInfoIconStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n mentionsWarningStyle: React.CSSProperties\n): mentionIconStyleType {\n return {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: theme.palette.getAccent600(),\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: theme.palette.getAccent600(),\n padding: \"8px\",\n iconHeight: \"20px\",\n iconWidth: \"20px\",\n iconBackground: \"transparent\",\n gap: \"5px\",\n ...mentionsWarningStyle,\n };\n}\n\nexport function textInputStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): TextInputStyle {\n return new TextInputStyle({\n height: \"100%\",\n width: \"100%\",\n maxHeight: messageComposerStyle?.maxInputHeight || \"150px\",\n border:\n messageComposerStyle?.border ||\n `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: messageComposerStyle?.borderRadius || \"12px\",\n background:\n messageComposerStyle?.background || `${theme.palette.getAccent50()}`,\n textFont:\n messageComposerStyle?.textFont || fontHelper(theme.typography.text2),\n textColor: messageComposerStyle?.textColor || theme.palette.getAccent(),\n dividerColor:\n messageComposerStyle?.dividerTint || theme.palette.getAccent100(),\n inputBorder: messageComposerStyle?.inputBorder || \"none\",\n inputBorderRadius: messageComposerStyle?.inputBorderRadius || \"0px\",\n inputBackground: messageComposerStyle?.inputBackground || \"transparent\",\n placeholderTextColor: theme.palette.getAccent500(),\n placeholderTextFont: fontHelper(theme.typography.subtitle2)\n });\n}\n\nexport function liveReactionButtonStyle(theme: CometChatTheme, style?: MessageComposerStyle) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: style?.liveReactionIconTint || \"red\",\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nexport function sendButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isDisabled: boolean = false\n) {\n\n const buttonTint = isDisabled ? theme.palette.getAccent200() : (messageComposerStyle?.sendIconTint || theme.palette.getPrimary())\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: buttonTint,\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nfunction getEmojiButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean\n): string | undefined {\n if (isAuxiliaryContentDisplayed) {\n return messageComposerStyle?.emojiIconTint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.emojiIconTint || theme.palette.getAccent500();\n}\n\nfunction getVoiceButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean\n): string | undefined {\n if (isAuxiliaryContentDisplayed) {\n return messageComposerStyle?.voiceRecordingIconTint || theme.palette.getAccent();\n }\n return messageComposerStyle?.voiceRecordingIconTint || theme.palette.getAccent500();\n}\n\nfunction getAttachButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n): string | undefined {\n if (isSecondaryContentDisplayed) {\n return messageComposerStyle?.attachIcontint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.attachIcontint || theme.palette.getAccent500();\n}\n\nfunction getAIButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n): string | undefined {\n if (isSecondaryContentDisplayed) {\n return messageComposerStyle?.AIIconTint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.AIIconTint || theme.palette.getAccent500();\n}\n\nexport function liveReactionButtonDivStyle(): CSSProperties {\n return {\n //margin: `0px ${RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN}`\n };\n}\n\nexport function fileMediaPickerStyle(): CSSProperties {\n return {\n display: \"none\",\n };\n}\n\nexport function secondaryViewStyle(): CSSProperties {\n return {\n flex: \"1\",\n };\n}\n\nexport function primaryViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n gap: \"6px\",\n };\n}\n\nexport function auxiliaryViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n width: \"fit-content\",\n gap: \"8px\",\n padding: \"0\",\n marginRight: \"8px\",\n };\n}\n\nexport function createPollStyle(theme: CometChatTheme): CreatePollStyle {\n return new CreatePollStyle({\n placeholderTextFont: fontHelper(theme.typography.subtitle1),\n placeholderTextColor: theme.palette.getAccent600(),\n deleteIconTint: theme.palette.getAccent600(),\n titleFont: fontHelper(theme.typography.title1),\n titleColor: theme.palette.getAccent(),\n closeIconTint: theme.palette.getPrimary(),\n questionInputBackground: theme.palette.getAccent100(),\n optionInputBackground: theme.palette.getAccent100(),\n answerHelpTextFont: fontHelper(theme.typography.caption1),\n answerHelpTextColor: theme.palette.getAccent400(),\n addAnswerIconTint: theme.palette.getPrimary(),\n createPollButtonTextFont: fontHelper(theme.typography.text2),\n createPollButtonTextColor: theme.palette.getAccent(\"dark\"),\n createPollButtonBackground: theme.palette.getPrimary(),\n addAnswerTextFont: fontHelper(theme.typography.text2),\n addAnswerTextColor: theme.palette.getPrimary(),\n errorTextFont: fontHelper(theme.typography.subtitle1),\n errorTextColor: theme.palette.getError(),\n optionPlaceholderTextFont: fontHelper(theme.typography.subtitle1),\n optionPlaceholderTextColor: theme.palette.getAccent600(),\n questionInputTextFont: fontHelper(theme.typography.subtitle2),\n questionInputTextColor: theme.palette.getAccent600(),\n optionInputTextFont: fontHelper(theme.typography.subtitle2),\n optionInputTextColor: theme.palette.getAccent600(),\n width: \"360px\",\n height: \"440px\",\n border: \"\",\n borderRadius: \"8px\",\n background: theme.palette.getAccent900(),\n });\n}\n\n// Default secondary view related styles\n\nconst ACTION_SHEET_HEIGHT = \"244px\";\nconst ACTION_SHEET_WIDTH = \"275px\";\nconst ACTION_SHEET_BORDER_RADIUS = \"12px\";\n\nexport function attachmentPopoverStyle(actionSheetStyle: ActionSheetStyle | undefined, theme: CometChatTheme): PopoverStyle {\n let height = actionSheetStyle?.height;\n let width = actionSheetStyle?.width;\n let applyActionsheetStyle = height == \"100%\" || width == \"100%\";\n return new PopoverStyle({\n width: width && !applyActionsheetStyle ? actionSheetStyle?.width : ACTION_SHEET_WIDTH,\n height: height && !applyActionsheetStyle ? actionSheetStyle?.height : ACTION_SHEET_HEIGHT,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n boxShadow: \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\"\n });\n}\n\nexport function AIPopoverStyle(\n aiOptionsStyle: AIOptionsStyle | undefined,\n theme: CometChatTheme\n): PopoverStyle {\n return new PopoverStyle({\n width: aiOptionsStyle?.width || ACTION_SHEET_WIDTH,\n height: aiOptionsStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius: aiOptionsStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function actionSheetContainerStyle(\n actionSheetStyle: ActionSheetStyle = {},\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: actionSheetStyle?.width || ACTION_SHEET_WIDTH,\n height: actionSheetStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n overflow: \"auto\",\n };\n}\n\nexport function AIActionSheetContainerStyle(\n aiActionSheetStyle: AIOptionsStyle | undefined,\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: aiActionSheetStyle?.width || ACTION_SHEET_WIDTH,\n height: aiActionSheetStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius:\n aiActionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n };\n}\nexport function getActionSheetStyle(actionSheetStyle: ActionSheetStyle | undefined, theme: CometChatTheme): ActionSheetStyle {\n return new ActionSheetStyle({\n width: actionSheetStyle?.width || \"100%\",\n height: actionSheetStyle?.height || \"100%\",\n border: actionSheetStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n background: actionSheetStyle?.background || theme.palette.getBackground(),\n layoutModeIconTint: actionSheetStyle?.layoutModeIconTint || theme.palette.getPrimary(),\n titleFont: actionSheetStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: actionSheetStyle?.titleColor || theme.palette.getAccent(),\n listItemBackground: actionSheetStyle?.listItemBackground || 'transparent',\n listItemIconTint: actionSheetStyle?.listItemIconTint || theme.palette.getAccent700(),\n listItemIconBackground: actionSheetStyle?.listItemIconBackground || 'transparent',\n listItemIconBorderRadius: actionSheetStyle?.listItemIconBorderRadius || '0',\n ActionSheetSeparatorTint: actionSheetStyle?.ActionSheetSeparatorTint || `${theme.palette.getAccent400()}`\n });\n}\n\nexport function getAIActionSheetStyle(\n aiOptionsStyle: AIOptionsStyle,\n theme: CometChatTheme\n): ActionSheetStyle {\n return new ActionSheetStyle({\n width: aiOptionsStyle?.width || \"100%\",\n height: aiOptionsStyle?.height || \"100%\",\n border: aiOptionsStyle?.border || \"none\",\n borderRadius: aiOptionsStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n background: aiOptionsStyle?.background || theme.palette.getBackground(),\n listItemBackground: aiOptionsStyle?.listItemBackground || \"transparent\",\n ActionSheetSeparatorTint:\n aiOptionsStyle?.optionsSeparatorTint || `${theme.palette.getAccent600()}`,\n });\n}\n\nexport function attachmentButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n padding: \"0\",\n buttonIconTint: getAttachButtonIconTint(\n messageComposerStyle,\n theme,\n isSecondaryContentDisplayed\n ),\n background: \"transparent\",\n };\n}\n\nexport function aiButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n padding: \"0\",\n buttonIconTint: getAIButtonIconTint(\n messageComposerStyle,\n theme,\n isSecondaryContentDisplayed\n ),\n background: \"transparent\",\n };\n}\n\n// Default auxiliary view related styles\n\nconst EMOJI_KEYBOARD_HEIGHT = \"400px\";\nconst EMOJI_KEYBOARD_WIDTH = \"320px\";\nconst EMOJI_KEYBOARD_BORDER_RADIUS = \"12px\";\n\nexport function emojiKeyboardPopoverStyle(): PopoverStyle {\n return new PopoverStyle({\n width: EMOJI_KEYBOARD_WIDTH,\n height: EMOJI_KEYBOARD_HEIGHT,\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function emojiKeyboardContainerStyle(\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: EMOJI_KEYBOARD_WIDTH,\n height: EMOJI_KEYBOARD_HEIGHT,\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n };\n}\n\nexport function emojiKeyboardStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): EmojiKeyboardStyle {\n return new EmojiKeyboardStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n background: theme.palette.getBackground(),\n textFont:\n messageComposerStyle?.emojiKeyboardTextFont ||\n fontHelper(theme.typography.caption1),\n textColor:\n messageComposerStyle?.emojiKeyboardTextColor || theme.palette.getAccent(),\n });\n}\n\nexport function emojiButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean,\n applyHorizontalMargin: boolean = false\n) {\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: getEmojiButtonIconTint(\n messageComposerStyle,\n theme,\n isAuxiliaryContentDisplayed\n ),\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nconst VOICE_RECORDING_HEIGHT = \"100px\";\nconst VOICE_RECORDING_WIDTH = \"250px\";\nconst VOICE_RECORDING_BORDER_RADIUS = \"8px\";\n\nexport function voiceRecordingPopoverStyle(): PopoverStyle {\n return new PopoverStyle({\n width: VOICE_RECORDING_WIDTH,\n height: VOICE_RECORDING_HEIGHT,\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n border: \"1px solid rgba(20, 20, 20, 0.08)\",\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function voiceRecordingContainerStyle(\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: VOICE_RECORDING_WIDTH,\n height: VOICE_RECORDING_HEIGHT,\n // maxWidth: \"80vw\",\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n boxSizing: \"border-box\",\n };\n}\n\nexport function voiceRecordingStyle(\n mediaRecorderStyle: MediaRecorderStyle | undefined,\n theme: CometChatTheme\n): EmojiKeyboardStyle {\n return new MediaRecorderStyle({\n ...mediaRecorderStyle,\n background: mediaRecorderStyle?.background || theme.palette.getBackground(),\n border: \"1px solid rgba(20, 20, 20, 0.08)\",\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n closeIconTint:\n mediaRecorderStyle?.closeIconTint || theme.palette.getAccent600(),\n submitIconTint:\n mediaRecorderStyle?.submitIconTint || theme.palette.getAccent600(),\n startIconTint:\n mediaRecorderStyle?.startIconTint || theme.palette.getError(),\n stopIconTint: mediaRecorderStyle?.stopIconTint || theme.palette.getError(),\n timerTextColor: mediaRecorderStyle?.timerTextColor || theme.palette.getAccent400(),\n timerTextFont: mediaRecorderStyle?.timerTextFont || fontHelper(theme.typography.text3),\n });\n}\n\nexport function voiceButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean,\n applyHorizontalMargin: boolean = false\n) {\n const marginStyle: { margin?: string } = {};\n\n if (applyHorizontalMargin) {\n marginStyle.margin = `0px ${RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN}`;\n }\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: getVoiceButtonIconTint(\n messageComposerStyle,\n theme,\n isAuxiliaryContentDisplayed\n ),\n background: \"transparent\",\n ...marginStyle,\n };\n}\n\nexport function defaultAuxiliaryViewContainer(): CSSProperties {\n return {\n display: \"flex\",\n flex: \"1\",\n };\n}\n\nexport function messageComposerHeaderStyle(): CSSProperties {\n return {\n height: \"fit-content\",\n position: \"relative\",\n width: \"100%\",\n boxSizing: \"border-box\",\n left: \"50%\",\n transform: \"translate(-50%)\",\n zIndex: 1,\n padding: '0px 0px 1px 0px'\n };\n}\n","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABeZJREFUeF7tnOGx5TQMhbUdQAdQAUsFQAVABSwVLFQAVABUAFTAUgFQAXSwuxVABzAfc81kM7ElJ7KjeyPPvHk%2FrpPI5%2BRIsuz4iWQLhcCTUNakMZKEBHsJkpAkJBgCwcxJhSQhwRAIZk4qJAkJhkAwc1IhSUgwBIKZkwpJQoIhEMycVIiNkLdE5Omt62%2B2S%2Fb1SkJ03N4RkV9FhP%2B0VyLy0e2%2FfnVnjyREBwwyPlx1QyWQ4t6SEB3SfypdhmA35Kb6GO%2BmB7Hjr4q1b4vI394jSULaiD4TkR8qXXBZ7gE%2BCWkT8nIRzNc9%2FxSR91Mh3gjU74cyUEir%2FSgin3ualAp5E80y3%2Fh2Me%2FQ8CYN%2FkZEXnjElGiEMPkCDNJMXAJvH%2F9HNuYXqGGd2u59JnEFuyGqu0UiBGD%2BEBHe0tLIYt71ePMayLTiRDegtwsgg%2FjSnYVFIuSLmzrWIHwpIt%2FtRUa5DlUw8bO0otRSQtGu2ZWFRSLkaxH5amOU%2BGd%2BG9GSkAaqqOD5xu%2FfiwjqGdFwj7jJUqfyegYuC1fb3SIphCzl440RuKeWq2dABs%2F4oBu97Qt%2Bv6XLdx%2FUt4p4DHnIBKwCPor55OY6rarBPuIc%2F7uD%2BNqOSAqhZrTMsIqtDJK60eyGaj5THvqTYfLYZXcUQshc8OW1titj6UJiuzM21bKq3XGiZVcUQmopb7F9ZKbVwqeVhTH5Q0WuLQohrTeRAQ9bEFLQvGT5XXNXBbOz3NblFqgswfNMlWxlf6S2XrWvN0R6tssitaSWZG1nqORSmxxqc48aQWfFEuwpinC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7AcivOwJ8qNAvXofbXv5HedPNoy6uwVw6OAjb7%2BsifKjQZ27%2F0vW37fC9iM6y65QDUD2L3PuNSJcntBmnnd5TY5zAT3yLMe%2FkS5I%2BA87LWZ9gajNglJQoIhEMycVEgSEgyBYOakQpKQYAgEMycVkoQEQyCYOamQJCQYAsHMSYUEI%2BRfzec9dI8XxxgAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FHeart%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FHeart%22%20fill%3D%22%23000000%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.375%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.3134395%2C18.0459049%20L1.52443954%2C8.87923824%20C-0.0597509272%2C7.29629358%20-0.452349335%2C4.87680895%200.550022872%2C2.87415491%20L0.550022872%2C2.87415491%20C1.29768241%2C1.3792661%202.71831477%2C0.334867269%204.36817344%2C0.0671851901%20C6.01803212%2C-0.200496889%207.69599623%2C0.341168737%208.87793954%2C1.52298824%20L10.3134395%2C2.95757158%20L11.7489395%2C1.52298824%20C12.9308829%2C0.341168737%2014.608847%2C-0.200496889%2016.2587056%2C0.0671851901%20C17.9085643%2C0.334867269%2019.3291967%2C1.3792661%2020.0768562%2C2.87415491%20L20.0768562%2C2.87415491%20C21.0778256%2C4.87595612%2020.6857045%2C7.29366739%2019.1033562%2C8.87648824%20L10.3134395%2C18.0459049%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M30.0001%200.666626C46.2004%200.666626%2059.3334%2013.7996%2059.3334%2030C59.3334%2046.2003%2046.2004%2059.3333%2030.0001%2059.3333C13.7997%2059.3333%200.666748%2046.2003%200.666748%2030C0.666748%2013.7996%2013.7997%200.666626%2030.0001%200.666626ZM30.0001%205.99996C16.7452%205.99996%206.00008%2016.7451%206.00008%2030C6.00008%2043.2548%2016.7452%2054%2030.0001%2054C43.2549%2054%2054.0001%2043.2548%2054.0001%2030C54.0001%2016.7451%2043.2549%205.99996%2030.0001%205.99996ZM31.6667%2027.3333C32.219%2027.3333%2032.6667%2027.781%2032.6667%2028.3333V42.3333C32.6667%2042.8856%2032.219%2043.3333%2031.6667%2043.3333H28.3334C27.7811%2043.3333%2027.3334%2042.8856%2027.3334%2042.3333V28.3333C27.3334%2027.781%2027.7811%2027.3333%2028.3334%2027.3333H31.6667ZM30.0001%2019.3333C31.4728%2019.3333%2032.6667%2020.5272%2032.6667%2022C32.6667%2023.4727%2031.4728%2024.6666%2030.0001%2024.6666C28.5273%2024.6666%2027.3334%2023.4727%2027.3334%2022C27.3334%2020.5272%2028.5273%2019.3333%2030.0001%2019.3333Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FMic%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMic%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284%2C%201%29%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%228%22%20y1%3D%2218.3333333%22%20x2%3D%228%22%20y2%3D%2222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20x%3D%223.5%22%20y%3D%220%22%20width%3D%229%22%20height%3D%2214.9111111%22%20rx%3D%223.91111111%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C8.8%20L0%2C11%20C0%2C15.0500882%203.35786438%2C18.3333333%207.5%2C18.3333333%20L8.5%2C18.3333333%20C12.6421356%2C18.3333333%2016%2C15.0500882%2016%2C11%20L16%2C8.8%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%20Rotated%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus-Rotated%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%2845.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FStipop%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FStipop%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.5%2C1%20C18.2989899%2C1%2023%2C5.70101013%2023%2C11.5%20C23%2C17.2039245%2018.451858%2C21.8455734%2012.7842951%2C21.9962258%20L12.5%2C22%20L6%2C23%20L6.47908443%2C20.1033393%20C3.77065445%2C18.2043706%202%2C15.0589646%202%2C11.5%20C2%2C5.70101013%206.70101013%2C1%2012.5%2C1%20Z%20M12.5%2C2.5%20C7.52943725%2C2.5%203.5%2C6.52943725%203.5%2C11.5%20C3.5%2C14.3705191%204.85206397%2C17.0112175%207.09635804%2C18.6980916%20L7.34021132%2C18.8751453%20L8.11298335%2C19.416961%20L7.817%2C21.202%20L12.3852902%2C20.5%20L12.5%2C20.5%20C17.4705627%2C20.5%2021.5%2C16.4705627%2021.5%2C11.5%20C21.5%2C6.52943725%2017.4705627%2C2.5%2012.5%2C2.5%20Z%20M13.5%2C12.3%20C13.1666667%2C13.9666667%2012.3333333%2C14.8%2011%2C14.8%20C9.66666667%2C14.8%208.83333333%2C13.9666667%208.5%2C12.3%20L13.5%2C12.3%20Z%20M15.0030662%2C6.67300699%20C15.1656001%2C6.92305919%2015.1180007%2C7.24908483%2014.9043132%2C7.44344192%20L14.826993%2C7.50306617%20L13.632%2C8.279%20L14.8086975%2C8.98550424%20C15.0644308%2C9.13894425%2015.1646368%2C9.45281874%2015.0578342%2C9.72120324%20L15.0144958%2C9.80869745%20C14.8610557%2C10.0644308%2014.5471813%2C10.1646368%2014.2787968%2C10.0578342%20L14.1913025%2C10.0144958%20L12.1913025%2C8.81449576%20C11.8402552%2C8.60386734%2011.8048611%2C8.12100565%2012.0939654%2C7.85785853%20L12.173007%2C7.79693383%20L14.173007%2C6.49693383%20C14.4508428%2C6.31634058%2014.8224729%2C6.39517122%2015.0030662%2C6.67300699%20Z%20M8.1%2C6.7%20C8.92842712%2C6.7%209.6%2C7.37157288%209.6%2C8.2%20C9.6%2C9.02842712%208.92842712%2C9.7%208.1%2C9.7%20C7.27157288%2C9.7%206.6%2C9.02842712%206.6%2C8.2%20C6.6%2C7.37157288%207.27157288%2C6.7%208.1%2C6.7%20Z%22%20id%3D%22Oval%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20height%3D%2224px%22%3E%3Cpath%20d%3D%22M%2012%202%20C%206.477%202%202%206.477%202%2012%20C%202%2017.523%206.477%2022%2012%2022%20C%2017.523%2022%2022%2017.523%2022%2012%20C%2022%206.477%2017.523%202%2012%202%20z%20M%2012%204%20C%2016.411%204%2020%207.589%2020%2012%20C%2020%2016.411%2016.411%2020%2012%2020%20C%207.589%2020%204%2016.411%204%2012%20C%204%207.589%207.589%204%2012%204%20z%20M%208%208%20L%208%2016%20L%2016%2016%20L%2016%208%20L%208%208%20z%22%2F%3E%3C%2Fsvg%3E\"","import {\n AIActionSheetContainerStyle,\n AIPopoverStyle,\n actionSheetContainerStyle,\n aiButtonStyle,\n attachmentButtonStyle,\n attachmentPopoverStyle,\n auxiliaryViewStyle,\n defaultAuxiliaryViewContainer,\n emojiButtonStyle,\n emojiKeyboardContainerStyle,\n emojiKeyboardPopoverStyle,\n emojiKeyboardStyle,\n fileMediaPickerStyle,\n getAIActionSheetStyle,\n getActionSheetStyle,\n getMentionInfoIconStyle,\n getMentionsViewStyle,\n getMessageComposerStyle,\n liveReactionButtonDivStyle,\n liveReactionButtonStyle,\n messageComposerHeaderStyle,\n previewStyle,\n primaryViewStyle,\n secondaryViewStyle,\n sendButtonStyle,\n textInputStyle,\n voiceButtonStyle,\n voiceRecordingContainerStyle,\n voiceRecordingPopoverStyle,\n voiceRecordingStyle,\n} from \"./style\";\nimport {\n AIOptionsStyle,\n CometChatMentionsFormatter,\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n MessageComposerStyle,\n UserMemberWrapperConfiguration,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n CometChatActionSheet,\n CometChatTextInput,\n MediaRecorderStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n AuxiliaryButtonAlignment,\n CometChatActionsView,\n CometChatMessageComposerAction,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatUIKitConstants,\n MessageStatus,\n Placement,\n PreviewMessageMode,\n RecordingType,\n UserMemberListType,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport React, {\n JSX,\n useCallback,\n useContext,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport AIIcon from \"./assets/ai-bot.svg\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport CloseIcon from \"./assets/close.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport CometChatUserMemberWrapper from \"../CometChatUserMemberWrapper\";\nimport HeartIcon from \"./assets/heart.svg\";\nimport { Hooks } from \"./hooks\";\nimport MentionWarningIcon from \"./assets/InfoSimpleIcon.svg\";\nimport MicIcon from \"./assets/mic.svg\";\nimport PlusIcon from \"./assets/plus.svg\";\nimport PlusRotatedIcon from \"./assets/plus-rotated.svg\";\nimport { PollsConfiguration } from \"../Extensions/Polls/PollsConfiguration\";\nimport { PollsExtensionDecorator } from \"../Extensions/Polls/PollsExtensionDecorator\";\nimport SendIcon from \"./assets/send.svg\";\nimport SmileysIcon from \"./assets/stipop.svg\";\nimport StopIcon from \"./assets/stop.svg\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { flushSync } from \"react-dom\";\n\nconst ActionSheetView = createComponent({\n tagName: \"cometchat-action-sheet\",\n elementClass: CometChatActionSheet,\n react: React,\n events: {\n onClick: \"cc-actionsheet-clicked\",\n },\n});\n\nconst ActionSheet = createComponent({\n tagName: \"cometchat-action-sheet\",\n elementClass: CometChatActionSheet,\n react: React,\n});\n\nconst TextInput = createComponent({\n tagName: \"cometchat-text-input\",\n elementClass: CometChatTextInput,\n react: React,\n});\n\ntype ComposerId = {\n parentMessageId: number | null;\n user: string | null;\n group: string | null;\n};\nexport type ContentToDisplay =\n | \"attachments\"\n | \"emojiKeyboard\"\n | \"voiceRecording\"\n | \"ai\"\n | \"none\";\ntype MediaMessageFileType =\n | typeof CometChatUIKitConstants.MessageTypes.image\n | typeof CometChatUIKitConstants.MessageTypes.video\n | typeof CometChatUIKitConstants.MessageTypes.audio\n | typeof CometChatUIKitConstants.MessageTypes.file;\nexport type ActionOnClickType = (() => void) | null;\n\ninterface IMessageComposerProps {\n /**\n * User to send messages to\n */\n user?: CometChat.User;\n /**\n * Group to send messages to\n *\n * @remarks\n * This prop is used if `user` prop is not provided\n */\n group?: CometChat.Group;\n /**\n * Text to fill the message input with\n *\n * @remarks\n * This prop is used only when this component mounts\n *\n * @defaultValue `\"\"`\n */\n text?: string;\n /**\n * Function to call when the message input's text value changes\n */\n onTextChange?: (text: string) => void;\n /**\n * Text shown in the message input when it is empty\n */\n placeHolderText?: string;\n /**\n * Image URL for the send button\n *\n * @remarks\n * This prop is used if `sendButtonView` prop is not provided\n *\n * @defaultValue `SendIcon`\n */\n sendButtonIconURL?: string;\n /**\n * Custom send button view\n */\n sendButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Function to call whenever a new text message is sent\n */\n onSendButtonClick?: (message: CometChat.BaseMessage, previewMessageMode?: PreviewMessageMode) => void;\n /**\n * Custom secondary button view\n */\n secondaryButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Image URL for the default secondary button\n *\n * @remarks\n * This prop is used if `secondaryButtonView` prop is not provided\n *\n * @defaultValue `./assets/plus.svg`\n */\n attachmentIconURL?: string;\n /**\n * Image URL for the emoji button\n *\n * @defaultValue `SmileysIcon`\n */\n emojiIconURL?: string;\n /**\n * Image URL for the AI button\n *\n * @defaultValue `AIIcon`\n */\n AIIconURL?: string;\n /**\n * Custom auxiliary button view\n */\n auxiliaryButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Alignment of the auxiliary button\n *\n * @defaultValue `AuxiliaryButtonAlignment.right`\n */\n auxiliaryButtonAlignment?: AuxiliaryButtonAlignment;\n /**\n * Options for the default secondary view\n */\n attachmentOptions?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => CometChatMessageComposerAction[];\n /**\n * Hide layout button\n *\n * @defaultValue `false`\n */\n hideLayoutMode?: boolean;\n /**\n * Id of the parent message\n */\n parentMessageId?: number;\n /**\n * Image URL for the live reaction button\n *\n * @defaultValue `./assets/heart.svg`\n */\n LiveReactionIconURL?: string;\n /**\n * Hide live reaction button\n *\n * @defaultValue `false`\n */\n hideLiveReaction?: boolean;\n /**\n * Preview section at the top of the message input\n */\n headerView?: JSX.Element;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Disable sound for outgoing messages\n *\n * @defaulValue `false`\n */\n disableSoundForMessages?: boolean;\n /**\n * Custom audio sound for outgoing messages\n */\n customSoundForMessage?: string;\n /**\n * Disable sending typing events\n *\n * @defaultValue `false`\n */\n disableTypingEvents?: boolean;\n /**\n * Styles to apply to this component\n */\n messageComposerStyle?: MessageComposerStyle;\n /**\n * Styles to apply to action sheet component\n */\n actionSheetStyle?: ActionSheetStyle;\n /**\n * Styles to apply to AI action sheet component\n */\n AIOptionsStyle?: AIOptionsStyle;\n /**\n * Hide voice recording button\n */\n hideVoiceRecording?: boolean;\n /**\n * Styles to apply voice recording view\n */\n mediaRecorderStyle?: MediaRecorderStyle;\n /**\n * Icon for voice recording start\n */\n voiceRecordingStartIconURL?: string;\n /**\n * Icon for voice recording close\n */\n voiceRecordingCloseIconURL?: string;\n /**\n * Icon for voice recording stop\n */\n voiceRecordingStopIconURL?: string;\n /**\n * Icon for voice recording submit\n */\n voiceRecordingSubmitIconURL?: string;\n\n InfoSimpleIcon?: string;\n\n userMemberWrapperConfiguration?: UserMemberWrapperConfiguration;\n\n textFormatters?: Array;\n\n disableMentions?: boolean;\n\n mentionsWarningText?: string;\n mentionsWarningStyle?: React.CSSProperties;\n}\n\ntype State = {\n text: string;\n addToMsgInputText: string;\n textMessageToEdit: CometChat.TextMessage | null;\n contentToDisplay: ContentToDisplay;\n loggedInUser: CometChat.User | null;\n showPoll: boolean;\n showMentionsCountWarning: boolean;\n};\n\nexport type Action =\n | { type: \"setText\"; text: State[\"text\"] }\n | {\n type: \"setAddToMsgInputText\";\n addToMsgInputText: State[\"addToMsgInputText\"];\n }\n | {\n type: \"setTextMessageToEdit\";\n textMessageToEdit: State[\"textMessageToEdit\"];\n }\n | { type: \"setContentToDisplay\"; contentToDisplay: ContentToDisplay }\n | { type: \"setLoggedInUser\"; loggedInUser: CometChat.User }\n | { type: \"setShowPoll\"; showPoll: boolean }\n | { type: \"setShowMentionsCountWarning\"; showMentionsCountWarning: boolean };\n\n// Not sure\nfunction processFile(file: File): Promise {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n if (reader.result !== null) {\n resolve(new File([reader.result], file.name, file));\n }\n };\n reader.onerror = () =>\n reject(\n new Error(`Converting the file named \"${file.name}\" to binary failed`)\n );\n reader.readAsArrayBuffer(file);\n });\n}\n\nconst USER_GROUP_NOT_PROVIDED_ERROR_STR =\n \"No user or group object provided. Should at least provide one.\";\nconst END_TYPING_AFTER_START_IN_MS = 500;\n\nfunction stateReducer(state: State, action: Action) {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setText\":\n newState = { ...state, text: action.text };\n break;\n case \"setAddToMsgInputText\":\n newState = { ...state, addToMsgInputText: action.addToMsgInputText };\n break;\n case \"setTextMessageToEdit\":\n newState = { ...state, textMessageToEdit: action.textMessageToEdit };\n break;\n case \"setContentToDisplay\":\n newState = { ...state, contentToDisplay: action.contentToDisplay };\n break;\n case \"setLoggedInUser\":\n newState = { ...state, loggedInUser: action.loggedInUser };\n break;\n case \"setShowPoll\":\n newState = { ...state, showPoll: action.showPoll };\n break;\n case \"setShowMentionsCountWarning\":\n newState = {\n ...state,\n showMentionsCountWarning: action.showMentionsCountWarning,\n };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a message composer to send messages to a user or group of a CometChat App\n */\nexport function CometChatMessageComposer(props: IMessageComposerProps) {\n const {\n user,\n group,\n text: initialText = \"\",\n onTextChange,\n placeHolderText = localize(\"ENTER_YOUR_MESSAGE_HERE\"),\n sendButtonIconURL = SendIcon,\n sendButtonView,\n onSendButtonClick,\n secondaryButtonView,\n attachmentIconURL = PlusIcon,\n emojiIconURL = SmileysIcon,\n AIIconURL = AIIcon,\n auxiliaryButtonView,\n auxiliaryButtonAlignment = AuxiliaryButtonAlignment.right,\n attachmentOptions,\n hideLayoutMode = false,\n parentMessageId = null,\n LiveReactionIconURL = HeartIcon,\n hideLiveReaction = true,\n headerView = null,\n onError,\n disableSoundForMessages = false,\n customSoundForMessage,\n disableTypingEvents = false,\n messageComposerStyle: messageComposerStyleObject,\n hideVoiceRecording = false,\n actionSheetStyle,\n AIOptionsStyle = {},\n mediaRecorderStyle,\n voiceRecordingStartIconURL = MicIcon,\n voiceRecordingCloseIconURL = CloseIcon,\n voiceRecordingStopIconURL = StopIcon,\n voiceRecordingSubmitIconURL = SendIcon,\n userMemberWrapperConfiguration,\n textFormatters = [],\n disableMentions = false,\n InfoSimpleIcon = MentionWarningIcon,\n mentionsWarningText,\n mentionsWarningStyle = {},\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n text: initialText,\n addToMsgInputText: initialText,\n textMessageToEdit: null,\n contentToDisplay: \"none\",\n loggedInUser: null,\n showPoll: false,\n showMentionsCountWarning: false,\n });\n const textInputRef = useRef<\n JSX.IntrinsicElements[\"cometchat-text-input\"] | null\n >(null);\n const mediaFilePickerRef = useRef(null);\n const [emojiKeyboardElement, setEmojiKeyboardRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"] | null\n >(null);\n const [voiceRecordingElement, setVoiceRecordingRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-media-recorder\"] | null\n >(null);\n const [primaryBtnElement, setPrimaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [secondaryBtnElement, setSecondaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [aiBtnElement, setAIBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [voiceRecordingBtnElement, setVoiceRecordingBtnElement] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [auxiliaryBtnElement, setAuxiliaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [auxiliaryPopoverElement, setAuxiliaryPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [attachmentPopoverElement, setAttachmentPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [aiPopoverElement, setAIPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [textMessageEditPreviewElement, setTextMessageEditPreviewRef] =\n useStateRef(null);\n const [actionSheetElement, setActionSheetRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null\n >(null);\n const [aiActionSheetElement, setAIActionSheetRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null\n >(null);\n const [liveReactionBtnElement, setLiveReactionBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n // const [createPollElement, setCreatePollRef] = useStateRef(null);\n const actionIdToActionOnClick = useRef(new Map());\n const endTypingTimeoutId = useRef(null);\n const createPollViewRef = useRef(null);\n const errorHandler = useCometChatErrorHandler(onError);\n const userPropRef = useRefSync(user);\n const groupPropRef = useRefSync(group);\n const parentMessageIdPropRef = useRefSync(parentMessageId);\n const disableSoundForMessagesPropRef = useRefSync(disableSoundForMessages);\n const customSoundForMessagePropRef = useRefSync(customSoundForMessage);\n const onSendButtonClickPropRef = useRefSync(onSendButtonClick);\n const { theme } = useContext(CometChatThemeContext);\n const [smartRepliesView, setSmartRepliesView] = React.useState(null);\n const [textFormatterArray, setTextFormatters] = useState(textFormatters);\n const [mentionsSearchTerm, setMentionsSearchTerm] = useState(\"\");\n const mentionsSearchTermTemp = React.useRef(\"\");\n const lastEmptySearchTerm = React.useRef(\"\");\n const [showListForMentions, setShowListForMentions] = useState(false);\n const mentionsTextFormatterInstanceRef =\n useRef(\n ChatConfigurator.getDataSource().getMentionsTextFormatter({ theme })\n );\n const [mentionsSearchCount, setMentionsSearchCount] = useState(0);\n const [userMemberWrapperConfig, setUserMemberWrapperConfig] = useState(\n userMemberWrapperConfiguration ?? new UserMemberWrapperConfiguration({})\n );\n const [userMemberListType, setUserMemberListType] = useState<\n UserMemberListType | undefined\n >();\n const [usersRequestBuilder, setUsersRequestBuilder] = useState<\n CometChat.UsersRequestBuilder | undefined\n >(undefined);\n const [groupMembersRequestBuilder, setGroupMembersRequestBuilder] = useState<\n CometChat.GroupMembersRequestBuilder | undefined\n >(undefined);\n const userMemberWrapperRef = useRef(null);\n\n let mentionedUsers = [];\n\n const mentionsFormatterInstanceId = \"composer_\" + Date.now();\n\n /**\n * Called when clicking a user from the mentions list.\n * Add the user to mentions text formatter instance and then call rerender to style the mention\n * within message input.\n *\n * @param {CometChat.User} user\n */\n\n const defaultMentionsItemClickHandler = (\n user: CometChat.User | CometChat.GroupMember\n ) => {\n let cometChatUsers = [user];\n mentionsTextFormatterInstanceRef.current.setCometChatUserGroupMembers(\n cometChatUsers\n );\n mentionedUsers = [\n ...mentionsTextFormatterInstanceRef.current.getCometChatUserGroupMembers(),\n ];\n mentionsTextFormatterInstanceRef.current.reRender();\n setShowListForMentions(false);\n setMentionsSearchCount(1);\n setMentionsSearchTerm(\"\");\n };\n\n const defaultOnEmptyForMentions = useCallback(() => {\n lastEmptySearchTerm.current = mentionsSearchTermTemp.current;\n setShowListForMentions(false);\n setMentionsSearchTerm(\"\");\n mentionsSearchTermTemp.current = \"\";\n }, [setShowListForMentions, setMentionsSearchTerm]);\n\n const searchMentions = useCallback(\n (searchTerm: any) => {\n if (!searchTerm || !searchTerm.length) {\n setMentionsSearchTerm(\"\");\n mentionsSearchTermTemp.current = \"\";\n setShowListForMentions(false);\n setMentionsSearchCount(1);\n return;\n }\n let currentSearchTerm = searchTerm.split(\"@\")[1].toLowerCase()\n ? searchTerm.split(\"@\")[1].toLowerCase()\n : undefined;\n\n if (\n (!currentSearchTerm ||\n !(\n lastEmptySearchTerm.current &&\n currentSearchTerm.startsWith(\n lastEmptySearchTerm.current.toLowerCase()\n )\n )) &&\n currentSearchTerm !== mentionsSearchTerm\n ) {\n setMentionsSearchTerm(currentSearchTerm);\n mentionsSearchTermTemp.current = currentSearchTerm;\n setShowListForMentions(true);\n lastEmptySearchTerm.current = \"\";\n setMentionsSearchCount(mentionsSearchCount + 1);\n }\n },\n [setMentionsSearchTerm, setShowListForMentions, setMentionsSearchCount]\n );\n\n /**\n * Creates receiver details object\n *\n * @throws `Error`\n * Thrown if `user` or 'group' both props are missing\n */\n const getReceiverDetails = useCallback((): {\n receiverId: string;\n receiverType: string;\n isBlocked?: boolean;\n } => {\n const user = userPropRef.current;\n const group = groupPropRef.current;\n if (user) {\n const isBlocked = user.getBlockedByMe() || user.getHasBlockedMe();\n return {\n receiverId: user?.getUid(),\n receiverType: CometChatUIKitConstants.MessageReceiverType.user,\n isBlocked: isBlocked\n };\n }\n if (group) {\n return {\n receiverId: group?.getGuid(),\n receiverType: CometChatUIKitConstants.MessageReceiverType.group,\n };\n }\n throw new Error(USER_GROUP_NOT_PROVIDED_ERROR_STR);\n }, [groupPropRef, userPropRef]);\n\n /**\n * Creates a `CometChat.TypingIndicator` instance\n */\n const getTypingNotification = useCallback((): CometChat.TypingIndicator | null => {\n const { receiverId, receiverType, isBlocked } = getReceiverDetails();\n if (isBlocked) {\n return null;\n }\n return new CometChat.TypingIndicator(receiverId, receiverType);\n }, [getReceiverDetails]);\n\n /**\n * Calls `startTyping` SDK function after creating a `CometChat.TypingIndicator` instance\n */\n const startTyping = useCallback((): void => {\n try {\n const typingNotification = getTypingNotification();\n if (!typingNotification) {\n return;\n }\n CometChat.startTyping(typingNotification);\n } catch (error) {\n errorHandler(error);\n }\n }, [getTypingNotification, errorHandler]);\n\n /**\n * Calls `endTyping` SDK function after creating a `CometChat.TypingIndicator` instance\n */\n const endTyping = useCallback((): void => {\n try {\n CometChat.endTyping(getTypingNotification());\n endTypingTimeoutId.current = null;\n } catch (error) {\n errorHandler(error);\n }\n }, [getTypingNotification, errorHandler]);\n\n /**\n * Handles emitting typing events\n */\n const handleTyping = useCallback((): void => {\n if (disableTypingEvents) {\n return;\n }\n if (endTypingTimeoutId.current !== null) {\n window.clearTimeout(endTypingTimeoutId.current);\n endTypingTimeoutId.current = null;\n } else {\n startTyping();\n }\n endTypingTimeoutId.current = window.setTimeout(\n () => endTyping(),\n END_TYPING_AFTER_START_IN_MS\n );\n }, [startTyping, endTyping, disableTypingEvents]);\n\n /**\n * Creates a composerId object\n */\n function getComposerId(): ComposerId {\n const user = userPropRef.current;\n if (user != undefined) {\n return { user: user?.getUid(), group: null, parentMessageId };\n }\n const group = groupPropRef.current;\n if (group != undefined) {\n return { user: null, group: group?.getGuid(), parentMessageId };\n }\n\n return { user: null, group: null, parentMessageId };\n }\n\n /**\n * Sets the `setAddToMsgInputText` state\n *\n * @remarks\n * Setting `addToMsgInputText` is a two-step process.\n * This is a workaround for an issue faced when setting the cometchat-message-input's text state\n */\n const mySetAddToMsgInputText = useCallback(\n function (text: string): void {\n flushSync(() => {\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: \"\" });\n });\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: text });\n setTimeout(() => {\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: \"\" });\n }, 0)\n },\n [dispatch]\n );\n\n /**\n * Handles SDK errors\n */\n const handleSDKError = useCallback(\n (\n error: unknown,\n message: CometChat.TextMessage | CometChat.MediaMessage,\n wasEditMethodCall: boolean\n ): void => {\n message.setMetadata({ error });\n if (wasEditMethodCall) {\n CometChatMessageEvents.ccMessageEdited.next({\n message,\n status: MessageStatus.error,\n });\n } else {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n throw error;\n },\n []\n );\n\n /**\n * Manages playing audio\n */\n const playAudioIfSoundNotDisabled = useCallback((): void => {\n const disableSoundForMessages = disableSoundForMessagesPropRef.current;\n if (!disableSoundForMessages) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.outgoingMessage,\n customSoundForMessagePropRef.current\n );\n }\n }, [customSoundForMessagePropRef, disableSoundForMessagesPropRef]);\n\n /**\n * Creates a `CometChat.TextMessage` instance\n */\n const getTextMessage = useCallback(\n (text: string): CometChat.TextMessage => {\n const { receiverId, receiverType } = getReceiverDetails();\n const textMessage = new CometChat.TextMessage(\n receiverId,\n text,\n receiverType\n );\n textMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n textMessage.setMuid(CometChatUIKitUtility.ID());\n const parentMessageId = parentMessageIdPropRef.current;\n if (parentMessageId !== null) {\n textMessage.setParentMessageId(parentMessageId);\n }\n return textMessage;\n },\n [getReceiverDetails, parentMessageIdPropRef]\n );\n\n /**\n * Calls `sendMessage` SDK function\n */\n const sendTextMessage = useCallback(\n async (\n textMessage: T\n ): Promise => {\n try {\n for (let i = 0; i < textFormatterArray.length; i++) {\n textMessage = textFormatterArray[i].formatMessageForSending(\n textMessage\n ) as T;\n }\n const sentTextMessage = await CometChat.sendMessage(textMessage);\n mentionsTextFormatterInstanceRef.current.resetCometChatUserGroupMembers();\n return sentTextMessage as T;\n } catch (error) {\n console.log(error);\n handleSDKError(error, textMessage, false);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending text message\n */\n const handleTextMessageSend = useCallback(\n async (text: string): Promise => {\n try {\n const textMessage = getTextMessage(text);\n let mentionedUsers =\n mentionsTextFormatterInstanceRef.current.getCometChatUserGroupMembers();\n if (mentionedUsers) {\n let userObj = [];\n for (let i = 0; i < mentionedUsers.length; i++) {\n userObj.push(\n new CometChat.User({\n uid: mentionedUsers[i].getUid(),\n name: mentionedUsers[i].getName(),\n })\n );\n }\n textMessage.setMentionedUsers(userObj);\n mentionedUsers = [];\n }\n CometChatMessageEvents.ccMessageSent.next({\n message: textMessage,\n status: MessageStatus.inprogress,\n });\n\n const sentTextMessage = await sendTextMessage(textMessage);\n if (sentTextMessage) {\n CometChatMessageEvents.ccMessageSent.next({\n message: sentTextMessage,\n status: MessageStatus.success,\n });\n playAudioIfSoundNotDisabled();\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [getTextMessage, playAudioIfSoundNotDisabled, sendTextMessage, errorHandler]\n );\n\n /**\n * Creates a `CometChat.TextMessage` instance with the `id` of the instance set to `textMessageId`\n */\n const getEditedTextMessage = useCallback(\n (newText: string, textMessageId: number): CometChat.TextMessage => {\n const { receiverId, receiverType } = getReceiverDetails();\n const newTextMessage = new CometChat.TextMessage(\n receiverId,\n newText,\n receiverType\n );\n newTextMessage.setId(textMessageId);\n return newTextMessage;\n },\n [getReceiverDetails]\n );\n\n /**\n * Calls `editMessage` SDK function\n */\n const sendEditedTextMessage = useCallback(\n async (\n editedTextMessage: T\n ): Promise => {\n try {\n for (let i = 0; i < textFormatterArray.length; i++) {\n editedTextMessage = textFormatterArray[i].formatMessageForSending(\n editedTextMessage\n ) as T;\n }\n const editedMessage = await CometChat.editMessage(editedTextMessage);\n mentionsTextFormatterInstanceRef.current.resetCometChatUserGroupMembers();\n return editedMessage as T;\n } catch (error) {\n handleSDKError(error, editedTextMessage, true);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending edited messages\n */\n const handleEditTextMessageSend = useCallback(\n async (\n newText: string,\n textMessage: CometChat.TextMessage\n ): Promise => {\n try {\n if (onSendButtonClickPropRef.current) {\n onSendButtonClickPropRef.current(getEditedTextMessage(newText, textMessage.getId()), PreviewMessageMode.edit)\n mySetAddToMsgInputText(\"\");\n }\n else {\n const editedMessage = await sendEditedTextMessage(\n getEditedTextMessage(newText, textMessage.getId())\n );\n mySetAddToMsgInputText(\"\");\n if (editedMessage) {\n CometChatMessageEvents.ccMessageEdited.next({\n message: editedMessage,\n status: MessageStatus.success,\n });\n }\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [sendEditedTextMessage, getEditedTextMessage, errorHandler]\n );\n\n /**\n * Handles sending a new text message or an edited message\n *\n * @remarks\n * The function closes the emojiKeyboard if it is visible before sending or editing a message\n */\n const handleSendButtonClick = useCallback(\n async (text: string): Promise => {\n if (\n (text = text?.trim())?.length === 0 ||\n (state.textMessageToEdit !== null &&\n state.textMessageToEdit.getText() === text)\n ) {\n return;\n }\n if (state.contentToDisplay === \"emojiKeyboard\") {\n auxiliaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n if (state.contentToDisplay === \"voiceRecording\") {\n voiceRecordingBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n let onSendButtonClick:\n | ((message: CometChat.BaseMessage, previewMessageMode?: PreviewMessageMode) => void)\n | undefined;\n if (state.textMessageToEdit !== null) {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n await handleEditTextMessageSend(text, state.textMessageToEdit);\n } else if ((onSendButtonClick = onSendButtonClickPropRef.current)) {\n try {\n await Promise.all([onSendButtonClick(getTextMessage(text), PreviewMessageMode.none)]);\n } catch (error) {\n errorHandler(error);\n }\n } else {\n await handleTextMessageSend(text);\n }\n },\n [\n state.textMessageToEdit,\n state.contentToDisplay,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n dispatch,\n handleEditTextMessageSend,\n handleTextMessageSend,\n errorHandler,\n getTextMessage,\n onSendButtonClickPropRef,\n userPropRef,\n ]\n );\n\n /**\n * Creates a `CometChat.MediaMessage` instance\n */\n const getMediaMessage = useCallback(\n async (\n file: File,\n fileType: MediaMessageFileType\n ): Promise => {\n const processedFile = await processFile(file);\n const { receiverId, receiverType } = getReceiverDetails();\n const mediaMessage = new CometChat.MediaMessage(\n receiverId,\n processedFile,\n fileType,\n receiverType\n );\n mediaMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n mediaMessage.setMuid(CometChatUIKitUtility.ID());\n mediaMessage.setMetadata({ file: processedFile });\n const parentMessageId = parentMessageIdPropRef.current;\n if (parentMessageId !== null) {\n mediaMessage.setParentMessageId(parentMessageId);\n }\n return mediaMessage;\n },\n [getReceiverDetails, parentMessageIdPropRef]\n );\n\n /**\n * Calls `sendMediaMessage` SDK function\n */\n const sendMediaMessage = useCallback(\n async (\n mediaMessage: T\n ): Promise => {\n try {\n const sentMediaMessage = await CometChat.sendMediaMessage(mediaMessage);\n return sentMediaMessage as T;\n } catch (error) {\n handleSDKError(error, mediaMessage, false);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending media message\n */\n const handleMediaMessageSend = useCallback(\n async (file: File, fileType: MediaMessageFileType): Promise => {\n try {\n const mediaMessage = await getMediaMessage(file, fileType);\n CometChatMessageEvents.ccMessageSent.next({\n message: mediaMessage,\n status: MessageStatus.inprogress,\n });\n\n const sentMediaMessage = await sendMediaMessage(mediaMessage);\n if (sentMediaMessage) {\n CometChatMessageEvents.ccMessageSent.next({\n message: sentMediaMessage,\n status: MessageStatus.success,\n });\n playAudioIfSoundNotDisabled();\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [\n getMediaMessage,\n playAudioIfSoundNotDisabled,\n sendMediaMessage,\n errorHandler,\n ]\n );\n\n /**\n * Handles sending recorded voice message\n */\n const handleSendVoiceMessage = useCallback(\n async (blob: Blob): Promise => {\n try {\n const audioFile = new File(\n [blob],\n `${audioRecordingSimpleDateFormat()}.wav`,\n { type: blob.type }\n );\n handleMediaMessageSend(\n audioFile,\n CometChatUIKitConstants.MessageTypes.audio\n );\n } catch (error) {\n errorHandler(error);\n }\n },\n [handleMediaMessageSend, errorHandler]\n );\n\n /**\n * @returns A string in the format `audio-recording-yyyyMMddHHmmss`\n */\n function audioRecordingSimpleDateFormat() {\n const now = new Date();\n const string = \"audio-recording-yyyyMMddHHmmss\";\n const year = now.getFullYear().toString();\n const month = (now.getMonth() + 1).toString().padStart(2, \"0\");\n const date = now.getDate().toString().padStart(2, \"0\");\n const hours = now.getHours().toString().padStart(2, \"0\");\n const minutes = now.getMinutes().toString().padStart(2, \"0\");\n const seconds = now.getSeconds().toString().padStart(2, \"0\");\n return string\n .replace(\"yyyyMMdd\", `${year}${month}${date}`)\n .replace(\"HHmmss\", `${hours}${minutes}${seconds}`);\n }\n\n /**\n * Wrapper around `handleMediaMessageSend`\n */\n const handleMediaMessageSendWrapper = useCallback(async (): Promise => {\n const mediaFilePickerElement = mediaFilePickerRef.current;\n if (\n !mediaFilePickerElement?.files?.length ||\n userPropRef.current?.getBlockedByMe()\n ) {\n return;\n }\n const file = mediaFilePickerElement.files[0];\n const fileType = mediaFilePickerElement.accept.slice(0, -2);\n const onSendButtonClick = onSendButtonClickPropRef.current;\n if (onSendButtonClick) {\n try {\n await Promise.all([\n onSendButtonClick(await getMediaMessage(file, fileType), PreviewMessageMode.none),\n ]);\n } catch (error) {\n errorHandler(error);\n }\n } else {\n await handleMediaMessageSend(file, fileType);\n }\n\n mediaFilePickerElement.value = \"\";\n }, [\n handleMediaMessageSend,\n errorHandler,\n getMediaMessage,\n onSendButtonClickPropRef,\n userPropRef,\n ]);\n\n /**\n * @returns Should the component show the send button view\n */\n\n function hideSendButton(): boolean {\n return (\n !state.text || state?.text?.trim() === \"\" ||\n (state.textMessageToEdit !== null &&\n state.textMessageToEdit.getText() === state.text)\n );\n }\n\n /**\n * Creates primary view\n */\n function getPrimaryView(): JSX.Element | null {\n return (\n <>\n {getVoiceRecordingView()}\n {\n hideSendButton() ? getLiveReactionButton() : <>\n }\n {\n hideLiveReaction ? getSendButton() : (hideSendButton() ? <> : getSendButton())\n }\n \n );\n }\n\n function getLiveReactionButton(): JSX.Element {\n return (hideLiveReaction ? <> : (\n \n \n \n ))\n }\n\n function getSendButton(): JSX.Element {\n if (sendButtonView) {\n return sendButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n return (\n \n \n \n );\n }\n\n /**\n * Creates secondary view\n */\n function getSecondaryView(): JSX.Element {\n if (secondaryButtonView && (user !== undefined || group !== undefined)) {\n return secondaryButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n const defaultSecondaryBtn = (\n \n );\n // Use default secondary content\n let actions: CometChatMessageComposerAction[];\n if (\n attachmentOptions &&\n attachmentOptions.length > 0 &&\n (user !== undefined || group !== undefined)\n ) {\n const userToPass = user || group!;\n actions = attachmentOptions(\n userToPass,\n getComposerId()\n );\n } else {\n actions = ChatConfigurator.getDataSource().getAttachmentOptions(\n theme,\n getComposerId()\n );\n }\n\n for (let i = 0; i < actions.length; i++) {\n const curAction = actions[i];\n const { id } = curAction;\n if (typeof id === \"string\") {\n let overrideOnClick = curAction.onClick;\n if (id === \"extension_poll\") {\n overrideOnClick = () => {\n (curAction.onClick as Function)?.call(\n new PollsExtensionDecorator(\n ChatConfigurator.getDataSource(),\n new PollsConfiguration({})\n ),\n [user, group]\n );\n };\n }\n actionIdToActionOnClick.current.set(\n id,\n overrideOnClick ? overrideOnClick : null\n );\n }\n }\n const defaultSecondaryContent = (\n \n );\n return (\n \n \n {defaultSecondaryBtn}\n \n \n {defaultSecondaryContent}\n \n \n );\n }\n\n /**\n * Creates header view\n */\n function getHeaderView(): JSX.Element {\n return (\n \n {headerView ?? getTextMessageEditPreview()}\n \n );\n }\n\n /**\n * Creates voice recording view\n */\n function getVoiceRecordingView(): JSX.Element | null {\n const defaultSecondaryContent = (\n \n );\n\n const defaultSecondaryBtn = (\n \n );\n\n return hideVoiceRecording ? null : (\n \n \n {defaultSecondaryBtn}\n \n \n {state.contentToDisplay === \"voiceRecording\"\n ? defaultSecondaryContent\n : null}\n \n \n );\n }\n\n /**\n * Creates AI view\n */\n function getAIButtonView(): JSX.Element {\n const defaultAIBtn = (\n \n );\n\n let actions: (CometChatMessageComposerAction | CometChatActionsView)[];\n\n actions = ChatConfigurator.getDataSource().getAIOptions(\n userPropRef?.current || null,\n groupPropRef?.current || null,\n theme,\n getComposerId() as unknown as Map,\n AIOptionsStyle\n );\n\n const closePopover = () => {\n aiBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n };\n\n const backAction = () => {\n setSmartRepliesView(null);\n };\n\n const defaultAIContent = (\n {\n if (action instanceof CometChatMessageComposerAction) {\n if (action?.onClick) {\n action.onClick();\n closePopover();\n }\n }\n if (action instanceof CometChatActionsView) {\n if (action?.customView) {\n setSmartRepliesView(\n action.customView({ backAction, closePopover })\n );\n }\n }\n }}\n />\n );\n\n if (actions.length <= 0) {\n return <>\n }\n\n return (\n \n
    \n {defaultAIBtn}\n
    \n \n {!smartRepliesView ? defaultAIContent : smartRepliesView}\n \n \n );\n }\n\n /**\n * Creates auxiliary view\n */\n function getAuxiliaryView(): JSX.Element {\n if (auxiliaryButtonView && (user !== undefined || group !== undefined)) {\n return auxiliaryButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n const applyHorizontalMargin = hideLiveReaction && hideSendButton();\n const defaultAuxiliaryOptions =\n ChatConfigurator.getDataSource().getAuxiliaryOptions(\n getComposerId() as unknown as Map,\n theme,\n user,\n group\n );\n // Use default auxiliary button\n const defaultAuxiliaryBtn = (\n \n );\n // Use default auxiliary content\n const defaultAuxiliaryContent = (\n \n );\n return (\n <>\n <>{getAIButtonView()}\n
    \n {defaultAuxiliaryOptions.map((option: any) => option)}\n
    \n \n \n \n {defaultAuxiliaryBtn}\n \n \n {defaultAuxiliaryContent}\n \n \n \n \n );\n }\n\n /**\n * Creates preview view\n */\n function getTextMessageEditPreview(): JSX.Element | null {\n const checkForMentions = (message: CometChat.TextMessage) => {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp = messageText;\n let match = regex.exec(messageText);\n let cometChatUsersGroupMembers = [];\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] === mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n messageTextTmp = messageTextTmp.replace(\n match[0],\n \"@\" + user.getName()\n );\n cometChatUsersGroupMembers.push(user);\n }\n match = regex.exec(messageText);\n }\n mentionsTextFormatterInstanceRef.current.setCometChatUserGroupMembers(\n cometChatUsersGroupMembers\n );\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n return messageTextTmp;\n };\n\n if (state.textMessageToEdit === null) {\n return null;\n }\n const messageToBeEdited = state.textMessageToEdit;\n return (\n \n );\n }\n\n /**\n * Creates the file picker component\n */\n function getMediaFilePicker(): JSX.Element {\n // Purposely not given classname\n return (\n \n );\n }\n\n /**\n * Creates the message input component\n */\n function getTextInput(): JSX.Element {\n return (\n \n \n {getPrimaryView()}\n \n \n {getSecondaryView()}\n \n \n {getAuxiliaryView()}\n \n \n );\n }\n\n /**\n * Creates create poll modal\n */\n function getCreatePollModal(): JSX.Element | null {\n if (state.showPoll && createPollViewRef?.current) {\n return createPollViewRef.current;\n }\n\n return null;\n }\n\n Hooks({\n dispatch,\n textInputRef,\n liveReactionBtnElement,\n LiveReactionIconURL,\n mySetAddToMsgInputText,\n actionSheetElement,\n secondaryBtnElement,\n mediaFilePickerRef,\n textMessageEditPreviewElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n emojiKeyboardElement,\n voiceRecordingElement,\n text: state.text,\n handleSendButtonClick,\n primaryBtnElement,\n onTextChange,\n actionIdToActionOnClick,\n handleTyping,\n errorHandler,\n getReceiverDetails,\n contentToDisplay: state.contentToDisplay,\n createPollViewRef,\n handleSendVoiceMessage,\n auxiliaryPopoverElement,\n attachmentPopoverElement,\n aiPopoverElement,\n aiBtnElement,\n setSmartRepliesView,\n textFormatters,\n disableMentions,\n textFormatterArray,\n mentionsTextFormatterInstanceRef,\n userMemberWrapperConfiguration,\n setTextFormatters,\n CometChatUIKitLoginListener,\n group,\n user,\n setUserMemberWrapperConfig,\n userMemberWrapperConfig,\n userPropRef,\n groupPropRef,\n setShowListForMentions,\n searchMentions,\n mentionsFormatterInstanceId,\n setUsersRequestBuilder,\n setGroupMembersRequestBuilder,\n setUserMemberListType,\n userMemberWrapperRef,\n getComposerId,\n parentMessageIdPropRef\n });\n return (\n <>\n {getCreatePollModal()}\n \n {showListForMentions && (\n
    \n \n
    \n )}\n {state.showMentionsCountWarning && (\n
    \n \n
    \n )}\n {getMediaFilePicker()}\n {getHeaderView()}\n {getTextInput()}\n \n \n );\n}\n","import { Action, ActionOnClickType, ContentToDisplay } from \".\";\nimport {\n CometChat,\n Group,\n GroupMembersRequestBuilder,\n User,\n UsersRequestBuilder,\n} from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n UserMemberWrapperConfiguration,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatMessageEvents,\n CometChatUIEvents,\n IMentionsCountWarning,\n IMessages,\n IModal,\n MessageStatus,\n UserMemberListType,\n} from \"@cometchat/uikit-resources\";\nimport React, { JSX, useEffect, useRef } from \"react\";\n\ntype Args = {\n dispatch: React.Dispatch;\n textInputRef: React.MutableRefObject<\n JSX.IntrinsicElements[\"cometchat-message-input\"] | null\n >;\n liveReactionBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n LiveReactionIconURL: string;\n mySetAddToMsgInputText: (text: string) => void;\n actionSheetElement: JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null;\n mediaFilePickerRef: React.MutableRefObject;\n secondaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n textMessageEditPreviewElement:\n | JSX.IntrinsicElements[\"cometchat-preview\"]\n | null;\n auxiliaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n voiceRecordingBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n emojiKeyboardElement:\n | JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"]\n | null;\n voiceRecordingElement:\n | JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"]\n | null;\n auxiliaryPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n attachmentPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n text: string;\n handleSendButtonClick: (text: string) => Promise;\n primaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n onTextChange?: (text: string) => void;\n actionIdToActionOnClick: React.MutableRefObject<\n Map\n >;\n handleTyping: () => void;\n errorHandler: (error: unknown) => void;\n getReceiverDetails: () => { receiverId: string; receiverType: string };\n contentToDisplay: ContentToDisplay;\n createPollViewRef: any;\n handleSendVoiceMessage: (blob: Blob) => Promise;\n aiPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n aiBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n setSmartRepliesView: any;\n textFormatters: Array;\n disableMentions: boolean;\n textFormatterArray: Array;\n mentionsTextFormatterInstanceRef: React.MutableRefObject;\n userMemberWrapperConfiguration: UserMemberWrapperConfiguration | undefined;\n setTextFormatters: React.Dispatch<\n React.SetStateAction\n >;\n CometChatUIKitLoginListener: any;\n group: CometChat.Group | undefined;\n user: CometChat.User | undefined;\n userMemberWrapperConfig: UserMemberWrapperConfiguration;\n setUserMemberWrapperConfig: React.Dispatch<\n React.SetStateAction\n >;\n userPropRef: React.MutableRefObject;\n groupPropRef: React.MutableRefObject;\n setShowListForMentions: any;\n searchMentions: Function;\n mentionsFormatterInstanceId: string;\n setUsersRequestBuilder: React.Dispatch<\n React.SetStateAction\n >;\n setGroupMembersRequestBuilder: React.Dispatch<\n React.SetStateAction\n >;\n setUserMemberListType: React.Dispatch<\n React.SetStateAction\n >;\n userMemberWrapperRef: any;\n getComposerId: Function;\n parentMessageIdPropRef: any;\n};\n\nexport function Hooks(args: Args) {\n const {\n dispatch,\n textInputRef,\n liveReactionBtnElement,\n LiveReactionIconURL,\n mySetAddToMsgInputText,\n actionSheetElement,\n mediaFilePickerRef,\n secondaryBtnElement,\n textMessageEditPreviewElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n emojiKeyboardElement,\n voiceRecordingElement,\n auxiliaryPopoverElement,\n attachmentPopoverElement,\n text,\n handleSendButtonClick,\n primaryBtnElement,\n onTextChange,\n actionIdToActionOnClick,\n handleTyping,\n errorHandler,\n getReceiverDetails,\n contentToDisplay,\n createPollViewRef,\n handleSendVoiceMessage,\n aiPopoverElement,\n aiBtnElement,\n setSmartRepliesView,\n textFormatters,\n disableMentions,\n textFormatterArray,\n mentionsTextFormatterInstanceRef,\n userMemberWrapperConfiguration,\n setTextFormatters,\n CometChatUIKitLoginListener,\n group,\n user,\n userMemberWrapperConfig,\n setUserMemberWrapperConfig,\n userPropRef,\n groupPropRef,\n setShowListForMentions,\n searchMentions,\n mentionsFormatterInstanceId,\n setUsersRequestBuilder,\n setGroupMembersRequestBuilder,\n setUserMemberListType,\n userMemberWrapperRef,\n getComposerId,\n parentMessageIdPropRef } = args;\n const isPreviewVisible = useRef(false);\n useEffect(\n /**\n * Subscribes to message edited Message UI event\n */\n () => {\n const subMessageEdited = CometChatMessageEvents.ccMessageEdited.subscribe(\n (object: IMessages) => {\n let parentId = object?.message?.getParentMessageId()\n if ((parentMessageIdPropRef.current && parentId\n && parentId === parentMessageIdPropRef.current)\n || (!parentMessageIdPropRef.current && !parentId)) {\n if (\n object.status === MessageStatus.inprogress &&\n object.message instanceof CometChat.TextMessage\n ) {\n isPreviewVisible.current = true;\n dispatch({\n type: \"setTextMessageToEdit\",\n textMessageToEdit: object.message,\n });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(object.message.getText());\n }\n else {\n isPreviewVisible.current = true;\n }\n }\n }\n );\n const subComposeMessage = CometChatUIEvents.ccComposeMessage.subscribe(\n (text: string) => {\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(text);\n }\n );\n mentionsTextFormatterInstanceRef.current.setId(\n mentionsFormatterInstanceId\n );\n\n const ccShowMentionsCountWarning =\n CometChatUIEvents.ccShowMentionsCountWarning.subscribe(\n (data: IMentionsCountWarning) => {\n if (data.id === mentionsFormatterInstanceId) {\n if (data.showWarning) {\n dispatch({\n type: \"setShowMentionsCountWarning\",\n showMentionsCountWarning: true,\n });\n return;\n }\n dispatch({\n type: \"setShowMentionsCountWarning\",\n showMentionsCountWarning: false,\n });\n }\n }\n );\n return () => {\n subMessageEdited.unsubscribe();\n subComposeMessage.unsubscribe();\n ccShowMentionsCountWarning.unsubscribe();\n };\n },\n [\n mySetAddToMsgInputText,\n dispatch,\n textInputRef,\n mentionsFormatterInstanceId,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the live reaction button element\n */\n () => {\n if (!liveReactionBtnElement) {\n return;\n }\n async function handleEvent() {\n try {\n const reactionURL = LiveReactionIconURL;\n const { receiverId, receiverType } = getReceiverDetails();\n const data = {\n type: \"live_reaction\",\n reaction: \"heart\",\n };\n CometChat.sendTransientMessage(\n new CometChat.TransientMessage(receiverId, receiverType, data)\n );\n CometChatMessageEvents.ccLiveReaction.next(\"heart\");\n } catch (error) {\n errorHandler(error);\n }\n }\n const eventName = \"cc-button-clicked\";\n liveReactionBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n liveReactionBtnElement.removeEventListener(eventName, handleEvent);\n };\n },\n [\n LiveReactionIconURL,\n liveReactionBtnElement,\n errorHandler,\n getReceiverDetails,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-actionsheet-clicked` event listener to the action sheet element\n */\n () => {\n if (!actionSheetElement || !mediaFilePickerRef.current) {\n return;\n }\n function handleEvent(e: CustomEvent) {\n const { action } = e.detail;\n // Hide the secondary content view\n secondaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n const actionOnClick = actionIdToActionOnClick.current.get(\n `${action.id}`\n );\n if (typeof actionOnClick === \"function\") {\n actionOnClick();\n } else {\n // Open the correct file picker\n mediaFilePickerRef.current!.accept = `${action.id}/*`;\n mediaFilePickerRef.current!.click();\n }\n }\n const eventName = \"cc-actionsheet-clicked\";\n actionSheetElement.addEventListener(eventName, handleEvent);\n return () => {\n actionSheetElement.removeEventListener(eventName, handleEvent);\n };\n },\n [\n secondaryBtnElement,\n actionSheetElement,\n dispatch,\n actionIdToActionOnClick,\n mediaFilePickerRef,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-preview-close-clicked` event listener to the preview element\n */\n () => {\n if (!textMessageEditPreviewElement) {\n return;\n }\n function onPreviewCloseClick() {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n // Empty the text in the message composer\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(\"\");\n }\n const eventName = \"cc-preview-close-clicked\";\n textMessageEditPreviewElement.addEventListener(\n eventName,\n onPreviewCloseClick\n );\n return () => {\n textMessageEditPreviewElement.removeEventListener(\n eventName,\n onPreviewCloseClick\n );\n };\n },\n [textMessageEditPreviewElement, dispatch, textInputRef]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the secondary button element\n */\n () => {\n if (!secondaryBtnElement) {\n return;\n }\n function onSecondaryBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n\n function onAttachmentPopoverOutsideClick() {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-button-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n secondaryBtnElement.addEventListener(eventName, onSecondaryBtnClick);\n attachmentPopoverElement.addEventListener(\n outsideClickEventName,\n onAttachmentPopoverOutsideClick\n );\n return () => {\n secondaryBtnElement.removeEventListener(eventName, onSecondaryBtnClick);\n attachmentPopoverElement.removeEventListener(\n outsideClickEventName,\n onAttachmentPopoverOutsideClick\n );\n };\n },\n [\n contentToDisplay,\n secondaryBtnElement,\n attachmentPopoverElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n aiBtnElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the ai button element\n */\n () => {\n if (!aiBtnElement) {\n return;\n }\n\n function onAIBtnClick() {\n setSmartRepliesView(null);\n switch (contentToDisplay) {\n case \"ai\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"none\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n\n function onAIPopoverOutsideClick() {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-button-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n aiBtnElement.addEventListener(eventName, onAIBtnClick);\n aiPopoverElement.addEventListener(\n outsideClickEventName,\n onAIPopoverOutsideClick\n );\n return () => {\n aiBtnElement.removeEventListener(eventName, onAIBtnClick);\n aiPopoverElement.removeEventListener(\n outsideClickEventName,\n onAIPopoverOutsideClick\n );\n };\n },\n [\n contentToDisplay,\n aiBtnElement,\n aiPopoverElement,\n secondaryBtnElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n setSmartRepliesView,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the auxiliary button element\n */\n () => {\n if (!auxiliaryBtnElement || !voiceRecordingBtnElement) {\n return;\n }\n function onAuxiliaryBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"emojiKeyboard\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n function onVoiceRecordingBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"voiceRecording\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n const eventName = \"cc-button-clicked\";\n auxiliaryBtnElement.addEventListener(eventName, onAuxiliaryBtnClick);\n voiceRecordingBtnElement.addEventListener(\n eventName,\n onVoiceRecordingBtnClick\n );\n return () => {\n auxiliaryBtnElement.removeEventListener(eventName, onAuxiliaryBtnClick);\n voiceRecordingBtnElement.removeEventListener(\n eventName,\n onVoiceRecordingBtnClick\n );\n };\n },\n [\n contentToDisplay,\n secondaryBtnElement,\n voiceRecordingBtnElement,\n auxiliaryBtnElement,\n aiBtnElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-emoji-clicked` event listener to the emoji keyboard element\n */\n () => {\n if (!emojiKeyboardElement) {\n return;\n }\n function onEmojiClicked(e: CustomEvent) {\n const emoji = e.detail.id;\n if (typeof emoji === \"string\") mySetAddToMsgInputText(emoji);\n }\n\n function onEmojiKeyboardClose(e: CustomEvent) {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-emoji-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n emojiKeyboardElement.addEventListener(eventName, onEmojiClicked);\n auxiliaryPopoverElement.addEventListener(\n outsideClickEventName,\n onEmojiKeyboardClose\n );\n return () => {\n emojiKeyboardElement.removeEventListener(eventName, onEmojiClicked);\n auxiliaryPopoverElement.removeEventListener(\n outsideClickEventName,\n onEmojiKeyboardClose\n );\n };\n },\n [\n mySetAddToMsgInputText,\n auxiliaryPopoverElement,\n emojiKeyboardElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-media-recorder-closed` event listener to the media recorder element\n * Add `cc-media-recorder-submitted` event listener to the media recorder element\n */\n () => {\n if (!voiceRecordingElement) {\n return;\n }\n function onCloseTriggered(e: CustomEvent) {\n const customEvent = new CustomEvent(\"cc-button-clicked\", {});\n voiceRecordingBtnElement?.click();\n voiceRecordingBtnElement?.dispatchEvent(customEvent);\n }\n function sendVoiceMessage($event: CustomEvent) {\n const blob = $event.detail.file;\n onCloseTriggered($event);\n handleSendVoiceMessage(blob);\n }\n const closeEvent = \"cc-media-recorder-closed\";\n const submitEvent = \"cc-media-recorder-submitted\";\n voiceRecordingElement.addEventListener(closeEvent, onCloseTriggered);\n voiceRecordingElement.addEventListener(submitEvent, sendVoiceMessage);\n return () => {\n voiceRecordingElement.removeEventListener(closeEvent, onCloseTriggered);\n voiceRecordingElement.removeEventListener(\n submitEvent,\n sendVoiceMessage\n );\n };\n },\n [\n voiceRecordingElement,\n voiceRecordingBtnElement,\n dispatch,\n handleSendVoiceMessage,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the primary button element\n */\n () => {\n if (!primaryBtnElement) {\n return;\n }\n function handleEvent() {\n if (text) {\n handleSendButtonClick(text);\n }\n }\n const eventName = \"cc-button-clicked\";\n primaryBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n primaryBtnElement.removeEventListener(eventName, handleEvent);\n };\n },\n [handleSendButtonClick, text, primaryBtnElement]\n );\n\n useEffect(\n /**\n * Add `cc-message-input-entered` event listener to the message input element\n */\n () => {\n const textInputElement = textInputRef.current;\n if (!textInputElement) {\n return;\n }\n function onTextInputEnter(e: CustomEvent) {\n setShowListForMentions(false);\n const textToSend = e.detail.value;\n if (typeof textToSend === \"string\") handleSendButtonClick(textToSend);\n }\n const eventName = \"cc-text-input-entered\";\n textInputElement.addEventListener(eventName, onTextInputEnter);\n return () => {\n textInputElement.removeEventListener(eventName, onTextInputEnter);\n };\n },\n [handleSendButtonClick, textInputRef]\n );\n\n useEffect(\n /**\n * Add `cc-message-input-changed` event listener to the message input element\n */\n () => {\n const textInputElement = textInputRef.current;\n if (!textInputElement) {\n return;\n }\n function onTextInputChange(e: CustomEvent) {\n const newText = e.detail.value;\n if (typeof newText === \"string\" || newText == undefined) {\n\n handleTyping();\n dispatch({ type: \"setText\", text: newText });\n if (onTextChange !== undefined) onTextChange(newText);\n }\n }\n const eventName = \"cc-text-input-changed\";\n textInputElement.addEventListener(eventName, onTextInputChange);\n return () => {\n textInputElement.removeEventListener(\n eventName,\n onTextInputChange\n );\n };\n },\n [onTextChange, handleTyping, dispatch, textInputRef]\n );\n\n useEffect(\n /**\n * Subscribes to showModal & hideModal UI event to show & hide the Polls UI.\n */\n () => {\n const subShowModal = CometChatUIEvents.ccShowModal.subscribe(\n (data: IModal) => {\n dispatch({ type: \"setShowPoll\", showPoll: true });\n createPollViewRef.current = data.child;\n }\n );\n\n const subHideModal = CometChatUIEvents.ccHideModal.subscribe(() => {\n dispatch({ type: \"setShowPoll\", showPoll: false });\n createPollViewRef.current = null;\n });\n return () => {\n subShowModal.unsubscribe();\n subHideModal.unsubscribe();\n };\n },\n [createPollViewRef, dispatch]\n );\n\n useEffect(() => {\n if (!disableMentions) {\n if (textFormatters.length) {\n let foundMentionsFormatter = false;\n\n for (let i = 0; i < textFormatterArray.length; i++) {\n if (textFormatterArray[i] instanceof CometChatMentionsFormatter) {\n foundMentionsFormatter = true;\n break;\n }\n }\n\n if (!foundMentionsFormatter) {\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()\n );\n\n if (\n mentionsTextFormatterInstanceRef.current.getKeyDownCallBack() ===\n undefined\n ) {\n mentionsTextFormatterInstanceRef.current.setKeyDownCallBack(\n searchMentions\n );\n mentionsTextFormatterInstanceRef.current.setKeyUpCallBack(\n searchMentions\n );\n }\n\n setTextFormatters([\n ...textFormatterArray,\n mentionsTextFormatterInstanceRef.current,\n ]);\n }\n } else {\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()\n );\n\n if (\n mentionsTextFormatterInstanceRef.current.getKeyDownCallBack() ===\n undefined\n ) {\n mentionsTextFormatterInstanceRef.current.setKeyDownCallBack(\n searchMentions\n );\n mentionsTextFormatterInstanceRef.current.setKeyUpCallBack(\n searchMentions\n );\n }\n\n setTextFormatters([\n ...textFormatterArray,\n mentionsTextFormatterInstanceRef.current,\n ]);\n }\n }\n let mentionsTextFormatterInstance =\n mentionsTextFormatterInstanceRef.current;\n return () => {\n if (mentionsTextFormatterInstance) {\n mentionsTextFormatterInstance.cleanup();\n }\n };\n }, []);\n\n useEffect(() => {\n const shouldClearText =\n (userPropRef.current &&\n user &&\n userPropRef.current.getUid() !== user.getUid()) ||\n (groupPropRef.current &&\n group &&\n groupPropRef?.current.getGuid() !== group.getGuid());\n\n if (shouldClearText) {\n dispatch({ type: \"setText\", text: \"\" });\n mySetAddToMsgInputText(\"\");\n }\n\n if (userPropRef.current) {\n setShowListForMentions(\n user && userPropRef.current.getUid() !== user.getUid()\n );\n }\n if (groupPropRef.current) {\n setShowListForMentions(\n group && groupPropRef?.current.getGuid() !== group.getGuid()\n );\n }\n for (let i = 0; i < textFormatterArray.length; i++) {\n textFormatterArray[i].setComposerConfig(user, group, getComposerId());\n }\n }, [\n user,\n group,\n userPropRef,\n groupPropRef,\n dispatch,\n textInputRef,\n mySetAddToMsgInputText,\n ]);\n\n useEffect(() => {\n if (!disableMentions) {\n if (group) {\n const listType =\n userMemberWrapperConfiguration?.userMemberListType !== undefined\n ? userMemberWrapperConfiguration?.userMemberListType\n : UserMemberListType.groupmembers;\n\n setUserMemberListType(listType);\n\n const requestBuilder =\n userMemberWrapperConfiguration?.groupMemberRequestBuilder\n ? userMemberWrapperConfiguration?.groupMemberRequestBuilder\n : new CometChat.GroupMembersRequestBuilder(\n group.getGuid()\n ).setLimit(15);\n setGroupMembersRequestBuilder(requestBuilder);\n }\n\n if (user) {\n const listType =\n userMemberWrapperConfiguration?.userMemberListType !== undefined\n ? userMemberWrapperConfiguration?.userMemberListType\n : UserMemberListType.users;\n\n setUserMemberListType(listType);\n\n const requestBuilder =\n userMemberWrapperConfiguration?.usersRequestBuilder\n ? userMemberWrapperConfiguration?.usersRequestBuilder\n : new CometChat.UsersRequestBuilder().setLimit(15);\n\n setUsersRequestBuilder(requestBuilder);\n }\n }\n }, [user, group, disableMentions]);\n\n useEffect(() => {\n const handleMouseDown = (event: { target: any }) => {\n if (\n userMemberWrapperRef.current &&\n !userMemberWrapperRef.current.contains(event.target)\n ) {\n setShowListForMentions(false);\n }\n };\n document.addEventListener(\"mousedown\", handleMouseDown);\n\n return () => {\n document.removeEventListener(\"mousedown\", handleMouseDown);\n };\n }, []);\n // Reset composer when user/group changes.\n useEffect(() => {\n try {\n setTimeout(() => {\n if (isPreviewVisible.current && textInputRef.current) {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(\"\");\n isPreviewVisible.current = false;\n }\n });\n\n }\n catch (error) {\n errorHandler(error);\n }\n\n }, [user, group, parentMessageIdPropRef\n ]);\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\"\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\"\nimport { MessageHeaderStyle } from \"@cometchat/uikit-shared\"\nimport React, { CSSProperties } from 'react';\n\nexport const getMessageHeaderWrapperStyle = (messageHeaderStyle: MessageHeaderStyle, theme: CometChatTheme) => {\n\n return {\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: 'inherit',\n background: theme.palette.getBackground(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'row',\n padding: '8px',\n boxSizing: 'border-box',\n ...messageHeaderStyle\n } as CSSProperties\n}\n\nexport const MessageHeaderDivStyle = () => {\n return {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n borderRadius: 'inherit'\n } as CSSProperties\n}\n\nexport const MessageHeaderBackButtonStyle = () => {\n return {\n width: '24px',\n height: '24px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n }\n}\n\nexport const MessageHeaderListItemStyle = () => {\n return {\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n}\n\nexport const MessageHeaderMenuStyle = () => {\n return {\n width: 'fit-content',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n }\n}\n\nexport const CometChatListItemStyle = () => {\n return {\n width: '100%'\n }\n}\n\nexport const subtitleStyle = (user: CometChat.User | undefined, isTypingRef: React.MutableRefObject, messageHeaderStyle: MessageHeaderStyle, theme: CometChatTheme) => {\n // if (user && user.getStatus() === CometChatUIKitConstants.userStatusType.online) {\n // return {\n // textFont: messageHeaderStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n // textColor: messageHeaderStyle?.onlineStatusColor || theme.palette.getPrimary()\n // }\n // } else {\n // return {\n // textFont: isTypingRef?.current ? getMessageHeaderStyle?.typingIndicatorTextFont : getMessageHeaderStyle?.subtitleTextFont,\n // textColor: isTypingRef?.current ? getMessageHeaderStyle?.typingIndicatorTextColor : getMessageHeaderStyle?.subtitleTextColor\n // }\n // }\n if (isTypingRef && isTypingRef.current) {\n return {\n textFont: messageHeaderStyle?.typingIndicatorTextFont || fontHelper(theme.typography.subtitle2),\n textColor: messageHeaderStyle?.typingIndicatorTextColor || theme.palette.getPrimary()\n }\n } else {\n return {\n textFont: messageHeaderStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n textColor: messageHeaderStyle?.subtitleTextColor || theme.palette.getAccent600()\n }\n }\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme) => {\n return {\n borderRadius: \"24px\",\n width: \"36px\",\n height: \"36px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorder: \"\",\n outerViewBorderSpacing: \"\"\n }\n}\n\nexport const defaultStatusIndicatorStyle = () => {\n return {\n height: \"12px\",\n width: \"12px\",\n border: \"none\",\n borderRadius: \"24px\"\n }\n}\n\nexport const defaultListItemStyle = (listItemStyle: ListItemStyle, theme: CometChatTheme) => {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || \"inherit\",\n activeBackground: listItemStyle?.activeBackground || \"transparent\",\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor: listItemStyle?.separatorColor || \"\",\n hoverBackground: listItemStyle?.hoverBackground || \"transparent\"\n })\n}\n\nexport const getBackButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"none\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getPrimary()\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, BaseStyle, ListItemStyle } from '@cometchat/uikit-elements';\nimport { CometChatGroupEvents, CometChatMessageEvents, CometChatUIKitConstants, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IOwnershipChanged, localize } from '@cometchat/uikit-resources';\nimport { CometChatListItemStyle, MessageHeaderBackButtonStyle, MessageHeaderDivStyle, MessageHeaderListItemStyle, MessageHeaderMenuStyle, defaultAvatarStyle, defaultListItemStyle, defaultStatusIndicatorStyle, getBackButtonStyle, getMessageHeaderWrapperStyle, subtitleStyle } from \"./style\";\nimport { JSX, useCallback, useContext, useRef, useState } from \"react\";\nimport { useCometChatErrorHandler, useRefSync, useStateRef } from \"../CometChatCustomHooks\";\n\nimport BackIcon from './assets/backbutton.svg';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { MessageHeaderStyle } from '@cometchat/uikit-shared';\nimport PasswordGroupIcon from './assets/Locked.svg';\nimport PrivateGroupIcon from './assets/Private.svg';\nimport { Subscription } from 'rxjs';\n\ninterface IMessageHeaderProps {\n avatarStyle?: AvatarStyle,\n statusIndicatorStyle?: BaseStyle,\n messageHeaderStyle?: MessageHeaderStyle,\n listItemStyle?: ListItemStyle,\n subtitleView?: any,\n disableUsersPresence?: boolean,\n disableTyping?: boolean,\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n protectedGroupIcon?: string,\n passwordGroupIcon?: string | undefined;\n privateGroupIcon?: string,\n menu?: any,\n user?: CometChat.User,\n group?: CometChat.Group,\n backButtonIconURL?: string\n hideBackButton?: boolean,\n listItemView?: any,\n onError?: ((error: CometChat.CometChatException) => void) | null,\n onBack?: () => void\n}\n\nexport const CometChatMessageHeader = (props: IMessageHeaderProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n avatarStyle = {},\n statusIndicatorStyle = {},\n messageHeaderStyle = {},\n listItemStyle = {},\n subtitleView = null,\n disableUsersPresence = false,\n disableTyping = false,\n protectedGroupIcon = PasswordGroupIcon,\n passwordGroupIcon = undefined,\n privateGroupIcon = PrivateGroupIcon,\n menu = null,\n user,\n group,\n backButtonIconURL = BackIcon,\n hideBackButton,\n listItemView = null,\n onError,\n onBack = () => { }\n } = props;\n\n const [subtitleText, setSubtitleText] = useState('');\n const [loggedInUser, setLoggedInUser] = useState(null);\n const userRef = useRefSync(user);\n const groupRef = useRefSync(group);\n const onBackRef = useRefSync(onBack);\n const [ccBackBtnElement, setCCBackBtnRef] = useStateRef(null);\n const isTypingRef = useRef(false);\n const onErrorCallback = useCometChatErrorHandler(onError);\n\n\n // const setSubTitle = useCallback(() => {\n // const user = userRef.current;\n // const group = groupRef.current;\n // if (user) {\n // setSubtitleText(user.getStatus());\n // }\n // else if (group) {\n // const count = group.getMembersCount();\n // const membersText = localize(count > 1 ? \"MEMBERS\" : \"MEMBER\");\n // setSubtitleText(`${count} ${membersText}`);\n // }\n // }, [groupRef, userRef]);\n\n const updateSubtitle = useCallback(() => {\n const user = userRef.current;\n const group = groupRef.current;\n if (user) {\n setSubtitleText(localize(user.getStatus().toUpperCase()));\n }\n else if (group) {\n const count = group.getMembersCount();\n const membersText = localize(count > 1 ? \"MEMBERS\" : \"MEMBER\");\n setSubtitleText(`${count} ${membersText}`);\n }\n }, [userRef, groupRef]);\n\n const updateUserStatus = useCallback((userObject: CometChat.User) => {\n const user = userRef.current;\n if (user) {\n user.setStatus(userObject.getStatus());\n setSubtitleText(user.getStatus());\n }\n }, [userRef]);\n\n const setTypingIndicatorText = useCallback((typing: CometChat.TypingIndicator) => {\n try {\n const sender = typing?.getSender();\n const receiverId = typing?.getReceiverId();\n if (sender?.getUid() === userRef?.current?.getUid() && loggedInUser?.getUid() === receiverId) {\n const isBlocked = userRef?.current?.getBlockedByMe() || userRef?.current?.getHasBlockedMe();\n\n if (isBlocked) {\n return;\n }\n\n setSubtitleText(localize(\"IS_TYPING\"));\n }\n if (groupRef?.current?.getGuid() === receiverId) {\n setSubtitleText(`${sender?.getName()} ${localize(\"IS_TYPING\")}`);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [userRef, groupRef, onErrorCallback, loggedInUser]);\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccGroupMemberAdded = CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (groupRef?.current?.getGuid() === item?.userAddedIn?.getGuid()) {\n if (item?.usersAdded.length > 0) {\n item?.usersAdded.forEach(\n (userAdded: CometChat.User) => {\n if (userAdded?.getUid() === loggedInUser?.getUid()) {\n groupRef?.current?.setHasJoined(true);\n }\n }\n )\n }\n groupRef?.current?.setMembersCount(item?.userAddedIn?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberBanned = CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (groupRef?.current?.getGuid() === item?.kickedFrom?.getGuid()) {\n if (loggedInUser?.getUid() === item?.kickedUser?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberJoined = CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (groupRef?.current?.getGuid() === item?.joinedGroup?.getGuid()) {\n if (loggedInUser?.getUid() === item?.joinedUser?.getUid()) {\n groupRef?.current?.setHasJoined(true);\n }\n groupRef?.current?.setMembersCount(item?.joinedGroup?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberKicked = CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (groupRef?.current?.getGuid() === item?.kickedFrom?.getGuid()) {\n if (loggedInUser?.getUid() === item?.kickedUser?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccOwnershipChanged = CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (groupRef?.current?.getGuid() === item?.group?.getGuid()) {\n groupRef?.current?.setOwner(item?.group?.getOwner());\n updateSubtitle();\n }\n }\n )\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (groupRef?.current?.getGuid() === item?.leftGroup?.getGuid()) {\n if (loggedInUser?.getUid() === item?.userLeft?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.leftGroup?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n\n return () => {\n try {\n ccGroupMemberAdded.unsubscribe();\n ccGroupMemberBanned.unsubscribe();\n ccGroupMemberJoined.unsubscribe();\n ccGroupMemberKicked.unsubscribe();\n ccOwnershipChanged.unsubscribe();\n ccGroupLeft.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [groupRef, updateSubtitle, onErrorCallback, loggedInUser]);\n\n const attachListeners = useCallback(() => {\n const userListenerId = \"userList_\" + Date.now();\n const groupsListenerId = \"groupsList_\" + Date.now();\n const connectionListenerId = \"connection_\" + Date.now();\n\n if (!disableUsersPresence) {\n CometChat.addUserListener(\n userListenerId,\n new CometChat.UserListener({\n onUserOnline: (onlineUser: CometChat.User) => {\n if (userRef.current?.getUid() === onlineUser.getUid()) {\n updateUserStatus(onlineUser);\n }\n },\n onUserOffline: (offlineUser: CometChat.User) => {\n if (userRef.current?.getUid() === offlineUser?.getUid()) {\n updateUserStatus(offlineUser);\n }\n },\n })\n );\n }\n let onTypingStarted: Subscription;\n let onTypingEnded: Subscription;\n if (!disableTyping) {\n onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator: CometChat.TypingIndicator) => {\n isTypingRef.current = true;\n setTypingIndicatorText(typingIndicator);\n });\n onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator: CometChat.TypingIndicator) => {\n isTypingRef.current = false;\n updateSubtitle();\n });\n }\n CometChat.addGroupListener(\n groupsListenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (message: CometChat.Action, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group) => {\n if (groupRef.current?.getGuid() === changedGroup?.getGuid() && changedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setScope(newScope);\n }\n updateSubtitle();\n },\n onGroupMemberKicked: (message: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group) => {\n if (groupRef.current?.getGuid() === kickedFrom?.getGuid()) {\n if (kickedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n },\n onMemberAddedToGroup: (message: CometChat.Action, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group) => {\n if (groupRef.current?.getGuid() === userAddedIn.getGuid()) {\n if (userAdded.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(true);\n }\n groupRef.current?.setMembersCount(userAddedIn?.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberLeft: (message: CometChat.Action, leavingUser: CometChat.User, groupObject: CometChat.Group) => {\n if (groupRef.current?.getGuid() === groupObject.getGuid()) {\n if (leavingUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(groupObject.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberJoined: (message: CometChat.Action, joinedUser: CometChat.User, joinedGroup: CometChat.Group) => {\n if (groupRef.current?.getGuid() === joinedGroup.getGuid()) {\n if (joinedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(true);\n }\n groupRef.current?.setMembersCount(joinedGroup.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberBanned: (message: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group) => {\n if (groupRef.current?.getGuid() === bannedFrom.getGuid()) {\n if (bannedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(bannedFrom.getMembersCount());\n updateSubtitle();\n }\n }\n })\n );\n CometChat.addConnectionListener(\n connectionListenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener => On Connected\");\n },\n\n })\n );\n return () => {\n CometChat.removeUserListener(userListenerId);\n CometChat.removeGroupListener(groupsListenerId);\n CometChat.removeConnectionListener(connectionListenerId);\n onTypingStarted?.unsubscribe();\n onTypingEnded?.unsubscribe();\n };\n }, [userRef, groupRef, updateUserStatus, disableTyping, updateSubtitle, setTypingIndicatorText, loggedInUser, disableUsersPresence]);\n\n const checkStatusType = useCallback(() => {\n if (userRef.current) {\n if (!disableUsersPresence && userRef.current.getStatus() === CometChatUIKitConstants.userStatusType.online) {\n return \"#00f300\";\n }\n }\n else if (groupRef.current) {\n const groupType = groupRef.current.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n return \"#00f300\";\n }\n else if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n return \"#F7A500\";\n }\n }\n return null;\n }, [userRef, groupRef, disableUsersPresence]);\n\n const checkGroupType = useCallback(() => {\n let image: string = \"\";\n if (groupRef.current) {\n switch (groupRef.current?.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n image = passwordGroupIcon || protectedGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n image = privateGroupIcon;\n break;\n default:\n image = \"\"\n break;\n }\n }\n return image\n }, [groupRef, protectedGroupIcon, privateGroupIcon,passwordGroupIcon]);\n\n const getAvatarStyle = useCallback(() => {\n return { ...new AvatarStyle(defaultAvatarStyle(theme)), ...avatarStyle };\n }, [avatarStyle, theme]);\n\n const getStatusIndicatorStyle = useCallback(() => {\n return { ...defaultStatusIndicatorStyle(), ...statusIndicatorStyle };\n }, [statusIndicatorStyle]);\n\n const getListItemStyle = useCallback(() => {\n return defaultListItemStyle(listItemStyle, theme);\n }, [listItemStyle, theme]);\n\n const getSubtitleView = useCallback(() => {\n if (subtitleView) {\n return subtitleView;\n }\n\n return (\n
    \n \n
    \n );\n }, [userRef, subtitleView, subtitleText, theme, messageHeaderStyle]);\n\n const getListItemView = useCallback(() => {\n if (listItemView) {\n return listItemView;\n } else {\n return (\n \n
    \n {getSubtitleView()}\n
    \n
    \n )\n }\n }, [userRef, groupRef, listItemView, getSubtitleView, getAvatarStyle, getStatusIndicatorStyle, getListItemStyle, checkGroupType, checkStatusType]);\n\n const getBackButton = () => {\n\n if (hideBackButton) return null;\n\n return (\n
    \n \n
    \n );\n };\n\n const getMenu = useCallback(() => {\n\n if (!menu) return null;\n\n return (\n
    \n {menu}\n
    \n );\n\n }, [menu]);\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n attachListeners,\n onErrorCallback,\n ccBackBtnElement,\n onBackRef,\n userRef,\n groupRef,\n updateSubtitle\n )\n\n return (\n
    \n
    \n {getBackButton()}\n
    \n {getListItemView()}\n
    \n
    \n {getMenu()}\n
    \n );\n}\n","import React, { JSX, useEffect } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: Function,\n subscribeToEvents: any,\n attachListeners: any,\n onErrorCallback: any,\n ccBackBtnElement: JSX.IntrinsicElements[\"cometchat-button\"],\n onBackRef: React.MutableRefObject<() => void>,\n userRef: React.MutableRefObject, \n groupRef: React.MutableRefObject,\n updateSubtitle: Function\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (userObject: CometChat.User | null) => {\n if (userObject) {\n setLoggedInUser(userObject);\n }\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n const removeListenerFns : (() => void)[] = [];\n if(loggedInUser){\n removeListenerFns.push(subscribeToEvents());\n removeListenerFns.push(attachListeners());\n }\n return () => {\n for (let i = 0; i < removeListenerFns.length; i++) {\n return removeListenerFns[i]();\n }\n }\n }, [loggedInUser, attachListeners, subscribeToEvents]);\n\n useEffect(\n () => {\n if (!ccBackBtnElement) return;\n const eventName = \"cc-button-clicked\";\n const onBackClicked = () => onBackRef.current?.();\n ccBackBtnElement.addEventListener(eventName, onBackClicked);\n return () => {\n ccBackBtnElement.removeEventListener(eventName, onBackClicked);\n }\n },\n [ccBackBtnElement, onBackRef]\n );\n\n useEffect(() => {\n updateSubtitle();\n }, [userRef.current, groupRef.current, updateSubtitle])\n}\n\nexport { Hooks };\n","import { CometChatEmojiKeyboard, CometChatIconButton, CometChatButton, CometChatDate, CometChatLabel, CometChatLoader, CometChatAvatar, CometChatReceipt } from \"@cometchat/uikit-elements\";\nimport { CometChatReactions } from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\n/**\n * Converts Lit web components into React components using the createComponent function from lit labs. This conversion allows these components to be seamlessly integrated and used within a React application while preserving their original functionalities and event handling capabilities.\n **/\n\n/**\n * Converts CometChatReactions Lit web component to a React component using createComponent from lit labs. This can be used to show a list of reactions for a particular message. It can be customized using the style class of this component.For more details, go to [CometChatReactions](https://www.cometchat.com/docs-beta/ui-kit/react/reaction)\n *\n */\nexport const CometChatReactionsView = createComponent({\n tagName: \"cometchat-reactions\",\n elementClass: CometChatReactions,\n react: React,\n});\n\n/**\n * Converts CometChatEmojiKeyboard Lit web component to a React component using createComponent from lit labs. This can be used to show a list of emojis, which returns a particular emoji on click. It can be customized using the style class of this component.For more details, go to [CometChatEmojiKeyboard](https://www.cometchat.com/docs-beta/ui-kit/react/emoji-keyboard)\n *\n */\nexport const CometChatEmojiKeyboardView = createComponent({\n tagName: \"cometchat-emoji-keyboard\",\n elementClass: CometChatEmojiKeyboard,\n events: {\n onEmojiClick: \"cc-emoji-clicked\",\n },\n react: React,\n});\n\n/**\n * Converts CometChatIconButton Lit web component to a React component using createComponent from lit labs. This can be used to display a button which has an icon, a button, or both. It can be customized using the style class of this component.For more details, go to [CometChatIconButton](https://www.cometchat.com/docs-beta/ui-kit/react/icon-button)\n */\nexport const CometChatIconButtonView = createComponent({\n tagName: \"cometchat-icon-button\",\n elementClass: CometChatIconButton,\n react: React,\n events: {\n buttonClick: \"cc-button-clicked\",\n },\n});\n\n/**\n * Converts CometChatButton Lit web component to a React component using createComponent from lit labs. It can be used to display a button with customizable text. It can be customized using the style class of this component.\n */\nexport const CometChatButtonView = createComponent({\n tagName: \"cometchat-button\",\n elementClass: CometChatButton,\n react: React,\n events: {\n buttonClick: \"cc-button-clicked\",\n },\n});\n\n/**\n * Converts CometChatDate Lit web component to a React component using createComponent from lit labs. It can be used to display a date in different time formats by providing the enum and timestamp. It can be customized using the style class of this component.For more details, go to [CometChatDate](https://www.cometchat.com/docs-beta/ui-kit/react/date)\n */\nexport const CometChatDateView = createComponent({\n tagName: \"cometchat-date\",\n elementClass: CometChatDate,\n react: React,\n});\n\n/**\n * Converts CometChatLabel Lit web component to a React component using createComponent from lit labs. It can be used to display normal text or a title with customizable text. It can be customized using the style class of this component.For more details, go to [CometChatLabel](https://www.cometchat.com/docs-beta/ui-kit/react/label)\n */\nexport const CometChatLabelView = createComponent({\n tagName: \"cometchat-label\",\n elementClass: CometChatLabel,\n react: React,\n});\n\n/**\n * Converts CometChatLoader Lit web component to a React component using createComponent from lit labs. It can be used to display a loading icon which is customizable. By default, it has a loading icon inside the component. It can be customized using the style class of this component.For more details, go to [CometChatLoader](https://www.cometchat.com/docs-beta/ui-kit/react/loader)\n */\n\nexport const CometChatLoaderView = createComponent({\n tagName: \"cometchat-loader\",\n elementClass: CometChatLoader,\n react: React,\n});\n\n/**\n * Converts CometChatAvatar Lit web component to a React component using createComponent from lit labs. It can be used to display a user/group image with a fallback name if the URL is not present. It can be customized using the style class of this component. For more details, go to [CometChatAvatar](https://www.cometchat.com/docs-beta/ui-kit/react/avatar)\n */\nexport const CometChatAvatarView = createComponent({\n tagName: \"cometchat-avatar\",\n elementClass: CometChatAvatar,\n react: React,\n});\n\n/**\n * Converts CometChatReceipt Lit web component to a React component using createComponent from lit labs. It can be used to display various types of receipt statuses for a message (like sent, delivered, etc.) which can be customized by sending the enum for which state to be shown. It can be customized using the style class of this component.For more details, go to [CometChatReceipt](https://www.cometchat.com/docs-beta/ui-kit/react/receipt)\n */\nexport const CometChatReceiptView = createComponent({\n tagName: \"cometchat-receipt\",\n elementClass: CometChatReceipt,\n react: React,\n});\n","import {\n AvatarStyle,\n DateStyle,\n LabelStyle,\n ListItemStyle,\n LoaderStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n MessageBubbleAlignment,\n MessageListAlignment,\n fontHelper,\n} from \"@cometchat/uikit-resources\";\nimport {\n BaseStyle,\n ListStyle,\n MessageListStyle,\n ReactionInfoConfiguration,\n ReactionInfoStyle,\n ReactionListStyle,\n ReactionsStyle,\n StickersConstants,\n} from \"@cometchat/uikit-shared\";\nimport { CSSProperties } from \"react\";\n\n/**\n * Generates the style object for the new unread-messages view, visible when the user is not at the bottom and receives a new message\n *\n * @returns {CSSProperties}\n */\nexport const newMessageIndicatorStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"fit-content\",\n width: \"100%\",\n };\n};\n\n/**\n * Generates the style object for the custom header view, visible on the top of the message list\n *\n * @returns {CSSProperties}\n */\nexport const headerStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n width: \"100%\",\n height: \"auto\",\n };\n};\n\n/**\n * Returns the style object for the custom footer view, visible on the bottom of the message list. By default, smart replies are visible for the message received.\n *\n * @returns {CSSProperties}\n */\nexport const footerStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n width: \"100%\",\n height: \"auto\",\n };\n};\n\n/**\n * Provides the style object for the CometChatList wrapper which renders a list of messages\n\n *\n * @returns {CSSProperties}\n */\nexport const listWrapperStyle: () => CSSProperties = () => {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowX: \"hidden\",\n boxSizing: \"border-box\",\n };\n};\n\n/**\n * Generates the style object for the MessageList wrapper which renders the CometChatList component\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {CSSProperties}\n */\nexport const wrapperStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => CSSProperties = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n height: \"100%\",\n width: \"100%\",\n flex: \"1 1 0\",\n order: \"2\",\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n border: `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: \"inherit\",\n background: theme.palette.getBackground(),\n ...messageListStyle,\n };\n };\n\n/**\n * Style object for the threadView in the CometChatMessageBubble which shows the message count of a specific thread visible below the CometChatMessageBubble in a particular user/group.\n *\n * @param {CometChat.BaseMessage} message\n * @param {CometChatTheme} theme\n * @param {(CometChat.User | null)} loggedInUser\n * @param {MessageListStyle} [messageListStyle={}]\n * @param {MessageBubbleAlignment} [alignment]\n * @returns {CSSProperties}\n */\nexport const messageThreadViewStyle: (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n loggedInUser: CometChat.User | null,\n messageListStyle: MessageListStyle | undefined,\n alignment?: MessageBubbleAlignment\n) => CSSProperties = (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n loggedInUser: CometChat.User | null,\n messageListStyle: MessageListStyle = {},\n alignment?: MessageBubbleAlignment\n) => {\n\n const baseStyle = {\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: messageListStyle.threadReplyIconTint || theme.palette.getAccent600(),\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n buttonTextColor: messageListStyle?.threadReplyTextColor || theme.palette.getAccent(),\n buttonTextFont: messageListStyle?.threadReplyTextFont || fontHelper(theme.typography.text2),\n iconHeight: \"15px\",\n iconWidth: \"15px\"\n };\n\n if ((!message.getSender() || message.getSender().getUid() === loggedInUser?.getUid()) && alignment != MessageBubbleAlignment.left) {\n return {\n ...baseStyle,\n flexFlow: \"row-reverse\",\n };\n } else {\n return {\n ...baseStyle,\n flexFlow: \"row\",\n };\n }\n };\n\n\n\n/**\n * Style object for the new message indicator text visible upon receiving a new message while the screen is not at the last message of the chat.\n *\n * @param {CometChatTheme} theme\n * @returns {CSSProperties}\n */\nexport const newMessageTextStyleStyle: (theme: CometChatTheme) => CSSProperties = (theme: CometChatTheme) => {\n return {\n height: \"fit-content\",\n width: \"fit-content\",\n background: theme.palette.getPrimary(),\n display: \"flex\",\n justifyContent: \"center\",\n buttonTextFont: fontHelper(theme.typography.text2),\n buttonTextColor: theme.palette.getAccent(\"dark\"),\n border: \"none\",\n borderRadius: \"12px\",\n padding: \"2px 6px\"\n };\n};\n\n\n\n/**\n * Default style object for CometChatMessageBubble component which renders all types of supported message types.\n *\n * @param {CometChat.BaseMessage} message\n * @param {CometChatTheme} theme\n * @param {(MessageListAlignment | undefined)} alignment\n * @param {(CometChat.User | null)} loggedInUser\n * @returns {BaseStyle}\n */\nexport const messageBubbleStyle: (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageListAlignment | undefined,\n loggedInUser: CometChat.User | null\n) => BaseStyle = (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageListAlignment | undefined,\n loggedInUser: CometChat.User | null\n) => {\n const baseBackground: BaseStyle = {\n background: \"transparent\",\n borderRadius: \"12px\",\n };\n\n const coloredBackground: BaseStyle = {\n background: theme.palette.getSecondary(),\n borderRadius: \"12px\",\n };\n\n if (message.getDeletedAt()) {\n return {\n ...baseBackground,\n };\n } else if (\n message?.getType() === CometChatUIKitConstants.calls.meeting &&\n (!message?.getSender() || message?.getSender().getUid() === loggedInUser?.getUid())\n ) {\n return {\n ...coloredBackground,\n background: theme.palette.getPrimary(),\n border: `none`,\n };\n } else if (message?.getType() === StickersConstants.sticker) {\n return baseBackground;\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n (!message.getSender() || loggedInUser?.getUid() === message.getSender().getUid())\n ) {\n return {\n ...coloredBackground,\n background:\n alignment === MessageListAlignment.left\n ? theme.palette.getSecondary()\n : theme.palette.getPrimary(),\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return {\n ...coloredBackground,\n borderRadius: \"\",\n };\n } else if (\n message.getType() === CometChatUIKitConstants.MessageTypes.groupMember ||\n message.getCategory() === CometChatUIKitConstants.MessageCategory.call\n ) {\n return {\n ...baseBackground,\n border: `1px solid ${theme.palette.getSecondary()}`,\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return {\n ...coloredBackground,\n width: \"300px\",\n };\n } else {\n return coloredBackground;\n }\n };\n\n/**\n * Default style object for receipt status of the message if it's read sent or delivered.\n *\n * @param {CometChatTheme} theme\n * @param {CometChat.BaseMessage} message\n * @returns {ReceiptStyle}\n */\nexport const messageReceiptStyle: (theme: CometChatTheme, message: CometChat.BaseMessage) => ReceiptStyle = (theme: CometChatTheme, message: CometChat.BaseMessage) => {\n const isTextMessage = message?.getType() === CometChatUIKitConstants.MessageTypes.text;\n return new ReceiptStyle({\n waitIconTint: theme.palette.getAccent700(),\n sentIconTint: theme.palette.getAccent600(),\n deliveredIconTint: theme.palette.getAccent600(),\n readIconTint: isTextMessage ? theme.palette.getBackground() : theme.palette.getPrimary(),\n errorIconTint: theme.palette.getError(),\n height: \"11px\",\n width: \"12px\",\n background:\"none\"\n });\n};\n\n/**\n * Default style object for statusInfo view which renders the time when the message was sent and receipt status\nof the message if it's read or delivered.\n *\n * @param {boolean} isValid\n * @param {CometChatTheme} theme\n * @param {CometChat.BaseMessage} message\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const getStatusInfoViewStyle: (\n isValid: boolean,\n theme: CometChatTheme,\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n) => CSSProperties = (\n isValid: boolean,\n theme: CometChatTheme,\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n) => {\n const baseStyle = {\n display: \"flex\",\n alignItems: \"end\",\n padding: \"1px 8px 8px\",\n gap: \"4px\",\n marginTop: \"0\"\n };\n\n if (isValid) {\n return {\n ...baseStyle,\n justifyContent: \"center\",\n height: \"fit-content\",\n borderRadius: \"22px\",\n padding: \"3px 5px\",\n paddingTop: \"2px\",\n position: \"relative\",\n marginTop: \"-22px\",\n marginRight: \"12px\",\n background: theme.palette.getAccent500(\"dark\"),\n width: \"fit-content\"\n };\n } else {\n if (message?.getType() === CometChatUIKitConstants.MessageTypes.text) {\n baseStyle['padding'] = '0px 8px 8px';\n baseStyle['marginTop'] = alignment === MessageBubbleAlignment.right ? '-6px' : '-5px'\n }\n\n return baseStyle;\n }\n };\n\n/**\n * Style object for footerView wrapper which is visible at the bottom of the CometChatMessageBubble component.\nIt is a placeholder which accepts a custom view. By default, message Reactions are visible at the bottom for the message\nreceived in a particular User/Group Chat.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const bubbleFooterViewWrapperStyle: (alignment: MessageBubbleAlignment) => CSSProperties = (\n alignment: MessageBubbleAlignment\n): CSSProperties => {\n let justifyContent = \"center\";\n if (alignment === MessageBubbleAlignment.right) {\n justifyContent = \"flex-end\";\n } else if (alignment === MessageBubbleAlignment.left) {\n justifyContent = \"flex-start\";\n }\n\n return {\n display: \"flex\",\n justifyContent: justifyContent,\n width: \"100%\",\n boxSizing: \"border-box\",\n };\n};\n\n/**\n * Style object for time in headerView of CometChatMessageBubble which shows the time when the message was sent\nin the particular user/group chat\n\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {DateStyle}\n */\nexport const messageBubbleHeaderDateStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => DateStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n textColor:\n messageListStyle?.TimestampTextColor || theme.palette.getAccent600(),\n textFont:\n messageListStyle?.TimestampTextFont ||\n fontHelper(theme.typography.caption3),\n padding: \"0\",\n display: \"block\"\n };\n };\n\n/**\n * Style object for title in headerView of CometChatMessageBubble which shows the name\nof the sender of the message in the particular user/group chat\n *\n * @param {CometChatTheme} theme\n * @returns {LabelStyle}\n */\nexport const bubbleHeaderTitleStyle: (theme: CometChatTheme, messageListStyle?: MessageListStyle) => LabelStyle = (theme: CometChatTheme, messageListStyle?: MessageListStyle) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n textFont: defaultMessageListStyle?.nameTextFont || fontHelper(theme.typography.caption2),\n textColor: defaultMessageListStyle?.nameTextColor || theme.palette.getAccent600(),\n };\n};\n\n/**\n * Generates the style object for the CometChatDate component, visible between the messages in CometChatMessageList as a separator for same-date messages.\n *\n * @param {(DateStyle | undefined)} dateSeparatorStyle\n * @param {CometChatTheme} theme\n * @returns {DateStyle}\n */\nexport const dateSeperatorStyle: (\n dateSeparatorStyle: DateStyle | undefined,\n theme: CometChatTheme\n) => DateStyle = (\n dateSeparatorStyle: DateStyle | undefined,\n theme: CometChatTheme\n) => {\n return new DateStyle({\n textFont:\n dateSeparatorStyle?.textFont || fontHelper(theme.typography.subtitle2),\n textColor: dateSeparatorStyle?.textColor || theme.palette.getAccent600(),\n background: dateSeparatorStyle?.background || \"inherit\",\n height: dateSeparatorStyle?.height || \"100%\",\n width: dateSeparatorStyle?.width || \"100%\",\n border:\n dateSeparatorStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: dateSeparatorStyle?.borderRadius || \"8px\",\n });\n };\n\n/**\n * Provides the default style object for the CometChatMessageList component if the required styles are not provided by the parent component.\n *\n * @param {CometChatTheme} theme\n * @returns {MessageListStyle}\n */\nexport const tempMessageListStyle: (theme: CometChatTheme) => MessageListStyle = (theme: CometChatTheme) => {\n return new MessageListStyle({\n background: theme.palette.getBackground(),\n border: `none`,\n emptyStateTextFont: fontHelper(theme.typography.title1),\n emptyStateTextColor: theme.palette.getAccent600(),\n errorStateTextFont: fontHelper(theme.typography.title1),\n errorStateTextColor: theme.palette.getAccent600(),\n loadingIconTint: theme.palette.getAccent600(),\n nameTextFont: fontHelper(theme.typography.caption2),\n nameTextColor: theme.palette.getAccent600(),\n threadReplyTextFont: fontHelper(theme.typography.subtitle1),\n threadReplyIconTint: theme.palette.getAccent600(),\n threadReplyTextColor: theme.palette.getAccent600(),\n TimestampTextFont: fontHelper(theme.typography.caption2),\n TimestampTextColor: theme.palette.getAccent600(),\n });\n};\n\n\n/**\n * Generates the style object for the loading view visible in the center of the CometChatMessageList component until the messages for a specific User/Group are fetched.\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {LoaderStyle}\n */\nexport const loadingViewStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => LoaderStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n iconTint: defaultMessageListStyle.loadingIconTint,\n };\n };\n\n/**\n * Generates the style object for the error view visible in the center of the CometChatMessageList component when there is an issue fetching the messages of a specific User/Group.\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {LabelStyle}\n */\nexport const errorViewStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => LabelStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n textFont: defaultMessageListStyle.errorStateTextFont,\n textColor: defaultMessageListStyle.errorStateTextColor,\n };\n };\n\n/**\n * Generates the style object for the CometChatAvatar component, which includes both styling received from the parent component and default styling required in the CometChatAvatar component.\n *\n * @param {(AvatarStyle | undefined)} avatarStyle\n * @param {CometChatTheme} theme\n * @returns {AvatarStyle}\n */\nexport const messageAvatarStyle: (\n avatarStyle: AvatarStyle | undefined,\n theme: CometChatTheme\n) => AvatarStyle = (\n avatarStyle: AvatarStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultAvatarStyle = new AvatarStyle({\n borderRadius: \"24px\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: \"0\",\n outerViewBorderRadius: \"0\",\n outerViewBorderColor: \"\",\n outerViewBorderSpacing: \"0\",\n });\n return { ...defaultAvatarStyle, ...avatarStyle };\n };\n\n/**\n * Returns the default style object for CometChatDate wrapper, visible in the center between the messages in CometChatMessageList as a separator for same-day messages.\n *\n * @returns {CSSProperties}\n */\nexport const dateSeperatorWrapperStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n width: \"100%\",\n marginBottom: \"16px\",\n };\n};\n\n/**\n * Provides the default style object for the CometChatAvatar visible in the leadingView of CometChatMessageBubble, showing the sender's avatar.\n *\n * @type {AvatarStyle}\n */\nexport const defaultAvatarStyle: AvatarStyle = {\n borderRadius: \"24px\",\n width: \"36px\",\n height: \"36px\",\n};\n/**\n * Returns the default style object for CometChatMessageList if the style is not received from the parent.\n *\n * @type {MessageListStyle}\n */\nexport const defaultMessageListStyle: MessageListStyle = {\n nameTextFont: \"600 15px Inter, sans-serif\",\n nameTextColor: \"white\",\n TimestampTextFont: \"\",\n TimestampTextColor: \"\",\n threadReplyTextFont: \"\",\n threadReplyIconTint: \"\",\n threadReplyTextColor: \"\",\n emptyStateTextFont: \"700 22px Inter, sans-serif\",\n emptyStateTextColor: \"#bcbcbc\",\n errorStateTextFont: \"700 22px Inter, sans-serif\",\n errorStateTextColor: \"#bcbcbc\",\n loadingIconTint: \"grey\",\n};\n\n/**\n * Provides the default style object for the CometChatMessageBubble wrapper div.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const bubbleStyle: (\n alignment: MessageBubbleAlignment\n) => CSSProperties = (\n alignment: MessageBubbleAlignment\n): CSSProperties => {\n let justifyContent = \"center\";\n if (alignment === MessageBubbleAlignment.right) {\n justifyContent = \"flex-end\";\n } else if (alignment === MessageBubbleAlignment.left) {\n justifyContent = \"flex-start\";\n }\n\n return {\n display: \"flex\",\n justifyContent: justifyContent,\n width: \"100%\",\n marginBottom: \"16px\",\n };\n };\n\n/**\n * Supplies the default style object for the CometChatMessageBubble container.\n *\n * @type {CSSProperties}\n */\nexport const defaultMessageListBubbleStyle: CSSProperties = {\n padding: \"0px 0px 0px 15px\",\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n marginRight: \"8px\",\n boxSizing: \"border-box\"\n};\n\n/**\n * Returns the default style for the CometChatList component, which renders a list of messages for a specific user/group.\n *\n * @returns {ListStyle}\n */\nexport const getListStyle: () => ListStyle = () => {\n return new ListStyle({\n height: \"100%\",\n width: \"100%\",\n background: \"inherit\",\n });\n};\n\n/**\n * Provides the default style for the CometChatAvatar component, which renders an Avatar about the reactor in the Reactions list.\n *\n * @param {CometChatTheme} theme\n * @returns {AvatarStyle}\n */\nexport const getReactionListAvatarStyle: (theme: CometChatTheme) => AvatarStyle = (theme: CometChatTheme) => {\n return new AvatarStyle({\n borderRadius: \"50%\",\n width: \"35px\",\n height: \"35px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: \"0\",\n outerViewBorderRadius: \"0\",\n outerViewBorderColor: \"\",\n outerViewBorderSpacing: \"0\",\n });\n}\n\n/**\n * Generates the default style for the CometChatListItem component, which renders details about the reaction in the list.\n *\n * @param {CometChatTheme} theme\n * @returns {ListItemStyle}\n */\nexport const getReactionListItemStyle: (theme: CometChatTheme) => ListItemStyle = (theme: CometChatTheme) => {\n return new ListItemStyle({\n background: \"transparent\",\n activeBackground: \"transparent\",\n hoverBackground: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent(),\n separatorColor: theme.palette.getAccent100(),\n });\n}\n\n/**\n * Provides the default style for the CometChatReactionList component, which shows a list of reactions on a specific reaction along with the reactor's details.\n *\n * @param {CometChatTheme} theme\n * @returns {ReactionListStyle}\n */\nexport const getReactionListStyle: (theme: CometChatTheme) => ReactionListStyle = (theme: CometChatTheme) => {\n return new ReactionListStyle({\n width: \"320px\",\n height: \"300px\",\n borderRadius: \"12px\",\n background: theme.palette.getAccent900(),\n border: \"none\",\n errorIconTint: theme.palette.getAccent400(),\n loadingIconTint: theme.palette.getAccent400(),\n sliderEmojiCountFont: fontHelper(theme.typography.subtitle2),\n sliderEmojiFont: fontHelper(theme.typography.subtitle1),\n subtitleTextColor: theme.palette.getAccent500(),\n subtitleTextFont: fontHelper(theme.typography.subtitle2),\n tailViewFont: fontHelper(theme.typography.title1),\n dividerTint: theme.palette.getAccent100(),\n sliderEmojiCountColor: theme.palette.getAccent500(),\n activeEmojiBackground: theme.palette.getAccent100()\n })\n}\n\n/**\n * Default styling for CometChatReactionInfo component. If the configuration styling is not passed.\n *\n * @param {CometChatTheme} theme\n * @param {ReactionInfoConfiguration} config\n * @returns {ReactionInfoStyle}\n */\nexport const getReactionInfoStyle: (theme: CometChatTheme, config: ReactionInfoConfiguration) => ReactionInfoStyle = (theme: CometChatTheme, config: ReactionInfoConfiguration) => {\n return new ReactionInfoStyle({\n background: config?.reactionInfoStyle?.background || theme.palette.getAccent(\"light\"),\n border: config?.reactionInfoStyle?.border || \"none\",\n borderRadius: config?.reactionInfoStyle?.borderRadius || \"12px\",\n errorIconTint: config?.reactionInfoStyle?.errorIconTint || theme.palette.getBackground(\"light\"),\n loadingIconTint: config?.reactionInfoStyle?.loadingIconTint || theme.palette.getBackground(\"light\"),\n namesColor: config?.reactionInfoStyle?.namesColor || theme.palette.getBackground(\"light\"),\n namesFont: config?.reactionInfoStyle?.namesFont || fontHelper(theme.typography.subtitle2),\n reactedTextColor: config?.reactionInfoStyle?.reactedTextColor || theme.palette.getAccent700(\"dark\"),\n reactedTextFont: config?.reactionInfoStyle?.reactedTextFont || fontHelper(theme.typography.subtitle2),\n reactionFontSize: config?.reactionInfoStyle?.reactionFontSize || \"37px\"\n });\n}\n\n/**\n * Default styleing for CometChatReactions component wrapper.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const getReactionViewStyle: (alignment: MessageBubbleAlignment) => CSSProperties = (alignment: MessageBubbleAlignment) => {\n return {\n width: \"100%\",\n padding: \"5px 0px\",\n boxSizing: \"border-box\",\n display: \"flex\",\n marginTop: \"-9px\",\n justifyContent: alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n }\n}\n/**\n * Returns the default style for the statusInfoView wrapper in CometChatMessageBubble.\n *\n * @returns {CSSProperties}\n */\nexport const getStatusInfoStyle: () => CSSProperties = () => {\n return {\n position: \"relative\", display: \"flex\", justifyContent: \"flex-end\"\n }\n}\n/**\n * Generates the default style for the CometChatReactions component wrapper, which shows a list of reactions on a specific message, visible in the footer view of the message bubble.\n *\n * @param {ReactionsStyle} [reactionsStyle]\n * @param {CometChatTheme} theme\n * @returns {ReactionsStyle}\n */\nexport const getReactionsStyle: (reactionsStyle: ReactionsStyle | undefined, theme: CometChatTheme) => ReactionsStyle = (reactionsStyle: ReactionsStyle = {}, theme: CometChatTheme) => {\n return new ReactionsStyle({\n height: reactionsStyle?.height || \"100%\",\n width: reactionsStyle?.width || \"fit-content\",\n border: reactionsStyle?.border || \"none\",\n borderRadius: reactionsStyle?.borderRadius || \"0\",\n background: reactionsStyle?.background || \"transparent\",\n activeReactionBackground: reactionsStyle?.activeReactionBackground || theme.palette.getPrimary150(),\n reactionBackground: reactionsStyle?.reactionBackground || theme.palette.getAccent100(),\n reactionBorder: reactionsStyle?.reactionBorder || `none`,\n activeReactionBorder: reactionsStyle?.activeReactionBorder || `1px solid ${theme.palette.getPrimary500()}`,\n reactionBorderRadius: reactionsStyle?.reactionBorderRadius || \"20px\",\n activeReactionCountTextColor: reactionsStyle?.activeReactionCountTextColor || theme.palette.getAccent(),\n activeReactionCountTextFont: reactionsStyle?.activeReactionCountTextFont || fontHelper(theme.typography.caption1),\n reactionCountTextFont: reactionsStyle?.reactionCountTextFont || fontHelper(theme.typography.caption1),\n reactionCountTextColor: reactionsStyle?.reactionCountTextColor || theme.palette.getAccent(),\n reactionBoxShadow: reactionsStyle?.reactionBoxShadow || \"rgba(0, 0, 0, 0.1) 0px 4px 12px\",\n reactionEmojiFont: reactionsStyle?.reactionEmojiFont || fontHelper(theme.typography.subtitle1),\n baseReactionBackground: reactionsStyle?.baseReactionBackground || theme.palette.getBackground(),\n })\n}\n","\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { CSSProperties } from \"react\";\nimport { ReceiptStyle, DateStyle, BackdropStyle } from \"@cometchat/uikit-elements\";\nimport { BaseStyle, MessageInformationStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & { buttonIconTint?: string };\ntype WrapperStyle = CSSProperties & { position?: string };\n\nexport function closeBtnStyle(theme: CometChatTheme): ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: theme.palette.getPrimary(),\n background: \"transparent\",\n position: \"absolute\",\n top: \"20px\",\n right: \"16px\"\n };\n}\n\nexport const dividerStyle = (theme: CometChatTheme) => {\n return {\n height: \"1px\",\n width: \"100%\",\n background: theme.palette.getAccent100()\n }\n}\n\nexport function receiptStyle(theme: CometChatTheme): ReceiptStyle {\n return new ReceiptStyle({\n deliveredIconTint: theme.palette.getAccent600(),\n readIconTint: theme.palette.getPrimary(),\n errorIconTint: theme.palette.getError(),\n height: \"20px\",\n width: \"20px\"\n });\n}\n\nexport const MessageDateStyle = (dateSeparatorStyle: DateStyle | undefined, theme: CometChatTheme) => {\n let tempDateSeparatorStyle: DateStyle | undefined = dateSeparatorStyle;\n let defaultDateStyle = new DateStyle({\n textFont: fontHelper(theme.typography.caption2),\n textColor: theme.palette.getAccent600(),\n background: theme.palette.getAccent100(),\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"8px\",\n })\n\n tempDateSeparatorStyle = { ...defaultDateStyle, ...tempDateSeparatorStyle };\n\n tempDateSeparatorStyle.background = tempDateSeparatorStyle.background || theme.palette.getAccent600()\n\n return tempDateSeparatorStyle;\n}\n\nexport const defaultDateSeparatorStyle = {\n background: \"transparent\",\n height: \"\",\n width: \"\",\n border: \"none\",\n borderRadius: \"none\",\n}\n\nexport const dateInfoStyle = {\n marginLeft: \"auto\"\n}\nexport const receiptWrapperStyle = {\n display: \"flex\"\n}\nexport const receiptSubtitleWrapperStyle = {\n width: \"100%\"\n}\nexport const messageInfoStyle = (theme: CometChatTheme) => {\n return {\n width: \"360px\", height: \"620px\", margin: \"0 auto\", background: theme.palette.getBackground(), borderRadius: \"12px\"\n }\n}\n\nexport const messageInfoHeaderStyle = (theme: CometChatTheme): WrapperStyle => {\n return {\n textAlign: \"center\",\n position: \"relative\",\n font: fontHelper(theme.typography.title1),\n color: theme.palette.getAccent(),\n padding: \"19px 0px\"\n\n }\n}\nexport const getMessageInfoStyle = (theme: CometChatTheme, messageInfo?: MessageInformationStyle): CSSProperties => {\n let defaultStyle = {\n width: \"360px\",\n height: \"620px\",\n margin: \"0 auto\",\n background: theme.palette.getBackground(),\n borderRadius: \"12px\",\n overflow: \"hidden\",\n boxSizing: \"border-box\" as any\n }\n return { ...defaultStyle, ...messageInfo }\n}\n\nexport const getReceiptTextStyle = (theme: CometChatTheme): CSSProperties => {\n return {\n marginTop: \"8px\",\n marginBottom: \"8px\",\n marginLeft: \"10px\",\n fontSize: fontHelper(theme.typography.subtitle2),\n fontWeight: \"500\",\n color: theme.palette.getAccent600(),\n display: \"flex\"\n\n }\n}\n\n\nexport const getMessageTextStyle = (theme: CometChatTheme): CSSProperties => {\n return {\n marginBottom: \"8px\",\n marginLeft: \"10px\",\n fontSize: fontHelper(theme.typography.subtitle2),\n fontWeight: \"500\",\n color: theme.palette.getAccent600(),\n display: \"flex\"\n }\n}\n\n\nexport const getParentBubbleStyle = (alignBubble?: boolean): CSSProperties => {\n return {\n height: \"fit-content\",\n maxHeight: \"182px\",\n overflow: \"hidden auto\",\n boxSizing: \"border-box\",\n padding: \"2px 8px\",\n justifyContent: \"flex-end\",\n display: alignBubble ? \"flex\" : \"inherit\",\n paddingRight: alignBubble ? \"16px\" : \"8px\"\n }\n}\n\nexport function getBackdropStyle(backdropStyleObject : BaseStyle) : BackdropStyle {\n return {\n background: 'rgba(0, 0, 0, 0.5)',\n position: 'absolute',\n width: backdropStyleObject?.width,\n height: backdropStyleObject?.height,\n ...backdropStyleObject,\n };\n}","import {\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIKitConstants,\n MessageBubbleAlignment\n} from \"@cometchat/uikit-resources\";\nimport { CometChatMessageBubble } from \"../Views/CometChatMessageBubble\";\n\nexport class MessageUtils {\n messageBubbleStyle(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageBubbleAlignment,\n currentUser: any\n ) {\n if (message.getDeletedAt()) {\n return {\n background: \"transparent\",\n border: `1px dashed ${theme.palette.getAccent400()}`,\n borderRadius: \"12px\",\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n (!message.getSender() ||\n currentUser?.getUid() === message.getSender().getUid())\n ) {\n return {\n background:\n alignment === MessageBubbleAlignment.left\n ? theme.palette.getAccent100()\n : theme.palette.getPrimary(),\n borderRadius: \"12px\",\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return {\n borderRadius: \"\",\n background: theme.palette.getAccent100(),\n };\n } else if (\n message.getType() === CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n return {\n background: \"transparent\",\n borderRadius: \"12px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n };\n } else {\n if (\n message.getSender() &&\n message.getSender().getUid() !== currentUser?.getUid()\n ) {\n return {\n background: theme.palette.getAccent100(),\n borderRadius: \"12px\",\n };\n } else {\n return {\n background: theme.palette.getAccent100(),\n borderRadius: \"12px\",\n };\n }\n }\n }\n\n getContentView(\n message: CometChat.BaseMessage,\n template: CometChatMessageTemplate\n ) {\n let view;\n const messageTypesMap: { [key: string]: CometChatMessageTemplate } = {};\n messageTypesMap[`${template.category}_${template.type}`] = template;\n\n if (\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`] &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n ?.contentView\n ) {\n view = messageTypesMap[\n `${message?.getCategory()}_${message?.getType()}`\n ]?.contentView(message, MessageBubbleAlignment.right);\n // default would be html string using lit components\n if (typeof view === \"string\") {\n return {\n html: view,\n };\n }\n return view;\n } else {\n return null;\n }\n }\n\n getBubbleWrapper(\n message: CometChat.BaseMessage,\n template: CometChatMessageTemplate\n ) {\n let view;\n const messageTypesMap: { [key: string]: CometChatMessageTemplate } = {};\n messageTypesMap[`${template.category}_${template.type}`] = template;\n\n if (\n messageTypesMap &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`] &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n .bubbleView\n ) {\n view =\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n .bubbleView(message);\n return view;\n } else {\n view = null;\n return view;\n }\n }\n\n getMessageBubble(\n baseMessage: CometChat.BaseMessage,\n template: CometChatMessageTemplate,\n messageBubbleStyle: any,\n alignment: MessageBubbleAlignment\n ) {\n return this.getBubbleWrapper(baseMessage, template)\n ? this.getBubbleWrapper(baseMessage, template)\n : \n }\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20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3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","import { AvatarStyle, BackdropStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIKitConstants,\n DatePatterns,\n MessageBubbleAlignment,\n Receipts,\n States,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitLoginListener, MessageInformationStyle } from \"@cometchat/uikit-shared\";\nimport { MessageDateStyle, closeBtnStyle, dateInfoStyle, defaultDateSeparatorStyle, dividerStyle, getBackdropStyle, getMessageInfoStyle, getMessageTextStyle, getParentBubbleStyle, getReceiptTextStyle, messageInfoHeaderStyle, messageInfoStyle, receiptStyle, receiptSubtitleWrapperStyle, receiptWrapperStyle } from \"./style\"\nimport { useCallback, useContext, useEffect, useRef, useState } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\"\nimport { CometChatUIKit } from \"../Shared/CometChatUIKit/CometChatUIKit\";\nimport DeliveredIcon from \"./assets/message-delivered.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\nimport ReadIcon from \"./assets/message-read.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport WarningIcon from \"./assets/warning-small.svg\";\n\ninterface MessageInformationProps {\n title?: string;\n message: CometChat.BaseMessage;\n template?: CometChatMessageTemplate;\n closeIconURL?: string;\n bubbleView?: (messageObject: CometChat.BaseMessage) => void | JSX.Element;\n listItemView?: (\n messageObject: CometChat.BaseMessage,\n messageReceipt?: CometChat.MessageReceipt\n ) => JSX.Element;\n subtitleView?: (\n messageObject: CometChat.BaseMessage,\n messageReceipt?: CometChat.MessageReceipt\n ) => void | JSX.Element;\n receiptDatePattern?: (timestamp: number) => string;\n onClose?: () => void;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n messageInformationStyle?: MessageInformationStyle;\n readIcon?: string;\n deliveredIcon?: string;\n listItemStyle?: ListItemStyle;\n emptyStateText?: any;\n emptyStateView?: any;\n loadingIconURL?: string;\n loadingStateView?: any;\n errorStateText?: any;\n errorStateView?: any;\n backdropStyle?:BackdropStyle;\n}\n\nconst CometChatMessageInformation = (props: MessageInformationProps) => {\n const { theme } = useContext(CometChatThemeContext);\n\n const {\n title = localize(\"MESSAGE_INFORMATION\"),\n closeIconURL,\n onClose,\n message,\n bubbleView,\n subtitleView = null,\n listItemView = null,\n messageInformationStyle,\n listItemStyle,\n receiptDatePattern,\n template,\n loadingIconURL = SpinnerIcon,\n backdropStyle = new BackdropStyle({})\n } = props;\n\n const [userObj, setUserObj] = useState();\n const [templateRef, setTemplateRef] = useState(template!);\n const [messageReceipts, setMessageReceipts] = useState<\n CometChat.MessageReceipt[]\n >([]);\n const loggedInUser = useRef(null);\n\n const getListItemStyle = () => {\n let defaultStyle: ListItemStyle = new ListItemStyle({\n height: \"70px\",\n width: \"100%\",\n background: \"inherit\",\n borderRadius: \"0\",\n titleFont: fontHelper(theme.typography.title2),\n titleColor: theme.palette.getAccent(),\n border: \"none\",\n separatorColor: theme.palette.getAccent200(),\n hoverBackground: theme.palette.getAccent50(),\n });\n return { ...defaultStyle, ...listItemStyle };\n };\n\n async function getMessageReceipt(message?: CometChat.BaseMessage) {\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n let messageReceiptVal: CometChat.MessageReceipt | any =\n await CometChat.getMessageReceipts(message?.getId());\n let receiptList = messageReceiptVal.filter((receipt: CometChat.MessageReceipt) =>\n receipt.getSender().getUid() !== loggedInUser.current?.getUid()) as CometChat.MessageReceipt[]\n setMessageReceipts(receiptList);\n return messageReceiptVal;\n }\n }\n\n useEffect(()=>{\n if(!template){\n const getTemplateRef = CometChatUIKit.getDataSource()?.getMessageTemplate(props.message?.getType(), props.message?.getCategory(), theme);\n if (getTemplateRef)\n setTemplateRef(getTemplateRef);\n }\n },[props.message, template, theme])\n\n useEffect(() => {\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n setUserObj(message.getReceiver() as CometChat.User);\n }\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n getMessageReceipt(message);\n }\n }, [message]);\n\n function getCloseBtnView() {\n return (\n \n );\n }\n\n const getBubbleView = useCallback(() => {\n if (CometChatUIKitLoginListener.getLoggedInUser()) {\n loggedInUser.current = CometChatUIKitLoginListener.getLoggedInUser();\n }\n if (message) {\n if (bubbleView) return bubbleView(message);\n else {\n\n if (!templateRef) {\n return <>\n }\n\n const style = new MessageUtils().messageBubbleStyle(\n message,\n theme,\n MessageBubbleAlignment.right,\n loggedInUser.current\n );\n const view = new MessageUtils().getMessageBubble(\n message,\n templateRef,\n style,\n MessageBubbleAlignment.right\n );\n return view;\n }\n }\n return null;\n }, [message, bubbleView, templateRef, theme]);\n\n function getListItemSubtitleView(\n deliveredAt: number,\n readAt?: number | undefined\n ): JSX.Element {\n if (subtitleView !== null && typeof(subtitleView) === \"function\" ) {\n return <>{subtitleView(message)};\n }\n\n return (\n
    \n
    \n {getSubtitleReadReceiptView(deliveredAt, readAt)}\n
    \n
    \n );\n }\n\n /**\n * Creates subtitle receipt view\n */\n function getSubtitleReadReceiptView(\n deliveredAt: number,\n readAt?: number\n ): JSX.Element | null {\n return (\n
    \n \n
    \n \n
    \n \n {deliveredAt !== undefined && localize(\"DELIVERED\")}\n
    \n
    \n \n
    \n \n {readAt && \n
    \n \n
    \n \n {readAt !== undefined && localize(\"READ\")}\n \n {readAt !== undefined && (\n
    \n \n
    \n )}\n {readAt === undefined && (\n
    \n ...\n
    \n )}\n \n }\n \n );\n }\n\n const subtitleStyle = {\n font: fontHelper(theme.typography.subtitle2),\n color: theme.palette.getAccent600(),\n };\n\n const defaultAvatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"43px\",\n height: \"43px\",\n });\n\n function getListitemReceipt(\n messageReceipt: CometChat.MessageReceipt\n ): JSX.Element {\n return (\n <>\n {listItemView\n ? listItemView(message, messageReceipt)\n : getDefaultListItemView(messageReceipt)}\n \n );\n }\n\n /**\n * Creates default list item view\n */\n function getDefaultListItemView(messageReceipt: CometChat.MessageReceipt) {\n return (\n \n );\n }\n\n return (\n \n \n \n \n
    {title}
    \n {getCloseBtnView()}\n \n \n \n {localize(\"MESSAGE\")}\n \n \n
    {getBubbleView()}
    \n \n \n {localize(\"RECEIPT_INFORMATION\")}\n \n \n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n message.getDeliveredAt() !== undefined && (\n
    \n \n
    \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n message.getDeliveredAt() === undefined && (\n \n {\" \"}\n {localize(\"NO_RECIPIENT\")}{\" \"}\n \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n messageReceipts.length > 0 && (\n
    \n \n
    \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n messageReceipts.length <= 0 && (\n \n {\" \"}\n {localize(\"NO_RECIPIENTS\")}{\" \"}\n \n )}\n \n \n \n \n );\n};\n\nexport { CometChatMessageInformation };","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\n/**\nThe MessageListManager is responsible for controlling chat operations like fetching messages and managing listener lifecycles. It attaches listeners for group and call activities for a particular user or group, which are activated when the chat is open and deactivated when it's closed or when switching to a new chat.\nIn addition, it supports real-time connection monitoring by attaching an SDK websocket listener to the chat session.\n*/\nexport class MessageListManager {\n messagesRequest: CometChat.MessagesRequest | null = null;\n static groupListenerId: string = \"group_\" + new Date().getTime();\n static callListenerId: string = \"call_\" + new Date().getTime();\n static connectionListenerId: string = \"MessageList_connection_\" + String(Date.now());\n\n /**\n * Creates an instance of MessageListManager which constructs a request builder for fetching messages from a particular user/group in the chat.\n * @param {CometChat.MessagesRequestBuilder} [messagesRequestBuilder]\n * @param {CometChat.User} [user]\n * @param {CometChat.Group} [group]\n * @param {number} [messageId]\n * @param {number} [parentMessageId]\n * @memberof MessageListManager\n */\n constructor(messagesRequestBuilder?: CometChat.MessagesRequestBuilder, user?: CometChat.User, group?: CometChat.Group, messageId?: number, parentMessageId?: number) {\n if (messagesRequestBuilder) {\n let requestBuilder!: CometChat.MessagesRequestBuilder;\n if (user) {\n messagesRequestBuilder.guid = undefined;\n requestBuilder = messagesRequestBuilder.setUID(user.getUid())\n\n } else if (group) {\n messagesRequestBuilder.uid = undefined;\n requestBuilder = messagesRequestBuilder.setGUID(group!.getGuid())\n }\n if (messageId) {\n requestBuilder!.setMessageId(messageId);\n }\n this.messagesRequest = requestBuilder.build()!;\n } else {\n const builder: CometChat.MessagesRequestBuilder = new CometChat.MessagesRequestBuilder()\n .setTypes(ChatConfigurator.dataSource.getAllMessageTypes())\n .setCategories(ChatConfigurator.dataSource.getAllMessageCategories())\n .hideReplies(true)\n .setLimit(30)\n\n if (messageId) {\n builder.setMessageId(messageId)\n }\n if (parentMessageId) {\n builder.setParentMessageId(parentMessageId)\n }\n if (user) {\n builder.setUID(user.getUid())\n builder.guid = undefined;\n } else if (group) {\n builder.setGUID(group.getGuid())\n builder.uid = undefined;\n }\n this.messagesRequest = builder.build();\n }\n }\n\n /**\n * Function to invoke the fetchNext method of the messagesRequestBuilder to retrieve the subsequent messages following the latest fetched message.\n *\n * @returns {Promise}\n */\n fetchNextMessages: () => Promise | undefined = () => {\n return this.messagesRequest?.fetchNext();\n };\n /**\n * Function to invoke the fetchPrevious method of the messagesRequestBuilder to retrieve the subsequent messages following the last fetched message.\n *\n * @returns {Promise}\n */\n fetchPreviousMessages: () => Promise | undefined = () => {\n return this.messagesRequest?.fetchPrevious();\n }\n\n /**\n * Function to attach the group and call listeners for a particular user/group. This listener is attached when the chat is opened and is removed once the chat is closed or when switching to a new chat, where it creates a new listener for the particular chat.\n *\n * @param {Function} callback\n */\n static attachListeners: (callback: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void) => void = (callback: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void) => {\n\n /** Add Group Listener to listen to group action messages */\n CometChat.addGroupListener(\n this.groupListenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (message: CometChat.BaseMessage, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, changedGroup);\n },\n onGroupMemberKicked: (message: CometChat.BaseMessage, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, kickedFrom);\n },\n onGroupMemberBanned: (message: CometChat.BaseMessage, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, bannedFrom);\n },\n onGroupMemberUnbanned: (message: CometChat.BaseMessage, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, unbannedFrom);\n },\n onMemberAddedToGroup: (message: CometChat.BaseMessage, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, userAddedIn);\n },\n onGroupMemberLeft: (message: CometChat.BaseMessage, leavingUser: CometChat.GroupMember, group: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, group);\n },\n onGroupMemberJoined: (message: CometChat.BaseMessage, joinedUser: CometChat.GroupMember, joinedGroup: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, joinedGroup);\n },\n })\n );\n /** Add Calls Listener to listen to call activities if Calling is enabled. */\n if (ChatConfigurator.names.includes(\"calling\")) {\n CometChat.addCallListener(\n this.callListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onIncomingCallCancelled: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onOutgoingCallRejected: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onOutgoingCallAccepted: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onCallEndedMessageReceived: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n })\n );\n }\n };\n /**\n * Function to remove the attached listeners for a particular user/group.\n * */\n static removeListeners(): void {\n CometChat.removeGroupListener(this.groupListenerId);\n CometChat.removeConnectionListener(this.connectionListenerId)\n if (ChatConfigurator.names.includes(\"calling\")) {\n CometChat.removeCallListener(this.callListenerId);\n }\n }\n /**\n* Attaches an SDK websocket listener to monitor when the connection disconnects or reconnects.\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnectionListener(callback: () => void): void {\n const listenerId = \"MessageList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: (): void => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: (): void => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n }\n}\n","import \"@cometchat/uikit-elements\";\n\nimport {\n AvatarStyle,\n BackdropStyle,\n DateStyle,\n EmojiKeyboardStyle,\n} from \"@cometchat/uikit-elements\";\nimport { BaseMessage, CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CSSProperties,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatCallEvents,\n CometChatGroupEvents,\n CometChatMessageEvents,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n CustomInteractiveMessage,\n DatePatterns,\n FormMessage,\n IDialog,\n IGroupLeft,\n IGroupMemberAdded,\n IGroupMemberKickedBanned,\n IGroupMemberScopeChanged,\n IMessages,\n IPanel,\n IShowOngoingCall,\n MessageBubbleAlignment,\n MessageListAlignment,\n MessageStatus,\n PanelAlignment,\n SchedulerMessage,\n States,\n TimestampAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { CometChatAvatarView, CometChatButtonView, CometChatDateView, CometChatEmojiKeyboardView, CometChatIconButtonView, CometChatLabelView, CometChatLoaderView, CometChatReactionsView, CometChatReceiptView } from \"../Shared/Views/LitElementsWrapper/LitElementsWrapper\";\nimport {\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitUtility,\n InteractiveMessageUtils,\n MessageInformationConfiguration,\n MessageListStyle,\n MessageReceiptUtils,\n ReactionInfoConfiguration,\n ReactionListConfiguration,\n ReactionsConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n bubbleFooterViewWrapperStyle,\n bubbleHeaderTitleStyle,\n bubbleStyle,\n dateSeperatorStyle,\n dateSeperatorWrapperStyle,\n defaultAvatarStyle,\n defaultMessageListBubbleStyle,\n defaultMessageListStyle,\n errorViewStyle,\n footerStyle,\n getListStyle,\n getReactionInfoStyle,\n getReactionListAvatarStyle,\n getReactionListItemStyle,\n getReactionListStyle,\n getReactionViewStyle,\n getReactionsStyle,\n getStatusInfoStyle,\n getStatusInfoViewStyle,\n headerStyle,\n listWrapperStyle,\n loadingViewStyle,\n messageAvatarStyle,\n messageBubbleHeaderDateStyle,\n messageBubbleStyle,\n messageReceiptStyle,\n messageThreadViewStyle,\n newMessageIndicatorStyle,\n newMessageTextStyleStyle,\n wrapperStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n} from \"../CometChatCustomHooks\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatMessageBubble } from \"../Shared/Views/CometChatMessageBubble\";\nimport { CometChatMessageInformation } from \"../CometChatMessageInformation\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport DeliveredIcon from \"./assets/message-delivered.svg\";\nimport { Hooks } from \"./useCometChatMessageList\";\nimport LoadingIcon from \"./assets/Spinner.svg\";\nimport { MessageListManager } from \"./controller\";\nimport ReadIcon from \"./assets/message-read.svg\";\nimport SentIcon from \"./assets/message-sent.svg\";\nimport { Subscription } from \"rxjs\";\nimport ThreadIndicatorIcon from \"./assets/threadIndicatorIcon.svg\";\nimport WaitIcon from \"./assets/wait.svg\";\nimport WarningIcon from \"./assets/warning-small.svg\";\n\ninterface IMessageListProps {\n parentMessageId?: number;\n user?: CometChat.User;\n group?: CometChat.Group;\n emptyStateText?: string;\n errorStateText?: string;\n emptyStateView?: any;\n errorStateView?: any;\n loadingStateView?: any;\n disableReceipt?: boolean;\n disableSoundForMessages?: boolean;\n customSoundForMessages?: string;\n readIcon?: string;\n deliveredIcon?: string;\n sentIcon?: string;\n waitIcon?: string;\n errorIcon?: string;\n loadingIconURL?: string;\n alignment?: MessageListAlignment;\n showAvatar?: boolean;\n datePattern?: DatePatterns;\n timestampAlignment?: TimestampAlignment;\n DateSeparatorPattern?: DatePatterns;\n hideDateSeparator?: boolean;\n templates?: CometChatMessageTemplate[];\n messagesRequestBuilder?: CometChat.MessagesRequestBuilder;\n newMessageIndicatorText?: string;\n scrollToBottomOnNewMessages?: boolean;\n thresholdValue?: number;\n onThreadRepliesClick?: Function;\n headerView?: any;\n footerView?: any;\n avatarStyle?: AvatarStyle;\n dateSeparatorStyle?: DateStyle;\n messageListStyle?: MessageListStyle;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n hideError?: boolean;\n messageInformationConfiguration?: MessageInformationConfiguration;\n reactionsConfiguration?: ReactionsConfiguration;\n disableReactions?: boolean;\n emojiKeyboardStyle?: EmojiKeyboardStyle;\n threadIndicatorIcon?: string;\n disableMentions?: boolean;\n textFormatters?: CometChatTextFormatter[];\n backdropStyle?: BackdropStyle\n}\nconst defaultProps: IMessageListProps = {\n parentMessageId: 0,\n user: undefined,\n group: undefined,\n emptyStateText: localize(\"NO_MESSAGES_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n emptyStateView: null,\n errorStateView: null,\n loadingStateView: null,\n disableReceipt: false,\n disableSoundForMessages: false,\n customSoundForMessages: \"\",\n readIcon: ReadIcon,\n deliveredIcon: DeliveredIcon,\n sentIcon: SentIcon,\n waitIcon: WaitIcon,\n errorIcon: WarningIcon,\n loadingIconURL: LoadingIcon,\n alignment: MessageListAlignment.standard,\n showAvatar: true,\n datePattern: DatePatterns.time,\n timestampAlignment: TimestampAlignment.bottom,\n DateSeparatorPattern: DatePatterns.DayDate,\n hideDateSeparator: false,\n templates: [],\n messagesRequestBuilder: undefined,\n newMessageIndicatorText: \"\",\n scrollToBottomOnNewMessages: false,\n thresholdValue: 1000,\n onThreadRepliesClick: () => { },\n headerView: null,\n footerView: null,\n avatarStyle: defaultAvatarStyle,\n dateSeparatorStyle: undefined,\n messageListStyle: defaultMessageListStyle,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n hideError: false,\n messageInformationConfiguration: new MessageInformationConfiguration({}),\n reactionsConfiguration: new ReactionsConfiguration({}),\n disableReactions: false,\n emojiKeyboardStyle: {} as EmojiKeyboardStyle,\n threadIndicatorIcon: ThreadIndicatorIcon,\n disableMentions: false,\n textFormatters: [],\n backdropStyle: new BackdropStyle({})\n};\nconst CometChatMessageList = (props: IMessageListProps) => {\n const {\n parentMessageId,\n user,\n group,\n emptyStateText,\n errorStateText,\n emptyStateView,\n errorStateView,\n loadingStateView,\n disableReceipt,\n disableSoundForMessages,\n customSoundForMessages,\n readIcon,\n deliveredIcon,\n sentIcon,\n waitIcon,\n errorIcon,\n loadingIconURL,\n alignment,\n showAvatar,\n datePattern,\n timestampAlignment,\n DateSeparatorPattern,\n hideDateSeparator,\n templates,\n messagesRequestBuilder,\n newMessageIndicatorText,\n scrollToBottomOnNewMessages,\n thresholdValue,\n onThreadRepliesClick,\n headerView,\n footerView,\n avatarStyle,\n dateSeparatorStyle,\n messageListStyle,\n onError,\n hideError,\n messageInformationConfiguration,\n reactionsConfiguration,\n disableReactions,\n emojiKeyboardStyle,\n threadIndicatorIcon,\n disableMentions,\n textFormatters,\n backdropStyle\n } = props;\n /**\n * All the useState hooks are declaired here. These trigger a rerender when updated.\n */\n const [messageList, setMessageList] = useState([]);\n const [scrollListToBottom, setScrollListToBottom] = useState(true);\n const [messageListState, setMessageListState] = useState(\n States.loading\n );\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const [showMessageInfoPopup, setShowMessageInfoPopup] = useState(false);\n const [activeMessageInfo, setActiveMessageInfo] =\n useState(null); // should be state.\n const [showConfirmDialog, setShowConfirmDialog] = useState(false);\n const [ongoingCallView, setOngoingCallView] = useState(null);\n const [showNewMessagesBanner, setShowNewMessagesBanner] = useState(false);\n const [showFooterPanelView, setShowFooterPanelView] = useState(false);\n const [showHeaderPanelView, setShowHeaderPanelView] = useState(false);\n\n\n /**\n * All the useRef hooks are declaired here. These do not trigger a rerender. They are used to get the updated values wherever required in the code.\n */\n const newMessagesBtnRef = useRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const loggedInUserRef = useRef(null);\n const isFirstReloadRef = useRef(false);\n const elementRefs = useRef({});\n const messageListManagerRef = useRef(null);\n const messageIdRef = useRef({ prevMessageId: 0, nextMessageId: 0 });\n const totalMessagesCountRef = useRef(0);\n const UnreadMessagesRef = useRef([]);\n const newMessageTextRef = useRef(\"\");\n const imageModerationDialogRef = useRef(null);\n const userRef = useRefSync(user);\n const groupRef = useRefSync(group);\n const parentMessageIdRef = useRefSync(parentMessageId);\n const smartReplyViewRef = useRef(null);\n const headerViewRef = useRef(null);\n\n const isConnectionReestablishedRef = useRef(false);\n const isOnBottomRef = useRef(false);\n\n\n /**\n * All the Private variables are declaired here for internal use.\n */\n const { theme } = useContext<{ theme: CometChatTheme }>(CometChatThemeContext);\n const onErrorCallback = useCometChatErrorHandler(onError);\n let keepRecentMessages: boolean = true,\n timestampEnum: any = TimestampAlignment,\n isFetchingPreviousMessages = false,\n threadedAlignment: MessageBubbleAlignment = MessageBubbleAlignment.left;\n const getLoaderHtml: JSX.Element = useMemo(() => {\n if (loadingStateView) {\n return (\n
    \n \n {loadingStateView}\n \n
    \n );\n } else {\n return (\n
    \n \n
    \n );\n }\n }, [loadingStateView, loadingIconURL, messageListStyle, theme]);\n\n const getErrorHtml: JSX.Element = useMemo(() => {\n if (errorStateView) {\n return (\n
    \n \n {errorStateView}\n \n
    \n );\n } else {\n return (\n
    \n \n
    \n );\n }\n }, [errorStateView, errorStateText, messageListStyle, theme]);\n\n const getEmptyHtml: JSX.Element | undefined = useMemo(() => {\n if (emptyStateView) {\n return (\n
    \n \n {emptyStateView}\n \n
    \n );\n } else {\n return undefined;\n }\n }, [emptyStateView, emptyStateText, messageListStyle, theme]);\n const messagesTemplate = useMemo(() => {\n return templates && templates.length > 0\n ? templates\n : ChatConfigurator.getDataSource().getAllMessageTemplates(theme, {\n disableMentions: disableMentions,\n textFormatters: textFormatters,\n });\n }, [templates, theme]);\n const messagesTypesMap = useMemo(() => {\n let messagesTypesArray: { [key: string]: CometChatMessageTemplate } = {};\n messagesTemplate.forEach((el: CometChatMessageTemplate) => {\n messagesTypesArray[el.category + \"_\" + el.type] = el;\n });\n return messagesTypesArray;\n }, [messagesTemplate]);\n\n /*\n * isPartOfCurrentChatForUIEvent: To check if the message belongs for this list and is not part of thread even for current list\n it only runs for UI event because it assumes logged in user is always sender\n * @param: message: CometChat.BaseMessage\n*/\n const isPartOfCurrentChatForUIEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n if (parentMessageIdRef.current) {\n if (message.getParentMessageId() === parentMessageIdRef.current) {\n return true;\n }\n } else {\n if (message.getParentMessageId()) {\n return false\n }\n\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && receiverId === userRef.current.getUid()) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && receiverId === groupRef.current.getGuid()) {\n return true\n }\n }\n\n return false\n\n }\n },\n []\n );\n\n /**\n * Function to validate if a transient message belongs to the current message list.\n * It checks if the message is not part of a thread even for the current list.\n * It only runs for SDK event because it needs senderId to check if the message is sent by the same user.\n * @param {CometChat.TransientMessage} message - The transient message to be validated\n * @returns {boolean | undefined} - Returns true if the message belongs to the current list, false otherwise\n */\n const validateTransientMessage: (message: CometChat.TransientMessage) => boolean | undefined = useCallback(\n (message: CometChat.TransientMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n const senderId = message?.getSender()?.getUid();\n if (parentMessageIdRef.current) {\n return false;\n } else {\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current.getGuid())) {\n return true\n }\n }\n return false\n\n }\n }, []\n )\n\n /*\n * isPartOfCurrentChatForSDKEvent: To check if the message belongs for this list and is not part of thread even for current list\n it only runs for SDK event because it needs senderId to check if the message is sent by the same user\n * @param: message: CometChat.BaseMessage\n */\n const isPartOfCurrentChatForSDKEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n const senderId = message?.getSender()?.getUid();\n if (parentMessageIdRef.current) {\n if (message.getParentMessageId() === parentMessageIdRef.current) {\n return true;\n }\n } else {\n if (message.getParentMessageId()) {\n return false\n }\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current.getGuid())) {\n return true\n }\n }\n\n return false\n\n }\n }, []\n )\n\n /*\n * isThreadOfCurrentChatForUIEvent: To check if the message belongs thread of this list,\n it only runs for UI event because it assumes logged in user is always sender\n * @param: message: CometChat.BaseMessage\n */\n const isThreadOfCurrentChatForUIEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!message.getParentMessageId()) {\n return false\n }\n\n const receiverId = message?.getReceiverId();\n\n if (userRef.current) {\n if (receiverId === userRef.current.getUid()) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverId === groupRef.current.getGuid()) {\n return true\n }\n }\n\n return false\n }, []\n );\n\n\n /*\n * isThreadOfCurrentChatForSDKEvent: To check if the message belongs thread of this list,\n it only runs for SDK event because it needs senderId to check if the message is sent by the same user\n * @param: message: CometChat.BaseMessage\n */\n const isThreadOfCurrentChatForSDKEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!message.getParentMessageId()) {\n return false;\n }\n\n const receiverId = message?.getReceiverId();\n const senderId = message?.getSender()?.getUid();\n\n if (userRef.current) {\n if (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid()) {\n return true;\n }\n } else if (groupRef.current) {\n if (receiverId === groupRef.current.getGuid()) {\n return true;\n }\n }\n\n return false;\n },\n []\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is not found, the function will return 'undefined'.\n *\n * @param {number} id The ID of the message to be retrieved.\n * @returns {CometChat.BaseMessage | undefined} Returns the message object if found, otherwise 'undefined'.\n */\n const getMessageById: (id: number) => CometChat.BaseMessage | undefined = useCallback(\n (id: number) => {\n try {\n const messageObject = messageList.find(\n (m: CometChat.BaseMessage) =>\n m?.getId()?.toString() === id?.toString()\n );\n return messageObject;\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [messageList, onErrorCallback]\n );\n\n /**\n * Opens the thread view for a given message.\n * @param {CometChat.BaseMessage} message - The message object for which the thread view should be opened.\n * @returns {void}\n */\n const openThreadView: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n isOnBottomRef.current = false;\n setScrollListToBottom(false);\n if (onThreadRepliesClick) {\n onThreadRepliesClick(message, getThreadedMessageBubble);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onThreadRepliesClick, onErrorCallback, isOnBottomRef]\n );\n\n /**\n * Function to monitor the scrollbar position and update the 'isOnBottom' property.\n * This helps in showing the unread messages count in the message list if a new message is received while the scrollbar is not at the bottom.\n * @param {boolean | undefined} isOnBottom - Indicates whether the scrollbar has reached the bottom or not.\n * @returns {void}\n */\n const updateIsOnBottom: (isOnBottom?: boolean | undefined) => void = useCallback(\n (hasScrolled?: boolean) => {\n if (hasScrolled !== undefined) {\n isOnBottomRef.current = hasScrolled;\n }\n },\n [isOnBottomRef]\n );\n\n /**\n* Function to convert the user ID (UID) to the actual name of the mentioned user. This prevents the user's UID from being exposed when the message text is copied.\n* @param {CometChat.TextMessage} message - The message object, which contains the text with user mentions represented as UIDs.\n* @returns {string} The message text, with mention replaced by the actual name of the user.\n*/\n const getMentionsTextWithoutStyle: (message: CometChat.TextMessage) => string = (message: CometChat.TextMessage) => {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp = message.getText();\n let match = regex.exec(messageText);\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] === mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n messageTextTmp = messageTextTmp.replace(match[0], \"@\" + user.getName());\n }\n match = regex.exec(messageText);\n }\n return messageTextTmp;\n };\n\n /**\n * Function to find the message in the list and replace it by matching the muid. This works when we send the message in the ui before the success of the api for optmistic ui and then replace the message with actual message object by matching muid because message id is not generated before the api success.\n * @param {CometChat.BaseMessage} message - The message object, which needs to be replaced in the list.\n * @returns {void}\n */\n const updateMessageByMuid: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m.getMuid() === message.getMuid()) {\n return message;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n\n /**\n * Function to find a message in the list and replace it by matching the message ID. This function is useful when we need to edit, delete or update a message object and update it in the UI in real-time.\n * @param {CometChat.BaseMessage} message - The message object that needs to be replaced in the list.\n * @returns {void}\n */\n const updateMessageByMessageId: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setScrollListToBottom(false);\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === message?.getId()) {\n return message;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to handle when a message is edited\n * @param {CometChat.BaseMessage} editedMessage - The message that was edited.\n * @returns {void}\n */\n const replaceUpdatedMessage: (message: CometChat.BaseMessage) => void = useCallback(\n (editedMessage: CometChat.BaseMessage) => {\n try {\n if (isPartOfCurrentChatForSDKEvent(editedMessage)) {\n updateMessageByMessageId(editedMessage);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [updateMessageByMessageId, onErrorCallback, isPartOfCurrentChatForSDKEvent]\n );\n\n /**\n * Function to find a message in the list and replace it, matching either the message ID or MUID based on the boolean flag. The corresponding function for updating the message is then called.\n * @param {CometChat.BaseMessage} message - The message object to be replaced in the list.\n * @param {boolean} replaceByMuid - Optional flag to determine whether replacement should use MUID. If not provided, defaults to `false`.\n * @returns {void}\n */\n const updateMessage: (message: CometChat.BaseMessage, replaceByMuid?: boolean) => void = useCallback(\n (message: CometChat.BaseMessage, replaceByMuid: boolean = false) => {\n try {\n if (replaceByMuid) {\n setScrollListToBottom(true);\n updateMessageByMuid(message);\n } else {\n setScrollListToBottom(false);\n updateMessageByMessageId(message);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n updateMessageByMuid,\n updateMessageByMessageId,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to add a selected reaction to a specific message in the list.\n * @param {string} emoji - The reaction to add to the specified message.\n * @param {CometChat.BaseMessage} message - The message object to which the reaction will be added.\n * @returns {void}\n */\n const reactToMessages: (emoji: string, messageObject: CometChat.BaseMessage) => void = useCallback(\n (emoji: string, messageObject: CometChat.BaseMessage) => {\n const messageId = messageObject?.getId();\n const msgObject = getMessageById(messageId) as CometChat.BaseMessage;\n const reactions = msgObject?.getReactions() || [];\n const emojiObject = reactions?.find((reaction: any) => {\n return reaction?.reaction === emoji;\n });\n\n if (emojiObject && emojiObject?.getReactedByMe()) {\n const updatedReactions: CometChat.ReactionCount[] = [];\n reactions.forEach((reaction) => {\n if (reaction?.getReaction() === emoji) {\n if (reaction?.getCount() === 1) {\n return;\n } else {\n reaction.setCount(reaction?.getCount() - 1);\n reaction.setReactedByMe(false);\n updatedReactions.push(reaction);\n }\n } else {\n updatedReactions.push(reaction);\n }\n });\n const newMessageObj = CometChatUIKitUtility.clone(msgObject);\n newMessageObj.setReactions(updatedReactions);\n updateMessage(newMessageObj);\n CometChat.removeReaction(messageId, emoji)\n .then((message) => { })\n .catch((error) => {\n updateMessage(msgObject);\n console.log(error);\n });\n } else {\n const updatedReactions = [];\n const reactionAvailable = reactions.find((reaction) => {\n return reaction?.getReaction() === emoji;\n });\n\n reactions.forEach((reaction) => {\n if (reaction?.getReaction() === emoji) {\n reaction.setCount(reaction?.getCount() + 1);\n reaction.setReactedByMe(true);\n updatedReactions.push(reaction);\n } else {\n updatedReactions.push(reaction);\n }\n });\n if (!reactionAvailable) {\n const react: CometChat.ReactionCount = new CometChat.ReactionCount(emoji, 1, true);\n updatedReactions.push(react);\n }\n\n const newMessageObj = CometChatUIKitUtility.clone(msgObject);\n newMessageObj.setReactions(updatedReactions);\n updateMessage(newMessageObj);\n\n CometChat.addReaction(messageId, emoji)\n .then(() => { })\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n updateMessage(msgObject);\n });\n }\n }, [getMessageById, onErrorCallback, updateMessage]\n );\n\n /**\n * Default Callback functions for message options.\n */\n\n /**\n *Function fetches a specific message from the message list using its ID. If the message is found, the selected reaction is added beneath the message.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onReactMessage: (id: number) => void = useCallback(\n (id: number) => {\n let defaultStyle: CSSProperties = { zIndex: \"100\" }\n let configKeyboardStyle = emojiKeyboardStyle;\n let keyboardStyle = new EmojiKeyboardStyle({\n width: configKeyboardStyle?.width || \"320px\",\n height: configKeyboardStyle?.height || \"300px\",\n border: configKeyboardStyle?.border || \"1px solid #e0e0e0\",\n borderRadius: configKeyboardStyle?.borderRadius || \"8px\",\n activeIconTint: configKeyboardStyle?.activeIconTint,\n background: configKeyboardStyle?.background,\n iconTint: configKeyboardStyle?.iconTint,\n textColor: configKeyboardStyle?.textColor,\n textFont: configKeyboardStyle?.textFont,\n });\n const messageObject: CometChat.BaseMessage = getMessageById(\n id\n ) as CometChat.BaseMessage;\n return (closePopover: any) => {\n return {\n closePopover(args);\n reactToMessages(args?.detail?.id, messageObject);\n }}\n />\n\n }\n },\n [emojiKeyboardStyle, getMessageById, reactToMessages]\n );\n\n /**\n *Function to retrieve a specific message, identified by its ID, from the message list. If the message is found, the text content of that message will be copied to the clipboard.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onCopyMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.TextMessage = getMessageById(id) as CometChat.TextMessage;\n if (message) {\n let text = message.getText();\n if (\n !disableMentions &&\n message.getMentionedUsers() &&\n message.getMentionedUsers().length\n ) {\n text = getMentionsTextWithoutStyle(message);\n }\n navigator?.clipboard?.writeText(text);\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [getMessageById, onErrorCallback]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the CometChatMessageInformation component will be opened.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onOpenMessageInfo: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n isOnBottomRef.current = false;\n setScrollListToBottom(false);\n setActiveMessageInfo(message);\n setShowMessageInfoPopup(true);\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback, isOnBottomRef, getMessageById]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the CometChatThreadedMessages component will be opened.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onOpenThread: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let messageObject: CometChat.BaseMessage | undefined = getMessageById(id);\n if (messageObject) {\n openThreadView(messageObject);\n\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [openThreadView, onErrorCallback, getMessageById]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the chat will be opened for the particular user of that group to chat privately.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onMessagePrivately: (id: number) => void = useCallback(\n (id: number) => {\n try {\n const messageObject: CometChat.BaseMessage | undefined = getMessageById(id);\n if (messageObject) {\n const user: CometChat.User = messageObject.getSender();\n CometChatUIEvents.ccOpenChat.next({\n user: user,\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [getMessageById, onErrorCallback]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If found, the message would be deleted.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onDeleteMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n const messageId: any = message.getId();\n CometChat.deleteMessage(messageId).then(\n (deletedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(deletedMessage)\n CometChatMessageEvents.ccMessageDeleted.next(deletedMessage);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [replaceUpdatedMessage, onErrorCallback, getMessageById]\n );\n\n /**\n* Function to retrieve a specific message by its ID from the message list.\n* If found, the Edit preview will be opened to edit that particular message.\n* @param {number} id - The ID of the message to be retrieved.\n* @returns {void}\n*/\n const onEditMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n CometChatMessageEvents.ccMessageEdited.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback, getMessageById]\n );\n\n /**\n * Function to set a default callback for each message option if none exists. This is called when default CometChatMessageTemplates for supported messages are fetched.\n * @param {(CometChatActionsIcon | CometChatActionsView)[]} options - The array of message options.\n * @param {number} id - Optional parameter. The ID of the option to which the options belong.\n * @returns {(CometChatActionsIcon | CometChatActionsView)[]} - Returns the array of message options with assigned callback functions.\n */\n const setDefaultOptionsCallback: (options: (CometChatActionsIcon | CometChatActionsView)[], id?: number) => (CometChatActionsIcon | CometChatActionsView)[] = useCallback(\n (options: (CometChatActionsIcon | CometChatActionsView)[], id?: number) => {\n try {\n options.forEach(\n (element: CometChatActionsIcon | CometChatActionsView) => {\n switch (element.id) {\n case CometChatUIKitConstants.MessageOption.deleteMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onDeleteMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.editMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onEditMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.copyMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onCopyMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.replyInThread:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onOpenThread;\n }\n break;\n case CometChatUIKitConstants.MessageOption.messageInformation:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onOpenMessageInfo;\n }\n break;\n case CometChatUIKitConstants.MessageOption.sendMessagePrivately:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onMessagePrivately;\n }\n break;\n case CometChatUIKitConstants.MessageOption.reactToMessage:\n if (element instanceof CometChatActionsView && !element?.customView) {\n element.customView = onReactMessage(id!);\n }\n break;\n default:\n break;\n }\n }\n );\n return options;\n } catch (error: any) {\n onErrorCallback(error);\n return options;\n }\n },\n [\n onErrorCallback,\n onDeleteMessage,\n onEditMessage,\n onOpenThread,\n onCopyMessage,\n onOpenMessageInfo,\n onMessagePrivately,\n onReactMessage,\n ]\n );\n\n /**\n * Function to check if the reaction option should be added in the Message options by checking if the reactions feature is enabled or disabled\n * @param {Array} options - The array of message options.\n * @returns {Array} - Returns the array of message options with assigned callback functions.\n */\n const validateReactionOption: (options: Array) => Array = useCallback(\n (options: Array) => {\n if (!disableReactions) {\n return options;\n }\n\n return options.filter(\n (option: CometChatActionsIcon | CometChatActionsView) => {\n return (\n option.id !== CometChatUIKitConstants.MessageOption.reactToMessage\n );\n }\n );\n },\n [disableReactions]\n );\n\n /**\n * Function to get message options for each message based on the message type.\n * @param {CometChat.BaseMessage} msgObject - The message for which the options are to be retrieved.\n * @returns {Array} - Returns the array of appropriate message options.\n */\n const getMessageOptions: (msgObject: CometChat.BaseMessage) => (CometChatActionsIcon | CometChatActionsView)[] = useCallback(\n (\n msgObject: CometChat.BaseMessage\n ): (CometChatActionsIcon | CometChatActionsView)[] => {\n let options: (CometChatActionsIcon | CometChatActionsView)[] = [];\n if (!msgObject.getId()) {\n return options;\n }\n try {\n if (\n messagesTemplate &&\n messagesTemplate.length > 0 &&\n !msgObject.getDeletedAt() &&\n msgObject.getType() !==\n CometChatUIKitConstants.MessageTypes.groupMember &&\n msgObject?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.call\n ) {\n messagesTemplate.forEach((element: any) => {\n if (\n element.type === msgObject.getType() &&\n element.category === msgObject.getCategory()\n ) {\n options = setDefaultOptionsCallback(\n element?.options?.(loggedInUserRef.current, msgObject, theme, groupRef.current),\n msgObject?.getId()\n );\n }\n });\n }\n options = validateReactionOption(options);\n return options;\n } catch (error: any) {\n onErrorCallback(error);\n return options;\n }\n },\n [\n messagesTemplate,\n validateReactionOption,\n setDefaultOptionsCallback,\n theme,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to set the alignment of the message bubble based on message list alignment and the sender of the message. The MessageBubble then adjusts itself based on the passed alignment.\n * @param {CometChat.BaseMessage} message - Message for which the alignment is to be determined.\n * @returns {MessageBubbleAlignment} - Returns the alignment for the message.\n */\n const setBubbleAlignment: (message: CometChat.BaseMessage) => MessageBubbleAlignment = useCallback(\n (message: CometChat.BaseMessage) => {\n let bubbleAlignment = MessageBubbleAlignment.center;\n try {\n if (alignment === MessageListAlignment.left && message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember) {\n bubbleAlignment = MessageBubbleAlignment.left;\n } else {\n if (\n message?.getType() === CometChatUIKitConstants.MessageTypes.groupMember ||\n message?.getCategory() == CometChatUIKitConstants.MessageCategory.call\n ) {\n bubbleAlignment = MessageBubbleAlignment.center;\n } else if (\n !message.getSender() ||\n (message?.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n message?.getType() !== CometChatUIKitConstants.MessageTypes.groupMember)\n ) {\n bubbleAlignment = MessageBubbleAlignment.right;\n } else {\n bubbleAlignment = MessageBubbleAlignment.left;\n }\n }\n return bubbleAlignment;\n } catch (error: any) {\n onErrorCallback(error);\n return bubbleAlignment;\n }\n },\n [alignment, onErrorCallback]\n );\n\n /**\n * Function to return the content view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the content view is to be returned.\n * @returns {any} - Returns the content view or null.\n */\n const getContentView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.contentView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.contentView(\n item,\n _alignment\n );\n }\n return null;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback, setBubbleAlignment]\n );\n\n /**\n * Function to return the bottom view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the bottom view is to be returned.\n * @returns {any} - Returns the bottom view or null.\n */\n const getBottomView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.bottomView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.bottomView(\n item,\n _alignment\n );\n }\n return null;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback, setBubbleAlignment]\n );\n\n /**\n * Function to return the header view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the header view is to be returned.\n * @returns {any} - Returns the header view or null.\n */\n const getHeaderView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let view: any = null;\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.headerView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.headerView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to return the footer view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the footer view is to be returned.\n * @returns {any} - Returns the footer view or null.\n */\n const getFooterView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let view: any = null;\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.footerView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.footerView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to return the bubble wrapper for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the bubble wrapper is to be returned.\n * @returns {any} - Returns the bubble wrapper or null.\n */\n const getBubbleWrapper: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n let view: any = null;\n try {\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()].bubbleView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()].bubbleView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return view;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to mark a given message as read.\n * @param {CometChat.BaseMessage} message - The message to be marked as read.\n * @returns {void}\n */\n const markMessageRead: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n CometChat.markAsRead(message).then(\n () => {\n CometChatMessageEvents.ccMessageRead.next(message);\n },\n (error: unknown) => {\n onErrorCallback(error);\n }\n );\n }, [onErrorCallback])\n\n /**\n * Function to check and mark a message as read if `disableReceipt` is false and the message is not sent by the logged-in user.\n * @param {CometChat.BaseMessage} message - The message to be checked and marked as read.\n * @returns {void}\n */\n const checkAndMarkMessageAsRead: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!disableReceipt &&\n message.getSender().getUid() !== loggedInUserRef.current?.getUid()) {\n markMessageRead(message);\n }\n }, [disableReceipt, markMessageRead])\n\n /**\n * Function to clear the count of new messages. If the last unread message exists, it marks it as read.\n * @returns {void}\n */\n\n const clearNewMessagesCount: () => void = useCallback(() => {\n isOnBottomRef.current = true;\n if (newMessagesBtnRef.current) {\n newMessagesBtnRef.current?.click();\n }\n const lastMessage: CometChat.BaseMessage =\n UnreadMessagesRef.current[UnreadMessagesRef.current.length - 1];\n if (lastMessage) {\n checkAndMarkMessageAsRead(lastMessage);\n }\n UnreadMessagesRef.current = [];\n if (newMessageTextRef.current) {\n newMessageTextRef.current = \"\";\n }\n\n if (showNewMessagesBanner) {\n setShowNewMessagesBanner(false)\n }\n }, [checkAndMarkMessageAsRead, showNewMessagesBanner])\n\n\n /**\n * Function to reinitialize the Message Request Builder.\n * @returns {void}\n */\n const reinitializeMessagesRequestBuilder: () => void = useCallback(() => {\n try {\n if (keepRecentMessages) {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.slice(-30);\n return messages;\n });\n } else {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.slice(0, 30);\n return messages;\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback]);\n\n /**\n * Function to prepend messages to the beginning of the current message list.\n * @param {CometChat.BaseMessage[]} messages - The messages to be prepended.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const prependMessages: (messages: CometChat.BaseMessage[]) => Promise = useCallback(\n (messages: CometChat.BaseMessage[]) => {\n return new Promise((resolve, reject) => {\n if (isPartOfCurrentChatForSDKEvent(messages[0])) {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const updatedMessageList = [...messages, ...prevMessageList];\n return updatedMessageList;\n });\n totalMessagesCountRef.current = totalMessagesCountRef.current + messages.length;\n setMessageListState(States.loaded);\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = false;\n reinitializeMessagesRequestBuilder();\n }\n resolve(true);\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n }\n else {\n if (messageList.length == 0) {\n setMessageListState(States.loaded);\n }\n\n resolve(true);\n\n }\n });\n },\n [\n messageList,\n thresholdValue,\n reinitializeMessagesRequestBuilder,\n isPartOfCurrentChatForSDKEvent,\n onErrorCallback]\n );\n\n /**\n * Function to fetch previous messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const fetchPreviousMessages: () => Promise = useCallback(() => {\n return new Promise(async (resolve, reject) => {\n try {\n setMessageListState(States.loading);\n\n let unreadMessageCount = 0;\n\n if (userRef?.current) {\n const unreadCountObject: any =\n await CometChat.getUnreadMessageCountForUser(\n userRef.current?.getUid()\n );\n unreadMessageCount =\n unreadCountObject[userRef.current?.getUid()] || 0;\n }\n\n if (groupRef?.current) {\n const unreadCountObject: any =\n await CometChat.getUnreadMessageCountForGroup(\n groupRef.current?.getGuid()\n );\n unreadMessageCount =\n unreadCountObject[groupRef.current?.getGuid()] || 0;\n }\n\n if (!isFetchingPreviousMessages) {\n isFetchingPreviousMessages = true;\n if (!messageListManagerRef.current.previous) {\n messageListManagerRef.current.previous = new MessageListManager(\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n messageIdRef.current.prevMessageId,\n parentMessageIdRef.current\n );\n }\n messageListManagerRef?.current.previous.fetchPreviousMessages().then(\n (messagesList: any) => {\n if (!parentMessageIdRef.current) {\n }\n if (messagesList && messagesList.length > 0) {\n messagesList = messagesList.map(\n (message: CometChat.BaseMessage) => {\n if (\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n );\n } else {\n return message;\n }\n }\n );\n }\n if (isFirstReloadRef.current) {\n CometChatUIEvents.ccActiveChatChanged.next({\n user: userRef.current,\n group: groupRef.current,\n message: messagesList.length > 0 ? messagesList[messagesList.length - 1] : undefined,\n unreadMessageCount\n });\n isFirstReloadRef.current = false;\n MessageListManager.attachConnectionListener(() => {\n isConnectionReestablishedRef.current = true;\n fetchActionMessages().then(() => {\n fetchNextMessages()\n .then(\n (success) => {\n resolve(success);\n isConnectionReestablishedRef.current = false;\n },\n (error) => {\n reject(error);\n }\n )\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n });\n });\n });\n }\n\n isFetchingPreviousMessages = false;\n if (messagesList && messagesList.length > 0) {\n let lastMessage: CometChat.BaseMessage =\n messagesList[messagesList.length - 1];\n let isMyMessage = lastMessage?.getSender().getUid() == loggedInUserRef.current?.getUid()\n if (!lastMessage.getDeliveredAt() && !disableReceipt && !isMyMessage) {\n CometChat.markAsDelivered(lastMessage).then(() => {\n messagesList.forEach((m: CometChat.BaseMessage) => {\n if (\n m?.getId() <= lastMessage?.getId() &&\n !isMyMessage &&\n !m.getDeliveredAt()\n ) {\n m.setDeliveredAt(new Date().getTime());\n }\n return m;\n });\n });\n }\n if (!lastMessage.getReadAt() && !isMyMessage) {\n if (!disableReceipt) {\n CometChat.markAsRead(lastMessage).then(() => {\n messagesList.forEach((m: CometChat.BaseMessage) => {\n if (\n m?.getId() <= lastMessage?.getId() &&\n !isMyMessage &&\n !m.getReadAt()\n ) {\n m.setReadAt(new Date().getTime());\n }\n return m;\n });\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n });\n } else {\n UnreadMessagesRef.current = [];\n }\n }else if(!isMyMessage){\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n }\n\n prependMessages(messagesList).then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } else {\n if (messagesList.length === 0) {\n if (totalMessagesCountRef.current === 0) {\n setMessageListState(States.empty);\n }\n }\n resolve(true);\n }\n },\n (error: CometChat.CometChatException) => {\n isFetchingPreviousMessages = false;\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n if (error.code != \"REQUEST_IN_PROGRESS\") {\n onErrorCallback(error);\n reject(error);\n }\n else {\n setMessageListState(States.loading)\n }\n }\n );\n } else {\n resolve(true);\n }\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n }\n });\n }, [\n disableReceipt,\n onErrorCallback,\n prependMessages,\n ]);\n\n /**\n * Function to append messages to the end of the current message list.\n * @param {CometChat.BaseMessage[]} messages - The messages to be appended.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n\n const appendMessages: (messages: CometChat.BaseMessage[]) => Promise = useCallback(\n (messages: CometChat.BaseMessage[]) => {\n return new Promise((resolve, reject) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]): CometChat.BaseMessage[] => {\n const updatedMessageList: CometChat.BaseMessage[] = [\n ...prevMessageList,\n ...messages,\n ];\n return updatedMessageList;\n });\n totalMessagesCountRef.current = totalMessagesCountRef.current + messages.length;\n let id = messages[messages.length - 1]?.getId();\n if (id && messageIdRef.current.prevMessageId !== id) {\n messageIdRef.current.nextMessageId = id;\n }\n\n if (scrollToBottomOnNewMessages) {\n setTimeout(() => {\n setScrollListToBottom(true);\n isOnBottomRef.current = true;\n }, 100);\n } else {\n if (isConnectionReestablishedRef.current) {\n setScrollListToBottom(isOnBottomRef.current);\n let lastMessage: CometChat.BaseMessage =\n messages[messages?.length - 1];\n if (\n isOnBottomRef.current &&\n lastMessage &&\n lastMessage.getSender().getUid() != loggedInUserRef.current?.getUid() &&\n !lastMessage.getReadAt()\n ) {\n CometChat.markAsRead(lastMessage).then(() => {\n UnreadMessagesRef.current = [];\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n });\n }\n } else {\n setScrollListToBottom(false);\n }\n let countText = newMessageIndicatorText\n ? newMessageIndicatorText\n : UnreadMessagesRef.current.length > 1\n ? localize(\"NEW_MESSAGES\")\n : localize(\"NEW_MESSAGE\");\n UnreadMessagesRef.current.push(...messages);\n newMessageTextRef.current =\n \" ↓ \" + UnreadMessagesRef.current.length + \" \" + countText;\n setShowNewMessagesBanner(true);\n }\n setMessageListState(States.loaded);\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = true;\n reinitializeMessagesRequestBuilder();\n }\n resolve(true);\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n });\n },\n [\n thresholdValue,\n reinitializeMessagesRequestBuilder,\n onErrorCallback,\n isOnBottomRef,\n ]\n );\n\n /**\n * Function to fetch action messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const fetchActionMessages: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n let requestBuilder = new CometChat.MessagesRequestBuilder()\n .setType(CometChatUIKitConstants.MessageCategory.message)\n .setCategory(CometChatUIKitConstants.MessageCategory.action)\n .setMessageId(messageIdRef.current.nextMessageId)\n .setLimit(30);\n if (userRef.current) {\n requestBuilder.setUID(userRef.current.getUid());\n } else if (groupRef.current) {\n requestBuilder.setGUID(groupRef.current.getGuid());\n }\n requestBuilder\n .build()\n .fetchNext()\n .then((messages) => {\n if (messages && messages.length > 0) {\n messages.forEach((message: CometChat.BaseMessage) => {\n replaceUpdatedMessage(\n (\n message as CometChat.Action\n ).getActionOn() as CometChat.BaseMessage\n );\n });\n return resolve(true);\n } else {\n return resolve(true);\n }\n })\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n return reject(error);\n });\n });\n }, [onErrorCallback]);\n\n\n /**\n * Function to fetch the next set of messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n\n const fetchNextMessages: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n if (messageIdRef.current.nextMessageId) {\n if (!messageListManagerRef.current.next) {\n messageListManagerRef.current.next = new MessageListManager(\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n messageIdRef.current.nextMessageId,\n parentMessageIdRef.current\n );\n }\n setMessageListState(States.loading);\n messageListManagerRef?.current.next.fetchNextMessages().then(\n (messagesList: any) => {\n if (messagesList && messagesList.length > 0) {\n messagesList = messagesList.map(\n (message: CometChat.BaseMessage) => {\n if (\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n );\n } else {\n return message;\n }\n }\n );\n }\n if (messagesList) {\n if (messagesList.length === 0) {\n totalMessagesCountRef.current === 0\n ? setMessageListState(States.empty)\n : setMessageListState(States.loaded);\n resolve(true);\n } else {\n appendMessages(messagesList).then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n }\n } else {\n resolve(true);\n }\n },\n (error: any) => {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n );\n } else {\n resolve(true);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [\n appendMessages,\n onErrorCallback,\n messageList?.length,\n messagesRequestBuilder]);\n\n /**\n * Function to update the reply count of a message.\n * @param {CometChat.BaseMessage} message - The message for which the reply count is to be updated.\n * @returns {void}\n */\n\n const updateReplyCount: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === message.getParentMessageId()) {\n if (m.getReplyCount()) {\n m.setReplyCount(m.getReplyCount() + 1);\n } else {\n m.setReplyCount(1);\n }\n return m;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to update unread reply count for a specific message.\n * @param {CometChat.BaseMessage} message - The message for which the unread reply count is updated.\n * @returns {void}\n */\n const updateUnreadReplyCount: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n let messageList: CometChat.BaseMessage[] = [...prevMessageList];\n let messageKey = messageList.findIndex(\n (m) => m.getId() === message.getParentMessageId()\n );\n if (messageKey > -1) {\n const messageObj: CometChat.BaseMessage = messageList[messageKey];\n messageList.splice(messageKey, 1, messageObj);\n prevMessageList = [...messageList];\n }\n return prevMessageList;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback])\n\n /**\n * Function to add a new message to the current message list.\n * @param {CometChat.BaseMessage} message - The message to be added.\n * @returns {void}\n */\n const addMessage: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n totalMessagesCountRef.current += 1;\n if (totalMessagesCountRef.current > 0 && messageListState != States.loaded) {\n setMessageListState(States.loaded)\n }\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = [...prevMessageList, message];\n return messages;\n });\n if (!message.getSender() || (message.getSender().getUid() == loggedInUserRef.current?.getUid())) {\n setScrollListToBottom(true);\n }\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = true;\n reinitializeMessagesRequestBuilder();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [thresholdValue, onErrorCallback, scrollListToBottom]\n );\n\n /**\n * Function to get the receipt status of a message.\n * @param {CometChat.BaseMessage} message - The message for which the receipt status is to be fetched.\n * @returns {number | undefined} - Returns the receipt status or undefined.\n */\n\n const getMessageReceipt: (message: CometChat.BaseMessage) => number | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n return MessageReceiptUtils.getReceiptStatus(message);\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to play an audio notification for new messages if sound is enabled.\n * @returns {void}\n */\n\n const playAudio: () => void = useCallback(() => {\n try {\n if (!disableSoundForMessages) {\n if (customSoundForMessages) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage,\n customSoundForMessages\n );\n } else {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage\n );\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [disableSoundForMessages, customSoundForMessages, onErrorCallback]);\n\n /**\n * Function to show and increment the count of unread messages.\n * @param {CometChat.BaseMessage} message - The unread message to be counted.\n * @returns {void}\n */\n const showAndIncrementUnreadCount: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n if (!isOnBottomRef.current && message.getSender() && message.getSender().getUid() != loggedInUserRef.current?.getUid()) {\n let countText = newMessageIndicatorText\n ? newMessageIndicatorText\n : UnreadMessagesRef.current.length > 1\n ? localize(\"NEW_MESSAGES\")\n : localize(\"NEW_MESSAGE\");\n UnreadMessagesRef.current.push(message);\n newMessageTextRef.current =\n \" ↓ \" + UnreadMessagesRef.current.length + \" \" + countText;\n setShowNewMessagesBanner(true);\n }\n }, [newMessageIndicatorText]);\n\n /**\n * Function to mark all messages up to a certain point as delivered.\n * @param {CometChat.MessageReceipt} message - The receipt message up to which all messages are marked as delivered.\n * @returns {void}\n */\n\n const markAllMessagAsDelivered: (message: CometChat.MessageReceipt) => void = useCallback(\n (message: CometChat.MessageReceipt) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (\n parseInt(m?.getId()?.toString()) <=\n parseInt(message.getMessageId()) &&\n m.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n !m.getDeliveredAt()\n ) {\n m.setDeliveredAt(message.getDeliveredAt());\n }\n return m;\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to mark all messages up to a certain point as read.\n * @param {CometChat.MessageReceipt} message - The receipt message up to which all messages are marked as read.\n * @returns {void}\n */\n const markAllMessageAsRead: (message: CometChat.MessageReceipt) => void = useCallback(\n (message: CometChat.MessageReceipt) => {\n try {\n const listToMarkRead: CometChat.BaseMessage[] = [];\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (\n parseInt(m?.getId()?.toString()) <=\n parseInt(message.getMessageId()) &&\n m.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n !m.getReadAt()\n ) {\n m.setReadAt(message.getReadAt());\n if (\n parseInt(m?.getId()?.toString()) ===\n parseInt(message.getMessageId())\n ) {\n listToMarkRead.push(m);\n }\n }\n return m;\n });\n listToMarkRead.forEach((m) => {\n CometChatMessageEvents.ccMessageRead.next(m);\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to handle the marking of messages as read or delivered\n * @param {CometChat.MessageReceipt} messageReceipt - The receipt message\n * @returns {void}\n */\n\n const messageReadAndDelivered: (message: CometChat.MessageReceipt) => void = useCallback(\n (messageReceipt: CometChat.MessageReceipt) => {\n try {\n if (\n messageReceipt.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n messageReceipt.getSender().getUid() === userRef.current?.getUid() &&\n messageReceipt.getReceiver() === loggedInUserRef.current?.getUid()\n ) {\n messageReceipt.getReceiptType() === \"delivery\"\n ? markAllMessagAsDelivered(messageReceipt)\n : markAllMessageAsRead(messageReceipt);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n markAllMessagAsDelivered,\n markAllMessageAsRead,\n onErrorCallback]\n );\n\n\n\n /**\n * Function to update an interactive message\n * @param {CometChat.InteractionReceipt} receipt - The interaction receipt of the message to be updated.\n * @returns {void}\n */\n const updateInteractiveMessage: (message: CometChat.InteractionReceipt) => void = useCallback(\n (receipt: CometChat.InteractionReceipt) => {\n if (loggedInUserRef.current?.getUid() === receipt.getSender().getUid()) {\n setMessageList((previousMessage) => {\n return previousMessage.map((message) => {\n if (String(message.getId()) === String(receipt.getMessageId())) {\n const interaction = receipt.getInteractions();\n (message as CometChat.InteractiveMessage).setInteractions(\n interaction\n );\n return InteractiveMessageUtils.convertInteractiveMessage(message);\n } else {\n return message;\n }\n });\n });\n }\n },\n []\n );\n\n /**\n * Function to check whether to scroll to the bottom of the message list\n * @param {boolean} forceScroll - A boolean indicating whether to force the scroll to the bottom\n * @returns {void}\n */\n const checkAndScrollToBottom: (forceScroll?: boolean) => void = useCallback((forceScroll: boolean = false) => {\n\n if (forceScroll || scrollToBottomOnNewMessages) {\n setTimeout(() => {\n setScrollListToBottom(true);\n isOnBottomRef.current = true;\n UnreadMessagesRef.current = [];\n }, 100);\n return;\n }\n }, [scrollToBottomOnNewMessages]);\n\n /**\n * Function to handle when a new message is received\n * @param {CometChat.BaseMessage} message - The new message received.\n * @returns {void}\n */\n const messageReceivedHandler: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n if (isPartOfCurrentChatForSDKEvent(message)) {\n addMessage(message);\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n checkAndMarkMessageAsRead(message);\n } else {\n if (isOnBottomRef.current) {\n checkAndScrollToBottom(true);\n checkAndMarkMessageAsRead(message);\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(message);\n }\n }\n } else if (isThreadOfCurrentChatForSDKEvent(message)) {\n updateReplyCount(message);\n updateUnreadReplyCount(message);\n }\n playAudio();\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n isPartOfCurrentChatForSDKEvent,\n isThreadOfCurrentChatForSDKEvent,\n playAudio,\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n checkAndMarkMessageAsRead,\n showAndIncrementUnreadCount,\n updateReplyCount,\n updateUnreadReplyCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to handle when a group action message is received\n * @param {CometChat.Action} actionMessage - The action message received.\n * @param {CometChat.Group} group - The group where the action message is received.\n * @returns {void}\n */\n\n const groupActionMessageReceived: (message: CometChat.Action, group: CometChat.Group) => void = useCallback(\n (actionMessage: CometChat.Action, group: CometChat.Group) => {\n try {\n if (group?.getGuid() === groupRef?.current?.getGuid()) {\n addMessage(actionMessage);\n if (!isOnBottomRef.current) {\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(actionMessage);\n }\n } else {\n checkAndScrollToBottom(true);\n }\n }\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n showAndIncrementUnreadCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Checks if receipt is of the current list.\n * @param {CometChat.ReactionEvent} receipt - The reaction event object.\n * @returns {boolean} - Returns true if the receipt is of the current list, otherwise returns false.\n */\n const isReactionOfThisList: (receipt: CometChat.ReactionEvent) => boolean = useCallback((receipt: CometChat.ReactionEvent) => {\n const receiverId = receipt?.getReceiverId();\n const receiverType = receipt?.getReceiverType();\n const reactedById = receipt?.getReaction()?.getReactedBy()?.getUid();\n const parentMessageId = receipt?.getParentMessageId();\n const listParentMessageId = parentMessageId && String(parentMessageId);\n if (listParentMessageId) {\n if (parentMessageId === listParentMessageId) {\n return true;\n } else {\n return false\n }\n } else {\n if (receipt.getParentMessageId()) {\n return false\n }\n\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current?.getUid() || reactedById === userRef.current?.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current?.getGuid())) {\n return true\n }\n }\n }\n return false\n }, [])\n\n /**\n * Updates the message list with the reaction information of a message.\n * @param message - The message reaction object.\n * @param isAdded - Indicates whether the reaction is added or removed.\n */\n const messageReactionUpdated: (receipt: CometChat.ReactionEvent, isAdded: boolean) => boolean | undefined = useCallback(\n (receipt: CometChat.ReactionEvent, isAdded: boolean) => {\n if (!isReactionOfThisList(receipt)) {\n return false;\n }\n\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const index = prevMessageList.findIndex(\n (i) =>\n i.getId().toString() ===\n receipt.getReaction()?.getMessageId().toString()\n );\n if (index === -1) {\n return prevMessageList;\n }\n const messageObject = prevMessageList[index];\n let action: CometChat.REACTION_ACTION;\n if (isAdded) {\n action = CometChat.REACTION_ACTION.REACTION_ADDED;\n } else {\n action = CometChat.REACTION_ACTION.REACTION_REMOVED;\n }\n const modifiedMessage = CometChat.CometChatHelper.updateMessageWithReactionInfo(messageObject, receipt.getReaction(), action) as CometChat.BaseMessage;\n\n return prevMessageList.map((m) => {\n if (m.getId().toString() === modifiedMessage?.getId().toString()) {\n return CometChatUIKitUtility.clone(modifiedMessage)\n } else {\n return m\n }\n });\n });\n }, [isReactionOfThisList]\n );\n\n /**\n * Function to handle when a call action message is received\n * @param {CometChat.Call} callMessage - The call message received.\n * @returns {void}\n */\n const callActionMessageReceived: (callMessage: CometChat.Call) => void = useCallback(\n (callMessage: CometChat.Call) => {\n try {\n if (\n isPartOfCurrentChatForSDKEvent(callMessage) &&\n ChatConfigurator.names.includes(\"calling\")\n ) {\n addMessage(callMessage);\n if (!isOnBottomRef.current) {\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(callMessage);\n }\n } else {\n checkAndScrollToBottom(true);\n }\n }\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n isPartOfCurrentChatForSDKEvent,\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n showAndIncrementUnreadCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to handle the processing of real-time group and call actions.\n * @param {string} key - The key identifying the type of the message category.\n * @param {CometChat.BaseMessage} message - The incoming message.\n * @param {CometChat.Group} group - The group where the message is received (if applicable).\n * @returns {void}\n */\n const handleGroupAndCallActions = useCallback(\n (\n key: string = \"\",\n message: CometChat.BaseMessage,\n group?: CometChat.Group\n ) => {\n try {\n switch (key) {\n case CometChatUIKitConstants.MessageCategory.action: {\n if (group) {\n groupActionMessageReceived(message as CometChat.Action, group);\n }\n break;\n }\n case CometChatUIKitConstants.MessageCategory.call: {\n callActionMessageReceived(message as CometChat.Call);\n break;\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n groupActionMessageReceived,\n callActionMessageReceived,\n onErrorCallback,\n ]\n );\n\n /**\n * Callback to be executed when the message list is scrolled to the bottom.\n * @returns {Promise} Returns a promise that resolves to a boolean value or a CometChat exception.\n */\n const onBottomCallback: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n clearNewMessagesCount();\n setScrollListToBottom(false);\n if (messageListManagerRef.current && messageListManagerRef.current.previous) {\n messageListManagerRef.current.previous = null;\n }\n fetchNextMessages().then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [\n messageList,\n checkAndMarkMessageAsRead,\n fetchNextMessages,\n clearNewMessagesCount,\n onErrorCallback,\n ]);\n\n /**\n * Callback to be executed when the message list is scrolled to the top.\n * @returns {Promise} Returns a promise that resolves to a boolean value or a CometChat exception.\n */\n\n const onTopCallback: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n setScrollListToBottom(false);\n isOnBottomRef.current = false;\n if (messageListManagerRef.current && messageListManagerRef.current.next) {\n messageListManagerRef.current.next = null;\n }\n fetchPreviousMessages().then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [fetchPreviousMessages, onErrorCallback, isOnBottomRef]);\n\n /**\n * Function to update the view to focus on a specific message.\n * @param {CometChat.BaseMessage} message - The message to focus on.\n * @returns {void}\n */\n const updateView: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n elementRefs.current[message.getId()].current?.scrollIntoView({\n block: \"center\",\n });\n },\n []\n );\n\n /**\n * Function to scroll the message list to the bottom.\n * @returns {void}\n */\n const scrollToBottom: () => void = useCallback(() => {\n try {\n clearNewMessagesCount()\n setScrollListToBottom(true);\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [markMessageRead, onErrorCallback, clearNewMessagesCount]);\n\n /**\n * Function to reset the count of unread messages in a thread.\n * @param {number | string} parentMessageId - The parent message ID of the thread.\n * @returns {void}\n */\n\n const resetCountForUnreadMessagesInThread: (parentMessageId: number | string) => void = useCallback(\n (parentMessageId: number | string) => {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n return prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === parentMessageId) {\n return m;\n } else {\n return m;\n }\n });\n });\n },\n []\n );\n\n /**\n * Function to subscribe to UI events for handling various scenarios such as showing a dialog, handling group member events, handling message edits, etc.\n * @returns {() => void} A cleanup function to unsubscribe from the events.\n */\n const subscribeToUIEvents: () => (() => void) | undefined = useCallback(() => {\n try {\n const ccShowOngoingCall = CometChatUIEvents.ccShowOngoingCall.subscribe(\n (data: IShowOngoingCall) => {\n setShowOngoingCall(true);\n setOngoingCallView(data.child);\n }\n );\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n (call: CometChat.Call) => {\n setShowOngoingCall(false);\n setOngoingCallView(null);\n if (!call) {\n return;\n }\n callActionMessageReceived(call);\n }\n );\n const ccCallRejected = CometChatCallEvents.ccCallRejected.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccCallAccepted = CometChatCallEvents.ccCallAccepted.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccMessageRead = CometChatMessageEvents.ccMessageRead.subscribe(\n (message: CometChat.BaseMessage) => {\n if (isThreadOfCurrentChatForSDKEvent(message)) {\n resetCountForUnreadMessagesInThread(message.getParentMessageId());\n }\n }\n );\n const ccShowDialog = CometChatUIEvents.ccShowDialog.subscribe(\n (data: IDialog) => {\n imageModerationDialogRef.current = data.child;\n setShowConfirmDialog(true);\n }\n );\n const ccHideDialog = CometChatUIEvents.ccHideDialog.subscribe(() => {\n imageModerationDialogRef.current = null;\n setShowConfirmDialog(false);\n });\n const ccShowPanel = CometChatUIEvents.ccShowPanel.subscribe(\n (data: IPanel) => {\n if (!data.message || ((data.message.getParentMessageId() && parentMessageId && data.message.getParentMessageId() == parentMessageId) || (!parentMessageId && !data.message?.getParentMessageId()))) {\n if (data.position === PanelAlignment.messageListFooter) {\n if (smartReplyViewRef.current) {\n smartReplyViewRef.current = null;\n setShowNewMessagesBanner(false);\n setShowFooterPanelView(false);\n }\n setTimeout(() => {\n smartReplyViewRef.current = data.child;\n setShowFooterPanelView(true);\n }, 0);\n }\n else if (data.position === PanelAlignment.messageListHeader) {\n if (headerViewRef.current) {\n headerViewRef.current = null;\n setShowHeaderPanelView(false);\n }\n\n setTimeout(() => {\n headerViewRef.current = data.child;\n setShowHeaderPanelView(true);\n }, 0);\n\n }\n }\n }\n );\n const ccHidePanel = CometChatUIEvents.ccHidePanel.subscribe(\n (alignment) => {\n if (alignment === PanelAlignment.messageListFooter) {\n smartReplyViewRef.current = null;\n setShowNewMessagesBanner(false);\n setShowFooterPanelView(false);\n\n }\n else if (alignment === PanelAlignment.messageListHeader) {\n headerViewRef.current = null;\n setShowHeaderPanelView(false);\n\n }\n }\n );\n const ccGroupMemberAdded =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n item.messages.map((message) => {\n groupActionMessageReceived(message, item.userAddedIn);\n });\n }\n );\n const ccGroupMemberBanned =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n groupActionMessageReceived(item.message, item.kickedFrom);\n }\n );\n const ccGroupMemberKicked =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n groupActionMessageReceived(item.message, item.kickedFrom);\n }\n );\n const ccGroupMemberScopeChanged =\n CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe(\n (item: IGroupMemberScopeChanged) => {\n groupActionMessageReceived(item.message, item.group);\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n groupActionMessageReceived(item.message, item.leftGroup);\n }\n );\n const ccMessageEdit = CometChatMessageEvents.ccMessageEdited.subscribe(\n (obj: IMessages) => {\n if (obj?.status === MessageStatus.success) {\n if (isPartOfCurrentChatForUIEvent(obj.message)) {\n updateMessage(obj.message, false);\n }\n }\n }\n );\n\n const ccMessageTranslated = CometChatMessageEvents.ccMessageTranslated.subscribe(\n (obj: IMessages) => {\n if (obj?.status === MessageStatus.success) {\n if (isPartOfCurrentChatForSDKEvent(obj.message)) {\n updateMessage(obj.message, false);\n setTimeout(() => {\n updateView(obj.message);\n }, 100);\n }\n }\n }\n );\n\n const ccMessageSent = CometChatMessageEvents.ccMessageSent.subscribe(\n (obj: IMessages) => {\n let { message, status } = obj;\n switch (status) {\n case MessageStatus.inprogress: {\n if (isPartOfCurrentChatForUIEvent(message))\n addMessage(message);\n break;\n }\n case MessageStatus.success: {\n if (isPartOfCurrentChatForUIEvent(message)) {\n updateMessage(message, true);\n }\n\n if (isThreadOfCurrentChatForUIEvent(message)) {\n updateReplyCount(message);\n }\n break;\n }\n default:\n updateMessage(message, true);\n if (isThreadOfCurrentChatForUIEvent(message)) {\n updateReplyCount(message);\n }\n break;\n }\n }\n );\n\n const onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage: CometChat.TextMessage) => {\n messageReceivedHandler(textMessage);\n });\n const onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage: CometChat.MediaMessage) => {\n messageReceivedHandler(mediaMessage);\n\n });\n const onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage: CometChat.CustomMessage) => {\n messageReceivedHandler(customMessage);\n });\n const onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage: FormMessage) => {\n messageReceivedHandler(formMessage);\n });\n const onSchedulerMessageReceived = CometChatMessageEvents.onSchedulerMessageReceived.subscribe((schedulerMessage: SchedulerMessage) => {\n messageReceivedHandler(schedulerMessage);\n });\n const onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage: CardMessage) => {\n messageReceivedHandler(cardMessage);\n });\n const onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customInteractiveMessage: CustomInteractiveMessage) => {\n messageReceivedHandler(customInteractiveMessage);\n });\n const onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt: CometChat.MessageReceipt) => {\n if (!disableReceipt) {\n messageReadAndDelivered(messageReceipt);\n }\n });\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt: CometChat.MessageReceipt) => {\n if (!disableReceipt) {\n messageReadAndDelivered(messageReceipt);\n }\n });\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(deletedMessage);\n });\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(editedMessage);\n });\n const onTransientMessageReceived = CometChatMessageEvents.onTransientMessageReceived.subscribe((transientMessage: CometChat.TransientMessage) => {\n let message: CometChat.TransientMessage =\n transientMessage as CometChat.TransientMessage;\n let liveReaction: any = message.getData();\n if (\n validateTransientMessage(transientMessage)\n && liveReaction[\"type\"] == \"live_reaction\"\n ) {\n CometChatMessageEvents.ccLiveReaction.next(\n liveReaction[\"reaction\"]\n );\n }\n });\n const onInteractionGoalCompleted = CometChatMessageEvents.onInteractionGoalCompleted.subscribe((receipt: CometChat.InteractionReceipt) => {\n updateInteractiveMessage(receipt)\n });\n let onMessageReactionAdded: Subscription, onMessageReactionRemoved: Subscription;\n\n if (!disableReactions) {\n onMessageReactionAdded = CometChatMessageEvents.onMessageReactionAdded.subscribe((reactionReceipt) => {\n messageReactionUpdated(reactionReceipt, true);\n });\n onMessageReactionRemoved = CometChatMessageEvents.onMessageReactionRemoved.subscribe((reactionReceipt) => {\n messageReactionUpdated(reactionReceipt, false);\n });\n }\n\n return () => {\n try {\n ccMessageEdit?.unsubscribe();\n ccMessageSent?.unsubscribe();\n ccGroupMemberAdded?.unsubscribe();\n ccGroupMemberBanned?.unsubscribe();\n ccGroupMemberKicked?.unsubscribe();\n ccGroupMemberScopeChanged?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccShowOngoingCall?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n ccCallEnded?.unsubscribe();\n ccCallRejected?.unsubscribe();\n ccCallAccepted?.unsubscribe();\n ccShowDialog?.unsubscribe();\n ccHideDialog?.unsubscribe();\n ccShowPanel?.unsubscribe();\n ccHidePanel?.unsubscribe();\n ccMessageTranslated?.unsubscribe();\n ccMessageRead?.unsubscribe();\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n onMessagesDelivered?.unsubscribe();\n onMessagesRead?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n onMessageEdited?.unsubscribe();\n onTransientMessageReceived?.unsubscribe();\n onInteractionGoalCompleted?.unsubscribe();\n if (!disableReactions) {\n onMessageReactionAdded?.unsubscribe();\n onMessageReactionRemoved?.unsubscribe();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [\n validateTransientMessage,\n resetCountForUnreadMessagesInThread,\n disableReactions,\n callActionMessageReceived,\n isThreadOfCurrentChatForSDKEvent,\n updateMessage,\n groupActionMessageReceived,\n isPartOfCurrentChatForUIEvent,\n updateView,\n addMessage,\n isThreadOfCurrentChatForUIEvent,\n updateReplyCount,\n onErrorCallback,\n showFooterPanelView,\n ]);\n\n /**\n * Function to check if two dates are different\n * @param {number | undefined} firstDate - The first date to compare\n * @param {number | undefined} secondDate - The second date to compare\n * @returns {boolean | undefined} Returns true if dates are different, false otherwise\n */\n const isDateDifferent: (firstDate: number | undefined, secondDate: number | undefined) => boolean | undefined = useCallback(\n (firstDate: number | undefined, secondDate: number | undefined) => {\n try {\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate! * 1000);\n secondDateObj = new Date(secondDate! * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to decide whether to show header title or not\n * @param {CometChat.BaseMessage} message - The message for which header title needs to be decided\n * @returns {boolean} Returns true if header title needs to be shown, false otherwise\n */\n\n const showHeaderTitle: (message: CometChat.BaseMessage) => boolean = useCallback(\n (message: CometChat.BaseMessage) => {\n if (alignment === MessageListAlignment.left) {\n return true;\n } else {\n if (\n groupRef.current &&\n message?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n message?.getSender() &&\n message?.getSender()?.getUid() !== loggedInUserRef.current?.getUid() &&\n alignment === MessageListAlignment.standard\n ) {\n return true;\n } else {\n return false;\n }\n }\n },\n [alignment]\n );\n\n /**\n * Function to get leading view for message bubble\n * @param {CometChat.BaseMessage} message - The message for which leading view needs to be fetched\n * @returns {any} Returns JSX.Element or null for leading view of a message bubble\n */\n\n const getBubbleLeadingView: (message: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call &&\n showAvatar &&\n showHeaderTitle(item)\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [showAvatar, avatarStyle, showHeaderTitle, theme]\n );\n\n /**\n * Function to get header date for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which header date needs to be fetched\n * @returns {JSX.Element} Returns JSX.Element for header date of a message bubble\n */\n const getBubbleHeaderDate: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n \n \n );\n },\n [messageListStyle, datePattern, theme]\n );\n\n /**\n * Function to get header title for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which header title needs to be fetched\n * @returns {JSX.Element} Returns JSX.Element for header title of a message bubble\n */\n\n const getBubbleHeaderTitle: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n \n \n );\n },\n [theme]\n );\n\n /**\n * Function to get the header of a message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the header needs to be fetched\n * @returns {any} Returns JSX.Element or null for header view of a message bubble\n */\n\n const getBubbleHeader: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (getHeaderView(item)) {\n return getHeaderView(item);\n } else {\n if (\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n if (\n !showHeaderTitle(item) &&\n timestampAlignment !== timestampEnum.top\n ) {\n return null;\n } else {\n return (\n <>\n {showHeaderTitle(item) ? getBubbleHeaderTitle(item) : null}\n {timestampAlignment === timestampEnum.top\n ? getBubbleHeaderDate(item)\n : null}\n \n );\n }\n }\n }\n\n return null;\n },\n [\n timestampAlignment,\n getBubbleHeaderDate,\n showHeaderTitle,\n getHeaderView,\n getBubbleHeaderTitle,\n ]\n );\n\n /**\n * Function to get status and date for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the information needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for status and date of a message bubble or null\n */\n const getBubbleStatusInfoDate: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n timestampAlignment === timestampEnum.bottom &&\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [\n timestampAlignment,\n messageListStyle,\n datePattern,\n theme,\n ]\n );\n\n /**\n * Function to get receipt for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the receipt needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for receipt of a message bubble or null\n */\n\n const getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n !disableReceipt &&\n (!item?.getSender() ||\n loggedInUserRef.current?.getUid() === item?.getSender()?.getUid()) &&\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [\n disableReceipt,\n waitIcon,\n sentIcon,\n deliveredIcon,\n readIcon,\n errorIcon,\n getMessageReceipt,\n theme,\n ]\n );\n\n /**\n * Function to get configuration for reaction list\n * @returns {ReactionListConfiguration} Returns ReactionListConfiguration\n */\n const getReactionListConfiguration: () => ReactionListConfiguration = useCallback(() => {\n const reactionListConfiguration =\n reactionsConfiguration?.reactionListConfiguration || {};\n const avatarStyle = getReactionListAvatarStyle(theme);\n const listItemStyle = getReactionListItemStyle(theme);\n const reactionListStyle = getReactionListStyle(theme);\n const reactionItemClicked = (\n reaction: CometChat.Reaction,\n message: CometChat.BaseMessage\n ) => {\n if (reaction?.getReactedBy()?.getUid() === loggedInUserRef.current?.getUid()) {\n reactToMessages(reaction?.getReaction(), message);\n }\n };\n return new ReactionListConfiguration({\n avatarStyle: {\n ...avatarStyle,\n ...reactionListConfiguration?.avatarStyle,\n },\n errorIconURL: reactionListConfiguration?.errorIconURL || \"\",\n listItemStyle: {\n ...listItemStyle,\n ...reactionListConfiguration?.listItemStyle,\n },\n loadingIconURL: reactionListConfiguration?.loadingIconURL || \"\",\n reactionListStyle: {\n ...reactionListStyle,\n ...reactionListConfiguration?.reactionListStyle,\n },\n reactionItemClicked:\n reactionListConfiguration?.reactionItemClicked || reactionItemClicked,\n reactionsRequestBuilder:\n reactionListConfiguration?.reactionsRequestBuilder || undefined,\n });\n }, [reactionsConfiguration, reactToMessages, theme]);\n\n /**\n * Function to get configuration for reaction info\n * @returns {ReactionInfoConfiguration} Returns ReactionInfoConfiguration\n */\n const getReactionInfoConfiguration: () => ReactionInfoConfiguration = useCallback(() => {\n const config = reactionsConfiguration?.reactionInfoConfiguration || {};\n const reactionInfoStyle = getReactionInfoStyle(theme, config);\n return new ReactionInfoConfiguration({\n reactionInfoStyle: reactionInfoStyle,\n reactionsRequestBuilder: config?.reactionsRequestBuilder || undefined,\n errorIconURL: config?.errorIconURL || \"\",\n loadingIconURL: config?.loadingIconURL || \"\",\n });\n }, [reactionsConfiguration, theme]);\n\n /**\n * Function to get reaction view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the reaction view needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for reaction view of a message bubble or null\n */\n const getReactionView: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n const reactions = item?.getReactions() || [];\n const alignment = setBubbleAlignment(item);\n if (reactions && reactions.length > 0 && !disableReactions) {\n const style = getReactionsStyle(reactionsConfiguration?.reactionsStyle, theme);\n return {\n if (reactionsConfiguration?.reactionClick) {\n reactionsConfiguration?.reactionClick(reaction, message);\n } else {\n reactToMessages(reaction?.getReaction(), message);\n }\n }\n }\n reactionListConfiguration={getReactionListConfiguration()}\n reactionInfoConfiguration={getReactionInfoConfiguration()}\n style={getReactionViewStyle(alignment)}\n />\n } else {\n return null;\n }\n },\n [\n disableReactions,\n getReactionInfoConfiguration,\n getReactionListConfiguration,\n reactToMessages,\n reactionsConfiguration,\n setBubbleAlignment,\n theme,\n ]\n );\n\n /**\n * Function to get footer view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the footer view needs to be fetched\n * @returns {any} Returns JSX.Element for footer view of a message bubble\n */\n const getBubbleFooterView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (getFooterView(item)) {\n return (\n \n {getFooterView(item)}\n \n );\n } else {\n return (\n \n {getReactionView(item)}\n \n );\n }\n },\n [getReactionView, getFooterView, setBubbleAlignment]\n );\n\n /**\n * Function to get thread view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the thread view needs to be fetched\n * @returns {any} Returns JSX.Element for thread view of a message bubble\n */\n const getBubbleThreadView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (item?.getReplyCount() && !item?.getDeletedAt()) {\n const alignment = setBubbleAlignment(item);\n const icon = threadIndicatorIcon;\n\n return (\n
    \n {\n openThreadView(item);\n }}\n >\n \n
    \n );\n }\n },\n [\n setBubbleAlignment,\n threadIndicatorIcon,\n theme,\n messageListStyle,\n openThreadView,\n ]\n );\n\n /**\n * Function to validate a message for displaying status information\n * @param {CometChat.BaseMessage} message - The message to be validated\n * @returns {boolean} - Returns true if the message type is valid, false otherwise\n */\n const isValidMessageForStatusInfo: (\n message: CometChat.BaseMessage\n ) => boolean = (\n message: CometChat.BaseMessage\n ): boolean => {\n const messageType = message?.getType();\n const validMessageTypes = [\n CometChatUIKitConstants.MessageTypes.image,\n CometChatUIKitConstants.MessageTypes.video,\n ];\n return validMessageTypes.includes(messageType);\n };\n\n /**\n* Function to create status view for the message\n* @param {CometChat.BaseMessage} item - The message for which the status view needs to be fetched\n* @returns {any} - Returns JSX.Element or null for status view of a message\n*/\n\n const getStatusInfoView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.statusInfoView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.statusInfoView(\n item,\n _alignment\n );\n } else if (!item?.getDeletedAt() && !(item instanceof CometChat.Action) && !(item instanceof CometChat.Call)) {\n return (\n \n \n {getBubbleStatusInfoDate(item)}\n {getBubbleStatusInfoReceipt(item)}\n \n \n );\n } else {\n return null;\n }\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [\n getBubbleStatusInfoDate,\n getBubbleStatusInfoReceipt,\n messagesTypesMap,\n onErrorCallback,\n setBubbleAlignment,\n ]\n );\n\n /**\n * Function to generate a message bubble\n * @param {CometChat.BaseMessage} item - The message for which the bubble needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble\n */\n\n const getMessageBubbleItem: (item: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage, i: any) => {\n return (\n {\n elementRefs.current[item.getId()] = ref;\n }}\n leadingView={getBubbleLeadingView(item)}\n headerView={getBubbleHeader(item)}\n footerView={getBubbleFooterView(item)}\n contentView={getContentView(item)}\n bottomView={getBottomView(item)}\n id={item?.getId() || item?.getMuid()}\n options={getMessageOptions(item)}\n messageBubbleStyle={messageBubbleStyle(\n item,\n theme,\n alignment,\n loggedInUserRef.current\n )}\n alignment={setBubbleAlignment(item)}\n replyView={null}\n threadView={getBubbleThreadView(item)}\n statusInfoView={getStatusInfoView(item)}\n >
    \n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getBubbleFooterView,\n getContentView,\n alignment,\n setBubbleAlignment,\n getBubbleThreadView,\n getStatusInfoView,\n getMessageOptions,\n getBottomView,\n theme,\n ]\n );\n\n /**\n * Function to create date for the message bubble\n * @param {CometChat.BaseMessage} item - The message for which the date needs to be fetched\n * @param {number} i - The index of the message\n * @returns {JSX.Element | null} - Returns JSX.Element or null for date of a message bubble\n */\n const getMessageBubbleDate: (item: CometChat.BaseMessage, i: number) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage, i: number) => {\n if (i === 0) {\n return (\n \n \n \n );\n } else {\n if (\n isDateDifferent(messageList[i - 1]?.getSentAt(), item?.getSentAt())\n ) {\n return (\n \n \n \n );\n } else {\n return null;\n }\n }\n },\n [\n DateSeparatorPattern,\n messageList,\n dateSeparatorStyle,\n isDateDifferent,\n theme,\n ]\n );\n\n /**\n * Function to create a message bubble\n * @param {CometChat.BaseMessage} m - The message for which the bubble needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble\n */\n const getMessageBubble: (m: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (m: CometChat.BaseMessage, i: any) => {\n let _alignment = setBubbleAlignment(m);\n\n return (\n <>\n {\n !hideDateSeparator ?\n getMessageBubbleDate(m, i) : <>}\n \n {getBubbleWrapper(m)\n ? getBubbleWrapper(m)\n : getMessageBubbleItem(m, i)}\n \n \n );\n },\n [\n getBubbleWrapper,\n getMessageBubbleDate,\n getMessageBubbleItem,\n setBubbleAlignment,\n ]\n );\n\n /**\n * Function to generate a message bubble view item\n * @param {CometChat.BaseMessage} item - The message for which the view item needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble view item\n */\n const getMessageBubbleViewItem: (item: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage, i: any) => {\n return (\n \n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getContentView,\n alignment,\n setBubbleAlignment,\n theme,\n ]\n );\n\n /**\n * Function to get the bubble view\n * @param {CometChat.BaseMessage} m - The message for which the bubble view needs to be fetched\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a bubble view\n */\n const getBubbleView: (m: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (m: CometChat.BaseMessage, i: any) => {\n return (\n \n {getBubbleWrapper(m)\n ? getBubbleWrapper(m)\n : getMessageBubbleViewItem(m, i)}\n \n );\n },\n [\n getBubbleWrapper,\n getMessageBubbleDate,\n getMessageBubbleItem,\n getMessageBubbleViewItem,\n ]\n );\n\n /**\n * Function to get the footer of the message list\n * @returns {JSX.Element} - Returns JSX.Element for the footer of the message list\n */\n const getMessageListFooter: () => JSX.Element = useCallback(() => {\n return (\n <>\n {showFooterPanelView && smartReplyViewRef.current ? smartReplyViewRef.current : null}\n {footerView && !smartReplyViewRef.current ? footerView : null}\n \n );\n }, [\n footerView,\n scrollToBottom,\n showFooterPanelView\n ]);\n\n /**\n * Function to get the header of the message list\n * @returns {JSX.Element} - Returns JSX.Element for the header of the message list\n */\n const getMessageListHeader: () => JSX.Element = useCallback(() => {\n return (\n <>\n {showHeaderPanelView && headerViewRef.current ? headerViewRef.current : null}\n {headerView && !headerViewRef.current ? headerView : null}\n \n );\n }, [\n headerView,\n showHeaderPanelView\n ]);\n /**\n * Function to get the thread count of a message\n * @param {CometChat.BaseMessage} message - The message for which the thread count needs to be fetched\n * @returns {string} - Returns the thread count of the message as a string\n */\n const getThreadCount: (message: CometChat.BaseMessage) => string = (message: CometChat.BaseMessage) => {\n const replyCount = message?.getReplyCount() || 0;\n const suffix = replyCount === 1 ? localize(\"REPLY\") : localize(\"REPLIES\");\n return `${replyCount} ${suffix}`;\n };\n\n /**\n * Function to get the threaded message bubble\n * @param {CometChat.BaseMessage} item - The message for which the threaded bubble needs to be fetched\n * @returns {JSX.Element} - Returns JSX.Element for a threaded message bubble\n */\n const getThreadedMessageBubble: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n {getBubbleWrapper(item) ? (\n getBubbleWrapper(item)\n ) : (\n \n )}\n \n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getBubbleFooterView,\n getContentView,\n alignment,\n getMessageOptions,\n getBubbleWrapper,\n getBottomView,\n theme,\n ]\n );\n\n /**\n * Function to get list item\n * @param {CometChat.BaseMessage} message - The message for which the list item needs to be fetched\n * @param {number} index - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a list item\n */\n\n const getListItem: (message: CometChat.BaseMessage, index: number) => JSX.Element = useMemo(() => {\n return function (message: CometChat.BaseMessage, index: number): any {\n return getMessageBubble(message, index);\n };\n }, [getMessageBubble]);\n\n /**\n * Function to get the current state of the message list\n * @returns {States} - Returns the current state of the message list\n */\n const getCurrentMessageListState: () => States = useCallback(() => {\n return messageListState\n }, [messageListState]);\n /**\n * Function to hide the message information\n */\n const hideMessageInformation: () => void = () => {\n setShowMessageInfoPopup(false);\n };\n\n /**\n * Function to get the message template based on the message type and category\n * @param {CometChat.BaseMessage} selectedMessage - The message for which the template needs to be fetched\n * @returns {CometChatMessageTemplate} - Returns the template of the selected message\n */\n const getMessageTemplate: (selectedMessage: CometChat.BaseMessage) => CometChatMessageTemplate = (selectedMessage: CometChat.BaseMessage) => {\n return messagesTypesMap[\n `${selectedMessage?.getCategory() + \"_\" + selectedMessage?.getType()}`\n ];\n };\n\n /**\n * Custom hooks for CometChatMessageList component.\n */\n Hooks(\n loggedInUserRef,\n messageListManagerRef,\n fetchPreviousMessages,\n handleGroupAndCallActions,\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n subscribeToUIEvents,\n messageIdRef,\n totalMessagesCountRef,\n messageList,\n onErrorCallback,\n setMessageList,\n setScrollListToBottom,\n smartReplyViewRef,\n isOnBottomRef,\n isFirstReloadRef\n );\n\n return (\n <>\n \n \n {getMessageListHeader()}\n \n
    \n \n {showNewMessagesBanner &&\n UnreadMessagesRef.current &&\n UnreadMessagesRef.current.length > 0 &&\n !isOnBottomRef.current ? (\n
    \n \n\n
    \n ) : null}\n
    \n\n \n {getMessageListFooter()}\n \n \n\n {showOngoingCall ? ongoingCallView : null}\n {showConfirmDialog && imageModerationDialogRef.current\n ? imageModerationDialogRef.current\n : null}\n {showMessageInfoPopup && activeMessageInfo !== null && (\n \n )}\n \n );\n};\n\nCometChatMessageList.defaultProps = defaultProps;\nexport { CometChatMessageList };\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMessage%20Sent%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMessage-Sent%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.1282564%2C3.43708984%20C11.3839897%2C3.0108676%2011.9368239%2C2.87265904%2012.3630462%2C3.12839238%20C12.7564821%2C3.36445393%2012.9045099%2C3.85366653%2012.7238142%2C4.26276853%20L12.6717436%2C4.3631822%20L7.87174363%2C12.3631822%20C7.59058211%2C12.8317847%206.96826751%2C12.9373278%206.54992747%2C12.6127032%20L6.4636039%2C12.5365321%20L3.2636039%2C9.33653212%20C2.91213203%2C8.98506026%202.91213203%2C8.41521177%203.2636039%2C8.06373991%20C3.58578644%2C7.74155737%204.091466%2C7.71470883%204.44423138%2C7.98319428%20L4.5363961%2C8.06373991%20L6.921%2C10.448136%20L11.1282564%2C3.43708984%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage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20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_10800_33104%29%22%3E%3Cpath%20d%3D%22M13.9906%201.69617C13.824%204.12358%2012.7401%206.39667%2010.959%208.05423C9.17776%209.71179%206.83266%2010.6296%204.39955%2010.6215C4.23748%2010.6215%203.84965%2010.6297%203.68799%2010.6215H1.03645%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.2041%207.43042L1.0094%2010.6251L4.2041%2013.8198%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_10800_33104%22%3E%3Crect%20width%3D%2215%22%20height%3D%2215%22%20fill%3D%22white%22%20transform%3D%22matrix%28-1%200%200%201%2015%200%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\"","import { MutableRefObject, createRef, useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { MessageListManager } from \"./controller\";\nimport { CometChatUIKitLoginListener } from \"@cometchat/uikit-shared\";\n/**\n * This Hooks function is a custom React hook designed to manage functionalities of CometChatMessageList component. It fetches the logged-in user, handles event subscriptions and tracks message IDs for new message retrieval. It plays a key role in maintaining real-time functionality and user interactions in the chat interface.\n **/\nfunction Hooks(\n\tloggedInUserRef: MutableRefObject,\n\tmessageListManagerRef: MutableRefObject,\n\tfetchPreviousMessages: () => void,\n\tupdateMessage: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void,\n\tmessagesRequestBuilder: CometChat.MessagesRequestBuilder | undefined,\n\tuser: CometChat.User | undefined,\n\tgroup: CometChat.Group | undefined,\n\tsubscribeToEvents: () => (() => void) | undefined,\n\tmessageIdRef: MutableRefObject,\n\ttotalMessagesCountRef: MutableRefObject,\n\tmessageList: CometChat.BaseMessage[],\n\tonErrorCallback: (error: CometChat.CometChatException) => void,\n\tsetMessageList: (messages: CometChat.BaseMessage[]) => void,\n\tsetScrollListToBottom: (scrollToBottom: boolean) => void,\n\tsmartReplyViewRef: MutableRefObject,\n\tisOnBottomRef: MutableRefObject,\n\tisFirstReloadRef: MutableRefObject,\n): void {\n\t/**\n\t * useEffect hook to fetch the logged-in user when we first launch the user/group chat and set isFirstReloadRef to true. This state variable is used to add a connection listener when the chat is launched for the first time.\n\t * **/\n\tuseEffect(() => {\n\t\tCometChat.getLoggedinUser()\n\t\t\t.then(\n\t\t\t\t(userObject: CometChat.User | null) => {\n\t\t\t\t\tisFirstReloadRef.current = true;\n\t\t\t\t\tif (userObject) {\n\t\t\t\t\t\tloggedInUserRef.current = userObject;\n\t\t\t\t\t}\n\t\t\t\t}, (error: CometChat.CometChatException) => {\n\t\t\t\t\tonErrorCallback(error);\n\t\t\t\t}\n\t\t\t);\n\t}, [onErrorCallback]);\n\t/**\n\t* useEffect hook to subscribe to SDK and UI events when the component launches for the first time, or when changing from one chat to another.\n\t**/\n\n\tuseEffect(() => {\n\t\tlet unsubscribeEvents: (() => void) | undefined;\n\t\tif (CometChatUIKitLoginListener.getLoggedInUser() && (user || group)) {\n\t\t\tmessageListManagerRef.current = {\n\t\t\t\tprevious: new MessageListManager(\n\t\t\t\t\tmessagesRequestBuilder,\n\t\t\t\t\tuser,\n\t\t\t\t\tgroup\n\t\t\t\t)\n\t\t\t}\n\t\t\tMessageListManager.attachListeners(updateMessage);\n\t\t\tunsubscribeEvents = subscribeToEvents();\n\t\t\tsetMessageList([]);\n\t\t\tsetScrollListToBottom(true);\n\t\t\tisOnBottomRef.current = true;\n\t\t\tfetchPreviousMessages();\n\t\t\tsmartReplyViewRef.current = null;\n\t\t}\n\t\treturn () => {\n\t\t\tMessageListManager?.removeListeners?.();\n\t\t\tunsubscribeEvents?.();\n\t\t}\n\t}, [user, group]);\n\t/**\n\t * useEffect hook to store the first and last message ID in the messageList array. These are used to fetch new messages after a particular message when the connection gets reestablished after being interrupted.\n\t**/\n\tuseEffect(() => {\n\t\ttotalMessagesCountRef.current = messageList.length;\n\t\tif (messageList?.length > 0) {\n\t\t\tmessageIdRef.current.prevMessageId = messageList[0].getId();\n\t\t\tmessageIdRef.current.nextMessageId = messageList[messageList.length - 1].getId();\n\t\t}\n\t}, [messageList]);\n\n}\n\nexport { Hooks };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const ThreadedMessagesWrapperStyle = () => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n boxSizing: \"border-box\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesHeaderStyle = () => {\n return {\n padding: \"16px\",\n width: \"100%\",\n display: \"flex\",\n boxSizing: \"border-box\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesCloseButtonStyle = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n width: \"24px\",\n };\n};\n\nexport const ThreadedMessagesTitleStyle = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"calc(100% - 24px)\",\n };\n};\n\nexport const ThreadedMessagesBubbleViewStyle = () => {\n return {\n display: \"flex\",\n width: \"100%\",\n height: \"fit-content\",\n padding: \"8px 16px\",\n boxSizing: \"border-box\",\n maxHeight: \"20em\",\n overflow: \"hidden scroll\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesActionViewStyle = (theme: CometChatTheme) => {\n return {\n height: \"36px\",\n padding: \"8px 16px\",\n boxSizing: \"border-box\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesListStyle = () => {\n return {\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesComposerStyle = () => {\n return {\n height: \"fit-content\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n minHeight: \"90px\"\n } as CSSProperties;\n};\n\nexport const threadedMessageListStyle = () => {\n return {\n width: \"100%\",\n height: \"calc(100% - 156px)\",\n display: \"flex\",\n flexDirection: \"column\",\n } as CSSProperties;\n};\n\nexport const actionButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"100%\",\n width: \"100%\",\n border: `0 none`,\n borderRadius: \"0\",\n // padding: \"8px 16px\",\n background: `${theme.palette.getBackground()}`,\n buttonTextFont: `${fontHelper(theme.typography.subtitle1)}`,\n buttonTextColor: `${theme.palette.getAccent600()}`,\n } as CSSProperties;\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatMessageEvents,\n CometChatUIKitConstants,\n IMessages,\n MessageStatus,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n MessageComposerConfiguration,\n MessageListConfiguration,\n ThreadedMessagesStyle,\n UserMemberWrapperConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n ThreadedMessagesActionViewStyle,\n ThreadedMessagesBubbleViewStyle,\n ThreadedMessagesCloseButtonStyle,\n ThreadedMessagesComposerStyle,\n ThreadedMessagesHeaderStyle,\n ThreadedMessagesListStyle,\n ThreadedMessagesTitleStyle,\n ThreadedMessagesWrapperStyle,\n actionButtonStyle,\n threadedMessageListStyle,\n} from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessageComposer } from \"../CometChatMessageComposer\";\nimport { CometChatMessageList } from \"../CometChatMessageList/CometChatMessageList\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\n\ninterface IThreadedMessagesProps {\n parentMessage: CometChat.BaseMessage;\n title?: string;\n closeIconURL?: string;\n bubbleView: any;\n messageActionView?: any;\n onClose?: any;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n threadedMessagesStyle?: any;\n messageListConfiguration?: any;\n messageComposerConfiguration?: any;\n hideMessageComposer?: boolean,\n messageComposerView?: (user?: CometChat.User, group?: CometChat.Group, parentMessage?: CometChat.BaseMessage) => JSX.Element,\n messageListView?: (user?: CometChat.User, group?: CometChat.Group, parentMessage?: CometChat.BaseMessage) => JSX.Element,\n}\n\nconst threadMessagesStyle = {\n width: \"100%\",\n height: \"100%\",\n background: \"white\",\n borderRadius: \"none\",\n border: \"1px solid rgba(20, 20, 20, 0.1)\",\n titleColor: \"rgba(20, 20, 20)\",\n titleFont: \"700 22px Inter\",\n closeIconTint: \"#3399FF\",\n};\n\nconst titleStyle: any = {\n textFont: \"700 22px Inter\",\n textColor: \"black\",\n background: \"transparent\",\n};\nconst buttonStyle: any = {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: \"#7dbfff\",\n};\n\nconst CometChatThreadedMessages = (props: IThreadedMessagesProps) => {\n const {\n parentMessage,\n title = localize(\"THREAD\"),\n closeIconURL = Close2xIcon,\n bubbleView = null,\n messageActionView = null,\n onError,\n onClose = () => { },\n threadedMessagesStyle = threadMessagesStyle,\n messageListConfiguration = new MessageListConfiguration({}),\n messageComposerConfiguration = new MessageComposerConfiguration({}),\n messageComposerView,\n messageListView,\n hideMessageComposer\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [parentMessageObject, setParentMessageObject] =\n useState(parentMessage);\n const [replyCount, setReplyCount] = useState(0);\n\n const threadedMessagesStyleRef = useRef(threadedMessagesStyle);\n let defaultStyle: ThreadedMessagesStyle = new ThreadedMessagesStyle({\n width: \"100%\",\n height: \"100%\",\n background: theme.palette.getBackground(),\n borderRadius: \"none\",\n border: \"none\",\n titleColor: theme.palette.getAccent(),\n titleFont: fontHelper(theme.typography.title1),\n closeIconTint: theme.palette.getPrimary(),\n });\n threadedMessagesStyleRef.current = {\n ...defaultStyle,\n ...threadedMessagesStyle,\n };\n titleStyle.textFont =\n threadedMessagesStyleRef?.current?.titleFont ||\n fontHelper(theme.typography.title1);\n titleStyle.textColor =\n threadedMessagesStyleRef?.current?.titleColor || theme.palette.getAccent();\n titleStyle.background = \"transparent\";\n\n buttonStyle.buttonIconTint =\n threadedMessagesStyleRef?.current?.closeIconTint ||\n theme.palette.getPrimary();\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n\n const userObject = useMemo(() => {\n if (\n loggedInUser &&\n parentMessage?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n if (parentMessage?.getSender()?.getUid() === loggedInUser?.getUid()) {\n return parentMessage?.getReceiver() as CometChat.User;\n } else {\n return parentMessage?.getSender() as CometChat.User;\n }\n }\n }, [parentMessage, loggedInUser]);\n\n const groupObject = useMemo(() => {\n if (loggedInUser) {\n if (\n parentMessage?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n return parentMessage?.getReceiver() as CometChat.Group;\n }\n }\n }, [loggedInUser, parentMessage]);\n\n const parentMessageObjectId = parentMessageObject.getId();\n\n const requestBuilder = useMemo(() => {\n return new CometChat.MessagesRequestBuilder()\n .setCategories(ChatConfigurator.getDataSource().getAllMessageCategories())\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .hideReplies(true)\n .setLimit(20)\n .setParentMessageId(parentMessageObjectId);\n }, [parentMessageObjectId]);\n\n const updateReceipt = useCallback(\n (messageReceipt: CometChat.MessageReceipt) => {\n try {\n if (Number(messageReceipt?.getMessageId()) === parentMessageObjectId) {\n if (messageReceipt?.getReadAt()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(messageReceipt?.getReadAt());\n return tempObject;\n });\n } else if (messageReceipt?.getDeliveredAt()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(messageReceipt?.getDeliveredAt());\n return tempObject;\n });\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [parentMessageObjectId, setParentMessageObject, onErrorCallback]\n );\n\n const updateMessage = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n if (parentMessageObjectId === message?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [parentMessageObjectId, setParentMessageObject, onErrorCallback]\n );\n\n const addListener = useCallback(() => {\n const onMessagesDelivered =\n CometChatMessageEvents.onMessagesDelivered.subscribe(\n (messageReceipt: CometChat.MessageReceipt) => {\n updateReceipt(messageReceipt);\n }\n );\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe(\n (messageReceipt: CometChat.MessageReceipt) => {\n updateReceipt(messageReceipt);\n }\n );\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe(\n (deletedMessage: CometChat.BaseMessage) => {\n updateMessage(deletedMessage);\n }\n );\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe(\n (editedMessage: CometChat.BaseMessage) => {\n updateMessage(editedMessage);\n }\n );\n const onTextMessageReceived =\n CometChatMessageEvents.onTextMessageReceived.subscribe(\n (message: CometChat.TextMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onMediaMessageReceived =\n CometChatMessageEvents.onMediaMessageReceived.subscribe(\n (message: CometChat.MediaMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onCustomMessageReceived =\n CometChatMessageEvents.onCustomMessageReceived.subscribe(\n (message: CometChat.CustomMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onFormMessageReceived =\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onSchedulerMessageReceived =\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onCardMessageReceived =\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onCustomInteractiveMessageReceived =\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe(\n (message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n\n return () => {\n onMessagesDelivered?.unsubscribe();\n onMessagesRead?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n onMessageEdited?.unsubscribe();\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n };\n }, [updateReceipt, updateMessage, parentMessage]);\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccMessageSent = CometChatMessageEvents.ccMessageSent.subscribe(\n ({ status, message }: IMessages) => {\n if (\n status === MessageStatus.success &&\n message?.getParentMessageId() === parentMessageObject?.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const ccMessageEdited = CometChatMessageEvents.ccMessageEdited.subscribe(\n ({ status, message }: IMessages) => {\n if (\n status === MessageStatus.success &&\n message?.getId() === parentMessageObject?.getId()\n ) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n }\n );\n const ccMessageDeleted =\n CometChatMessageEvents.ccMessageDeleted.subscribe(\n (message: CometChat.BaseMessage) => {\n if (message?.getId() === parentMessageObject?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n }\n );\n const ccMessageRead = CometChatMessageEvents.ccMessageRead.subscribe(\n (message: CometChat.BaseMessage) => {\n if (message?.getId() === parentMessageObject?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(message?.getReadAt());\n return tempObject;\n });\n }\n }\n );\n\n return () => {\n try {\n ccMessageDeleted?.unsubscribe();\n ccMessageEdited?.unsubscribe();\n ccMessageRead?.unsubscribe();\n ccMessageSent?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [parentMessageObject, setParentMessageObject, onErrorCallback]);\n\n const closeView = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const wrapperStyle = () => {\n return {\n background:\n threadedMessagesStyleRef?.current?.background ||\n theme.palette.getBackground(),\n height: threadedMessagesStyleRef?.current?.height,\n width: threadedMessagesStyleRef?.current?.width,\n border: threadedMessagesStyleRef?.current?.border,\n borderRadius: threadedMessagesStyleRef?.current?.borderRadius,\n };\n };\n\n const getThreadCount = useCallback(() => {\n try {\n const count = replyCount || 0;\n const suffix = count === 1 ? localize(\"REPLY\") : localize(\"REPLIES\");\n return `${count} ${suffix}`;\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback, replyCount]);\n\n const getBubbleView = useCallback(() => {\n if (bubbleView && parentMessageObject) {\n return bubbleView(parentMessageObject);\n }\n return null;\n }, [parentMessageObject, bubbleView]);\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n addListener,\n subscribeToEvents,\n onErrorCallback,\n parentMessage,\n setReplyCount\n );\n\n return (\n \n \n \n \n \n \n \n \n \n
    \n \n {getBubbleView()}\n
    \n \n {messageActionView ? (\n messageActionView\n ) : (\n \n )}\n \n {!messageListView ? \n \n : (userObject || groupObject) ? messageListView(userObject, groupObject, parentMessage) : null}\n \n {!hideMessageComposer && !messageComposerView ? \n \n : null}\n {!hideMessageComposer && messageComposerView && (userObject || groupObject) ? messageComposerView(userObject, groupObject, parentMessage) : null}\n\n \n );\n};\n\nexport { CometChatThreadedMessages };\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { UserMemberWrapperConfiguration } from \"@cometchat/uikit-shared\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: any,\n addListener: Function,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n parentMessage: any,\n setReplyCount: Function,\n) {\n \n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n const removeListener = addListener();\n const unsubscribeFromEvents = subscribeToEvents();\n return () => {\n removeListener();\n unsubscribeFromEvents();\n };\n }\n }, [loggedInUser, addListener, subscribeToEvents]);\n\n useEffect(() => {\n if (parentMessage?.getReplyCount() === undefined){\n setReplyCount(0);\n }else{\n setReplyCount(parentMessage?.getReplyCount());\n }\n }, [parentMessage, setReplyCount]);\n\n}\n\nexport { Hooks };","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatGroupEvents,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatUserEvents,\n IGroupLeft,\n PanelAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n DetailsConfiguration,\n MessageComposerConfiguration,\n MessageHeaderConfiguration,\n MessageListConfiguration,\n MessagesStyle,\n ThreadedMessagesConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n MessagesComposerDivStyle,\n MessagesDetailsDivStyle,\n MessagesDivStyle,\n MessagesHeaderDivStyle,\n MessagesListDivStyle,\n MessagesWrapperStyle,\n ThreadedMessagesDivStyle,\n detailsButtonStyle,\n getDetailsStyle,\n getMessageComposerStyle,\n getMessageHeaderStyle,\n getMessageListStyle,\n liveReactionStyle,\n panelDivStyle,\n} from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatDetails } from \"../CometChatDetails\";\nimport { CometChatMessageComposer } from \"../CometChatMessageComposer\";\nimport { CometChatMessageHeader } from \"../CometChatMessageHeader\";\nimport { CometChatMessageList } from \"../CometChatMessageList/CometChatMessageList\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatThreadedMessages } from \"../CometChatThreadedMessages\";\nimport { Hooks } from \"./hooks\";\nimport InfoIcon from \"./assets/Info.svg\";\nimport LiveReactionIcon from \"./assets/heart-reaction.png\";\n\ninterface IMessagesProps {\n user?: CometChat.User;\n group?: CometChat.Group;\n hideMessageComposer?: boolean;\n disableTyping?: boolean;\n messageHeaderConfiguration?: MessageHeaderConfiguration;\n messageListConfiguration?: MessageListConfiguration;\n messageComposerConfiguration?: MessageComposerConfiguration;\n threadedMessagesConfiguration?: ThreadedMessagesConfiguration;\n detailsConfiguration?: DetailsConfiguration;\n customSoundForIncomingMessages?: string;\n customSoundForOutgoingMessages?: string;\n disableSoundForMessages?: boolean;\n messagesStyle?: MessagesStyle;\n messageHeaderView?: any;\n messageComposerView?: any;\n messageListView?: any;\n hideMessageHeader?: boolean;\n hideDetails?: boolean;\n auxiliaryMenu?: any;\n}\n\nconst defaultProps: IMessagesProps = {\n user: undefined,\n group: undefined,\n hideMessageComposer: false,\n disableTyping: false,\n messageHeaderConfiguration: new MessageHeaderConfiguration({}),\n messageListConfiguration: new MessageListConfiguration({}),\n messageComposerConfiguration: new MessageComposerConfiguration({}),\n threadedMessagesConfiguration: new ThreadedMessagesConfiguration({}),\n detailsConfiguration: new DetailsConfiguration({}),\n customSoundForIncomingMessages: \"\",\n customSoundForOutgoingMessages: \"\",\n disableSoundForMessages: false,\n messagesStyle: new MessagesStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"white\",\n borderRadius: \"none\",\n border: \"1px solid rgba(20, 20, 20, 0.1)\"\n }),\n messageHeaderView: null,\n messageComposerView: null,\n messageListView: null,\n hideMessageHeader: false,\n hideDetails: false,\n auxiliaryMenu: null,\n};\n\n\n\nconst CometChatMessages = (props: IMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n\n const {\n user,\n group,\n hideMessageComposer,\n disableTyping,\n messageHeaderConfiguration,\n messageListConfiguration,\n messageComposerConfiguration,\n threadedMessagesConfiguration,\n detailsConfiguration,\n customSoundForIncomingMessages,\n customSoundForOutgoingMessages,\n disableSoundForMessages,\n messagesStyle,\n messageHeaderView,\n messageComposerView,\n messageListView,\n hideMessageHeader,\n hideDetails,\n auxiliaryMenu,\n } = props;\n const liveReactionName = \"heart\";\n const [loggedInUser, setLoggedInUser] = useState(null);\n\n const [activeUser, setActiveUser] = useState(user);\n const [activeGroup, setActiveGroup] = useState(group);\n\n const ccHeaderMenuRef = useRef(null);\n const threadMessageObjectRef = useRef(null);\n const parentBubbleViewCallbackRef = useRef(null);\n\n const [liveReaction, setLiveReaction] = useState(false);\n const [openDetails, setOpenDetails] = useState(false);\n const [openThreadedMessages, setOpenThreadedMessages] = useState(false);\n\n const [showPanelView, setShowPanelView] = useState(false);\n const assistBotChatView = useRef(null);\n\n let messagesRequestBuilder = useMemo(() => {\n if (user) {\n return new CometChat.MessagesRequestBuilder()\n .setUID(user.getUid())\n .setCategories(\n ChatConfigurator.getDataSource().getAllMessageCategories()\n )\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .setLimit(20)\n .hideReplies(true);\n } else if (group) {\n return new CometChat.MessagesRequestBuilder()\n .setGUID(group.getGuid())\n .setCategories(\n ChatConfigurator.getDataSource().getAllMessageCategories()\n )\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .setLimit(20)\n .hideReplies(true);\n }\n }, [user, group]);\n\n let reactionName: string = messageComposerConfiguration?.LiveReactionIconURL || LiveReactionIcon,\n infoIconURL: string = InfoIcon;\n\n const liveReactionStart = useCallback(\n (reactionName: string) => {\n if (liveReaction) {\n reactionName = \"\";\n setLiveReaction(false);\n } else {\n setLiveReaction(true);\n setTimeout(() => {\n reactionName = \"\";\n setLiveReaction(false);\n }, 1500);\n }\n },\n [liveReaction, setLiveReaction]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n\n const ccLiveReaction = CometChatMessageEvents.ccLiveReaction.subscribe(\n (reactionName: any) => {\n if (!openThreadedMessages && reactionName && reactionName === liveReactionName) {\n liveReactionStart(reactionName);\n }\n }\n );\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (value: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group?.getGuid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n setActiveGroup(value);\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (activeGroup?.getGuid() === item.leftGroup.getGuid()) {\n if (loggedInUser?.getUid() === item?.userLeft.getUid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n setActiveGroup(item.leftGroup);\n }\n }\n );\n const ccUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(\n (blockedUser: CometChat.User) => {\n if (activeUser?.getUid() === blockedUser.getUid()) {\n blockedUser.setBlockedByMe(true);\n setActiveUser(blockedUser);\n }\n }\n );\n const ccUserUnBlocked = CometChatUserEvents.ccUserUnblocked.subscribe(\n (unblockedUser: CometChat.User) => {\n if (activeUser?.getUid() === unblockedUser.getUid()) {\n unblockedUser.setBlockedByMe(false);\n setActiveUser(unblockedUser);\n }\n }\n );\n\n const ccShowPanel = CometChatUIEvents.ccShowPanel.subscribe((data) => {\n if (data.position === PanelAlignment.messages) {\n assistBotChatView.current = data.child;\n setShowPanelView(true);\n }\n });\n\n const ccHidePanel = CometChatUIEvents.ccHidePanel.subscribe(\n (alignment) => {\n if (alignment === PanelAlignment.messages) {\n assistBotChatView.current = null;\n setShowPanelView(false);\n }\n }\n );\n\n return () => {\n try {\n ccLiveReaction?.unsubscribe();\n ccGroupDeleted?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccUserBlocked?.unsubscribe();\n ccUserUnBlocked?.unsubscribe();\n ccShowPanel?.unsubscribe();\n ccHidePanel?.unsubscribe();\n } catch (error: any) {\n console.log(\"error\", error);\n }\n };\n } catch (error: any) {\n console.log(\"error\", error);\n }\n }, [\n openThreadedMessages,\n liveReactionStart,\n setOpenDetails,\n setOpenThreadedMessages,\n activeGroup,\n activeUser,\n loggedInUser,\n group,\n ]);\n\n const openThreadView = (\n message: CometChat.BaseMessage,\n callback: Function\n ) => {\n threadMessageObjectRef.current = message;\n parentBubbleViewCallbackRef.current = callback;\n setOpenThreadedMessages(true);\n };\n\n const openDetailsPage = () => setOpenDetails(true);\n const closeDetailsPage = () => {\n setOpenDetails(false);\n };\n\n const closeThreadView = () => {\n threadMessageObjectRef.current = null;\n parentBubbleViewCallbackRef.current = null;\n setOpenThreadedMessages(false);\n };\n function getDetailsTemplate() {\n if (props.detailsConfiguration?.data) {\n return props.detailsConfiguration?.data(props.user, props.group);\n }\n return;\n }\n\n const getHeaderMenu = useCallback(() => {\n if (messageHeaderConfiguration?.menu) {\n return messageHeaderConfiguration.menu(activeUser, activeGroup);\n }\n const defaultAuxiliaryMenu =\n ChatConfigurator.getDataSource().getAuxiliaryHeaderMenu(\n activeUser,\n activeGroup\n );\n return (\n <>\n {auxiliaryMenu\n ? auxiliaryMenu\n : defaultAuxiliaryMenu.map((auxMenu: any) => auxMenu)}\n {!hideDetails ? (\n \n \n \n ) : null}\n \n );\n }, [\n messageHeaderConfiguration,\n activeUser,\n activeGroup,\n auxiliaryMenu,\n hideDetails,\n infoIconURL,\n ]);\n\n const getMessageHeaderComponent = () => {\n return (\n \n );\n };\n\n const getMessageHeader = () => {\n if (hideMessageHeader) {\n return null;\n }\n\n return (\n
    \n {messageHeaderView ? messageHeaderView : getMessageHeaderComponent()}\n
    \n );\n };\n\n const getMessageListComponent = () => {\n return (\n \n );\n };\n\n const getMessageList = () => {\n if (messageListView) {\n return messageListView;\n }\n\n return (\n
    \n {getMessageListComponent()}\n
    \n );\n };\n\n const getMessageComposerComponent = () => {\n return (\n !hideMessageComposer ?\n : null\n )\n };\n\n const getMessageComposer = () => {\n if (hideMessageComposer) {\n return null;\n }\n\n if (messageComposerView) {\n return messageComposerView;\n }\n\n return (\n \n {getMessageComposerComponent()}\n \n );\n };\n\n const getThreadedMessagesComponent = () => {\n if (openThreadedMessages && threadMessageObjectRef.current) {\n return (\n \n );\n }\n\n return null;\n };\n\n const getThreadedMessages = () => {\n if (openThreadedMessages && threadMessageObjectRef.current) {\n return (\n
    \n {getThreadedMessagesComponent()}\n
    \n );\n }\n return null;\n };\n const getLiveReactionStyle = () => {\n return {\n height: \"20px\",\n width: \"25px\",\n background: messageComposerConfiguration?.messageComposerStyle?.liveReactionIconTint || \"red\"\n }\n }\n\n const getLiveReaction = () => {\n return liveReaction ? (\n
    \n \n
    \n ) : null;\n };\n\n const getDetailsComponent = () => {\n return (\n \n );\n };\n\n const getDetails = () => {\n return openDetails ? (\n
    \n {getDetailsComponent()}\n
    \n ) : null;\n };\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n ccHeaderMenuRef,\n setOpenDetails,\n messageListConfiguration,\n user ?? null,\n setActiveUser,\n group ?? null,\n setActiveGroup,\n setOpenThreadedMessages\n );\n\n if (!activeUser && !activeGroup) {\n return null;\n }\n\n return (\n \n {showPanelView && assistBotChatView.current ? (\n
    \n {assistBotChatView.current}{\" \"}\n
    \n ) : null}\n
    \n {getMessageHeader()}\n {getMessageList()}\n {getMessageComposer()}\n
    \n {getThreadedMessages()}\n {getLiveReaction()}\n {getDetails()}\n \n );\n};\n\nCometChatMessages.defaultProps = defaultProps;\nexport { CometChatMessages };\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAUCAYAAACXtf2DAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAFAAAAAAnxZisAAACpElEQVQ4Ea1VzUsVURQ/5868UrEg/AMy0NTMRQRBJfIQszKxgh5ByzbVIooiiDbZBwUtXAWJtGgRJW0MQsxnxfhRIbgpsqcQtajoA8uITGfu3Hs6Z+zJU3pq+n4wc+fee87vd+bcM2cQ5mB0Z+0WMuERQNiNgO+UgtYAgs7K7uffM01fVlevyc9391iAo5bsOkT1gPdvlvd4Q5l2mJ68bahdG2rTwvMmB9HV1gKP0WWA3oSWzlc86rsj9qm6mkOuwgsKsMQSgeErxpEYS5oQOpSLp0u7vA9iGwmkdsWLlaGuPKXKJw3TyU4GYizEYG+OFglXAt7gOWomzoRY5TsO+Na+8pEaqpJ97/FeIuFUjX++X+C4jb+ZPBsUi3C0Wvb5OSaRZ0MBi0xY01GxvfYApuprtjkE/ZZAZXeZpkrnczF2Ek9oaKtCi2c4ogXJRUKIFyJP2zmolHLUSZeAGjWXQq4RcpHwMTVxIeCwVEuuIWfGSPGIl/9OcqohnA7QVWUCeMg1PyJ1nCsIl7ZmVIcqqSo97xen6aK8UC4SleZB5VwS7ijs8p7e9sDQLflIlos8R4FPdLs9Gb8rXJEAq5K7YurEpLHeckTEd8rYp77G483QHNXmTOJLuwZ/ukof9I0dWIqI+PjWDFqHEps870c6EzMCslCSfPYVQtzvG9MpDos5E7GZJrc9gfX3buju/5Qml3GWgCyUed7YtwmdYJHrLqqom8r6vyDfT0whsG3bqrzV+6oeD36ZazdvkCN1NYe5nq8xSRHndpYvd14Igca5dZxdn+xtm7WZMZlXQOxe18c3ukQtLLJDc0cUSPsOiJ6AMqfKugdeRItZbgsKiN/Q5s2xwqLCYw7hOWl3/FO5oj+OtVYODwdZeJe2LD+mVDxe/D/efwCuAQs2cnkFkQAAAABJRU5ErkJggg==\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n\tsubscribeToEvents: Function,\n\tccHeaderMenuRef: any,\n\tsetOpenDetails: any,\n\tmessageListConfiguration: any,\n user: CometChat.User | null,\n setActiveUser: Function,\n group: CometChat.Group | null,\n setActiveGroup: Function,\n setOpenThreadedMessages: any\n) {\n\tuseEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (userObject: CometChat.User | null) => {\n if (userObject) {\n setLoggedInUser(userObject);\n }\n }\n );\n },\n [setLoggedInUser]\n );\n\n useEffect(\n () => {\n const element = ccHeaderMenuRef.current;\n if (!element) return;\n const headerButtonClick = (event: any) => {\n setOpenDetails(true);\n }\n if (!messageListConfiguration?.menu) {\n element.addEventListener(\"cc-menu-clicked\", headerButtonClick);\n } else {\n element.removeEventListener(\"cc-menu-clicked\", headerButtonClick);\n }\n\n return () => {\n element.removeEventListener(\"cc-menu-clicked\", headerButtonClick);\n }\n }, [messageListConfiguration, ccHeaderMenuRef, setOpenDetails]\n );\n\n useEffect(()=>{\n if(user){\n setActiveGroup(null);\n setActiveUser((previousUser: CometChat.User) => {\n\n if(previousUser?.getUid() !== user?.getUid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n return user;\n });\n }\n \n }, [user, setActiveUser, setActiveGroup, setOpenDetails, setOpenThreadedMessages]);\n\n useEffect(()=>{\n if(group){\n setActiveUser(null);\n setActiveGroup((previousGroup: CometChat.Group) => {\n\n if(previousGroup?.getGuid() !== group?.getGuid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n return group;\n });\n }\n \n }, [group, setActiveUser, setActiveGroup, setOpenDetails, setOpenThreadedMessages]);\n\n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n }\n return () => {\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, subscribeToEvents]);\n\n}\n\nexport { Hooks };\n","import {\n CometChatConversationEvents,\n CometChatGroupEvents,\n CometChatUIEvents,\n CometChatUIKitConstants,\n IGroupLeft,\n IGroupMemberAdded,\n IGroupMemberJoined,\n IGroupMemberKickedBanned,\n IOwnershipChanged,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n ContactsConfiguration,\n ConversationsConfiguration,\n MessageComposerConfiguration,\n MessageHeaderConfiguration,\n MessagesConfiguration,\n WithMessagesStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n getBackdropStyle,\n getButtonStyle,\n getConversationsStyle,\n getConversationsWrapperStyles,\n getEmptyMessageLayoutStyle,\n getLabelStyle,\n getMessageComposerStyle,\n getMessageHeaderStyle,\n getMessagesStyle,\n getWithMessagesMainStyle,\n getWithMessagesSidebarStyle,\n} from \"./style\";\nimport { useCallback, useContext, useRef, useState } from \"react\";\nimport { useCometChatErrorHandler, useStateRef } from \"../CometChatCustomHooks\";\n\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatContacts } from \"../CometChatContacts\";\nimport { CometChatConversations } from \"../CometChatConversations\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport StartConversationIcon from \"./assets/StartConversation.svg\";\n\ninterface IConversationsWithMessagesProps {\n user?: CometChat.User;\n group?: CometChat.Group;\n isMobileView?: boolean;\n messageText?: string;\n conversationsWithMessagesStyle?: WithMessagesStyle;\n messagesConfiguration?: MessagesConfiguration;\n conversationsConfiguration?: ConversationsConfiguration;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n startConversationConfiguration?: ContactsConfiguration;\n startConversationIconURL?: string;\n}\n\nconst defaultProps: IConversationsWithMessagesProps = {\n user: undefined,\n group: undefined,\n isMobileView: false,\n messageText: \"\",\n conversationsWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n conversationsConfiguration: new ConversationsConfiguration({}),\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n startConversationConfiguration: new ContactsConfiguration({}),\n startConversationIconURL: StartConversationIcon,\n};\n\nconst CometChatConversationsWithMessages = (\n props: IConversationsWithMessagesProps\n) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n user,\n group,\n isMobileView,\n messageText,\n conversationsWithMessagesStyle,\n messagesConfiguration,\n conversationsConfiguration,\n startConversationConfiguration,\n onError,\n startConversationIconURL,\n } = props;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [activeConversation, setActiveConversation] =\n useState(null);\n const [activeUser, setActiveUser] = useState(user ?? null);\n const [activeGroup, setActiveGroup] = useState(group ?? null);\n const [showCometChatContacts, setShowCometChatContacts] = useState(false);\n const activeChatRef = useRef(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n activeChatRef.current = activeConversation\n const [startConversationBtnElement, setStartConversationBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n\n const setActiveChat = useCallback(async () => {\n try {\n let type: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let conversationWith: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n if (typeof conversationWith === \"string\") {\n setActiveConversation(\n await CometChat.getConversation(conversationWith, type)\n );\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeUser, activeGroup, setActiveConversation, onErrorCallback]);\n\n const onBack = () => {\n setActiveUser(null);\n setActiveGroup(null);\n setActiveConversation(null);\n };\n\n const onItemClick = (conversation: CometChat.Conversation) => {\n try {\n activeChatRef.current = conversation\n setActiveConversation(conversation);\n if (\n conversation.getConversationType() &&\n conversation.getConversationType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n setActiveGroup(null);\n setActiveUser(conversation.getConversationWith() as CometChat.User);\n } else if (\n conversation.getConversationType() &&\n conversation.getConversationType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n setActiveUser(null);\n setActiveGroup(conversation.getConversationWith() as CometChat.Group);\n } else {\n return;\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n const removeChatOnGroupAction = useCallback((message: CometChat.Action, leavingUser: CometChat.User, user?: CometChat.User) => {\n const activeChat = activeChatRef.current\n const currentuser = loggedInUser || user\n const isSameUser = currentuser?.getUid() === leavingUser.getUid();\n const actionForGroup = message.getActionFor() instanceof CometChat.Group;\n\n if (isSameUser && activeChat && activeChat.getConversationWith() instanceof CometChat.Group) {\n let group = activeChat.getConversationWith() as CometChat.Group;\n\n if (actionForGroup) {\n let actionOnGroup = message.getActionFor() as CometChat.Group;\n\n if (actionOnGroup.getGuid() === group.getGuid()) {\n setActiveConversation(null);\n setActiveGroup(null);\n setActiveUser(null)\n }\n }\n }\n }, [loggedInUser, setLoggedInUser, activeUser, activeGroup, activeChatRef])\n const attachGroupListener = (user?: CometChat.User) => {\n const listenerId = \"ConversationWithMessages_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberKicked: (message: CometChat.Action, kickedUser: CometChat.User) => {\n removeChatOnGroupAction(message, kickedUser, user);\n\n },\n onGroupMemberBanned: (message: CometChat.Action, bannedUser: CometChat.User) => {\n removeChatOnGroupAction(message, bannedUser, user);\n\n },\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n const removeActiveChatList = useCallback(\n (conversation: CometChat.Conversation) => {\n try {\n const conversationType = conversation.getConversationType();\n const conversationWith = conversation.getConversationWith();\n if (\n conversationType ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n activeUser &&\n activeUser.getUid() === (conversationWith as CometChat.User).getUid()\n ) {\n setActiveUser(null);\n } else if (\n conversationType ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n activeGroup &&\n activeGroup.getGuid() ===\n (conversationWith as CometChat.Group).getGuid()\n ) {\n setActiveGroup(null);\n } else {\n return;\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [activeGroup, setActiveGroup, activeUser, setActiveUser, onErrorCallback]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccConversationDeleted =\n CometChatConversationEvents.ccConversationDeleted.subscribe(\n (conversation: CometChat.Conversation) => {\n removeActiveChatList(conversation);\n }\n );\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (group: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group.getGuid()) {\n setActiveConversation(null);\n setActiveGroup(null);\n }\n }\n );\n const ccGroupMemberAdded =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.userAddedIn!.getGuid()\n ) {\n setActiveGroup(item?.userAddedIn);\n }\n }\n );\n const ccGroupMemberBanned =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.kickedFrom!.getGuid()\n ) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n );\n const ccGroupMemberJoined =\n CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.joinedGroup!.getGuid()\n ) {\n setActiveGroup(item?.joinedGroup);\n }\n }\n );\n const ccGroupMemberKicked =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.kickedFrom!.getGuid()\n ) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n );\n const ccOwnershipChanged =\n CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.group!.getGuid()\n ) {\n setActiveGroup(item?.group);\n setActiveConversation((prevState) => {\n if (prevState) {\n let tempConversation: CometChat.Conversation =\n CometChatUIKitUtility.clone(prevState);\n tempConversation.setConversationWith(item?.group);\n return tempConversation;\n }\n return prevState;\n });\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.leftGroup!.getGuid() &&\n loggedInUser?.getUid() === item?.userLeft?.getUid()\n ) {\n setActiveGroup(null);\n setActiveConversation(null);\n }\n }\n );\n\n const ccOpenChat = CometChatUIEvents.ccOpenChat.subscribe((item) => {\n const uid = item.user?.getUid()\n if (uid) {\n CometChat.getConversation(uid, CometChatUIKitConstants.MessageReceiverType.user).then((conversation) => {\n onItemClick(conversation);\n })\n }\n })\n\n return () => {\n try {\n ccConversationDeleted?.unsubscribe();\n ccGroupDeleted?.unsubscribe();\n ccGroupMemberAdded?.unsubscribe();\n ccGroupMemberBanned?.unsubscribe();\n ccGroupMemberJoined?.unsubscribe();\n ccGroupMemberKicked?.unsubscribe();\n ccOwnershipChanged?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccOpenChat?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [\n activeGroup,\n setActiveConversation,\n setActiveGroup,\n removeActiveChatList,\n onErrorCallback,\n loggedInUser,\n ]);\n\n const showCometChatContactsView = () => setShowCometChatContacts(true);\n const hideCometChatContactsView = () => setShowCometChatContacts(false);\n\n const StartConversationButton = !showCometChatContacts ? (\n \n {\" \"}\n \n ) : null;\n\n const onContactsItemClick = (\n user?: CometChat.User,\n group?: CometChat.Group\n ) => {\n if (user) {\n setActiveGroup(null);\n setActiveUser(user);\n hideCometChatContactsView();\n } else if (group) {\n setActiveUser(null);\n setActiveGroup(group);\n hideCometChatContactsView();\n }\n };\n\n const getMessageHeaderConfiguration = () => {\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack:\n messagesConfiguration?.messageHeaderConfiguration?.onBack || onBack,\n hideBackButton: (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(\n conversationsWithMessagesStyle,\n messagesConfiguration,\n isMobileView\n ),\n ...messagesConfiguration?.messageHeaderConfiguration\n ?.messageHeaderStyle,\n },\n } as MessageHeaderConfiguration;\n };\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(\n conversationsWithMessagesStyle,\n messagesConfiguration,\n isMobileView\n ),\n ...messagesConfiguration?.messageComposerConfiguration\n ?.messageComposerStyle,\n },\n } as MessageComposerConfiguration;\n }\n\n const getConversationsComponent = () => {\n return (\n \n );\n };\n\n const getSidebarContent = () => {\n return (\n \n {getConversationsComponent()}\n \n );\n };\n\n const getMessagesComponent = () => {\n return (\n \n );\n };\n\n const getMainContent = () => {\n return !showCometChatContacts && (activeUser || activeGroup) ? (\n \n {getMessagesComponent()}\n \n ) : null;\n };\n\n const getDecoratorMessageContent = () => {\n\n const text = messageText ? messageText : localize(\"NO_CHATS_SELECTED\");\n\n return (\n \n \n \n );\n };\n\n const getDecoratorMessage = () =>\n !showCometChatContacts && !activeUser && !activeGroup\n ? getDecoratorMessageContent()\n : null;\n\n const getContacts = () =>\n showCometChatContacts && (\n \n );\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n onErrorCallback,\n setActiveChat,\n user,\n group,\n startConversationBtnElement,\n showCometChatContactsView,\n showCometChatContacts,\n hideCometChatContactsView,\n setActiveUser,\n setActiveGroup,\n attachGroupListener\n );\n\n return (\n \n {getSidebarContent()}\n {getMainContent()}\n {getDecoratorMessage()}\n {getContacts()}\n \n );\n};\n\nCometChatConversationsWithMessages.defaultProps = defaultProps;\nexport { CometChatConversationsWithMessages };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FNew%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FNew%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9288822%2C11.8990317%20L7.62932866%2C12.3710104%20L8.10043948%2C9.07071466%20L16.5857676%2C0.585763632%20C17.3668205%2C-0.195254544%2018.6331574%2C-0.195254544%2019.4142103%2C0.585763632%20C20.1952632%2C1.36678181%2020.1952632%2C2.63306247%2019.4142103%2C3.41408064%20L10.9288822%2C11.8990317%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2215.6426571%22%20y1%3D%221.52883225%22%20x2%3D%2218.4710998%22%20y2%3D%224.35714926%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C12.0003604%20L16%2C18.6667267%20C16%2C19.4030732%2015.4030369%2C20%2014.6666577%2C20%20L1.33333252%2C20%20C0.596953301%2C20%200%2C19.4030732%200%2C18.6667267%20L0%2C5.33399414%20C0%2C4.59764765%200.596953301%2C4.00072088%201.33333252%2C4.00072088%20L8%2C4.00072088%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: Function,\n subscribeToEvents: Function,\n onErrorCallback: Function,\n setActiveChat: any,\n user: any,\n group: any,\n startConversationBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null,\n showCometChatContactsView: Function,\n showCometChatContacts: any,\n hideCometChatContactsView: Function,\n setActiveUser: any,\n setActiveGroup: any,\n attachGroupListener: any\n) {\n useEffect(\n () => {\n let removeListener: any;\n CometChat.getLoggedinUser().then(\n (user) => {\n if (attachGroupListener) {\n removeListener = attachGroupListener(user);\n }\n setLoggedInUser(user);\n return () => {\n if (removeListener) {\n removeListener();\n }\n };\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(() => {\n let unsubscribeFromEvents: () => void;\n if (loggedInUser) {\n unsubscribeFromEvents = subscribeToEvents();\n setActiveChat();\n }\n return () => {\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, user, group, setActiveChat, subscribeToEvents]);\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the start conversation button element\n */\n () => {\n if (!startConversationBtnElement) {\n return;\n }\n async function handleEvent() {\n if (showCometChatContacts) {\n hideCometChatContactsView()\n }\n else {\n showCometChatContactsView()\n }\n\n }\n const eventName = \"cc-button-clicked\";\n startConversationBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n startConversationBtnElement.removeEventListener(eventName, handleEvent);\n };\n }, [startConversationBtnElement, showCometChatContactsView, hideCometChatContactsView, showCometChatContacts]);\n\n useEffect(() => {\n setActiveUser(user);\n }, [user, setActiveUser]);\n\n useEffect(() => {\n setActiveGroup(group);\n }, [group, setActiveGroup])\n\n}\n\nexport { Hooks };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatTheme, fontHelper } from '@cometchat/uikit-resources';\nimport { WithMessagesStyle, JoinGroupConfiguration, MessageHeaderStyle, MessageHeaderConfiguration, CreateGroupConfiguration, GroupsStyle, GroupsConfiguration, MessagesConfiguration, MessagesStyle, BaseStyle } from '@cometchat/uikit-shared';\nimport { LabelStyle, JoinGroupStyle, ListItemStyle, CreateGroupStyle, BackdropStyle } from '@cometchat/uikit-elements';\nimport { CSSProperties } from 'react';\n\nconst labelStyle: LabelStyle = {\n height: '100%',\n width: '100%',\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: 'flex',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: 'calc(100% - 280px)',\n height: '100%'\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0',\n left: '0'\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'inherit',\n border: 'none',\n borderRadius: 'inherit',\n width: '100%',\n height: 'auto'\n} as CSSProperties;\n\n\nconst WithMessagesSidebarStyle = {\n width: '280px',\n height: '100%',\n position: 'relative',\n} as CSSProperties;\n\nexport const getGroupsWrapperStyles = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n return {\n ...WithMessagesWrapperStyle,\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: '0',\n background: theme.palette.getBackground(),\n ...groupsWithMessagesStyle\n } as CSSProperties\n}\n\nexport const getWithMessagesSidebarStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme, isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeGroup);\n } else {\n return getDesktopViewSidebarStyle(groupsWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (activeGroup: CometChat.Group | undefined) => {\n\n const visibility = activeGroup ? { \"visibility\": \"hidden\" } : { \"visibility\": \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties\n}\n\nconst getDesktopViewSidebarStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight: groupsWithMessagesStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`\n } as CSSProperties\n}\n\nexport const getWithMessagesMainStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeGroup);\n } else {\n return getDesktopViewMainStyle(groupsWithMessagesStyle);\n }\n}\n\nconst getMobileViewMainStyle = (activeGroup: CometChat.Group | undefined) => {\n\n const visibility = activeGroup ? { \"visibility\": \"visible\" } : { \"visibility\": \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties;\n}\n\nconst getDesktopViewMainStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`\n }\n}\n\nexport const getLabelStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n return {\n ...labelStyle,\n textFont: groupsWithMessagesStyle?.messageTextFont || fontHelper(theme.typography.title1),\n textColor: groupsWithMessagesStyle?.messageTextColor || theme.palette.getAccent600(),\n } as LabelStyle;\n}\n\nexport const getGroupsStyle = (groupsConfiguration: GroupsConfiguration | undefined) => {\n\n const groupsStyle = groupsConfiguration?.groupsStyle;\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...groupsStyle\n } as GroupsStyle;\n}\n\nexport const getMessageHeaderStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `${borderRadius} ${borderRadius} 0 0` : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n } as MessageHeaderStyle;\n}\n\nexport const getMessageComposerStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `0 0 ${borderRadius} ${borderRadius}` : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n}\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n withMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: withMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n\n let visibility = { visibility: 'hidden' };\n if (!activeGroup && !isMobileView) {\n visibility = { \"visibility\": \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`\n } as CSSProperties\n}\n\nexport const getJoinGroupWrapperStyle = (isMobileView: boolean | undefined) => {\n\n if (isMobileView) {\n return {\n ...MobileLayoutStyle,\n background: 'inherit',\n borderRadius: 'inherit'\n }\n } else {\n return {\n width: `calc(100% - 280px)`,\n background: 'inherit',\n borderRadius: 'inherit'\n }\n }\n}\n\nexport const getJoinGroupStyle = (JoinGroupConfiguration: JoinGroupConfiguration | undefined, theme: CometChatTheme) => {\n const configStyle = JoinGroupConfiguration?.joinGroupStyle;\n return {\n width: configStyle?.width || \"100%\",\n height: configStyle?.height || \"100%\",\n boxShadow: configStyle?.boxShadow || 'none',\n background: configStyle?.background || \"transparent\",\n border: configStyle?.border || \"0\",\n borderRadius: configStyle?.borderRadius || \"inherit\",\n titleTextFont: configStyle?.titleTextFont || fontHelper(theme.typography.heading),\n titleTextColor: configStyle?.titleTextFont || theme.palette.getAccent700(),\n passwordInputPlaceholderTextFont: configStyle?.passwordInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputPlaceholderTextColor: configStyle?.passwordInputPlaceholderTextColor || theme.palette.getAccent600(),\n passwordInputBackground: configStyle?.passwordInputBackground || theme.palette.getAccent50(),\n passwordInputBorder: configStyle?.passwordInputBorder || \"none\",\n passwordInputBorderRadius: configStyle?.passwordInputBorderRadius || \"8px\",\n passwordInputBoxShadow: configStyle?.passwordInputBoxShadow || `${theme.palette.getAccent50()} 0 0 0 1px`,\n passwordInputTextFont: configStyle?.passwordInputTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputTextColor: configStyle?.passwordInputTextColor || theme.palette.getAccent(),\n joinButtonTextFont: configStyle?.joinButtonTextFont || fontHelper(theme.typography.title2),\n joinButtonTextColor: configStyle?.joinButtonTextColor || theme.palette.getBackground(),\n joinButtonBackground: configStyle?.joinButtonBackground || theme.palette.getPrimary(),\n joinButtonBorderRadius: configStyle?.joinButtonBorderRadius || \"8px\",\n joinButtonBorder: configStyle?.joinButtonBorder || \"none\",\n errorTextFont: configStyle?.errorTextFont || fontHelper(theme.typography.subtitle1),\n errorTextColor: configStyle?.errorTextFont || theme.palette.getError()\n } as JoinGroupStyle;\n}\n\nexport const getMessageHeaderSlotStyle = () => {\n return {\n position: 'absolute',\n top: '0',\n left: '0'\n } as CSSProperties;\n}\n\nexport const getJoinGroupMessageHederStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messageHeaderConfiguration: MessageHeaderConfiguration | undefined, theme: CometChatTheme) => {\n\n const configStyle = messageHeaderConfiguration?.messageHeaderStyle;\n return {\n background: configStyle?.background || 'inherit',\n border: 'none',\n borderRadius: configStyle?.borderRadius || groupsWithMessagesStyle?.borderRadius || 'inherit',\n onlineStatusColor: configStyle?.onlineStatusColor || theme.palette.getSuccess(),\n privateGroupIconBackground: configStyle?.privateGroupIconBackground || theme.palette.getSuccess(),\n passwordGroupIconBackground: configStyle?.passwordGroupIconBackground || \"RGB(247, 165, 0)\",\n backButtonIconTint: configStyle?.backButtonIconTint || theme.palette.getPrimary(),\n subtitleTextColor: configStyle?.subtitleTextColor || theme.palette.getAccent600(),\n subtitleTextFont: configStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n typingIndicatorTextColor: configStyle?.typingIndicatorTextColor || theme.palette.getPrimary(),\n typingIndicatorTextFont: configStyle?.typingIndicatorTextFont || fontHelper(theme.typography.subtitle1),\n } as MessageHeaderStyle;\n}\n\nexport const getListItemStyle = (messageHeaderConfiguration: MessageHeaderConfiguration | undefined, theme: CometChatTheme) => {\n\n const configStyle = messageHeaderConfiguration?.listItemStyle;\n return {\n width: configStyle?.width || \"100%\",\n height: configStyle?.height || \"45px\",\n background: configStyle?.background || \"inherit\",\n hoverBackground: configStyle?.hoverBackground || \"transparent\",\n activeBackground: configStyle?.activeBackground || \"transparent\",\n borderRadius: configStyle?.borderRadius || \"0\",\n titleFont: configStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: configStyle?.titleColor || theme.palette.getAccent(),\n border: configStyle?.border || \"none\",\n separatorColor: configStyle?.separatorColor || \"\",\n } as ListItemStyle;\n}\n\nexport const getBackdropStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined): BackdropStyle => {\n return {\n height: groupsWithMessagesStyle?.height,\n width: groupsWithMessagesStyle?.width,\n position: 'absolute'\n } as BaseStyle;\n}\n\nexport const getCreateGroupWrapperStyle = (isMobileView: boolean | undefined) => {\n if (isMobileView) {\n return {\n ...MobileLayoutStyle,\n background: 'inherit',\n borderRadius: 'inherit'\n } as CSSProperties;\n }\n}\n\nexport const getCreateGroupStyle = (createGroupConfiguration: CreateGroupConfiguration | undefined, theme: CometChatTheme, isMobileView: boolean | undefined) => {\n\n let width = \"360px\",\n height = '500px';\n if (isMobileView) {\n\n width = '100%';\n height = '100%';\n }\n\n const configStyle = createGroupConfiguration?.createGroupStyle;\n return {\n width: configStyle?.width || width,\n height: configStyle?.height || height,\n border: configStyle?.border || '0 none',\n borderRadius: configStyle?.borderRadius || '0',\n background: configStyle?.background || theme.palette.getBackground(),\n boxShadow: configStyle?.boxShadow || `${theme.palette.getAccent100()} 4px 16px 32px 4px`,\n titleTextFont: configStyle?.titleTextFont || fontHelper(theme.typography.heading),\n titleTextColor: configStyle?.titleTextColor || theme.palette.getAccent(),\n groupTypeTextFont: configStyle?.groupTypeTextFont || fontHelper(theme.typography.text3),\n groupTypeBorder: configStyle?.groupTypeBorder || '0 none',\n groupTypeBorderRadius: configStyle?.groupTypeBorderRadius || \"0px\",\n groupTypeTextColor: configStyle?.groupTypeTextColor || theme.palette.getAccent(),\n groupTypeTextBackground: configStyle?.groupTypeTextBackground || \"inherit\",\n groupTypeBackground: configStyle?.groupTypeBackground || theme.palette.getAccent100(),\n groupTypeBoxShadow: configStyle?.groupTypeBoxShadow || \"\",\n activeGroupTypeTextFont: configStyle?.activeGroupTypeTextFont || fontHelper(theme.typography.text3),\n activeGroupTypeTextColor: configStyle?.activeGroupTypeTextColor || theme.palette.getAccent(),\n activeGroupTypeBackground: configStyle?.activeGroupTypeBackground || theme.palette.getAccent900(),\n activeGroupTypeBoxShadow: configStyle?.activeGroupTypeBoxShadow || `${theme.palette.getAccent200()} 0 3px 8px 0`,\n activeGroupTypeBorderRadius: configStyle?.activeGroupTypeBorderRadius || \"8px\",\n activeGroupTypeBorder: configStyle?.activeGroupTypeBorder || \"none\",\n groupTypeTextBoxShadow: configStyle?.groupTypeTextBoxShadow || \"none\",\n groupTypeTextBorderRadius: configStyle?.groupTypeTextBorderRadius || \"7px\",\n closeIconTint: configStyle?.closeIconTint || theme.palette.getPrimary(),\n errorTextFont: configStyle?.errorTextFont || fontHelper(theme.typography.text2),\n errorTextBackground: configStyle?.errorTextBackground || theme.palette.getError(),\n errorTextBorderRadius: configStyle?.errorTextBorderRadius || \"8px\",\n errorTextBorder: configStyle?.errorTextBorder || \"none\",\n errorTextColor: configStyle?.errorTextColor || theme.palette.getError(),\n nameInputPlaceholderTextFont: configStyle?.nameInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n nameInputPlaceholderTextColor: configStyle?.nameInputPlaceholderTextColor || theme.palette.getAccent600(),\n nameInputBackground: configStyle?.nameInputBackground || theme.palette.getAccent100(),\n nameInputTextFont: configStyle?.nameInputTextFont || fontHelper(theme.typography.subtitle1),\n nameInputTextColor: configStyle?.nameInputTextColor || theme.palette.getAccent(),\n nameInputBorder: configStyle?.nameInputBorder || \"none\",\n nameInputBorderRadius: configStyle?.nameInputBorderRadius || \"8px\",\n nameInputBoxShadow: configStyle?.nameInputBoxShadow || `${theme.palette.getAccent100()} 0 0 0 1px`,\n passwordInputPlaceholderTextFont: configStyle?.passwordInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputPlaceholderTextColor: configStyle?.passwordInputPlaceholderTextColor || theme.palette.getAccent600(),\n passwordInputBackground: configStyle?.passwordInputBackground || theme.palette.getAccent100(),\n passwordInputBorder: configStyle?.passwordInputBorder || `none`,\n passwordInputBorderRadius: configStyle?.passwordInputBorderRadius || \"8px\",\n passwordInputBoxShadow: configStyle?.passwordInputBoxShadow || `${theme.palette.getAccent100()} 0 0 0 1px`,\n passwordInputTextFont: configStyle?.passwordInputTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputTextColor: configStyle?.passwordInputTextColor || theme.palette.getAccent(),\n createGroupButtonTextFont: configStyle?.createGroupButtonTextFont || fontHelper(theme.typography.title2),\n createGroupButtonTextColor: configStyle?.createGroupButtonTextColor || theme.palette.getAccent(\"dark\"),\n createGroupButtonBackground: configStyle?.createGroupButtonBackground || theme.palette.getPrimary(),\n createGroupButtonBorderRadius: configStyle?.createGroupButtonBorderRadius || \"8px\",\n createGroupButtonBorder: configStyle?.createGroupButtonBorder || \"none\",\n } as CreateGroupStyle;\n}\n\nexport const createGroupButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: '0',\n background: \"transparent\",\n buttonIconTint: `${theme.palette.getPrimary()}`,\n padding: '0'\n }\n};\n","import { CometChatCreateGroup, CometChatJoinGroup } from \"@cometchat/uikit-elements\";\nimport { CometChatGroupEvents, CometChatUIEvents, CometChatUIKitConstants, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IOwnershipChanged, localize } from \"@cometchat/uikit-resources\";\nimport { CreateGroupConfiguration, GroupsConfiguration, JoinGroupConfiguration, MessageComposerConfiguration, MessageHeaderConfiguration, MessagesConfiguration, WithMessagesStyle } from \"@cometchat/uikit-shared\";\nimport { JSX, useCallback, useContext, useRef, useState } from \"react\";\nimport { createGroupButtonStyle, getBackdropStyle, getCreateGroupStyle, getCreateGroupWrapperStyle, getEmptyMessageLayoutStyle, getGroupsStyle, getGroupsWrapperStyles, getJoinGroupMessageHederStyle, getJoinGroupStyle, getJoinGroupWrapperStyle, getLabelStyle, getListItemStyle, getMessageComposerStyle, getMessageHeaderSlotStyle, getMessageHeaderStyle, getMessagesStyle, getWithMessagesMainStyle, getWithMessagesSidebarStyle } from \"./style\";\nimport { useCometChatErrorHandler, useStateRef } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatGroups } from \"../CometChatGroups\";\nimport { CometChatMessageHeader } from \"../CometChatMessageHeader\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport CreateIcon from \"./assets/create-button.svg\";\nimport { Hooks } from \"./hooks\";\nimport React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\n\nconst CometChatCreateGroupComponent = createComponent({\n tagName: \"cometchat-create-group\",\n elementClass: CometChatCreateGroup,\n react: React,\n})\n\ninterface IGroupsWithMessagesProps {\n group?: CometChat.Group,\n isMobileView?: boolean,\n messageText?: string,\n groupsWithMessagesStyle?: WithMessagesStyle,\n messagesConfiguration?: MessagesConfiguration,\n groupsConfiguration?: GroupsConfiguration,\n createGroupConfiguration?: CreateGroupConfiguration,\n joinGroupConfiguration?: JoinGroupConfiguration,\n onError?: ((error: CometChat.CometChatException) => void) | null\n}\n\nconst defaultProps: IGroupsWithMessagesProps = {\n group: undefined,\n isMobileView: false,\n messageText: \"\",\n groupsWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n groupsConfiguration: new GroupsConfiguration({}),\n createGroupConfiguration: new CreateGroupConfiguration({}),\n joinGroupConfiguration: new JoinGroupConfiguration({}),\n onError: (error: CometChat.CometChatException) => { console.log(error) }\n};\n\nconst CometChatGroupsWithMessages = (props: IGroupsWithMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n group,\n isMobileView,\n messageText,\n groupsWithMessagesStyle,\n messagesConfiguration,\n groupsConfiguration,\n createGroupConfiguration,\n joinGroupConfiguration,\n onError\n } = props;\n\n const createGroupConfigCreateClick = createGroupConfiguration?.createClick;\n const joinGroupConfigOnError = joinGroupConfiguration?.onError;\n const joinGroupConfigJoinClick = joinGroupConfiguration?.joinClick;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [createGroupElement, setCreateGroupRef] = useStateRef(null);\n const [joinGroupElement, setJoinGroupRef] = useStateRef(null);\n const createGroupButtonRef = useRef(null);\n const [openCreateGroupPage, setOpenCreateGroupPage] = useState(false);\n const [openPasswordModal, setOpenPasswordModal] = useState(false);\n const protectedGroup = useRef(undefined);\n\n const [activeGroup, setActiveGroup] = useState(group ?? undefined);\n const [activeUser, setActiveUser] = useState(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n const JoinGroup = createComponent({\n tagName: \"cometchat-join-group\",\n elementClass: CometChatJoinGroup,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n });\n\n const onBack = () => {\n setActiveUser(null);\n setActiveGroup(undefined);\n };\n\n const openCreateGroup = () => setOpenCreateGroupPage(true);\n\n const closeCreateGroup = useCallback(() => {\n setOpenCreateGroupPage(false);\n }, []);\n\n const closeJoinGroup = () => {\n protectedGroup.current = undefined;\n setOpenPasswordModal(false);\n }\n\n\n const onItemClick = (group: CometChat.Group) => {\n\n try {\n setActiveUser(null);\n setOpenPasswordModal(false);\n if (group.getHasJoined()) {\n setActiveGroup(group);\n return;\n }\n if (group.getType() === CometChatUIKitConstants.GroupTypes.password) {\n setActiveGroup(undefined);\n protectedGroup.current = group;\n setOpenPasswordModal(true);\n return;\n }\n CometChat.joinGroup(group).then(\n (groupJoined: CometChat.Group) => {\n setActiveGroup(groupJoined);\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n\n const onGroupJoined = useCallback(\n (event: any) => {\n try {\n let group: CometChat.Group = event?.detail?.response;\n setOpenPasswordModal(false);\n protectedGroup.current = undefined;\n if (group) {\n setActiveGroup(group);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [setActiveGroup, protectedGroup, setOpenPasswordModal, onErrorCallback]\n )\n\n const subscribeToEvents = useCallback(\n () => {\n try {\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (group: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group.getGuid()) {\n setActiveGroup(undefined);\n }\n }\n );\n const ccGroupCreated = CometChatGroupEvents.ccGroupCreated.subscribe(\n (group: CometChat.Group) => {\n if (group) {\n setActiveGroup(group);\n setOpenCreateGroupPage(false);\n }\n }\n );\n const ccGroupMemberAdded = CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (activeGroup && activeGroup.getGuid() === item?.userAddedIn!.getGuid()) {\n setActiveGroup(item?.userAddedIn);\n setOpenCreateGroupPage(false);\n }\n }\n )\n const ccGroupMemberBanned = CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (activeGroup && activeGroup.getGuid() === item?.kickedFrom!.getGuid()) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n )\n const ccGroupMemberJoined = CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (protectedGroup.current && protectedGroup.current.getGuid() === item?.joinedGroup!.getGuid()) {\n closeJoinGroup();\n setActiveGroup(item?.joinedGroup);\n }\n }\n )\n const ccGroupMemberKicked = CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (activeGroup && activeGroup.getGuid() === item?.kickedFrom!.getGuid()) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n )\n const ccOwnershipChanged = CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (activeGroup && activeGroup.getGuid() === item?.group!.getGuid()) {\n setActiveGroup(item?.group);\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (activeGroup && activeGroup.getGuid() === item?.leftGroup!.getGuid() && loggedInUser?.getUid() === item?.userLeft?.getUid()) {\n setActiveGroup(undefined);\n }\n }\n );\n const ccOpenChat = CometChatUIEvents.ccOpenChat.subscribe((item) => {\n const user = item.user\n if (user) {\n setActiveGroup(undefined);\n setActiveUser(user);\n }\n });\n\n return () => {\n ccGroupDeleted.unsubscribe();\n ccGroupMemberAdded.unsubscribe();\n ccGroupMemberBanned.unsubscribe();\n ccGroupMemberJoined.unsubscribe();\n ccGroupMemberKicked.unsubscribe();\n ccOwnershipChanged.unsubscribe();\n ccGroupLeft.unsubscribe();\n ccGroupCreated.unsubscribe();\n ccOpenChat.unsubscribe();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeGroup, setActiveGroup, protectedGroup, setActiveUser, setOpenCreateGroupPage, onErrorCallback, loggedInUser]\n )\n\n const getJoinGroupHeaderView = useCallback((protectedGroup: CometChat.Group | undefined) => {\n\n if (!isMobileView) {\n return null;\n }\n\n let messageHeaderConfiguration = joinGroupConfiguration?.messageHeaderConfiguration;\n\n return (\n
    \n \n
    \n )\n }, [groupsWithMessagesStyle, isMobileView, joinGroupConfiguration?.messageHeaderConfiguration, theme]);\n\n const getCreateGroupComponent = () => {\n\n return (\n \n )\n }\n\n const getCreateGroup = () => {\n\n if (!isMobileView) {\n return (\n {getCreateGroupComponent()}\n );\n } else {\n return (\n
    \n {getCreateGroupComponent()}\n
    \n )\n }\n }\n\n const getJoinGroup = () => {\n return (\n
    \n \n\n {getJoinGroupHeaderView(protectedGroup.current)}\n \n
    \n )\n }\n\n const getMessageHeaderConfiguration = () => {\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack: messagesConfiguration?.messageHeaderConfiguration?.onBack || closeJoinGroup,\n hideBackButton: messagesConfiguration?.messageHeaderConfiguration?.hideBackButton || (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(groupsWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n },\n\n } as MessageHeaderConfiguration;\n }\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(groupsWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n } as MessageComposerConfiguration;\n }\n\n const getDefaultGroupMenus = useCallback(() => {\n return ();\n }, [theme]);\n\n const getGroupsComponent = () => {\n\n return (\n \n )\n }\n\n const getSidebarContent = () => {\n return (\n
    \n {getGroupsComponent()}\n
    \n )\n }\n\n const getMessagesComponent = () => {\n return (\n \n )\n }\n\n const getMainContent = () => {\n return (\n (activeGroup || activeUser) ?\n
    \n {getMessagesComponent()}\n
    \n : null\n )\n }\n\n const getDecoratorMessageContent = () => {\n const text = messageText ? messageText : localize(\"SELECT__GROUP\");\n return (\n
    \n \n
    \n );\n }\n\n const getDecoratorMessage = () => !(activeGroup || activeUser) && !openPasswordModal && !protectedGroup.current ? getDecoratorMessageContent() : null\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n onErrorCallback,\n isMobileView,\n joinGroupConfiguration,\n group,\n setActiveGroup,\n messagesConfiguration,\n onBack,\n createGroupElement,\n createGroupButtonRef,\n openCreateGroup,\n closeCreateGroup,\n joinGroupElement,\n onGroupJoined,\n createGroupConfigCreateClick,\n joinGroupConfigOnError,\n joinGroupConfigJoinClick\n );\n\n return (\n <>\n
    \n {getSidebarContent()}\n {getMainContent()}\n {getDecoratorMessage()}\n {openPasswordModal && !(activeUser || activeGroup) && protectedGroup.current ? getJoinGroup() : null}\n {openCreateGroupPage ? getCreateGroup() : null}\n
    \n \n );\n}\n\nCometChatGroupsWithMessages.defaultProps = defaultProps;\nexport { CometChatGroupsWithMessages };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%229%22%20y1%3D%220%22%20x2%3D%229%22%20y2%3D%2218%22%20id%3D%22Path-10%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%229%22%20x2%3D%2218%22%20y2%3D%229%22%20id%3D%22Path-11%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { useEffect } from \"react\";\nimport { MessagesConfiguration } from \"@cometchat/uikit-shared\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n isMobileView: any,\n joinGroupConfiguration: any,\n group: any,\n setActiveGroup: any,\n messagesConfiguration: MessagesConfiguration | undefined,\n onBack: Function,\n createGroupElement: any,\n createGroupButtonRef: any,\n openCreateGroup: Function,\n closeCreateGroup: Function,\n joinGroupElement: any,\n onGroupJoined: Function,\n createGroupConfigCreateClick : ((group: CometChat.Group) => void) | null | undefined,\n joinGroupConfigOnError : ((error: any) => void) | null | undefined,\n joinGroupConfigJoinClick : ((group: CometChat.Group, password: string) => void) | null | undefined\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n return subscribeToEvents();\n }\n }, [loggedInUser, subscribeToEvents]);\n\n useEffect(\n ()=>{\n const element = createGroupButtonRef.current;\n if (!element) return;\n const openCreateGroupModal = () => {\n openCreateGroup();\n }\n element.addEventListener(\"cc-button-clicked\", openCreateGroupModal);\n return ()=>{\n element.removeEventListener(\"cc-button-clicked\", openCreateGroupModal);\n }\n }, [openCreateGroup, createGroupButtonRef]\n )\n\n useEffect(\n () => {\n if (isMobileView) {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.hideBackButton = false;\n }\n\n if(joinGroupConfiguration?.messageHeaderConfiguration){\n joinGroupConfiguration.messageHeaderConfiguration.hideBackButton = false;\n }\n } else {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.hideBackButton = true;\n }\n if(joinGroupConfiguration?.messageHeaderConfiguration){\n joinGroupConfiguration.messageHeaderConfiguration.hideBackButton = true;\n }\n }\n }, [isMobileView, joinGroupConfiguration, messagesConfiguration]\n );\n\n useEffect(\n () => {\n setActiveGroup(group);\n }, [group, setActiveGroup]\n );\n\n useEffect(\n () => {\n if (!messagesConfiguration?.messageHeaderConfiguration?.onBack) {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.onBack = onBack;\n }\n }\n }, [messagesConfiguration, onBack]\n );\n\n useEffect(\n () => {\n if (!joinGroupElement) return;\n const eventName = \"cc-joingroup-joined\";\n const onJoinGroupButtonClicked = (event: any) => onGroupJoined(event);\n joinGroupElement.addEventListener(eventName, onJoinGroupButtonClicked);\n return () => {\n joinGroupElement.removeEventListener(eventName, onJoinGroupButtonClicked);\n };\n }, [joinGroupElement, onGroupJoined]\n )\n\n useEffect(()=>{\n if (!createGroupElement) return;\n const eventName = \"cc-creategroup-close-clicked\";\n const closeCreateGroupModal = () => closeCreateGroup();\n createGroupElement.addEventListener(eventName, closeCreateGroupModal);\n return () => {\n createGroupElement.removeEventListener(eventName, closeCreateGroupModal);\n };\n }, [createGroupElement, closeCreateGroup]);\n\n useEffect(()=>{\n if (!createGroupElement) return;\n if (createGroupConfigCreateClick) {\n createGroupElement.createClick = createGroupConfigCreateClick;\n return () => {\n createGroupElement.createClick = null;\n };\n }\n }, [createGroupConfigCreateClick, createGroupElement]);\n\n useEffect(() => {\n if (!joinGroupElement) return;\n if (joinGroupConfigJoinClick) {\n joinGroupElement.joinClick = joinGroupConfigJoinClick;\n return () => {\n joinGroupElement.joinClick = null;\n };\n }\n }, [joinGroupConfigJoinClick, joinGroupElement]);\n\n useEffect(() => {\n if (!joinGroupElement) return;\n if (joinGroupConfigOnError) {\n joinGroupElement.onError = joinGroupConfigOnError;\n return () => {\n joinGroupElement.onError = null;\n };\n }\n }, [joinGroupConfigOnError, joinGroupElement]);\n}\n\nexport { Hooks };","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatTheme, fontHelper } from '@cometchat/uikit-resources';\nimport { MessageHeaderStyle, MessagesConfiguration, MessagesStyle, UsersConfiguration, UsersStyle, WithMessagesStyle } from '@cometchat/uikit-shared';\nimport { LabelStyle } from '@cometchat/uikit-elements';\nimport { CSSProperties } from 'react';\n\nconst labelStyle: LabelStyle = {\n height: '100%',\n width: '100%',\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: 'flex',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: 'calc(100% - 280px)',\n height: '100%'\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0',\n left: '0'\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'inherit',\n border: 'none',\n borderRadius: 'inherit',\n width: '100%',\n height: 'auto'\n} as CSSProperties;\n\nconst WithMessagesSidebarStyle = {\n width: '280px',\n height: '100%',\n position: 'relative',\n} as CSSProperties;\n\nexport const getUsersWrapperStyles = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n return {\n ...WithMessagesWrapperStyle,\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: '0',\n background: theme.palette.getBackground(),\n ...usersWithMessagesStyle\n } as CSSProperties\n}\n\nexport const getWithMessagesSidebarStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme, isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeUser);\n } else {\n return getDesktopViewSidebarStyle(usersWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (activeUser: CometChat.User | undefined) => {\n\n const visibility = activeUser ? { \"visibility\": \"hidden\" } : { \"visibility\": \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties\n}\n\nconst getDesktopViewSidebarStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight: usersWithMessagesStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`\n } as CSSProperties\n}\n\nexport const getWithMessagesMainStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeUser);\n } else {\n return getDesktopViewMainStyle(usersWithMessagesStyle);\n }\n}\n\nconst getMobileViewMainStyle = (activeUser: CometChat.User | undefined) => {\n\n const visibility = activeUser ? { \"visibility\": \"visible\" } : { \"visibility\": \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties;\n}\n\nconst getDesktopViewMainStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`\n }\n}\n\nexport const getLabelStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n return {\n ...labelStyle,\n textFont: usersWithMessagesStyle?.messageTextFont || fontHelper(theme.typography.title1),\n textColor: usersWithMessagesStyle?.messageTextColor || theme.palette.getAccent600(),\n } as LabelStyle;\n}\n\nexport const getUsersStyle = (usersConfiguration: UsersConfiguration | undefined) => {\n\n const usersStyle = usersConfiguration?.usersStyle;\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...usersStyle\n } as UsersStyle;\n}\n\nexport const getMessageHeaderStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `${borderRadius} ${borderRadius} 0 0` : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n } as MessageHeaderStyle;\n}\n\nexport const getMessageComposerStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `0 0 ${borderRadius} ${borderRadius}` : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n}\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n withMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: withMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n\n let visibility = { visibility: 'hidden' };\n if (!activeUser && !isMobileView) {\n visibility = { \"visibility\": \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`\n } as CSSProperties\n}\n\nexport const getMessageInformationStyle = (messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n const desktopWidth = messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.width || \"320px\";\n const desktopHeight = messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.height || \"620px\";\n return {\n ...messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle,\n width: isMobileView ? \"100vw\" : desktopWidth,\n height: isMobileView ? \"100vh\" : desktopHeight,\n }\n}\n","import { CometChatUserEvents, localize } from \"@cometchat/uikit-resources\";\nimport { MessageComposerConfiguration, MessageHeaderConfiguration, MessageListConfiguration, MessagesConfiguration, UsersConfiguration, WithMessagesStyle } from \"@cometchat/uikit-shared\";\nimport { getEmptyMessageLayoutStyle, getLabelStyle, getMessageComposerStyle, getMessageHeaderStyle, getMessagesStyle, getUsersStyle, getUsersWrapperStyles, getWithMessagesMainStyle, getWithMessagesSidebarStyle,getMessageInformationStyle } from \"./style\";\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { Hooks } from \"./hooks\";\n\ninterface IUsersWithMessagesProps {\n user?: CometChat.User,\n isMobileView?: boolean,\n messageText?: string,\n usersWithMessagesStyle?: WithMessagesStyle,\n messagesConfiguration?: MessagesConfiguration,\n usersConfiguration?: UsersConfiguration,\n onError?: Function,\n}\n\nconst defaultProps: IUsersWithMessagesProps = {\n user: undefined,\n isMobileView: false,\n messageText: \"\",\n usersWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n usersConfiguration: new UsersConfiguration({}),\n onError: (error: CometChat.CometChatException) => { console.log(error) },\n};\n\nconst CometChatUsersWithMessages = (props: IUsersWithMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n user,\n isMobileView,\n messageText,\n usersWithMessagesStyle,\n messagesConfiguration,\n usersConfiguration,\n onError\n } = props;\n\n const [activeUser, setActiveUser] = useState(user ?? undefined);\n\n const onBack = () => setActiveUser(undefined);\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details\n }\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n }, [onError]\n );\n\n const onItemClick = (user: CometChat.User) => setActiveUser(user);\n\n const subscribeToEvents = useCallback(\n () => {\n try {\n const ccUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(\n (user: CometChat.User) => {\n if (activeUser && activeUser.getUid() === user.getUid()) {\n setActiveUser(user);\n }\n }\n );\n const ccUserUnBlocked = CometChatUserEvents.ccUserUnblocked.subscribe(\n (user: CometChat.User) => {\n if (activeUser && activeUser.getUid() === user.getUid()) {\n setActiveUser(user);\n }\n }\n );\n\n return () => {\n try {\n ccUserBlocked?.unsubscribe();\n ccUserUnBlocked?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeUser, setActiveUser, onErrorCallback]\n )\n\n function getMessageHeaderConfiguration() {\n\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack: messagesConfiguration?.messageHeaderConfiguration?.onBack || onBack,\n hideBackButton: messagesConfiguration?.messageHeaderConfiguration?.hideBackButton || (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(usersWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n },\n } as MessageHeaderConfiguration;\n }\n\n function getMessageListConfiguration() {\n return {\n ...messagesConfiguration?.messageListConfiguration,\n messageInformationConfiguration:{\n messageInformationStyle :{\n ...getMessageInformationStyle(messagesConfiguration,isMobileView)\n }\n }\n } as MessageListConfiguration;\n }\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(usersWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n } as MessageComposerConfiguration;\n }\n\n const getUsersComponent = () => {\n return (\n \n )\n }\n\n const getSidebarContent = () => {\n return (\n
    \n {getUsersComponent()}\n
    \n )\n }\n\n const getMessagesComponent = () => {\n return (\n \n )\n }\n\n const getMainContent = () => {\n return activeUser ? (\n
    \n {getMessagesComponent()}\n
    \n ) : null;\n }\n\n const getDecoratorMessageContent = () => {\n const text = messageText ? messageText : localize(\"SELECT__USER\");\n return (\n
    \n \n
    \n )\n }\n\n const getDecoratorMessage = () => !activeUser ? getDecoratorMessageContent() : null\n\n Hooks(\n subscribeToEvents,\n user,\n setActiveUser\n );\n\n return (\n
    \n {getSidebarContent()}\n {getMainContent()}\n <>\n {getDecoratorMessage()}\n \n
    \n );\n}\n\nCometChatUsersWithMessages.defaultProps = defaultProps;\nexport { CometChatUsersWithMessages };\n","import { useEffect } from \"react\";\n\nfunction Hooks(\n\tsubscribeToEvents: Function,\n user: any,\n setActiveUser: any,\n) {\n useEffect(\n () => subscribeToEvents(),\n [subscribeToEvents]\n );\n\n useEffect(\n () => {\n setActiveUser(user);\n }, [user, setActiveUser]\n );\n}\n\nexport { Hooks };","import { BaseStyle } from \"@cometchat/uikit-shared\";\n\n/**\n * TabsStyle\n *\n * @property {string} height - The height of the component.\n * @property {string} width - The width of the component.\n * @property {string} border - The border of the component.\n * @property {string} borderRadius - The border radius of the component.\n * @property {string} background - The background color of the component.\n * @property {string} tabListHeight - The height of the tab list.\n * @property {string} tabListWidth - The width of the tab list.\n * @property {string} tabListBorder - The border of the tab list.\n * @property {string} tabListBorderRadius - The border radius of the tab list.\n * @property {string} tabListBackground - The background color of the tab list.\n * @property {string} tabListBoxShadow - The box shadow of the tab list.\n * @property {string} tabListPadding - The padding of the tab list.\n * @property {string} tabPaneWidth - The width of the tab pane.\n * @property {string} tabPaneHeight - The height of the tab pane.\n */\n export class TabsStyle extends BaseStyle {\n tabListHeight?: string = \"100%\";\n tabListWidth?: string = \"100%\";\n tabListBorder?: string = \"0 none\";\n tabListBorderRadius?: string = \"0\";\n tabListBackground?: string = \"transparent\";\n tabListBoxShadow?: string = \"0\";\n tabListPadding?:string = \"0\";\n tabPaneWidth?: string = \"100%\";\n tabPaneHeight?: string = \"100%\";\n constructor(props: Partial) {\n super({})\n Object.assign(this, props);\n }\n}","import { DocumentBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { OptionsStyle } from \"@cometchat/uikit-shared\"\n\nexport class CollaborativeDocumentConfiguration {\n private style: DocumentBubbleStyle;\n private iconURL: string;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: DocumentBubbleStyle, iconURL?: string, optionIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, iconURL, optionIconURL, optionStyle } = configuration;\n this.style = (style as DocumentBubbleStyle);\n this.iconURL = (iconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getDocumentBubbleStyle(): DocumentBubbleStyle{\n return this.style;\n }\n\n getIconURL(): string {\n return this.iconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import { DocumentBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { OptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeWhiteboardConfiguration {\n private style: DocumentBubbleStyle;\n private iconURL: string;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: DocumentBubbleStyle, iconURL?: string, optionIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, iconURL, optionIconURL, optionStyle } = configuration;\n this.style = (style as DocumentBubbleStyle);\n this.iconURL = (iconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getWhiteboardBubbleStyle(): DocumentBubbleStyle {\n return this.style;\n }\n\n getIconURL(): string {\n return this.iconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import {\n AcceptButtonStyle,\n DeclineButtonStyle,\n IconStyle,\n IncomingCallButtonsStyle,\n IncomingCallLabelStyle,\n IncomingCallListItemStyle,\n IncomingCallSubtitleStyle,\n IncomingCallTailViewStyle,\n IncomingCallWrapperStyle,\n defaultAvatarStyle,\n defaultIncomingCallStyle,\n defaultListItemStyle,\n defaultOngoingCallStyle,\n} from \"./style\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CometChatCallEvents,\n CometChatUIKitConstants,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatSoundManager,\n CometChatUIKitCalls,\n IncomingCallStyle,\n StorageUtils,\n} from \"@cometchat/uikit-shared\";\nimport { useCallback, useContext, useRef, useState } from \"react\";\n\nimport AudioCallIcon from \"./assets/Audio-Call.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport VideoCallIcon from \"./assets/Video-call.svg\";\n\ninterface IIncomingCallProps {\n call?: any;\n disableSoundForCalls?: boolean;\n customSoundForCalls?: string;\n onAccept?: Function;\n onDecline?: Function;\n acceptButtonText?: string;\n declineButtonText?: string;\n subtitleView?: any;\n onError?: Function;\n listItemStyle?: ListItemStyle;\n avatarStyle?: AvatarStyle;\n incomingCallStyle?: IncomingCallStyle;\n}\n\nconst CometChatIncomingCall = (props: IIncomingCallProps) => {\n const {\n call,\n disableSoundForCalls = false,\n customSoundForCalls = \"\",\n onAccept,\n onDecline,\n acceptButtonText = localize(\"ACCEPT\"),\n declineButtonText = localize(\"DECLINE\"),\n subtitleView = null,\n listItemStyle = {\n height: \"100%\",\n width: \"100%\",\n },\n avatarStyle = {\n borderRadius: \"16px\",\n width: \"38px\",\n height: \"38px\",\n },\n incomingCallStyle = {\n width: \"fit-content\",\n height: \"fit-content\",\n },\n onError = (error: CometChat.CometChatException) => {\n console.log(error);\n },\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [loggedInUser, setLoggedInuser] = useState(null);\n const [showIncomingCallScreen, setShowIncomingCallScreen] = useState(false);\n const [showOngoingCallScreen, setShowOngoingCallScreen] = useState(false);\n const [showOutGoingCallScreen, setShowOutGoingCallScreen] = useState(false);\n\n const listItemStyleRef = useRef(null);\n const avatarStyleRef = useRef(null);\n const incomingCallStyleRef = useRef(null);\n const callRef = useRef(null);\n const sessionIdRef = useRef(\"\");\n const rejectCallButtonRef = useRef(null);\n const acceptCallButtonRef = useRef(null);\n\n avatarStyleRef.current = { ...defaultAvatarStyle(theme), ...avatarStyle };\n\n incomingCallStyleRef.current = {\n ...defaultIncomingCallStyle(theme),\n ...incomingCallStyle,\n };\n\n listItemStyleRef.current = {\n ...defaultListItemStyle(incomingCallStyleRef?.current, theme),\n ...listItemStyle,\n };\n\n const acceptButtonStyleRef = useRef({});\n\n acceptButtonStyleRef.current = AcceptButtonStyle(\n incomingCallStyleRef?.current\n );\n\n const declineButtonStyleRef = useRef({});\n\n declineButtonStyleRef.current = DeclineButtonStyle(\n incomingCallStyleRef?.current\n );\n\n const ongoingCallStyleRef = useRef({});\n ongoingCallStyleRef.current = { ...defaultOngoingCallStyle(theme) };\n\n const iconStyleRef = useRef(null);\n\n iconStyleRef.current = IconStyle(incomingCallStyleRef?.current);\n\n let incomingcallListenerId: string = \"incomingcall_\" + new Date().getTime(),\n subtitleText: string = localize(\"INCOMING_CALL\");\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n },\n [onError]\n );\n\n const playAudio = useCallback(() => {\n try {\n if (customSoundForCalls) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingCall,\n customSoundForCalls\n );\n } else {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [customSoundForCalls, onErrorCallback]);\n\n const isCallActive = useCallback(\n (call: CometChat.Call) => {\n let isCurrentCall: boolean = false;\n try {\n if (StorageUtils.getItem(CometChatUIKitConstants.calls.activecall)) {\n let oldCall: any = StorageUtils.getItem(\n CometChatUIKitConstants.calls.activecall\n );\n if (oldCall && oldCall.sessionId === call.getSessionId()) {\n isCurrentCall = true;\n } else {\n isCurrentCall = false;\n }\n } else {\n isCurrentCall = false;\n }\n return isCurrentCall;\n } catch (e) {\n onErrorCallback(e);\n return isCurrentCall;\n }\n },\n [onErrorCallback]\n );\n\n const rejectIncomingCall = useCallback(\n (reason: string = CometChatUIKitConstants.calls.rejected) => {\n try {\n CometChatSoundManager.pause();\n if (onDecline) {\n onDecline();\n } else if (typeof callRef?.current?.getSessionId() === \"string\") {\n CometChat.rejectCall(callRef?.current?.getSessionId(), reason).then(\n (rejectedCall: CometChat.Call) => {\n StorageUtils.setItem(\n CometChatUIKitConstants.calls.activecall,\n rejectedCall\n );\n CometChatCallEvents.ccCallRejected.next(rejectedCall);\n setShowIncomingCallScreen(false);\n callRef.current = null;\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [onDecline, onErrorCallback]\n );\n\n const showCall = useCallback(\n (call: CometChat.Call) => {\n try {\n if (\n !isCallActive(call) &&\n loggedInUser?.getUid() !== call?.getSender()?.getUid() &&\n callRef.current\n ) {\n if (\n !disableSoundForCalls &&\n !showOngoingCallScreen &&\n !showOutGoingCallScreen\n ) {\n setTimeout(() => {\n playAudio();\n }, 100);\n }\n if (!showOngoingCallScreen && !showOutGoingCallScreen) {\n setShowIncomingCallScreen(true);\n } else if (showOngoingCallScreen || showOutGoingCallScreen) {\n CometChatSoundManager.pause();\n rejectIncomingCall(CometChatUIKitConstants.calls.busy);\n CometChatCallEvents.ccCallRejected.next(call);\n }\n } else if (loggedInUser?.getUid() === call?.getSender()?.getUid()) {\n CometChatSoundManager.pause();\n return;\n } else {\n CometChatSoundManager.pause();\n rejectIncomingCall(CometChatUIKitConstants.calls.busy);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [\n isCallActive,\n disableSoundForCalls,\n playAudio,\n rejectIncomingCall,\n onErrorCallback,\n loggedInUser,\n showOngoingCallScreen,\n showOutGoingCallScreen,\n ]\n );\n\n const localStorageChange = useCallback((event: any) => {\n if (event?.key !== CometChatUIKitConstants.calls.activecall) {\n return;\n }\n if (event.newValue || event.oldValue) {\n let call;\n if (event.newValue) {\n call = JSON.parse(event.newValue);\n } else if (event.oldValue) {\n call = JSON.parse(event.oldValue);\n }\n if (callRef.current?.getSessionId() === call?.sessionId) {\n CometChatSoundManager.pause();\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n }\n return;\n }, []);\n\n const closeCallScreen = () => {\n setShowOngoingCallScreen(false);\n setShowOutGoingCallScreen(false)\n callRef.current = null;\n sessionIdRef.current = \"\";\n };\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n (call: CometChat.Call) => {\n closeCallScreen();\n }\n \n );\n\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n () => {\n setShowOutGoingCallScreen(true);\n }\n );\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const attachListeners = useCallback(() => {\n try {\n StorageUtils.attachChangeDetection(localStorageChange);\n CometChat.addCallListener(\n incomingcallListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: (call: CometChat.Call) => {\n if (callRef.current?.getSender()?.getUid() === call.getSender()?.getUid()){\n return;\n }\n callRef.current = call;\n showCall(call);\n },\n onIncomingCallCancelled: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n callRef.current = null;\n setShowIncomingCallScreen(false);\n },\n onOutgoingCallAccepted: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n if (call.getSender()?.getUid() === loggedInUser?.getUid()) {\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n },\n onOutgoingCallRejected: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n if (call.getSender()?.getUid() === loggedInUser?.getUid()){\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n }\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [localStorageChange, showCall, onErrorCallback, incomingcallListenerId,loggedInUser]);\n\n const removeListener = useCallback(() => {\n try {\n StorageUtils.detachChangeDetection(localStorageChange);\n CometChat.removeCallListener(incomingcallListenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [localStorageChange, onErrorCallback, incomingcallListenerId]);\n\n const checkForActiveCallAndEndCall = useCallback(() => {\n try {\n let call: CometChat.Call = CometChat.getActiveCall();\n return new Promise((resolve, reject) => {\n if (!call) {\n return resolve({ success: true });\n }\n let sessionID = call?.getSessionId();\n CometChat.endCall(sessionID).then(\n (response: CometChat.Call | null) => {\n return resolve(response);\n },\n (error: CometChat.CometChatException) => {\n return reject(error);\n }\n );\n });\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const acceptIncomingCall = useCallback(() => {\n try {\n CometChatSoundManager.pause();\n if (onAccept) {\n onAccept();\n } else {\n checkForActiveCallAndEndCall()?.then(\n (response) => {\n CometChat.acceptCall(callRef.current!.getSessionId()).then(\n (call: CometChat.Call) => {\n CometChatCallEvents.ccCallAccepted.next(call);\n StorageUtils.setItem(\n CometChatUIKitConstants.calls.activecall,\n call\n );\n setShowOngoingCallScreen(true);\n callRef.current = call;\n sessionIdRef.current = call?.getSessionId();\n setShowIncomingCallScreen(false);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (e) { }\n }, [checkForActiveCallAndEndCall, onErrorCallback, onAccept]);\n\n function getCallBuilder(): typeof CometChatUIKitCalls.CallSettings {\n let audioOnlyCall: boolean =\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? true\n : false;\n if (callRef.current?.getType() === CometChatUIKitConstants.calls.meeting) {\n return undefined;\n }\n\n const callSettings = new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChat.endCall(sessionIdRef.current)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n closeCallScreen();\n })\n .catch((err: CometChat.CometChatException) => { });\n }\n },\n onCallEndButtonPressed: () => {\n CometChat.endCall(sessionIdRef.current)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n })\n .catch((err: CometChat.CometChatException) => { });\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n ).build();\n return callSettings;\n }\n\n const getCallTypeIcon = () => {\n if (\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return AudioCallIcon;\n } else {\n return VideoCallIcon;\n }\n };\n\n Hooks(\n loggedInUser,\n setLoggedInuser,\n call,\n subscribeToEvents,\n attachListeners,\n removeListener,\n acceptCallButtonRef,\n rejectCallButtonRef,\n showCall,\n callRef,\n acceptIncomingCall,\n rejectIncomingCall,\n showIncomingCallScreen\n );\n return (\n <>\n {callRef.current && showIncomingCallScreen ? (\n \n \n \n {subtitleView ? (\n \n {subtitleView}\n \n ) : (\n \n
    \n \n
    \n \n \n )}\n\n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n ) : null}\n\n {showOngoingCallScreen && callRef.current && !showIncomingCallScreen ? (\n \n ) : null}\n \n );\n};\n\nexport { CometChatIncomingCall };\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: any,\n call: CometChat.Call,\n\tsubscribeToEvents: Function,\n attachListeners: Function,\n removeListener: Function,\n acceptCallButtonRef: any,\n rejectCallButtonRef: any,\n showCall: any,\n callRef: any,\n acceptIncomingCall: Function,\n rejectIncomingCall: Function,\n showIncomingCallScreen: boolean\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null)=>{\n if(user){\n setLoggedInUser(user);\n }\n }\n )\n }, [setLoggedInUser]\n );\n\n useEffect(\n () => {\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n attachListeners();\n }\n return () => {\n removeListener();\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, attachListeners, removeListener, subscribeToEvents]\n )\n\n useEffect(\n () => {\n if (call) {\n callRef.current = call;\n showCall(callRef.current);\n }\n }, [call, callRef, showCall]\n )\n\n useEffect(\n () => {\n const acceptCallButton = acceptCallButtonRef?.current;\n const rejectCallButton = rejectCallButtonRef?.current;\n\n if(!acceptCallButton && !rejectCallButton) return;\n\n const acceptCall = () => {\n acceptIncomingCall();\n }\n const rejectCall = () => {\n rejectIncomingCall(CometChatUIKitConstants.calls.rejected);\n }\n \n if(showIncomingCallScreen){\n acceptCallButton?.addEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.addEventListener(\"cc-button-clicked\", rejectCall);\n }else{\n acceptCallButton?.removeEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.removeEventListener(\"cc-button-clicked\", rejectCall);\n }\n return () => {\n acceptCallButton?.removeEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.removeEventListener(\"cc-button-clicked\", rejectCall);\n }\n }, [showIncomingCallScreen, acceptIncomingCall, rejectIncomingCall, acceptCallButtonRef, rejectCallButtonRef]\n );\n\n}\n\nexport { Hooks };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ConfirmDialogStyle } from \"@cometchat/uikit-elements\";\nimport { BaseStyle, ImageModerationStyle } from \"@cometchat/uikit-shared\";\n\nexport class ImageModerationConfiguration {\n private style: ImageModerationStyle;\n private confirmDialogStyle: ConfirmDialogStyle;\n private backDropStyle: BaseStyle;\n\n constructor(configuration: {\n style?: ImageModerationStyle, \n confirmDialogStyle?: ConfirmDialogStyle;\n backDropStyle?: BaseStyle;\n }) {\n this.style = configuration.style as ImageModerationStyle;\n this.confirmDialogStyle = configuration.confirmDialogStyle as ConfirmDialogStyle;\n this.backDropStyle = configuration.backDropStyle as BaseStyle;\n }\n\n getImageModerationStyle(): ImageModerationStyle{\n return this.style;\n }\n\n getConfirmDialogSyle(): ConfirmDialogStyle{\n return this.confirmDialogStyle;\n }\n \n getBackDropStyle(): BaseStyle{\n return this.backDropStyle;\n }\n\n}","import { LinkPreviewStyle } from \"@cometchat/uikit-shared\";\n\nexport class LinkPreviewConfiguration {\n private style: LinkPreviewStyle;\n\n constructor(configuration: {style?: LinkPreviewStyle}){\n this.style = (configuration.style as LinkPreviewStyle);\n }\n\n getLinkPreviewStyle(): LinkPreviewStyle{\n return this.style;\n }\n\n}","import { MessageTranslationStyle, OptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class MessageTranslationConfiguration {\n private style: MessageTranslationStyle;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: MessageTranslationStyle, optionIconURL?: string, optionStyle?: OptionsStyle}) {\n let { style, optionIconURL, optionStyle } = configuration;\n this.style = (style as MessageTranslationStyle);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getMessageTranslationStyle(): MessageTranslationStyle {\n return this.style;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import { SmartRepliesStyle } from \"@cometchat/uikit-shared\";\n\nexport class SmartRepliesConfiguration {\n private style: SmartRepliesStyle;\n\n constructor(configuration: {style?: SmartRepliesStyle}){\n this.style = (configuration.style as SmartRepliesStyle);\n }\n\n getSmartRepliesStyle(): SmartRepliesStyle{\n return this.style;\n }\n\n}","import { StickersStyle } from \"@cometchat/uikit-shared\";\n\nexport class StickersConfiguration {\n private style: StickersStyle;\n private stickerIconURL: string;\n private closeIconURL: string;\n\n constructor(configuration: {style?: StickersStyle, stickerIconURL?: string, closeIconURL?: string}){\n let { style, stickerIconURL, closeIconURL } = configuration;\n this.style = (style as StickersStyle);\n this.stickerIconURL = (stickerIconURL as string);\n this.closeIconURL = (closeIconURL as string);\n }\n\n getStickersStyle(): StickersStyle {\n return this.style;\n }\n\n getStickerIconURL(): string {\n return this.stickerIconURL;\n }\n\n getCloseIconURL(): string {\n return this.closeIconURL;\n }\n\n}"],"names":["process","env","NODE_ENV","jsxRuntimeModule","exports","f","require$$0","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","reactJsxRuntime_production_min","jsx","jsxs","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","ReactSharedInternals","error","format","_len2","arguments","length","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","apply","console","printWarning","REACT_MODULE_REFERENCE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","getContextName","displayName","getComponentNameFromType","tag","name","_context","outerType","innerType","wrapperName","functionName","getWrappedName","render","outerName","lazyComponent","payload","_payload","init","_init","x","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","assign","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","undefined","Error","match","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","get","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","log","info","warn","group","groupCollapsed","groupEnd","configurable","enumerable","value","writable","defineProperties","disableLogs","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","s","_frame","replace","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","isReactComponent","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","_source","setExtraStackFrame","isArrayImpl","isArray","testStringCoercion","checkKeyStringCoercion","willCoercionThrow","toStringTag","constructor","typeName","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","ReactElement","self","_store","freeze","jsxDEV","config","maybeKey","propName","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","hasValidRef","stateNode","componentName","warnIfStringRefCannotBeAutoConverted","warnAboutAccessingKey","defineKeyPropWarningGetter","warnAboutAccessingRef","defineRefPropWarningGetter","propTypesMisspellWarningShown","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","isValidElement","object","getDeclarationErrorAddendum","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","maybeIterable","maybeIterator","getIteratorFn","entries","step","next","done","validatePropTypes","propTypes","typeSpecs","values","location","has","bind","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","jsxWithValidation","isStaticChildren","validType","getModuleId","isValidElementType","keys","typeString","sourceInfo","fileName","lineNumber","getSourceInfoErrorAddendum","children","fragment","validateFragmentProps","reactJsxRuntime_development","Fragment","listStyle","usersStyleObject","theme","ListStyle","width","height","background","border","borderRadius","titleTextFont","fontHelper","typography","title1","titleTextColor","palette","getAccent","searchPlaceholderTextFont","subtitle1","searchPlaceholderTextColor","getAccent500","searchTextFont","searchTextColor","searchBorder","searchBorderRadius","searchBackground","getAccent50","searchIconTint","separatorColor","getAccent400","loadingIconTint","getAccent600","emptyStateTextFont","heading","emptyStateTextColor","errorStateTextFont","errorStateTextColor","sectionHeaderTextFont","caption1","sectionHeaderTextColor","UsersWrapperStyle","boxSizing","position","getBackground","overflow","listItemStyle","listItemStyleObject","ListItemStyle","activeBackground","getAccent100","titleFont","title2","titleColor","getAccent200","hoverBackground","avatarStyle","avatarStyleObject","AvatarStyle","backgroundColor","getAccent700","nameTextColor","getAccent900","backgroundSize","nameTextFont","outerViewBorderWidth","outerViewBorderRadius","outerViewBorderColor","outerViewBorderSpacing","statusIndicatorStyle","statusIndicatorStyleObject","useRefSync","res","useRef","useStateRef","initialValue","state","setState","useState","useCallback","useCometChatErrorHandler","onError","onErrorRef","errorHandler","CometChat","CometChatException","code","CometChatCheckbox","labelText","checked","disabled","checkboxStyle","onChange","onChangePropRef","useEffect","checkboxElement","eventName","handleEvent","addEventListener","removeEventListener","Hooks","_jsx","styleObject","stylePropName","JSON","stringify","listWrapperStyle","boxShadow","display","flexDirection","headerStyle","emptyTitle","flexShrink","padding","titleStyle","titleAlignment","textAlign","TitleAlignment","left","font","color","searchInputStyle","placeholderTextFont","placeholderTextColor","loaderStyle","iconTint","sectionHeaderStyle","errorLabelStyle","textFont","textColor","emptyLabelStyle","getKeyValue","keyValue","result","id","CometChatList","genericMemo","memo","title","hideSearch","searchText","onSearch","searchPlaceholderText","searchIconURL","list","listItem","showSectionHeader","sectionHeaderKey","listItemKey","onScrolledToBottom","onScrolledToTop","loadingView","loadingIconURL","hideError","errorStateView","errorStateText","emptyStateView","emptyStateText","scrollToBottom","scrolledUpCallback","searchInputElement","setSearchInputRef","intersectionObserverRootRef","intersectionObserverTopTargetRef","intersectionObserverBottomTargetRef","didComponentScrollToBottomRef","timeoutIdRef","scrollHeightTupleRef","didTopObserverCallbackRunRef","onScrolledToTopRef","onScrolledToBottomRef","onSearchRef","handleSearchChanged","newSearchText","detail","window","clearTimeout","setTimeout","stopCallingOnScrolledToBottomCallback","rootElement","targetElement","observer","IntersectionObserver","async","entry","relevantEntry","isIntersecting","scrollHeight","clientHeight","Promise","all","root","threshold","observe","unobserve","stopCallingOnScrolledToTopCallback","Math","round","scrollTop","max","scrollIntoView","_jsxs","className","style","placeholderText","paddingTop","overflowX","States","loading","empty","currrentSectionHeader","itemIdx","listSectionJSX","itemSectionHeader","toUpperCase","sectionHeaderJSX","getList","loadingViewJSX","justifyContent","alignItems","iconURL","getLoadingView","errorViewJSX","text","labelStyle","getErrorView","emptyViewJSX","getEmptyView","loaded","getStateView","LoadingIcon$3","CometChatListItem","avatarURL","avatarName","statusIndicatorColor","statusIndicatorIcon","isActive","subtitleView","tailView","menuView","hideSeparator","onClick","subtitleViewClassName","tailViewClassName","menuViewClassName","LoadingIcon","userPresencePlacement","UserPresencePlacement","bottom","getClassNamePropSpreadObject","getStylePropSpreadObject","onListItemClickPropRef","listItemElement","slot","CometChatMenuList","data","moreIconURL","topMenuSize","menuListStyle","onOptionClick","onOptionClickPropRef","idToOnClickMapRef","idToOnClickMap","menuListElement","event","option","CometChatUIKitUtility","clone","CometChatRadioButton","radioButtonStyle","radioBtnElement","CometChatThemeContext","createContext","CometChatTheme","UsersManager","usersRequestBuilder","searchRequestBuilder","usersSearchText","currentUsersRequestBuilder","this","getDefaultRequestBuilder","setSearchKeyword","usersRequest","build","UsersRequestBuilder","setLimit","defaultLimit","fetchNext","getCurrentPage","pagination","current_page","atttachListeners","cb","listenerId","Date","now","userListener","UserListener","onUserOnline","onUserOffline","addUserListener","removeUserListener","attachConnestionListener","callback","addConnectionListener","ConnectionListener","onConnected","onDisconnected","removeConnectionListener","SearchIcon$5","SpinnerIcon$7","stateReducer","action","newState","users","removeOldUsers","disableLoadingState","userList","usersManager","onEmpty","fetchState","user","targetUser","targetUserUid","getUid","targetIdx","findIndex","isFirstReload","CometChatUsers","localize","tileAlignment","SearchIcon","listItemView","loadingStateView","SpinnerIcon","disableUsersPresence","menus","options","selectionMode","SelectionMode","none","onSelect","onItemClick","usersStyle","activeUser","searchKeyword","fetchingUsers","fetchTimeOut","dispatch","useReducer","usersManagerRef","fetchNextIdRef","useContext","attachListenerOnFetch","isConnectionReestablished","isJustMounted","fetchNextAndAppendUsers","fetchId","initialState","newUsers","requestBuilder","trimmedText","updateUser","getDefaultListItemTailView","single","multiple","tailViewContent","paddingRight","getDefaultListItemMenuView","curOptions","getStatusIndicatorColor","getStatus","CometChatUIKitConstants","userStatusType","offline","onlineStatusColor","getSuccess","subUserBlocked","CometChatUserEvents","ccUserBlocked","subscribe","subUserUnblocked","ccUserUnblocked","unsubscribe","top","right","getAvatar","getName","groupMembersWrapperStyle","groupMemberSyleObject","groupMemberStyleObject","defaultBackBtnStyle","buttonIconTint","backButtonIconTint","getPrimary","closeBtnStyle","closeButtonIconTint","scopeLabelStyle","groupScopeStyleObject","LabelStyle","groupMembersStyle","MenuListStyle","moreIconTint","submenuWidth","submenuHeight","submenuBorder","submenuBorderRadius","submenuBackground","groupScopeStyle","ChangeScopeStyle","activeTextFont","activeTextColor","activeTextBackground","arrowIconTint","optionBackground","optionBorder","optionBorderRadius","hoverTextFont","hoverTextColor","hoverTextBackground","buttonTextFont","buttonTextColor","buttonBackground","closeIconTint","getBackdropStyle","groupsMembersStyle","CometChatButton","hoverText","buttonStyle","childRefCallback","onClickPropRef","buttonElement","DownArrowIcon","GroupMembersManager","groupMemberRequestBuilder","groupGuid","groupMembersSearchText","finalGroupRequestBuilder","GroupMembersRequestBuilder","groupMembersRequest","attachUserListener","createParticipantGroupMember","groupMember","GroupMember","groupMemberScope","participant","setName","setGuid","getGuid","setUid","attachGroupListener","addGroupListener","GroupListener","onGroupMemberScopeChanged","changedUser","newScope","oldScope","changedGroup","groupMemberUid","onGroupMemberKicked","kickedUser","kickedBy","kickedFrom","onGroupMemberBanned","bannedUser","bannedBy","bannedFrom","onMemberAddedToGroup","userAdded","userAddedBy","userAddedIn","onGroupMemberLeft","leavingUser","onGroupMemberJoined","joinedUser","joinedGroup","removeGroupListener","MoreIcon$1","SearchIcon$4","backbutton$2","SpinnerIcon$6","groupMembers","groupMembersManager","groupMemberList","targetUid","filter","groupMemberToChangeScopeOf","updatedGroupMember","setStatus","setScope","CometChatGroupMembers","backButtonIconURL","backbutton","showBackButton","onBack","center","searchPlaceholder","errorSateView","dropDownIconURL","closeButtonIconURL","onClose","groupMembersManagerRef","loggedInUserRef","changeScopeElement","setChangeScopeRef","groupPropRef","onSearchTextChange","fetchNextAndAppendGroupMembers","createActionMessage","actionOn","loggedInUser","actionMessage","Action","MessageTypes","MessageReceiverType","MessageCategory","setAction","setActionBy","setSender","setMessage","setActionFor","setActionOn","setReceiver","setConversationId","setMuid","ID","setSentAt","getUnixTimestamp","setReceiverType","setRawData","extras","scope","new","getScope","banGroupMember","currentGroup","groupClone","setMembersCount","getMembersCount","CometChatGroupEvents","ccGroupMemberBanned","groupMemberAction","BANNED","kickGroupMember","ccGroupMemberKicked","KICKED","updateGroupMemberScope","newScopeCasted","ccGroupMemberScopeChanged","scopeChangedFrom","scopeChangedTo","SCOPE_CHANGE","updatedUser","handleActionOnGroupMember","GroupMemberOptions","ban","kick","changeScope","groupMemberOptions","getSelectionInput","getDefaultTailOptionsView","MoreIcon","getDefaultTailView","GroupMemberUtils","getViewMemberOptions","columnGap","getDefaultListItemView","getLoggedinUser","changeScopeClosedEventName","scopeChangedEventName","handleChangeScopeClose","handleScopeChange","groupMemberKickedSub","groupMemberBannedSub","groupMemberChangeScopeSub","groupMemberAddedSub","ccGroupMemberAdded","usersAdded","cursor","groupMemberAllowedScopes","allowScopeChange","backdropStyle","arrowIconURL","changeScopeStyle","getGroupMemberScopeChangeModal","CometChatUserMemberWrapper","userMemberListType","UserMemberListType","loadingIconUrl","getAccent300","minHeight","groupmembers","entity","_Fragment","t","Set","o","HTMLElement","removeAttribute","delete","r","tagName","elementClass","events","react","Component","u","createElement","v","super","componentDidMount","componentDidUpdate","_$Gl","suppressHydrationWarning","forwardRef","TextMessageBubble","createComponent","CometChatTextBubble","ImageMessageBubble","CometChatImageBubble","ccImageClicked","AudioMessageBubble","CometChatAudioBubble","VideoMessageBubble","CometChatVideoBubble","FileMessageBubble","CometChatFileBubble","FormMessageBubble","CometChatFormBubble","ccSubmitClicked","SchedulerMessageBubble","CometChatSchedulerBubble","CardMessageBubble","CometChatCardBubble","FullScreenImageViewer","CometChatFullScreenViewer","ccCloseClicked","defaultTheme","MessagesDataSource","getSchedulerBubbleStyle","text1","calendarStyle","CalendarStyle","dateTextFont","subtitle2","dateTextColor","dayTextFont","text2","dayTextColor","monthYearTextFont","monthYearTextColor","defaultDateTextBackground","disabledDateTextColor","disabledDateTextFont","disabledDateTextBackground","timezoneTextFont","caption2","timezoneTextColor","arrowButtonTextColor","arrowButtonTextFont","timeSlotStyle","TimeSlotStyle","calendarIconTint","timezoneIconTint","emptySlotIconTint","emptySlotTextColor","emptySlotTextFont","seperatorTint","slotBackground","slotBorder","slotBorderRadius","slotTextColor","slotTextFont","qucikViewStyle","QuickViewStyle","subtitleFont","subtitleColor","leadingBarTint","leadingBarWidth","SchedulerBubbleStyle","quickViewStyle","dateSelectorStyle","timeSlotSelectorStyle","suggestedTimeBackground","suggestedTimeBorder","suggestedTimeBorderRadius","suggestedTimeDisabledBackground","suggestedTimeDisabledBorder","suggestedTimeDisabledBorderRadius","suggestedTimeDisabledTextColor","suggestedTimeDisabledTextFont","text3","suggestedTimeTextColor","suggestedTimeTextFont","moreButtonDisabledTextBackground","moreButtonDisabledTextBorder","moreButtonDisabledTextBorderRadius","moreButtonDisabledTextColor","moreButtonDisabledTextFont","moreButtonTextBackground","moreButtonTextBorder","moreButtonTextBorderRadius","moreButtonTextColor","moreButtonTextFont","goalCompletionTextColor","goalCompletionTextFont","errorTextColor","getError","errorTextFont","scheduleButtonStyle","iconHeight","iconWidth","subtitleTextColor","subtitleTextFont","summaryTextColor","summaryTextFont","clockIconTint","getEditOption","CometChatActionsIcon","MessageOption","editMessage","getDeleteOption","deleteMessage","getReactionOption","CometChatActionsView","reactToMessage","customView","getReplyInThreadOption","replyInThread","getSendMessagePrivatelyOption","sendMessagePrivately","getCopyOption","copyMessage","getMessageInfoOption","messageInformation","isSentByMe","getSender","getTextMessageOptions","messageObject","isParticipant","messageOptionList","push","getParentMessageId","getImageMessageOptions","ChatConfigurator","getDataSource","getCommonOptions","getVideoMessageOptions","getAudioMessageOptions","getFileMessageOptions","getBottomView","_messageObject","_alignment","getTextMessageTemplate","additionalConfigurations","CometChatMessageTemplate","category","contentView","textMessage","getDeletedAt","getDeleteMessageBubble","getTextMessageContentView","getMessageOptions","bottomView","_message","getAudioMessageTemplate","audio","audioMessage","getAudioMessageContentView","getVideoMessageTemplate","video","videoMessage","getVideoMessageContentView","getImageMessageTemplate","image","imageMessage","getImageMessageContentView","getGroupActionTemplate","getGroupActionBubble","getFileMessageTemplate","file","fileMessage","getFileMessageContentView","getFormMessageTemplate","form","interactive","formMessage","getFormMessageContentView","getSchedulerMessageTemplate","scheduler","schedulerMessage","getSchedulerMessageContentView","getCardMessageTemplate","card","cardMessage","getCardMessageContentView","getAllMessageTemplates","_theme","disableMentions","getMessageTemplate","messageType","messageCategory","_template","_optionList","getCategory","getType","getAllMessageTypes","addList","getAllMessageCategories","getAuxiliaryOptions","getId","getTextMessageBubble","getText","getAudioMessageBubble","getAttachments","getUrl","getFileMessageBubble","getFormMessageBubble","getSchedulerMessageBubble","getCardMessageBubble","imageUrl","getImageMessageBubble","getVideoMessageBubble","getActionMessage","JOINED","LEFT","actionBy","byEntity","onEntity","byString","forString","ADDED","UNBANNED","defaultStyle","messageText","textStyle","getTextMessageBubbleStyle","alignment","MessageBubbleAlignment","getFormMessageBubbleStyle","InputStyle","RadioButtonStyle","labelTextFont","labelTextColor","CheckboxStyle","dropdownStyle","DropdownStyle","optionHoverBorder","buttonGroupStyle","singleSelectStyle","SingleSelectStyle","FormBubbleStyle","wrapperBackground","wrapperBorderRadius","textInputStyle","wrapperPadding","datePickerBorder","datePickerBorderRadius","datePickerFont","datePickerFontColor","getCardMessageBubbleStyle","CardBubbleStyle","imageHeight","imageWidth","imageRadius","imageBackgroundColor","descriptionFontColor","descriptionFont","dividerTintColor","disabledButtonColor","urlTextFormatter","textFormatters","getAllTextFormatters","mentionsTextFormatter","CometChatMentionsFormatter","getMentionedUsers","setCometChatUserGroupMembers","setLoggedInUser","CometChatUIKitLoginListener","getLoggedInUser","CometChatUrlsFormatter","getMentionsTextFormatter","getUrlTextFormatter","setMessageBubbleAlignment","audioUrl","src","audioStyle","fileUrl","defaulStyle","downloadIconURL","subtitle","fileURL","fileStyle","onSubmitClick","hasCustomCallback","formBubbleStyle","getSchedulerWrapperStyle","schedulerBubbleStyle","onScheduleClick","cardBubbleStyle","placeholderImage","ImageBubbleStyle","maxHeight","maxWidth","fullScreenViewer","URL","closeIconURL","fullScreenViewerStyle","CometChatUIEvents","ccHideDialog","imageStyle","ccShowDialog","confirmCallback","videoUrl","thumbnailUrl","BaseStyle","poster","videoStyle","imageAttachmentOption","CometChatMessageComposerAction","videoAttachmentOption","audioAttachmentOption","fileAttachmentOption","getAttachmentOptions","getLastConversationMessage","conversation","ConversationUtils","getLastMessage","TextMessage","getFormattedText","mentionsTargetElement","MentionsTargetElement","getDefaultDetailsTemplate","DetailsUtils","getAuxiliaryHeaderMenu","getAIOptions","AIOptionsStyle","getMentionsFormattedText","mentionsFormatterParams","regex","messageTextTmp","exec","cometChatUsers","mentionedUsers","mentionsFormatter","setClasses","formatterParams","formatters","params","setComposerMentionStyle","UserMentionStyle","loggedInUserTextFont","loggedInUserTextColor","loggedInUserTextBackground","mentionTextFont","mentionTextColor","mentionTextBackground","setConversationMentionStyle","setRightBubbleMentionStyle","getTertiary","setLeftBubbleMentionStyle","setStyle","formattedTextColor","formattedTextFont","initialSource","dataSource","names","enable","newSource","find","nm","AIExtensionDataSource","isAIFeatureEnabled","getExtensionId","then","enabled","addExtension","DataSourceDecorator","getBubbleAlignment","sender","getContentView","configuration","senderMessageBubbleStyle","botMessageBubbleStyle","getBubbleFooterView","status","displayReceipt","Receipts","wait","sent","timestamp","getSentAt","dateStyle","getMessageBubbleDateStyle","pattern","DatePatterns","time","receipt","waitIcon","errorIcon","errorIconURL","receiptStyle","getMessageReceiptStyle","assistBotStyle","getContainerStyle","getBotTitleStyle","optionTitleFont","optionTitleColor","getBackButtonStyle","backIconTint","getOptionStyle","ActionSheetStyle","ActionSheetSeparatorTint","listItemBackground","getBotBackgroundStyle","getBotChatContainerStyle","minWidth","getBotChatHeaderStyle","marginBottom","getBotHeaderTitleStyle","getBotHeaderSubtitleStyle","getCloseButtonStyle","getMessageBubbleStyle","getMessageInputStyle","MessageInputStyle","dividerColor","inputBorder","inputBorderRadius","inputBackground","getSendButtonStyle","sendIconTint","ReceiptStyle","waitIconTint","errorIconTint","getMessageBubbleContainerStyle","bubbleAlignment","flex","backIcon$4","bots","closeCallback","backCallback","ActionSheet","CometChatActionSheet","AIAssistBotOptoinsView","backIconURL","backIcon","actions","hideLayoutMode","actionSheetStyle","bot","Close2xIcon$5","MessageBubbleAlignmentStyles","MessageBubbleTitleStyles","MessageOptionsStyles","headerView","zIndex","menuListStyles","subMenuStyle","showSubMenu","listStyleType","marginTop","moreButtonStyle","ContextMenuStyle","menuButtonStyle","isSubMenu","menuData","popoverStyle","CometChatContextMenu","setShowSubMenu","moreButtonRef","menuButtonRefArray","moreIconHoverText","onOptionClicked","placement","handleMenuClick","getMoreButton","getMenu","menu","index","menuButton","moreButton","el","getTopMenu","slice","getSubMenu","closeContentView","margin","CometChatMessageBubble","leadingView","replyView","threadView","footerView","statusInfoView","messageBubbleStyle","setRef","contentStyle","messageRef","isHovering","setIsHovering","timeoutId","forEach","parseInt","getPlacementAlignment","isMobile","checkBubblePosition","Placement","innerWidth","bubble","rect","getBoundingClientRect","isAtTop","innerHeight","isAtBottom","gap","onMouseEnter","onMouseLeave","alignSelf","getLeadingView","getHeaderView","messageSendCallBack","MessageInput","CometChatTextInput","ccTextInputChanged","ccTextInputEntered","AIAssistBotChatView","scrollBottom","subtitleText","botFirstMessage","messageInputRef","inputTextRef","messagesList","setMessagesList","insertFirstMessage","botFirstMessageText","onComposerEditTextChange","getBotResponse","response","newMessage","prevMessages","messages","getMuid","catch","onMessageSendClick","emptyInputField","getListItem","useMemo","Close2xIcon","sendIconURL","AIAssistBotDecorator","onMessageSent","resolve","reject","receiverId","receiverType","apiConfiguration","askBot","closeChat","ccHidePanel","PanelAlignment","ccShowPanel","newDataSource","addMessageListener","getAllBots","aiOptionsStyle","generalAskBotText","askText","numberOfBots","titleName","parentMessageId","listItemTextColor","listItemTextFont","messageComposerActions","newAction","botList","callBacks","backAction","closePopover","setTags","ccActiveChatChanged","AIAssistBotExtension","contentContainerStyle","getConversationStarterStyle","replyTextFont","replyTextColor","replyBackground","textBackground","textBorder","textBorderRadius","emptyIcon","getConversationStarterCallback","editReplyCallback","CometChatConversationStarterView","SmartReplies","ccReplyClicked","CometChatAICardView","CometChatAICard","AIConversationStarterView","messageListState","setMessageListState","activeView","setActiveView","loadingStateText","conversationStarters","CustomView","conversationStarterView","smartReplyStyle","conversationStarterStyle","replies","reply","getLoadedView","LoadingView","ErrorView","EmptyView","emptyIconURL","AIConversationStarterDecorator","currentMessage","getConversationStarter","editReply","ccComposeMessage","messageListFooter","closeIfMessageReceived","getReceiverId","loadConversationStarter","CometChatMessageEvents","onTextMessageReceived","onCustomMessageReceived","onMediaMessageReceived","onFormMessageReceived","onSchedulerMessageReceived","onCardMessageReceived","onCustomInteractiveMessageReceived","ccMessageSent","AIConversationStarterExtension","getPanelStyle","summaryStyle","PanelStyle","getConversationSummaryCallback","CometChatPanelView","CometChatPanel","AIConversationSummaryView","titleText","conversationSummary","conversationSummaryView","panelStyle","conversationSummaryStyle","closeIconUrl","AIConversationSummaryDecorator","unreadMessageCount","LISTENER_ID","closePanel","getConversationSummary","loadConversationSummary","unreadMessageThreshold","AIConversationSummaryExtension","getSmartReplyStyle","getSmartRepliesTitleStyle","getSmartRepliesCallback","CometChatSmartRepliesView","AISmartRepliesView","smartReplies","repliesArray","SmartRepliesView","smartRepliesStyle","AISmartRepliesDecorator","isModalClosed","childRef","buttonRef","getSmartReplies","AISmartRepliesExtension","resizeIconHoverText","sessionID","minimizeIconURL","maximizeIconURL","callSettingsBuilder","ongoingCallStyle","minimizeIconTint","maximizeIconTint","callWorkflow","CallWorkflow","defaultCalling","CometChatOngoingCall","setLoggedInuser","callScreenFrameRef","onErrorCallback","errorModel","details","errorObj","getCallBuilder","audioOnlyCall","CometChatUIKitCalls","CallSettingsBuilder","enableDefaultLayout","setIsAudioOnlyCall","setCallListener","OngoingCallListener","onCallEnded","endSession","CometChatCallEvents","ccCallEnded","onCallEndButtonPressed","endCall","startCall","authToken","getAuthToken","generateToken","startSession","token","CometChatUIKit","callscreenStyle","inset","CallButtonsWrapperStyle","callButtonStyle","outgoingCallStyle","defaultCallsButtonStyle","CallButtonsStyle","voiceCallIconTint","videoCallIconTint","voiceCallIconTextFont","videoCallIconTextFont","voiceCallIconTextColor","videoCallIconTextColor","buttonPadding","buttonBorder","buttonBorderRadius","CallscreenStyle","OutgoingCallWrapperStyle","OutgoingCallSubtitleStyle","iconBackground","OutgoingCallCardStyle","defaultAvatarStyle","defaultOutgoingCallStyle","OutgoingCallStyle","declineButtonTextFont","declineButtonTextColor","declineButtonIconTint","declineButtonIconBackground","Close2xIcon$4","CometChatOutgoingCall","disableSoundForCalls","customSoundForCalls","declineButtonText","declineButtonIconURL","onCloseClicked","iconAlignment","IconButtonAlignment","avatarStyleRef","outgoingCallStyleRef","buttonStyleRef","callRef","cancelCallButtonRef","OutgoingCallCancelButtonStyle","CometChatSoundManager","pause","playAudio","play","Sound","incomingCall","cancleCallButton","getReceiver","cardStyle","getReceiverType","getIcon","voiceCallIconURL","voiceCallIconText","voiceCallIconHoverText","videoCallIconURL","videoCallIconText","videoCallIconHoverText","callButtonsStyle","onVoiceCallClick","onVideoCallClick","CometChatCallButtons","callButtonStyleRef","voiceCallButtonStyleRef","videoCallButtonStyleRef","VideoCallButtonStyle","setActiveUser","activeGroup","setActiveGroup","showOngoingCall","setShowOngoingCall","showOutgoingCallScreen","setShowOutgoingCallScreen","disableButtons","setDisableButtons","audioCallButtonRef","videoCallButtonRef","sessionIdRef","onVoiceCallClickRef","onVideoCallClickRef","callbuttonsListenerId","getTime","subscribeToEvents","ccCallRejected","ccOutgoingCall","attachListeners","addCallListener","CallListener","onIncomingCallReceived","onIncomingCallCancelled","onOutgoingCallRejected","onOutgoingCallAccepted","getSessionId","removeListener","removeCallListener","closeCallScreen","initiateCall","callObj","Call","outgoingCall","initiateAudioCall","sendCustomMessage","customData","sessionId","callType","customType","calls","meeting","conversationId","customMessage","CustomMessage","setMetadata","incrementUnreadCount","shouldUpdateConversation","sentAt","muid","MessageStatus","inprogress","success","initiateVideoCall","cancelOutgoingCall","rejectCall","cancelled","getVoiceCallButtonStyle","getVoiceCallButtonTint","getVideoCallButtonStyle","getVideoCallButtonTint","unsubscribeFromEvents","audioCallButton","videoCallButton","audioCallButtonClicked","videoCallButtonClicked","ccBtnDisabledPropSpreadObject","CallingConstants","ongoing","ended","initiated","rejected","unanswered","CometChatDefaultCallBubble","CometChatIconButton","CallingExtensionDecorator","addLoginListener","LoginListener","logoutSuccess","getActiveCall","types","categories","custom","checkIfTemplateTypeExist","template","some","obj","checkIfTemplateCategoryExist","templates","getDirectCallTemplate","getDefaultCallTemplate","getDirectCallMessageBubble","getDefaultAudioCallMessageBubble","getDefaultVideoCallMessageBubble","getCallBubbleStyle","getData","getCallBubbleTitle","callBubbleAlignment","DocumentIconAlignment","callBubbleStyle","callBubbleTitle","joinCallButtonText","CometChatDirectCallBubble","CometChatDocumentBubble","documentStyle","buttonText","ccClicked","startDirectCall","ongoingCallScreen","directCalling","ccShowOngoingCall","callStatusStyle","CallingDetailsUtils","isMissedCall","getCallActionMessage","getCallStatus","additionalParams","auxMenus","callButtons","ExtensionsDataSource","isExtensionEnabled","CallingExtension","DocumentIcon","CometChatDocumentExtensionBubble","CollaborativeDocumentExtensionDecorator","CollaborativeDocumentConstants","extension_document","checkIfTemplateExist","getDocumentTemplate","documentMessage","getDocumentContentView","documentBubbleAlignment","configurationDocumentBubbleStyle","getDocumentBubbleStyle","documentBubbleStyle","documentURL","getDocumentURL","documentTitle","documentButtonText","documentSubitle","getIconURL","launchCollaborativeDocument","open","metadata","checkHasOwnProperty","injectedObject","extensions","extensionObject","document","document_url","board_url","configurationOptionStyle","isUser","getOptionIconURL","callExtension","post","v1_create","receiver","CollaborativeDocumentExtension","ExtensionsId","WhiteboardIcon","CometChatWhiteboardExtensionBubble","CollaborativeWhiteBoardExtensionDecorator","CollaborativeWhiteboardConstants","extension_whiteboard","getWhiteBoardTemplate","whiteboardMessage","getWhiteboardContentView","configurationWhiteboardBubbleStyle","getWhiteboardBubbleStyle","whiteboardURL","getWhiteboardDocument","whiteboardTitle","whiteboardButtonText","whiteboardSubitle","launchCollaborativeWhiteboardDocument","whiteboard","CollaborativeWhiteboardExtension","CometChatImageModerationBubble","ImageModeration","CCShowDialog","CometChatBackDropElement","CometChatBackdrop","CometChatConfirmDialogBox","CometChatConfirmDialog","ccCancelClicked","ccConfirmClicked","ImageModerationExtensionDecorator","getMetadata","getImageModerationStyle","imageModerationStyle","showDialog","_event","confirmModal","getConfirmationModal","onConfirm","configurationBackdropStyle","getBackDropStyle","configurationConfirmDialogStyle","getConfirmDialogSyle","warningText","confirmText","cancelText","confirmDialogStyle","confirmButtonBackground","cancelButtonBackground","getSecondary","confirmButtonTextColor","confirmButtonTextFont","cancelButtonTextColor","cancelButtonTextFont","messageTextFont","messageTextColor","cancelButtonText","confirmButtonText","onCancelClicked","onConfirmClicked","configurationImageModerationBubbleStyle","filterColor","warningTextColor","warningTextFont","ImageModerationExtension","imageModeration","CometChatLinkPreviewBubble","LinkPreview","ccLinkClicked","LinkPreviewExtensionDecorator","linkPreviewObject","getLinkPreview","getLinkPreviewWrapperStyle","getLinkPreviewDetails","description","favIconURL","linkPreviewStyle","getLinkPreviewStyle","openLink","getTextMessageStyle","url","configuarationLinkPreviewStyle","LinkPreviewStyle","descriptionColor","LinkPreviewConstants","injected","extensionsObject","link_preview","links","LinkPreviewExtension","linkPreview","CometChatMessageTranslationBubble","MessageTranslationBubble","MessageTranslationExtensionDecorator","getTranslationStyle","configurationMessageTranslationStyle","getMessageTranslationStyle","MessageTranslationStyle","translatedTextFont","translatedTextColor","helpTextColor","helpTextFont","checkIfOptionExist","translateMessage","newOption","msgId","languages","navigator","message_translations","translatedMessage","ccMessageTranslated","translatedText","messageTranslationStyle","MessageTranslationExtension","messageTranslation","CometChatPollsBubble","PollsBubble","CometChatCreatePollView","CreatePoll","PollsExtensionDecorator","PollsConstants","extension_poll","getPollsTemplate","pollsMessage","getPollsContentView","configurationPollsBubbleStyle","getPollsBubbleStyle","pollBubbleStyle","votePercentTextFont","votePercentTextColor","pollQuestionTextFont","pollQuestionTextColor","pollOptionTextFont","pollOptionTextColor","pollOptionBackground","optionsIconTint","totalVoteCountTextFont","totalVoteCountTextColor","selectedPollOptionBackground","userSelectedOptionBackground","pollOptionBorder","pollOptionBorderRadius","pollStyle","pollQuestion","getPollBubbleData","pollId","senderUid","getCustomData","onPollsButtonClicked","configurationCreatePollStyle","getCreatePollStyle","createPollStyle","deleteIconTint","questionInputBackground","optionInputBackground","answerHelpTextFont","answerHelpTextColor","addAnswerIconTint","createPollButtonTextFont","createPollButtonTextColor","createPollButtonBackground","addAnswerTextFont","addAnswerTextColor","optionPlaceholderTextFont","optionPlaceholderTextColor","questionInputTextFont","questionInputTextColor","optionInputTextFont","optionInputTextColor","ccShowModal","getPollView","triggerCloseEvent","deleteIconURL","getDeleteIconURL","getCloseIconURL","addAnswerIconURL","getAddAnswerIconURL","ccHideModal","PollsExtension","polls","CometChatSmartReplyBubble","SmartReplyExtensionDecorator","getSmartReplyView","getReplies","smartReply","smartReplyObject","SmartRepliesConstants","smart_reply","reply_positive","reply_neutral","reply_negative","configurationSmartRepliesStyle","getSmartRepliesStyle","sendSmartReply","setParentMessageId","setCategory","sendMessage","closeSmartReply","getSmartReplyButtonStyle","SmartReplyExtension","CometChatStickersKeyboard","StickersKeyboard","ccStickerClicked","CometChatImageMessageBubble","StickersExtensionDecorator","showStickerKeyboard","StickersConstants","sticker","getStickerTemplate","auxiliaryOptions","getStickerAuxiliaryButton","configurationStickersStyle","getStickersStyle","emojiButtonStyle","sticketButtonHeight","stickerButtonWidth","stickerButtonIconTint","PopoverStyle","stickerKeyboardStyle","openIconURL","getStickerIconURL","stickerStyle","sendSticker","stickerName","stickerURL","sticker_url","sticker_name","getSticker","stickerData","custom_data","getStickerMessageContentView","stickerMessage","StickersExtension","stickers","TextModeratorExtensionDecorator","getModeratedtext","getExtensionData","messageObj","getConversationType","RECEIVER_TYPE","USER","moderatedText","setText","TextModeratorExtension","profanityFilter","promise1","promise2","dataMasking","ThumbnailGenerationExtensionDecorator","thumbnailImage","ThumbnailGenerationExtension","thumbnailGeneration","uiKitSettings","checkAuthSettings","appSettingsBuilder","AppSettingsBuilder","getRoles","subscribePresenceForRoles","getSubscriptionType","subscribePresenceForAllUsers","subscribePresenceForFriends","autoEstablishSocketConnection","isAutoEstablishSocketConnection","setRegion","getRegion","overrideAdminHost","getAdminHost","overrideClientHost","getClientHost","appSettings","setSource","CometChatUIKitSharedSettings","uikitSettings","CometChatUiKit","version","appId","initiateAfterLogin","enableCalling","callAppSetting","CallAppSettingsBuilder","setAppId","region","getConversationUpdateSettings","conversationUpdateSettings","extensionList","defaultExtensions","ChatSdkEventInitializer","attachListener","aiFeaturesList","aiFeatures","defaultAIFeatures","extension","login","uid","authKey","loginWithAuthToken","createUser","logout","removeLoggedInUser","sendFormMessage","disableLocalEvents","sendInteractiveMessage","interactiveMessage","InteractiveMessageUtils","convertInteractiveMessage","sendCardMessage","sendCustomInteractiveMessage","sendTextMessage","sendMediaMessage","sendSchedulerMessage","SoundManager","Localize","CometChatLocalize","getTabListStyle","tabsStyle","tabAlignment","positionProperties","TabAlignment","tabListHeight","tabListWidth","tabListBorder","tabListBorderRadius","tabListBackground","tabListBoxShadow","tabListPadding","getTabContentStyle","tabPaneHeight","tabPaneWidth","getTabItemStyle","tab","activeTab","active","borderRadiusStyle","activeBorderRadius","TabPaneContentViewStyle","tabStyle","tabPaneContentStyle","tabs","keepAlive","tabIconAlignment","CometChatIconButtonBubble","ccButtonClicked","CometChatTabs","setActiveTab","activeTabId","setActiveTabId","childViewRef","openViewOnCLick","tabItem","childView","getButtonStyle","activeTitleTextFont","activeTitleTextColor","activeIconTint","ButtonStyle","getTabItems","floor","random","getTabPane","PollsConfiguration","createPollIconURL","optionIconURL","optionStyle","getCreatePollIconURL","IncomingCallWrapperStyle","incomingCallStyle","IncomingCallSubtitleStyle","IncomingCallLabelStyle","IncomingCallListItemStyle","marginLeft","IncomingCallTailViewStyle","IncomingCallButtonsStyle","paddingLeft","defaultIncomingCallStyle","IncomingCallStyle","getAccent800","acceptButtonTextFont","acceptButtonTextColor","acceptButtonBackground","acceptButtonBorderRadius","acceptButtonBorder","declineButtonBackground","declineButtonBorderRadius","declineButtonBorder","defaultListItemStyle","defaultOngoingCallStyle","getInitiator","callStatus","sentByMe","missedStatuses","busy","verifyCallUser","getCallStatusWithType","includeType","callMessageText","callTypeKey","convertMinutesToHoursMinutesSeconds","minutes","hours","remainingMinutes","seconds","hoursString","minutesString","secondsString","getSubtitleStyle","callStatusTextColor","callStatusTextFont","getAvatarStyle","getListItemStyle","callLogsStyle","getListStyle","getCallDateStyle","getDirectionIconStyle","tint","missedCallIconTint","outgoingCallIconTint","incomingCallIconTint","getInfoButtonStyle","infoIconTint","getDateSeparator","dateSeparatorTextFont","dateSeparatorTextColor","incomingAudioCallIconUrl","incomingVideoCallIconUrl","outgoingAudioCallIconUrl","outgoingVideoCallIconUrl","missedAudioCallIconUrl","missedVideoCallIconUrl","infoIconUrl","callLogRequestBuilder","onInfoClick","activeCall","datePattern","dateSeparatorPattern","DayDate","outgoingCallConfiguration","CometChatCallLogs","callList","setCallList","callListState","setCallListState","callInitiated","setCallInitiated","setCall","setSessionId","initiatedCallRef","setCallLogRequestBuilder","CallLogRequestBuilder","setCallCategory","setAuthToken","fetchNextCallList","getCallList","prevCallList","CALL_TYPE","AUDIO","VIDEO","callTmp","handleItemClick","handleInfoClick","getSessionID","getCallDirectionIcon","missedCall","icon","isDateDifferent","firstDate","secondDate","firstDateObj","secondDateObj","getDate","getMonth","getFullYear","getMessageBubbleDate","getInitiatedAt","getOutGoingCallStyle","getOngoingCallStyle","openOngoingCallScreen","detachListeners","getListItemSubtitleView","getListItemTailView","marginRight","avatar","setCallBuilder","onDeclineButtonClicked","getTitleStyle","callLog","getPrimaryDetailsTemplate","getSecondaryDetailsTemplate","getCallButtons","CometChatCallDetailsTemplate","hideSectionSeparator","getPrimaryOptions","getSecondaryOptions","CometChatCallDetailsOption","generateCallDetailsHTML","participants","count","generateCallOptionsHTML","hasRecording","getRecordings","initiatedAt","headingDateStyle","DateStyle","getTotalDurationInMinutes","containerStyle","buttonContainerStyle","getCallStatusStyle","getCallDurationStyle","callDurationTextColor","getDividerStyle","backIconUrl","callUser","callGroup","onBackClick","callLogHistoryStyle","CometChatCallLogHistory","builder","dividerStyle","getCallDuration","setRequestBuilder","callStatusColor","callStatusFont","callLogParticipantsStyle","CometChatCallLogParticipants","getCallParticipants","getParticipants","getCallInitiatedAt","getDurationOfCall","getHasJoined","getJoinedAt","recordingDurationColor","recordingDurationFont","getDownloadButtonStyle","downloadIconTint","downloadIconUrl","hideDownloadButton","callLogRecordingsStyle","onDownloadClick","CometChatCallLogRecordings","handleDownloadClick","getRecordingURL","fetch","blob","blobURL","createObjectURL","href","download","body","appendChild","click","getRecordingStartTime","getStartTime","getRecordingDuration","remainingSeconds","convertSecondsToHoursMinutesSeconds","getDuration","getRid","callLogHistoryConfiguration","callLogParticipantsConfiguration","callLogRecordingsConfiguration","callLogDetailsStyle","CometChatCallLogDetails","detailsTemplates","setDetailsTemplates","showParticipants","setShowParticipants","showRecordings","setShowRecordings","showCallHistory","setShowCallHistory","outerViewBorder","setTemplates","templatesArray","getOptionsForTemplate","callEntity","handleOptionClick","showDetailsPage","showParticipantsPage","showRecordingsPage","showCallHistoryPage","handlePageOnBackClick","getCallUser","getCallGroup","getTemplatesUI","hideItemSeparator","tail","getAvatarTitleStyle","getLabelStyle","isMobileView","withDetailsStyle","callLogDetailsConfiguration","callLogsConfiguration","CometChatCallLogsWithDetails","setActiveCall","getCallLogStyle","getCallDetailStyle","getBackClick","overrideOnBackClick","addMembersStyle","addMembersStyleObject","UsersStyle","addMembersButtonStyle","addMembersButtonBackground","addMembersButtonTextColor","addMembersButtonTextFont","SearchIcon$3","SpinnerIcon$5","backbutton$1","closeButton","CometChatAddMembers","sectionHeaderField","onAddMembersButtonClick","membersToAddRef","selectionModeRef","onSelectPropRef","onBackPropRef","onAddMembersButtonClickPropRef","createGroupMemberFromUser","onSelectWrapper","selected","tmpMembersToAddList","updated","curMember","onAddBtnClickWrapper","onAddBtnClick","UIDsToRemove","addMembersToGroup","add","addedMembers","addedMember","bannedMembersWrapperStyle","bannedMemberStyleObject","unbanBtnStyle","unbanIconTint","Close2xIcon$2","BannedMembersManager","bannedMembersRequestBuilder","bannedMembersSearchText","finalBannedMembersRequestBuilder","BannedMembersRequestBuilder","bannedMembersRequest","setAvatar","attachSDKGroupListener","groupRef","member","onGroupMemberUnbanned","unbannedUser","unbannedBy","unbannedFrom","bannedMemberUid","attachSDKUserListener","SearchIcon$2","SpinnerIcon$4","bannedMembers","bannedMember","CometChatBannedMembers","unbanIconURL","bannedMemberStyle","bannedMembersManagerRef","fetchNextAndAppendBannedMembers","unbanMember","unbanGroupMember","bannedMemberOptions","getDefaultListTailView","groupMemberUnbannedSub","ccGroupMemberUnbanned","conversationsWrapperStyle","conversationsStyleObject","deleteConversationDialogStyle","ConfirmDialogStyle","badgeStyle","badgeStyleObject","BadgeStyle","itemThreadIndicatorStyle","threadIndicatorTextFont","threadIndicatorTextColor","iconStyle","IconStyle","receiptStyleObject","sentIconTint","deliveredIconTint","readIconTint","subtitleTextStyle","typingIndicatorMap","convWith","getConversationWith","User","typingIndictorTextFont","typingIndictorTextColor","textOverflow","lastMessageTextFont","lastMessageTextColor","dateStyleObject","backdropStyleObject","conversationsStyle","ConversationsManager","conversationsRequestBuilder","convRequestBuilder","ConversationsRequestBuilder","_a","limit","conversationsRequest","conversationType","attachMessageReceivedListener","mediaMessage","attachMessageReceiptListener","onMessagesRead","messageReceipt","onMessagesDelivered","attachMessageTypingListener","onTypingStarted","typingIndicator","onTypingEnded","attachMessageModifiedListener","onMessageEdited","onMessageDeleted","attachCallListener","shouldIncrementForCustomMessage","willUpdateConversation","shouldUpdateOnCustomMessages","shouldLastMessageAndUnreadCountBeUpdated","isCustomMessage","shouldUpdateOnMessageReplies","shouldUpdateOnGroupActions","shouldUpdateOnCallActivities","LockedIcon$2","MessageDeliveredIcon","MessageReadIcon","MessageSentIcon","PrivateIcon$2","SpinnerIcon$3","WaitIcon$1","WarningSmallIcon","isAMessage","MediaMessage","InteractiveMessage","conversations","removeOldConversation","conversationList","newTypingIndicatorMap","convWithId","conversationToBeDeleted","targetConvId","getConversationId","conv","newConversationList","newConv","setConversationWith","targetId","updateReadAt","targetMessageId","getMessageId","lastMessage","getReadAt","getDeliveredAt","setReadAt","setUnreadMessageCount","setDeliveredAt","senderId","isReceiverTypeGroup","Group","setLastMessage","targetConversationId","targetGuidId","targetConversation","messageReadAt","CometChatConversations","activeConversation","disableReceipt","DayDateTime","protectedGroupIcon","LockedIcon","passwordGroupIcon","privateGroupIcon","PrivateIcon","readIcon","deliveredIcon","WaitIcon","sentIcon","disableSoundForMessages","disableTyping","customSoundForMessages","confirmDialogTitle","confirmDialogMessage","backDropStyleObject","unreadMentions","confirmDialogElement","setConfirmDialogRef","conversationsManagerRef","customSoundForMessagesRef","fetchNextAndAppendConversations","conversationManager","getIncrementUnreadCountBoolFromMetaData","metaDataGetterName","incrementUnreadCountFieldName","metaData","Boolean","updateConversationList","getUnreadMessageCount","Number","getActionFor","updatedGroup","refreshSingleConversation","removeConversation","CometChatHelper","getConversationFromMessage","onMessageReceived","markAsDelivered","incomingMessage","setReceipts","setTypingIndicator","typingStarted","getListItemAvatarURL","getListItemStatusIndicatorColor","online","GroupTypes","password","passwordGroupIconBackground","private","privateGroupIconBackground","getListItemStatusIndicatorIcon","getSubtitleThreadView","getSubtitleReadReceiptView","shouldDisplaySubtitleReceipt","MessageReceiptUtils","getReceiptStatus","getSubtitleText","textFormattersList","dangerouslySetInnerHTML","__html","whiteSpace","getSubtitleTextView","deleteOptionCallback","getListItemMenuView","defaultOptions","getDefaultOptions","ConversationOptions","getListItemTailContentView","setStatusIndicatorStyle","confirmClickEventName","cancelClickEventName","handleConfirmClick","deleteConversation","CometChatConversationEvents","ccConversationDeleted","handleCancelClick","groupMemberScopeChangedSub","groupDeletedSub","ccGroupDeleted","groupLeftSub","ccGroupLeft","leftGroup","userBlockedSub","messageEditedSub","ccMessageEdited","messageSentSub","messageDeletedSub","ccMessageDeleted","messageReadSub","ccMessageRead","callAcceptedSub","ccCallAccepted","outgoingCallSub","callRejectedSub","callEndedSub","WithMessagesWrapperStyle","WithMessagesMainStyle","MobileLayoutStyle","EmptyMessagesDivStyle","WithMessagesSidebarStyle","getConversationsWrapperStyles","conversationsWithMessagesStyle","getWithMessagesSidebarStyle","getMobileViewSidebarStyle","getDesktopViewSidebarStyle","visibility","borderRight","getWithMessagesMainStyle","getMobileViewMainStyle","getDesktopViewMainStyle","getConversationsStyle","conversationsConfiguration","getMessageHeaderStyle","messagesConfiguration","messageHeaderConfiguration","messageHeaderStyle","getMessageComposerStyle","messageComposerConfiguration","messageComposerStyle","getMessagesStyle","messagesStyle","getEmptyMessageLayoutStyle","showCometChatContacts","contactsStyle","submitBtnStyle","submitButtonBackground","submitButtonTextColor","submitButtonTextFont","contactsHeaderStyle","contactsWrapperStyle","getTabItemStyling","tabVisibility","TabsVisibility","usersAndGroups","tabHeight","tabBorderRadius","tabBorder","tabTitleTextFont","tabTitleTextColor","activeTabTitleTextFont","activeTabTitleTextColor","activeTabBackground","activeBorder","tabBackground","groupsWrapperStyle","groupsStyleObject","groupsStyle","GroupsStyle","subtitleStyle","subTitleTextFont","subTitleTextColor","GroupsManager","groupsRequestBuilder","groupsSearchText","tmpGrpReqBuilder","groupsRequest","GroupsRequestBuilder","createGroupListener","setHasJoined","groupLeft","guid","LockedIcon$1","PrivateIcon$1","SearchIcon$1","SpinnerIcon$2","groups","removeOldGroups","groupList","targetGroup","targetGuid","CometChatGroups","groupsManagerRef","fetchNextAndAppendGroups","groupsManager","getGroupStatusIcon","statusIconURL","getSubtitleView","membersCount","getMenuView","getTailView","groupCreatedSub","ccGroupCreated","groupMemberJoinedSub","ccGroupMemberJoined","groupMemberLeftSub","groupOwnershipChangedSub","ccOwnershipChanged","usersTabTitle","groupsTabTitle","groupsConfiguration","GroupsConfiguration","usersConfiguration","UsersConfiguration","selectionLimit","hideSubmitButton","submitButtonText","CometChatContacts","setTabs","groupsListRef","usersListRef","isActiveUsersTab","setIsActiveUsersTab","isLimitReached","setIsLimitReached","isActiveGroupsTab","setIsActiveGroupsTab","usersTabRef","groupsTabRef","onSubmitButtonClick","hideBlockedUsers","usersSearchRequestBuilder","joinedOnly","groupsSearchRequestBuilder","CometChatTabItem","onUserClicked","onUserSelected","onGroupClicked","onGroupSelected","submitClicked","splice","MessagesWrapperStyle","ThreadedMessagesDivStyle","overflowY","MessagesDetailsDivStyle","MessagesHeaderDivStyle","MessagesListDivStyle","getMessageListStyle","messageListConfiguration","messageListStyle","getDetailsStyle","detailsConfiguration","detailsStyle","detailsButtonStyle","panelDivStyle","detailsStyleObject","isUserOnline","optionBtnStyle","leaveDialogStyle","confirmDialogStyleObject","deleteDialogStyle","isSectionSeparatorStyle","getGroupMembersStyle","groupMembersConfiguration","getAddMembersStyle","addMembersConfiguration","getBannedMembersStyle","bannedMembersConfiguration","bannedMembersStyle","getTransferOwnershipStyle","transferOwnershipConfiguration","transferOwnershipStyle","BackButtonIcon","Close2xIcon$1","transferOwnershipStyleObject","isRadioButton","MemberScopeTextColor","MemberScopeTextFont","transferBtnStyle","transferButtonTextColor","transferButtonTextFont","cancelBtnStyle","GroupMembersStyle","SpinnerIcon$1","CometChatTransferOwnership","groupMembersRequestBuilder","transferButtonText","onTransferOwnership","groupMemberStyle","groupMembersStyleObject","isDisabled","setIsDisabled","selectedMemberRef","onTransferOwnershipPropRef","onTransferOwnershipWrapper","selectedMember","onTransferOwnershipProp","transferGroupOwnership","setOwner","newOwner","getOwner","rowGap","CometChatDetails","customProfileView","hideProfile","leaveButtonText","leaveConfirmDialogMessage","transferConfirmDialogMessage","deleteButtonText","deleteConfirmDialogMessage","listItmeStyleObject","leaveDialogStyleObject","deleteDialogStyleObject","pageToShow","setPageToShow","modalInfo","setModalInfo","userOrGroup","setUserOrGroup","leaveOrTransferConfirmDialogElement","setLeaveOrTransferConfirmDialog","deleteConfirmDialogElement","setDeleteConfirmDialog","onClosePropRef","createGroupMemberLeftActionMessage","handleLeaveOrTransferConfirmClick","leaveGroup","userLeft","handleDeleteConfirmClick","deleteGroup","groupType","getStatusIndicatorIcon","getDefaultProfileSubtitleText","numGroupMembers","getDefaultProfileSubtitleView","UserOptions","viewProfile","getLink","block","getBlockedByMe","blockUsers","userClone","setBlockedByMe","blockUser","unblock","unblockUsers","unblockUser","GroupOptions","viewMembers","addMembers","leave","isLoggedInUserGroupOwner","getSeparator","isTemplateSeparator","getSectionJSXWithKeyAdded","sectionSeparatorColor","itemSeparatorColor","titleJSX","optionsJSX","templateOptions","getTemplateOptions","templateOption","buttonJSX","contentJSX","transform","getOptionJSXWithKeyAdded","setPageToShowToNone","closeModal","getCometChatTransferOwnership","getUser","getGroup","paddingBottom","flexGrow","profileViewJSX","getDefaultProfileView","getProfileView","templateJSXList","getTemplates","getSectionList","resJSX","getCometChatAddMembers","getCometChatBannedMembers","dropdownIconURL","getCometChatGroupMembers","getSelectedPage","getModal","RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN","previewStyle","PreviewStyle","previewTitleFont","previewTitleColor","previewSubtitleFont","previewSubtitleColor","closePreviewTint","getMentionInfoIconStyle","mentionsWarningStyle","TextInputStyle","maxInputHeight","dividerTint","sendButtonStyle","getEmojiButtonIconTint","isAuxiliaryContentDisplayed","emojiIconTint","getVoiceButtonIconTint","voiceRecordingIconTint","getAttachButtonIconTint","isSecondaryContentDisplayed","attachIcontint","getAIButtonIconTint","AIIconTint","ACTION_SHEET_HEIGHT","ACTION_SHEET_WIDTH","ACTION_SHEET_BORDER_RADIUS","attachmentPopoverStyle","applyActionsheetStyle","actionSheetContainerStyle","AIActionSheetContainerStyle","aiActionSheetStyle","getActionSheetStyle","layoutModeIconTint","listItemIconTint","listItemIconBackground","listItemIconBorderRadius","getAIActionSheetStyle","optionsSeparatorTint","attachmentButtonStyle","aiButtonStyle","EMOJI_KEYBOARD_HEIGHT","EMOJI_KEYBOARD_WIDTH","EMOJI_KEYBOARD_BORDER_RADIUS","emojiKeyboardContainerStyle","emojiKeyboardStyle","EmojiKeyboardStyle","emojiKeyboardTextFont","emojiKeyboardTextColor","applyHorizontalMargin","VOICE_RECORDING_HEIGHT","VOICE_RECORDING_WIDTH","VOICE_RECORDING_BORDER_RADIUS","voiceRecordingStyle","mediaRecorderStyle","MediaRecorderStyle","submitIconTint","startIconTint","stopIconTint","timerTextColor","timerTextFont","voiceButtonStyle","marginStyle","AIIcon","CloseIcon$1","HeartIcon","MentionWarningIcon","MicIcon","PlusIcon","PlusRotatedIcon","SendIcon","SmileysIcon","StopIcon","ActionSheetView","TextInput","addToMsgInputText","textMessageToEdit","contentToDisplay","showPoll","showMentionsCountWarning","CometChatMessageComposer","initialText","onTextChange","placeHolderText","sendButtonIconURL","sendButtonView","onSendButtonClick","secondaryButtonView","attachmentIconURL","emojiIconURL","AIIconURL","auxiliaryButtonView","auxiliaryButtonAlignment","AuxiliaryButtonAlignment","attachmentOptions","LiveReactionIconURL","hideLiveReaction","customSoundForMessage","disableTypingEvents","messageComposerStyleObject","hideVoiceRecording","voiceRecordingStartIconURL","voiceRecordingCloseIconURL","CloseIcon","voiceRecordingStopIconURL","voiceRecordingSubmitIconURL","userMemberWrapperConfiguration","InfoSimpleIcon","mentionsWarningText","textInputRef","mediaFilePickerRef","emojiKeyboardElement","setEmojiKeyboardRef","voiceRecordingElement","setVoiceRecordingRef","primaryBtnElement","setPrimaryBtnRef","secondaryBtnElement","setSecondaryBtnRef","aiBtnElement","setAIBtnRef","voiceRecordingBtnElement","setVoiceRecordingBtnElement","auxiliaryBtnElement","setAuxiliaryBtnRef","auxiliaryPopoverElement","setAuxiliaryPopoverRef","attachmentPopoverElement","setAttachmentPopoverRef","aiPopoverElement","setAIPopoverRef","textMessageEditPreviewElement","setTextMessageEditPreviewRef","actionSheetElement","setActionSheetRef","aiActionSheetElement","setAIActionSheetRef","liveReactionBtnElement","setLiveReactionBtnRef","actionIdToActionOnClick","endTypingTimeoutId","createPollViewRef","userPropRef","parentMessageIdPropRef","disableSoundForMessagesPropRef","customSoundForMessagePropRef","onSendButtonClickPropRef","smartRepliesView","setSmartRepliesView","textFormatterArray","setTextFormatters","mentionsSearchTerm","setMentionsSearchTerm","mentionsSearchTermTemp","lastEmptySearchTerm","showListForMentions","setShowListForMentions","mentionsTextFormatterInstanceRef","mentionsSearchCount","setMentionsSearchCount","userMemberWrapperConfig","setUserMemberWrapperConfig","UserMemberWrapperConfiguration","setUserMemberListType","setUsersRequestBuilder","setGroupMembersRequestBuilder","userMemberWrapperRef","mentionsFormatterInstanceId","defaultOnEmptyForMentions","searchMentions","searchTerm","currentSearchTerm","toLowerCase","startsWith","getReceiverDetails","isBlocked","getHasBlockedMe","getTypingNotification","TypingIndicator","startTyping","typingNotification","endTyping","handleTyping","getComposerId","mySetAddToMsgInputText","flushSync","handleSDKError","wasEditMethodCall","playAudioIfSoundNotDisabled","outgoingMessage","getTextMessage","formatMessageForSending","sentTextMessage","resetCometChatUserGroupMembers","handleTextMessageSend","getCometChatUserGroupMembers","userObj","setMentionedUsers","getEditedTextMessage","newText","textMessageId","newTextMessage","setId","sendEditedTextMessage","editedTextMessage","editedMessage","handleEditTextMessageSend","PreviewMessageMode","edit","handleSendButtonClick","getMediaMessage","fileType","processedFile","reader","FileReader","onload","File","onerror","readAsArrayBuffer","processFile","handleMediaMessageSend","sentMediaMessage","handleSendVoiceMessage","audioFile","string","year","toString","month","padStart","date","getHours","getMinutes","getSeconds","audioRecordingSimpleDateFormat","handleMediaMessageSendWrapper","mediaFilePickerElement","files","accept","hideSendButton","getSendButton","getSecondaryView","defaultSecondaryBtn","curAction","overrideOnClick","defaultSecondaryContent","getVoiceRecordingView","mediaPlayerStyle","autorecording","recordingType","RecordingType","startIconURL","stopIconURL","submitButtonIconURL","startIconText","stopIconText","submitButtonIconText","closeOnOutsideClick","getAIButtonView","defaultAIBtn","defaultAIContent","onActionItemClick","getAuxiliaryView","defaultAuxiliaryOptions","defaultAuxiliaryBtn","defaultAuxiliaryContent","getTextMessageEditPreview","messageToBeEdited","previewSubtitle","cometChatUsersGroupMembers","checkForMentions","isPreviewVisible","subMessageEdited","parentId","subComposeMessage","ccShowMentionsCountWarning","showWarning","reaction","sendTransientMessage","TransientMessage","ccLiveReaction","actionOnClick","onPreviewCloseClick","onSecondaryBtnClick","onAttachmentPopoverOutsideClick","outsideClickEventName","onAIBtnClick","onAIPopoverOutsideClick","onAuxiliaryBtnClick","onVoiceRecordingBtnClick","onEmojiClicked","emoji","onEmojiKeyboardClose","onCloseTriggered","customEvent","CustomEvent","dispatchEvent","sendVoiceMessage","$event","closeEvent","submitEvent","textInputElement","onTextInputEnter","textToSend","onTextInputChange","subShowModal","subHideModal","foundMentionsFormatter","getKeyDownCallBack","setKeyDownCallBack","setKeyUpCallBack","mentionsTextFormatterInstance","cleanup","setComposerConfig","listType","handleMouseDown","contains","target","reRender","liveReactionIconTint","getMessageHeaderWrapperStyle","isTypingRef","typingIndicatorTextFont","typingIndicatorTextColor","BackIcon","PasswordGroupIcon","PrivateGroupIcon","CometChatMessageHeader","hideBackButton","setSubtitleText","userRef","onBackRef","ccBackBtnElement","setCCBackBtnRef","updateSubtitle","membersText","updateUserStatus","userObject","setTypingIndicatorText","typing","userListenerId","groupsListenerId","connectionListenerId","onlineUser","offlineUser","groupObject","checkStatusType","checkGroupType","getStatusIndicatorStyle","getListItemView","removeListenerFns","onBackClicked","CometChatReactionsView","CometChatReactions","CometChatEmojiKeyboardView","CometChatEmojiKeyboard","onEmojiClick","CometChatIconButtonView","buttonClick","CometChatButtonView","CometChatDateView","CometChatDate","CometChatLabelView","CometChatLabel","CometChatLoaderView","CometChatLoader","CometChatAvatarView","CometChatAvatar","CometChatReceiptView","CometChatReceipt","wrapperStyle","order","messageThreadViewStyle","baseStyle","threadReplyIconTint","threadReplyTextColor","threadReplyTextFont","flexFlow","newMessageTextStyleStyle","baseBackground","coloredBackground","MessageListAlignment","messageReceiptStyle","isTextMessage","getStatusInfoViewStyle","isValid","bubbleFooterViewWrapperStyle","messageBubbleHeaderDateStyle","TimestampTextColor","TimestampTextFont","caption3","bubbleHeaderTitleStyle","defaultMessageListStyle","tempMessageListStyle","dateSeperatorStyle","dateSeparatorStyle","MessageListStyle","loadingViewStyle","errorViewStyle","messageAvatarStyle","bubbleStyle","defaultMessageListBubbleStyle","getReactionViewStyle","MessageDateStyle","tempDateSeparatorStyle","defaultDateSeparatorStyle","dateInfoStyle","receiptWrapperStyle","receiptSubtitleWrapperStyle","getMessageInfoStyle","messageInfo","getReceiptTextStyle","fontSize","fontWeight","getMessageTextStyle","MessageUtils","currentUser","view","messageTypesMap","html","getBubbleWrapper","bubbleView","getMessageBubble","baseMessage","WarningIcon$1","CometChatMessageInformation","messageInformationStyle","receiptDatePattern","BackdropStyle","setUserObj","templateRef","setTemplateRef","messageReceipts","setMessageReceipts","getTemplateRef","messageReceiptVal","getMessageReceipts","receiptList","getMessageReceipt","getBubbleView","deliveredAt","readAt","delivered","WarningIcon","customDateString","DateTime","read","alignBubble","MessageListManager","messagesRequestBuilder","messageId","messagesRequest","fetchNextMessages","fetchPreviousMessages","fetchPrevious","setUID","setGUID","setMessageId","MessagesRequestBuilder","setTypes","setCategories","hideReplies","removeListeners","groupListenerId","callListenerId","attachConnectionListener","onCallEndedMessageReceived","standard","showAvatar","timestampAlignment","TimestampAlignment","DateSeparatorPattern","hideDateSeparator","newMessageIndicatorText","scrollToBottomOnNewMessages","thresholdValue","onThreadRepliesClick","messageInformationConfiguration","MessageInformationConfiguration","reactionsConfiguration","ReactionsConfiguration","disableReactions","threadIndicatorIcon","CometChatMessageList","messageList","setMessageList","scrollListToBottom","setScrollListToBottom","showMessageInfoPopup","setShowMessageInfoPopup","activeMessageInfo","setActiveMessageInfo","showConfirmDialog","setShowConfirmDialog","ongoingCallView","setOngoingCallView","showNewMessagesBanner","setShowNewMessagesBanner","showFooterPanelView","setShowFooterPanelView","showHeaderPanelView","setShowHeaderPanelView","newMessagesBtnRef","isFirstReloadRef","elementRefs","messageListManagerRef","messageIdRef","prevMessageId","nextMessageId","totalMessagesCountRef","UnreadMessagesRef","newMessageTextRef","imageModerationDialogRef","parentMessageIdRef","smartReplyViewRef","headerViewRef","isConnectionReestablishedRef","isOnBottomRef","keepRecentMessages","timestampEnum","isFetchingPreviousMessages","threadedAlignment","getLoaderHtml","getErrorHtml","getEmptyHtml","messagesTemplate","messagesTypesMap","messagesTypesArray","isPartOfCurrentChatForUIEvent","validateTransientMessage","isPartOfCurrentChatForSDKEvent","isThreadOfCurrentChatForUIEvent","isThreadOfCurrentChatForSDKEvent","getMessageById","openThreadView","getThreadedMessageBubble","updateIsOnBottom","hasScrolled","updateMessageByMuid","prevMessageList","updateMessageByMessageId","replaceUpdatedMessage","updateMessage","replaceByMuid","reactToMessages","msgObject","reactions","getReactions","emojiObject","getReactedByMe","updatedReactions","getReaction","getCount","setCount","setReactedByMe","newMessageObj","setReactions","removeReaction","reactionAvailable","ReactionCount","addReaction","onReactMessage","configKeyboardStyle","keyboardStyle","onCopyMessage","getMentionsTextWithoutStyle","clipboard","writeText","onOpenMessageInfo","onOpenThread","onMessagePrivately","ccOpenChat","onDeleteMessage","deletedMessage","onEditMessage","setDefaultOptionsCallback","validateReactionOption","setBubbleAlignment","getFooterView","markMessageRead","markAsRead","checkAndMarkMessageAsRead","clearNewMessagesCount","reinitializeMessagesRequestBuilder","prependMessages","unreadCountObject","getUnreadMessageCountForUser","getUnreadMessageCountForGroup","previous","fetchActionMessages","isMyMessage","appendMessages","countText","setType","getActionOn","updateReplyCount","getReplyCount","setReplyCount","updateUnreadReplyCount","messageKey","addMessage","showAndIncrementUnreadCount","markAllMessagAsDelivered","markAllMessageAsRead","listToMarkRead","messageReadAndDelivered","getReceiptType","updateInteractiveMessage","previousMessage","interaction","getInteractions","setInteractions","checkAndScrollToBottom","forceScroll","messageReceivedHandler","groupActionMessageReceived","isReactionOfThisList","reactedById","getReactedBy","listParentMessageId","messageReactionUpdated","isAdded","REACTION_ACTION","REACTION_ADDED","REACTION_REMOVED","modifiedMessage","updateMessageWithReactionInfo","callActionMessageReceived","callMessage","handleGroupAndCallActions","onBottomCallback","onTopCallback","updateView","resetCountForUnreadMessagesInThread","subscribeToUIEvents","messageListHeader","ccMessageEdit","customInteractiveMessage","onTransientMessageReceived","transientMessage","liveReaction","onInteractionGoalCompleted","onMessageReactionAdded","onMessageReactionRemoved","reactionReceipt","showHeaderTitle","getBubbleLeadingView","getBubbleHeaderDate","getBubbleHeaderTitle","getBubbleHeader","getBubbleStatusInfoDate","getBubbleStatusInfoReceipt","getReactionListConfiguration","reactionListConfiguration","getReactionListAvatarStyle","getReactionListItemStyle","reactionListStyle","ReactionListStyle","sliderEmojiCountFont","sliderEmojiFont","tailViewFont","sliderEmojiCountColor","activeEmojiBackground","getReactionListStyle","ReactionListConfiguration","reactionItemClicked","reactionsRequestBuilder","getReactionInfoConfiguration","reactionInfoConfiguration","reactionInfoStyle","ReactionInfoStyle","namesColor","namesFont","reactedTextColor","reactedTextFont","reactionFontSize","getReactionInfoStyle","ReactionInfoConfiguration","getReactionView","reactionsStyle","ReactionsStyle","activeReactionBackground","getPrimary150","reactionBackground","reactionBorder","activeReactionBorder","getPrimary500","reactionBorderRadius","activeReactionCountTextColor","activeReactionCountTextFont","reactionCountTextFont","reactionCountTextColor","reactionBoxShadow","reactionEmojiFont","baseReactionBackground","getReactionsStyle","hoverDebounceTime","reactionClick","getBubbleThreadView","getThreadCount","mirrorIcon","isValidMessageForStatusInfo","getStatusInfoView","getMessageBubbleItem","getMessageBubbleViewItem","getMessageListFooter","getMessageListHeader","replyCount","getCurrentMessageListState","unsubscribeEvents","selectedMessage","ThreadedMessagesActionViewStyle","actionButtonStyle","threadMessagesStyle","CometChatThreadedMessages","parentMessage","messageActionView","threadedMessagesStyle","MessageListConfiguration","MessageComposerConfiguration","messageComposerView","messageListView","hideMessageComposer","parentMessageObject","setParentMessageObject","threadedMessagesStyleRef","ThreadedMessagesStyle","parentMessageObjectId","updateReceipt","prevState","tempObject","addListener","prevCount","closeView","auxilaryButtonView","auxiliaryButtonsAlignment","MessageHeaderConfiguration","threadedMessagesConfiguration","ThreadedMessagesConfiguration","DetailsConfiguration","customSoundForIncomingMessages","customSoundForOutgoingMessages","MessagesStyle","messageHeaderView","hideMessageHeader","hideDetails","auxiliaryMenu","CometChatMessages","ccHeaderMenuRef","threadMessageObjectRef","parentBubbleViewCallbackRef","setLiveReaction","openDetails","setOpenDetails","openThreadedMessages","setOpenThreadedMessages","showPanelView","setShowPanelView","assistBotChatView","reactionName","infoIconURL","liveReactionStart","blockedUser","ccUserUnBlocked","unblockedUser","openDetailsPage","closeDetailsPage","closeThreadView","getDetailsTemplate","getHeaderMenu","defaultAuxiliaryMenu","auxMenu","headerButtonClick","previousUser","previousGroup","reactionIconURL","liveReactionStyle","MessagesConfiguration","ConversationsConfiguration","startConversationConfiguration","ContactsConfiguration","startConversationIconURL","CometChatConversationsWithMessages","setActiveConversation","setShowCometChatContacts","activeChatRef","startConversationBtnElement","setStartConversationBtnRef","setActiveChat","conversationWith","getConversation","removeChatOnGroupAction","activeChat","currentuser","isSameUser","actionForGroup","removeActiveChatList","tempConversation","hideCometChatContactsView","StartConversationButton","onContactsItemClick","showCometChatContactsView","threadedMessageConfiguration","getDecoratorMessageContent","getGroupsWrapperStyles","groupsWithMessagesStyle","getGroupsStyle","getJoinGroupWrapperStyle","getJoinGroupStyle","JoinGroupConfiguration","configStyle","joinGroupStyle","passwordInputPlaceholderTextFont","passwordInputPlaceholderTextColor","passwordInputBackground","passwordInputBorder","passwordInputBorderRadius","passwordInputBoxShadow","passwordInputTextFont","passwordInputTextColor","joinButtonTextFont","joinButtonTextColor","joinButtonBackground","joinButtonBorderRadius","joinButtonBorder","getJoinGroupMessageHederStyle","getCreateGroupWrapperStyle","getCreateGroupStyle","createGroupConfiguration","createGroupStyle","groupTypeTextFont","groupTypeBorder","groupTypeBorderRadius","groupTypeTextColor","groupTypeTextBackground","groupTypeBackground","groupTypeBoxShadow","activeGroupTypeTextFont","activeGroupTypeTextColor","activeGroupTypeBackground","activeGroupTypeBoxShadow","activeGroupTypeBorderRadius","activeGroupTypeBorder","groupTypeTextBoxShadow","groupTypeTextBorderRadius","errorTextBackground","errorTextBorderRadius","errorTextBorder","nameInputPlaceholderTextFont","nameInputPlaceholderTextColor","nameInputBackground","nameInputTextFont","nameInputTextColor","nameInputBorder","nameInputBorderRadius","nameInputBoxShadow","createGroupButtonTextFont","createGroupButtonTextColor","createGroupButtonBackground","createGroupButtonBorderRadius","createGroupButtonBorder","createGroupButtonStyle","CometChatCreateGroupComponent","CometChatCreateGroup","CreateGroupConfiguration","joinGroupConfiguration","CometChatGroupsWithMessages","createGroupConfigCreateClick","createClick","joinGroupConfigOnError","joinGroupConfigJoinClick","joinClick","createGroupElement","setCreateGroupRef","joinGroupElement","setJoinGroupRef","createGroupButtonRef","openCreateGroupPage","setOpenCreateGroupPage","openPasswordModal","setOpenPasswordModal","protectedGroup","JoinGroup","CometChatJoinGroup","closeCreateGroup","closeJoinGroup","joinGroup","groupJoined","onGroupJoined","getJoinGroupHeaderView","getCreateGroupComponent","hideCloseButton","getDefaultGroupMenus","openCreateGroup","openCreateGroupModal","onJoinGroupButtonClicked","closeCreateGroupModal","withMessagesStyle","getUsersWrapperStyles","usersWithMessagesStyle","getUsersStyle","getMessageInformationStyle","desktopWidth","desktopHeight","CometChatUsersWithMessages","TabsStyle","onAccept","onDecline","acceptButtonText","showIncomingCallScreen","setShowIncomingCallScreen","showOngoingCallScreen","setShowOngoingCallScreen","showOutGoingCallScreen","setShowOutGoingCallScreen","listItemStyleRef","incomingCallStyleRef","rejectCallButtonRef","acceptCallButtonRef","acceptButtonStyleRef","AcceptButtonStyle","declineButtonStyleRef","DeclineButtonStyle","ongoingCallStyleRef","iconStyleRef","incomingcallListenerId","isCallActive","isCurrentCall","StorageUtils","getItem","activecall","oldCall","rejectIncomingCall","reason","rejectedCall","setItem","showCall","localStorageChange","newValue","oldValue","parse","attachChangeDetection","detachChangeDetection","checkForActiveCallAndEndCall","acceptIncomingCall","acceptCall","acceptCallButton","rejectCallButton","callSettings","backDropStyle","stickerIconURL"],"mappings":";;;;;;;;;GAE6B,eAAzBA,QAAQC,IAAIC,SACdC,EAAAC,qCCMW,IAAIC,EAAEC,EAAiBC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAEV,EAAEW,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP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ACR9rB,KAAK5E,MAAS0wB,EAAc1wB,KAC/B,CAED,mBAAA+3C,GACI,OAAOnzC,KAAK5E,KACf,0HCJD,WAAA9R,CAAYwiC,GACR,IAAI1wB,MAAEA,EAAK2pD,cAAEA,EAAaC,YAAEA,GAAgBl5B,EAC5C9rB,KAAK5E,MAASA,EACd4E,KAAK+kD,cAAiBA,EACtB/kD,KAAKglD,YAAeA,CACvB,CAED,0BAAA1Q,GACI,OAAOt0C,KAAK5E,KACf,CAED,gBAAA8yC,GACI,OAAOluC,KAAK+kD,aACf,CAED,cAAAp3B,GACI,OAAO3tB,KAAKglD,WACf,2PCnBD,WAAA17D,CAAYwiC,GACR9rB,KAAK5E,MAAS0wB,EAAc1wB,KAC/B,CAED,oBAAAk/C,GACI,OAAOt6C,KAAK5E,KACf,8GCJD,WAAA9R,CAAYwiC,GACR,IAAI1wB,MAAEA,EAAKq1G,eAAEA,EAActpF,aAAEA,GAAiB2E,EAC9C9rB,KAAK5E,MAASA,EACd4E,KAAKywG,eAAkBA,EACvBzwG,KAAKmnB,aAAgBA,CACxB,CAED,gBAAAu0B,GACI,OAAO17C,KAAK5E,KACf,CAED,iBAAA8gD,GACI,OAAOl8C,KAAKywG,cACf,CAED,eAAAr3D,GACI,OAAOp5C,KAAKmnB,YACf","x_google_ignoreList":[0,1,2,35]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../node_modules/react/jsx-runtime.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../src/CometChatUsers/style.ts","../src/CometChatCustomHooks.ts","../src/Shared/Views/CometChatCheckbox/index.tsx","../src/Shared/Views/CometChatCheckbox/hooks.ts","../src/Shared/Views/CometChatList/style.ts","../src/Shared/Views/CometChatList/index.tsx","../src/Shared/Views/CometChatList/hooks.ts","../src/Shared/Views/CometChatListItem/assets/LoadingIcon.svg","../src/Shared/Views/CometChatListItem/index.tsx","../src/Shared/Views/CometChatListItem/hooks.ts","../src/Shared/Views/CometChatMenuList/index.tsx","../src/Shared/Views/CometChatMenuList/hooks.ts","../src/Shared/Views/CometChatRadioButton/index.tsx","../src/Shared/Views/CometChatRadioButton/hooks.ts","../src/CometChatThemeContext.ts","../src/CometChatUsers/controller.ts","../src/CometChatUsers/assets/search.svg","../src/CometChatUsers/assets/spinner.svg","../src/Shared/Views/CometChatMessageBubble/style.ts","../src/Shared/Views/CometChatContextMenu/style.ts","../src/Shared/Views/CometChatButton/index.tsx","../src/Shared/Views/CometChatButton/hooks.ts","../src/Shared/Views/CometChatContextMenu/index.tsx","../src/Shared/Views/CometChatMessageBubble/assets/More.svg","../src/Shared/Views/CometChatMessageBubble/index.tsx","../src/Shared/Utils/MessageUtils.tsx","../src/CometChatUsers/index.tsx","../src/CometChatUsers/hooks.ts","../src/CometChatGroupMembers/style.ts","../src/CometChatGroupMembers/assets/down-arrow.svg","../src/CometChatGroupMembers/controller.ts","../src/CometChatGroupMembers/assets/more-icon.svg","../src/CometChatGroupMembers/assets/search.svg","../src/CometChatGroupMembers/assets/backbutton.svg","../src/CometChatGroupMembers/assets/spinner.svg","../src/CometChatGroupMembers/index.tsx","../src/CometChatGroupMembers/hooks.ts","../src/CometChatUserMemberWrapper/index.tsx","../node_modules/@lit-labs/react/create-component.js","../src/Shared/Utils/MessagesDataSource.tsx","../src/Shared/Utils/assets/editicon.svg","../src/Shared/Utils/assets/deleteicon.svg","../src/Shared/Utils/assets/addreaction.svg","../src/Shared/Utils/assets/threadicon.svg","../src/Shared/Utils/assets/send-message-in-private.svg","../src/Shared/Utils/assets/Copy.svg","../src/Shared/Utils/assets/Info.svg","../src/Shared/Utils/assets/placeholder.png","../src/Shared/Utils/assets/download.svg","../src/Shared/Utils/assets/close2x.svg","../src/Shared/Utils/assets/photolibrary.svg","../src/Shared/Utils/assets/video.svg","../src/Shared/Utils/assets/audio-file.svg","../src/Shared/Utils/assets/attachment-file.svg","../src/Shared/Framework/ChatConfigurator.ts","../src/Shared/Framework/AIExtensionDataSource.ts","../src/Shared/Framework/DataSourceDecorator.ts","../src/AI/AIAssistBot/utils.tsx","../src/AI/AIAssistBot/style.ts","../src/AI/assets/backbutton.svg","../src/AI/AIAssistBot/AIAssistBotOptionsView.tsx","../src/AI/assets/close2x.svg","../src/AI/AIAssistBot/AIAssistBotChatView.tsx","../src/AI/assets/send.svg","../src/AI/AIAssistBot/AIAssistBotDecorator.tsx","../src/AI/AIAssistBot/AIAssistBotExtension.ts","../src/AI/AIConversationStarter/style.ts","../src/AI/assets/ai-empty.svg","../src/AI/assets/ai-error.svg","../src/AI/assets/loading.svg","../src/AI/AIConversationStarter/AIConversationStarterView.tsx","../src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx","../src/AI/AIConversationStarter/AIConversationStarterExtension.ts","../src/AI/AIConversationSummary/style.ts","../src/AI/AIConversationSummary/AIConversationSummaryView.tsx","../src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx","../src/AI/AIConversationSummary/AIConversationSummaryExtension.ts","../src/AI/AISmartReplies/style.ts","../src/AI/AISmartReplies/AISmartRepliesView.tsx","../src/AI/AISmartReplies/AISmartRepliesDecorator.tsx","../src/AI/AISmartReplies/AISmartRepliesExtension.ts","../src/Calling/CometChatOngoingCall/style.ts","../src/Calling/CometChatOngoingCall/index.tsx","../src/Calling/CometChatOngoingCall/assets/reduce-size.svg","../src/Calling/CometChatOngoingCall/assets/increase-size.svg","../src/Calling/CometChatOngoingCall/hooks.ts","../src/Calling/CometChatCallButtons/style.ts","../src/Calling/CometChatOutgoingCall/style.ts","../src/Calling/CometChatOutgoingCall/assets/close2x.svg","../src/Calling/CometChatOutgoingCall/index.tsx","../src/Calling/CometChatOutgoingCall/hooks.ts","../src/Calling/CometChatCallButtons/index.tsx","../src/Calling/CometChatCallButtons/assets/Audio-Call2x.svg","../src/Calling/CometChatCallButtons/assets/VideoCall2xIcon.svg","../src/Calling/CometChatCallButtons/hooks.ts","../src/Calling/CallingExtensionDecorator.tsx","../src/Calling/assets/Video-call2x.svg","../src/Calling/assets/Audio-Call.svg","../src/Calling/assets/Video-call.svg","../src/Shared/Framework/ExtensionsDataSource.ts","../src/Calling/CallingExtension.ts","../src/Extensions/CollaborativeDocument/assets/collaborativedocument.svg","../src/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx","../src/Extensions/CollaborativeDocument/CollaborativeDocumentExtension.ts","../src/Extensions/CollaborativeWhiteboard/assets/collaborativewhiteboard.svg","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.ts","../src/Extensions/ImageModeration/ImageModerationExtensionDecorator.tsx","../src/Extensions/ImageModeration/assets/close2x.svg","../src/Extensions/ImageModeration/assets/placeholder.png","../src/Extensions/ImageModeration/ImageModerationExtension.ts","../src/Extensions/LinkPreview/LinkPreviewExtensionDecorator.tsx","../src/Extensions/LinkPreview/LinkPreviewExtension.ts","../src/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.tsx","../src/Extensions/MessageTranslation/assets/translation.svg","../src/Extensions/MessageTranslation/MessageTranslationExtension.ts","../src/Extensions/Polls/PollsExtensionDecorator.tsx","../src/Extensions/Polls/assets/polls.svg","../src/Extensions/Polls/assets/delete.svg","../src/Extensions/Polls/assets/close.svg","../src/Extensions/Polls/assets/plus.svg","../src/Extensions/Polls/PollsExtension.ts","../src/Extensions/SmartReplies/SmartRepliesExtensionDecorator.tsx","../src/Extensions/SmartReplies/SmartRepliesExtension.ts","../src/Extensions/Stickers/StickersExtensionDecorator.tsx","../src/Extensions/Stickers/assets/Stickers.svg","../src/Extensions/Stickers/assets/close.svg","../src/Extensions/Stickers/StickersExtension.ts","../src/Extensions/TextModerator/TextModeratorExtensionDecorator.ts","../src/Extensions/TextModerator/TextModeratorExtension.ts","../src/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.ts","../src/Extensions/ThumbnailGeneration/assets/placeholder.png","../src/Extensions/ThumbnailGeneration/ThumbnailGenerationExtension.ts","../src/Shared/CometChatUIKit/CometChatUIKit.ts","../src/Shared/Views/CometChatTabs/style.ts","../src/Shared/Views/CometChatTabs/index.tsx","../src/Extensions/Polls/PollsConfiguration.ts","../src/Calling/CometChatIncomingCall/style.ts","../src/Calling/Utils/utils.ts","../src/Calling/CometChatCallLogs/style.ts","../src/Calling/CometChatCallLogs/index.tsx","../src/Calling/CometChatCallLogs/assets/LoadingIcon.svg","../src/Calling/CometChatCallLogs/assets/IncomingAudio.svg","../src/Calling/CometChatCallLogs/assets/IncomingVideo.svg","../src/Calling/CometChatCallLogs/assets/OutgoingAudio.svg","../src/Calling/CometChatCallLogs/assets/OutgoingVideo.svg","../src/Calling/CometChatCallLogs/assets/MissedAudio.svg","../src/Calling/CometChatCallLogs/assets/MissedVideo.svg","../src/Calling/CometChatCallLogs/assets/Info.svg","../src/Calling/CometChatCallLogs/hooks.ts","../src/Calling/CometChatCallLogDetails/style.ts","../src/Calling/Utils/CallDetailsUtils.tsx","../src/Calling/assets/side-arrow.svg","../src/Calling/CometChatCallLogHistory/style.ts","../src/Calling/CometChatCallLogHistory/index.tsx","../src/Calling/CometChatCallLogHistory/assets/backbutton.svg","../src/Calling/CometChatCallLogHistory/assets/LoadingIcon.svg","../src/Calling/CometChatCallLogHistory/hooks.ts","../src/Calling/CometChatCallLogParticipants/style.ts","../src/Calling/CometChatCallLogParticipants/index.tsx","../src/Calling/CometChatCallLogParticipants/assets/backbutton.svg","../src/Calling/CometChatCallLogRecordings/style.ts","../src/Calling/CometChatCallLogRecordings/index.tsx","../src/Calling/CometChatCallLogRecordings/assets/backbutton.svg","../src/Calling/CometChatCallLogRecordings/assets/download.svg","../src/Calling/CometChatCallLogDetails/index.tsx","../src/Calling/CometChatCallLogDetails/assets/backbutton.svg","../src/Calling/CometChatCallLogDetails/hooks.ts","../src/Calling/CometChatCallLogsWithDetails/style.ts","../src/Calling/CometChatCallLogsWithDetails/index.tsx","../src/Calling/CometChatCallLogsWithDetails/hooks.ts","../src/CometChatAddMembers/style.ts","../src/CometChatAddMembers/assets/search.svg","../src/CometChatAddMembers/assets/spinner.svg","../src/CometChatAddMembers/assets/backbutton.svg","../src/CometChatAddMembers/assets/close2x.svg","../src/CometChatAddMembers/index.tsx","../src/CometChatAddMembers/hooks.ts","../src/CometChatBannedMembers/style.ts","../src/CometChatBannedMembers/assets/close2x.svg","../src/CometChatBannedMembers/controller.ts","../src/CometChatBannedMembers/assets/search.svg","../src/CometChatBannedMembers/assets/spinner.svg","../src/CometChatBannedMembers/assets/backbutton.svg","../src/CometChatBannedMembers/index.tsx","../src/CometChatBannedMembers/hooks.ts","../src/CometChatConversations/style.ts","../src/CometChatConversations/controller.ts","../src/CometChatConversations/assets/locked.svg","../src/CometChatConversations/assets/message-delivered.svg","../src/CometChatConversations/assets/message-read.svg","../src/CometChatConversations/assets/message-sent.svg","../src/CometChatConversations/assets/private.svg","../src/CometChatConversations/assets/spinner.svg","../src/CometChatConversations/assets/wait.svg","../src/CometChatConversations/assets/warning-small.svg","../src/CometChatConversations/index.tsx","../src/CometChatConversations/assets/thread-arrow.svg","../src/CometChatConversations/hooks.ts","../src/CometChatConversationsWithMessages/style.ts","../src/CometChatContacts/style.ts","../src/CometChatGroups/style.ts","../src/CometChatGroups/controller.ts","../src/CometChatGroups/assets/locked.svg","../src/CometChatGroups/assets/private.svg","../src/CometChatGroups/assets/search.svg","../src/CometChatGroups/assets/spinner.svg","../src/CometChatGroups/index.tsx","../src/CometChatGroups/hooks.ts","../src/CometChatContacts/index.tsx","../src/CometChatMessages/style.ts","../src/CometChatDetails/style.ts","../src/CometChatDetails/assets/backbutton.svg","../src/CometChatDetails/assets/close2x.svg","../src/CometChatTransferOwnership/style.ts","../src/CometChatTransferOwnership/assets/search.svg","../src/CometChatTransferOwnership/assets/spinner.svg","../src/CometChatTransferOwnership/index.tsx","../src/CometChatTransferOwnership/hooks.ts","../src/CometChatDetails/assets/locked.svg","../src/CometChatDetails/assets/private.svg","../src/CometChatDetails/index.tsx","../src/CometChatDetails/hooks.ts","../src/CometChatMessageComposer/style.ts","../src/CometChatMessageComposer/assets/ai-bot.svg","../src/CometChatMessageComposer/assets/close.svg","../src/CometChatMessageComposer/assets/heart.svg","../src/CometChatMessageComposer/assets/InfoSimpleIcon.svg","../src/CometChatMessageComposer/assets/mic.svg","../src/CometChatMessageComposer/assets/plus.svg","../src/CometChatMessageComposer/assets/plus-rotated.svg","../src/CometChatMessageComposer/assets/send.svg","../src/CometChatMessageComposer/assets/stipop.svg","../src/CometChatMessageComposer/assets/stop.svg","../src/CometChatMessageComposer/index.tsx","../src/CometChatMessageComposer/hooks.ts","../src/CometChatMessageHeader/style.ts","../src/CometChatMessageHeader/assets/backbutton.svg","../src/CometChatMessageHeader/assets/Locked.svg","../src/CometChatMessageHeader/assets/Private.svg","../src/CometChatMessageHeader/index.tsx","../src/CometChatMessageHeader/hooks.ts","../src/Shared/Views/LitElementsWrapper/LitElementsWrapper.tsx","../src/CometChatMessageList/style.ts","../src/CometChatMessageInformation/style.ts","../src/CometChatMessageInformation/assets/message-delivered.svg","../src/CometChatMessageInformation/assets/spinner.svg","../src/CometChatMessageInformation/assets/warning-small.svg","../src/CometChatMessageInformation/index.tsx","../src/CometChatMessageInformation/assets/message-read.svg","../src/CometChatMessageList/assets/message-delivered.svg","../src/CometChatMessageList/controller.ts","../src/CometChatMessageList/CometChatMessageList.tsx","../src/CometChatMessageList/assets/message-read.svg","../src/CometChatMessageList/assets/message-sent.svg","../src/CometChatMessageList/assets/wait.svg","../src/CometChatMessageList/assets/warning-small.svg","../src/CometChatMessageList/assets/Spinner.svg","../src/CometChatMessageList/assets/threadIndicatorIcon.svg","../src/CometChatMessageList/useCometChatMessageList.ts","../src/CometChatMessageList/assets/close2x.svg","../src/CometChatThreadedMessages/style.ts","../src/CometChatThreadedMessages/assets/close2x.svg","../src/CometChatThreadedMessages/index.tsx","../src/CometChatThreadedMessages/hooks.ts","../src/CometChatMessages/index.tsx","../src/CometChatMessages/assets/heart-reaction.png","../src/CometChatMessages/assets/Info.svg","../src/CometChatMessages/hooks.ts","../src/CometChatConversationsWithMessages/index.tsx","../src/CometChatConversationsWithMessages/assets/StartConversation.svg","../src/CometChatConversationsWithMessages/hooks.ts","../src/CometChatConversationsWithMessages/assets/close2x.svg","../src/CometChatGroupsWithMessages/style.ts","../src/CometChatGroupsWithMessages/index.tsx","../src/CometChatGroupsWithMessages/assets/create-button.svg","../src/CometChatGroupsWithMessages/hooks.ts","../src/CometChatUsersWithMessages/style.ts","../src/CometChatUsersWithMessages/index.tsx","../src/CometChatUsersWithMessages/hooks.ts","../src/Shared/Views/CometChatTabs/TabsStyle.ts","../src/Extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.ts","../src/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.ts","../src/Calling/CometChatIncomingCall/index.tsx","../src/Calling/CometChatIncomingCall/hooks.ts","../src/Calling/CometChatIncomingCall/assets/Audio-Call.svg","../src/Calling/CometChatIncomingCall/assets/Video-call.svg","../src/Extensions/ImageModeration/ImageModerationConfiguration.ts","../src/Extensions/LinkPreview/LinkPreviewConfiguration.ts","../src/Extensions/MessageTranslation/MessageTranslationConfiguration.ts","../src/Extensions/SmartReplies/SmartRepliesConfiguration.ts","../src/Extensions/Stickers/StickersConfiguration.ts"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
    \n // or
    ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
    , because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { ListStyle, UsersStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function listStyle(usersStyleObject : UsersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: usersStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: usersStyleObject?.titleTextColor || theme.palette.getAccent(),\n searchPlaceholderTextFont: usersStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: usersStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: usersStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: usersStyleObject?.searchTextColor || theme.palette.getAccent(),\n searchBorder: usersStyleObject?.searchBorder || \"none\",\n searchBorderRadius: usersStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: usersStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchIconTint: usersStyleObject?.searchIconTint || theme.palette.getAccent500(),\n separatorColor: usersStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: usersStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: usersStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: usersStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: usersStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: usersStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n sectionHeaderTextFont: usersStyleObject?.sectionHeaderTextFont || fontHelper(theme.typography.caption1),\n sectionHeaderTextColor: usersStyleObject?.sectionHeaderTextColor || theme.palette.getAccent500()\n });\n}\n\nexport function UsersWrapperStyle(usersStyleObject : UsersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n boxSizing: \"border-box\",\n position: \"relative\",\n width: usersStyleObject?.width || \"100%\",\n height: usersStyleObject?.height || \"100%\",\n background: usersStyleObject?.background || theme.palette.getBackground(),\n border: usersStyleObject?.border || `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: usersStyleObject?.borderRadius || \"0\",\n overflow: \"hidden\"\n };\n}\n\nexport function menuStyles() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"12px\",\n right: \"12px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, usersStyleObject : UsersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n separatorColor: listItemStyleObject?.separatorColor || usersStyleObject?.separatorColor || theme.palette.getAccent200(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n width: statusIndicatorStyleObject?.width || \"12px\"\n };\n}\n\nexport function tailViewSelectionContainerStyle() : CSSProperties {\n return {\n paddingRight: \"8px\"\n };\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useCallback, useRef, useState } from \"react\";\n\n/**\n * Sets the created ref to the `value` passed\n * \n * @remarks\n * After the initial call of this hook, the internal ref is set to the `value` passed to this hook after the component has rendered completely. \n * So the returned ref will not have the updated value while the component renders\n */\nexport function useRefSync(value : T) : React.MutableRefObject {\n const res = useRef(value);\n res.current = value;\n return res;\n}\n\n/**\n * Custom hook to make refs stateful\n * \n * @remarks\n * Making refs stateful opens up the possibility of using the element the ref is pointing to as a dependency for a `useEffect` call\n * \n * @example\n * Here's a simple example\n * ```ts\n * // At the top most level of the functional component\n * const [inputElement, setInputRef] = useStateRef(null);\n * \n * // Inside the JSX\n * \n * ```\n */\nexport function useStateRef(initialValue : T) : [T, (node : T) => void] {\n const [state, setState] = useState(initialValue);\n const setRef = useCallback((node : T) => {\n setState(node);\n }, []);\n return [state, setRef];\n}\n\nexport function useCometChatErrorHandler(onError? : ((error : CometChat.CometChatException) => void) | null) : (error : unknown) => void {\n const onErrorRef = useRefSync(onError);\n const errorHandler = useCallback(function fn(error : unknown) : void {\n if (typeof error === \"object\" && error) {\n if (error instanceof CometChat.CometChatException) {\n const onError = onErrorRef.current;\n if (onError) {\n return onError(error);\n }\n }\n else if (error instanceof Error) {\n return fn(new CometChat.CometChatException({\n code: \"ERROR\",\n name: error.name,\n message: error.message\n }));\n }\n }\n console.log(error);\n }, [onErrorRef]);\n return errorHandler;\n}\n","import { CheckboxStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface ICheckboxProps {\n name? : string,\n labelText? : string,\n checked? : boolean,\n disabled? : boolean,\n checkboxStyle? : CheckboxStyle,\n onChange? : (customEvent : CustomEvent<{checked : boolean}>) => void\n};\n\nexport function CometChatCheckbox(props : ICheckboxProps) {\n const {\n name,\n labelText,\n checked,\n disabled,\n checkboxStyle,\n onChange\n } = props;\n\n const ref = useRef();\n const onChangePropRef = useRefSync(onChange);\n\n function getCheckedPropSpreadObject() : {checked? : true} {\n return checked ? {checked} : {};\n }\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onChangePropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onChangePropRef : React.MutableRefObject<((customEvent: CustomEvent<{checked: boolean;}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onChangePropRef\n } = args;\n\n useEffect(() => {\n const checkboxElement = ref.current;\n const eventName = \"cc-checkbox-changed\";\n const handleEvent = (e : CustomEvent<{checked : boolean}>) => onChangePropRef.current?.(e);\n checkboxElement.addEventListener(eventName, handleEvent);\n return () => {\n checkboxElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onChangePropRef]);\n}\n","import {\n LabelStyle,\n LoaderStyle,\n SearchInputStyle,\n} from \"@cometchat/uikit-elements\";\n\nimport { CSSProperties } from \"react\";\nimport { ListStyle } from \"@cometchat/uikit-shared\";\nimport { TitleAlignment } from \"@cometchat/uikit-resources\";\n\nexport function listWrapperStyle(listStyle: ListStyle | null): CSSProperties {\n return {\n boxSizing: \"border-box\",\n width: listStyle?.width || \"100%\",\n height: listStyle?.height || \"100%\",\n border: listStyle?.border || \"none\",\n borderRadius: listStyle?.borderRadius || \"0\",\n background: listStyle?.background || \"inherit\",\n boxShadow: listStyle?.boxShadow,\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n };\n}\n\nexport function headerStyle(emptyTitle: boolean): CSSProperties {\n return {\n flexShrink: \"0\",\n padding: emptyTitle ? \"0px 12px\" : \"19px 16px\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function titleStyle(\n listStyle: ListStyle | null,\n titleAlignment: TitleAlignment,\n emptyTitle?: Boolean\n): CSSProperties {\n return {\n textAlign: titleAlignment === TitleAlignment.left ? \"left\" : \"center\",\n font: listStyle?.titleTextFont || \"700 22px Inter, sans-serif\",\n color: listStyle?.titleTextColor || \"rgb(20, 20, 20)\",\n boxSizing: \"border-box\",\n };\n}\n\nexport const searchStyle = {\n padding: \"16px\",\n margin: \"-16px -16px 0 -16px\",\n} as CSSProperties;\n\nexport function searchInputStyle(\n listStyle: ListStyle | null\n): SearchInputStyle {\n // Property not set - boxShadow? : string;\n\n return {\n border: listStyle?.searchBorder || \"none\",\n borderRadius: listStyle?.searchBorderRadius || \"8px\",\n width: \"100%\",\n height: \"32px\",\n background: listStyle?.searchBackground || \"rgb(20, 20, 20, 0.04)\",\n searchTextFont: listStyle?.searchTextFont || \"400 15px Inter, sans-serif\",\n searchTextColor: listStyle?.searchTextColor || \"rgb(20, 20, 20)\",\n placeholderTextFont:\n listStyle?.searchPlaceholderTextFont || \"400 15px Inter, sans-serif\",\n placeholderTextColor:\n listStyle?.searchPlaceholderTextColor || \"rgb(20, 20, 20, 0.46)\",\n searchIconTint: listStyle?.searchIconTint || \"rgb(20, 20, 20, 0.46)\",\n };\n}\n\nexport function listItemContainerStyle(): CSSProperties {\n return {\n overflow: \"hidden auto\",\n overflowX: \"hidden\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n height: \"100%\",\n boxSizing: \"border-box\",\n padding: \"0 16px\",\n };\n}\n\nexport function viewContainerStyle(): CSSProperties {\n return {\n height: \"calc(100% - 1px)\",\n overflow: \"auto\",\n };\n}\n\nexport function defaultViewStyle(): CSSProperties {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n textAlign: \"center\",\n };\n}\n\nexport function customViewStyle(): CSSProperties {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n };\n}\n\nexport function loaderStyle(listStyle: ListStyle | null): LoaderStyle {\n return {\n iconTint: listStyle?.loadingIconTint || \"rgb(20, 20, 20, 0.58)\",\n };\n}\n\nexport function sectionHeaderStyle(listStyle: ListStyle | null): CSSProperties {\n return {\n font: listStyle?.sectionHeaderTextFont || \"500 12px Inter, sans-serif\",\n color: listStyle?.sectionHeaderTextColor || \"rbg(20, 20, 20, 0.46)\",\n textAlign: \"left\",\n padding: \"8px 0\",\n };\n}\n\nexport function errorLabelStyle(listStyle: ListStyle | null): LabelStyle {\n return {\n textFont: listStyle?.errorStateTextFont || \"700 22px Inter, sans-serif\",\n textColor: listStyle?.errorStateTextColor || \"rgb(20, 20, 20, 0.33)\",\n };\n}\n\nexport function emptyLabelStyle(listStyle: ListStyle | null): LabelStyle {\n return {\n textFont: listStyle?.emptyStateTextFont || \"700 22px Inter, sans-serif\",\n textColor: listStyle?.emptyStateTextColor || \"rgb(20, 20, 20, 0.33)\",\n };\n}\n\nexport function intersectionObserverBottomTargetDivStyle(): CSSProperties {\n return {\n height: \"1px\",\n border: \"1px solid transparent\"\n };\n}\n","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatTheme,\n States,\n TitleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport React, { JSX, useRef } from \"react\";\nimport {\n customViewStyle,\n defaultViewStyle,\n emptyLabelStyle,\n errorLabelStyle,\n headerStyle,\n intersectionObserverBottomTargetDivStyle,\n listItemContainerStyle,\n listWrapperStyle,\n loaderStyle,\n searchInputStyle,\n sectionHeaderStyle,\n titleStyle,\n viewContainerStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../../../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { Hooks } from \"./hooks\";\nimport { ListStyle } from \"@cometchat/uikit-shared\";\n\n/**\n * Extracts the value associated with the passed key from the passed object\n *\n * @param key - Property on the `item` parameter\n * @param item - Any object\n * @returns String converted value associated with the `key` property of the `item`  object\n */\nfunction getKeyValue(key: keyof T, item: T): string {\n let res: string;\n\n const keyValue = item[key];\n if (typeof keyValue === \"function\") {\n const result = keyValue.call(item);\n if (typeof result === \"undefined\") {\n if ((item as any)?.id) {\n res = String((item as any)?.id);\n } else {\n res = String(result);\n }\n } else {\n res = String(result);\n }\n } else {\n res = String(keyValue);\n }\n\n return res;\n}\n\nexport type DivElementRef = HTMLDivElement | null;\n\ninterface IListProps {\n /**\n * Title of the component\n *\n * @defaultValue `\"\"`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Text to fill the search input with\n *\n * @defaultValue `\"\"`\n */\n searchText?: string;\n /**\n * Function to call when the search input text changes\n *\n * @remarks\n * This function will only be called after 500ms of the search input text change\n */\n onSearch?: (searchStr: string) => void;\n /**\n * Image URL for the search icon to use in the search bar\n */\n searchIconURL?: string;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `\"Search\"`\n */\n searchPlaceholderText?: string;\n /**\n * List of objects to display\n */\n list: T[];\n /**\n * Custom list item view to be rendered for each object in the `list` prop\n */\n listItem: (item: T, itemIndex: number) => JSX.Element;\n /**\n * Function to call when the scrollbar is at the top-most position of the scrollable list\n */\n onScrolledToBottom?: () => Promise;\n /**\n * Function to call when the scrollbar is at the bottom-most position of the scrollable list\n */\n onScrolledToTop?: () => Promise;\n /**\n * Function to call when the scrollbar is not at the bottom-most position of the scrollable list\n */\n scrolledUpCallback?: (boolean?: boolean) => void;\n /**\n * Show alphabetical header\n *\n * @defaultValue `true`\n */\n showSectionHeader?: boolean;\n /**\n * Property on each object in the `list` prop\n *\n * @remarks\n * This property will be used to extract the section header character from each object in the `list` prop\n */\n sectionHeaderKey?: keyof T;\n /**\n * Property on each object in the `list` prop\n *\n * @remarks\n * This property will be used to extract the key value from each object in the `list` prop. The extracted key value is set as a `key` of a React element\n */\n listItemKey?: keyof T;\n /**\n * Fetch state of the component\n */\n state: States;\n /**\n * Custom view for the loading state of the component\n */\n loadingView?: JSX.Element;\n /**\n * Image URL for the default loading view\n */\n loadingIconURL?: string;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `\"ERROR\"`\n */\n errorStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `\"EMPTY\"`\n */\n emptyStateText?: string;\n /**\n * Set the scrollbar to the bottom-most position of the scrollable list\n *\n * @remarks\n * If the scrollbar of the scrollable list is set to the bottom-most position of the scrollable list because of this `prop`, the component won't call the `onScrolledToBottom` prop\n */\n scrollToBottom?: boolean;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Styles to apply to this component\n */\n listStyle?: ListStyle;\n // Won't add tsdoc comment here as this will be removed\n theme?: CometChatTheme;\n}\n\nfunction List(props: IListProps): JSX.Element {\n const {\n title = \"\",\n titleAlignment = TitleAlignment.left,\n hideSearch = false,\n searchText = \"\",\n onSearch,\n searchPlaceholderText = \"Search\",\n searchIconURL,\n list,\n listItem,\n showSectionHeader = true,\n sectionHeaderKey,\n listItemKey,\n onScrolledToBottom,\n onScrolledToTop,\n state,\n loadingView,\n loadingIconURL,\n hideError = false,\n errorStateView,\n errorStateText = \"Error\",\n emptyStateView,\n emptyStateText,\n scrollToBottom = false,\n onError,\n listStyle = null,\n scrolledUpCallback,\n } = props;\n\n const [searchInputElement, setSearchInputRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-search-input\"] | null\n >(null);\n const intersectionObserverRootRef = useRef(null);\n const intersectionObserverTopTargetRef = useRef(null);\n const intersectionObserverBottomTargetRef = useRef(null);\n const didComponentScrollToBottomRef = useRef(false);\n const timeoutIdRef = useRef(null);\n const scrollHeightTupleRef = useRef<[number, number]>([0, 0]);\n const didTopObserverCallbackRunRef = useRef(false);\n const onScrolledToTopRef = useRefSync(onScrolledToTop);\n const onScrolledToBottomRef = useRefSync(onScrolledToBottom);\n const onSearchRef = useRefSync(onSearch);\n const errorHandler = useCometChatErrorHandler(onError);\n\n /**\n * Creates the title view\n */\n function getTitle(emptyTitle = false): JSX.Element {\n return (\n \n {title}\n
    \n );\n }\n\n /**\n * Creates the search box\n */\n function getSearchBox(): JSX.Element | null {\n if (hideSearch) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates a list of views using the objects from the `list` prop\n */\n function getList(): JSX.Element[] | null {\n if (\n (state === States.loading && list.length === 0) ||\n state === States.empty ||\n state === States.error\n ) {\n return null;\n }\n let currrentSectionHeader = \"\";\n return list.map((item, itemIdx) => {\n let listSectionJSX: JSX.Element | null = null;\n if (showSectionHeader) {\n let itemSectionHeader: string;\n if (sectionHeaderKey === undefined) {\n errorHandler(\n new CometChat.CometChatException({\n code: \"ERROR\",\n name: \"Error\",\n message:\n \"'sectionHeaderKey' prop must be provided when 'showSectionHeader' prop is set to true. 'showSectionHeader' is set to be true by default\",\n })\n );\n itemSectionHeader = \" \";\n } else {\n itemSectionHeader = (getKeyValue(sectionHeaderKey, item) ||\n \" \")[0].toUpperCase();\n }\n let sectionHeaderJSX: JSX.Element | null = null;\n if (itemIdx === 0) {\n sectionHeaderJSX = (\n \n {itemSectionHeader}\n
    \n );\n currrentSectionHeader = itemSectionHeader;\n } else if (currrentSectionHeader !== itemSectionHeader) {\n sectionHeaderJSX = (\n
    \n \n {itemSectionHeader}\n
    \n
    \n );\n currrentSectionHeader = itemSectionHeader;\n } else {\n sectionHeaderJSX =
    ;\n }\n listSectionJSX = (\n
    {sectionHeaderJSX}
    \n );\n }\n return (\n
    \n {listSectionJSX}\n {listItem(item, itemIdx)}\n
    \n );\n });\n }\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let loadingViewJSX: JSX.Element;\n if (!loadingView) {\n loadingViewJSX = (\n \n \n \n );\n } else {\n loadingViewJSX = (\n \n {loadingView}\n \n );\n }\n return (\n \n {loadingViewJSX}\n \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n if (hideError) {\n return null;\n }\n let errorViewJSX: JSX.Element;\n if (!errorStateView) {\n errorViewJSX = (\n \n \n \n );\n } else {\n errorViewJSX = (\n \n {errorStateView}\n \n );\n }\n return (\n
    \n {errorViewJSX}\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let emptyViewJSX: JSX.Element;\n if (!emptyStateView && emptyStateText) {\n emptyViewJSX = (\n \n \n \n );\n } else {\n emptyViewJSX = (\n \n {emptyStateView}\n \n );\n }\n return (\n
    \n {emptyViewJSX}\n
    \n );\n }\n\n /**\n * Creates a view based on the value of the `state` prop\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n\n\n switch (state) {\n case States.loading:\n if (list.length === 0) {\n res = getLoadingView();\n }\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = state;\n }\n return res;\n }\n\n Hooks({\n onSearchRef,\n searchInputElement,\n intersectionObserverRootRef,\n intersectionObserverBottomTargetRef,\n onScrolledToBottomRef,\n onScrolledToTopRef,\n intersectionObserverTopTargetRef,\n timeoutIdRef,\n scrollToBottom,\n didComponentScrollToBottomRef,\n scrollHeightTupleRef,\n didTopObserverCallbackRunRef,\n errorHandler,\n scrolledUpCallback,\n });\n const emptyTitle = title === \"\" ? true : false;\n return (\n
    \n
    \n {getTitle(emptyTitle)}\n {getSearchBox()}\n
    \n \n
    \n {getList()}\n {getStateView()}\n
    \n \n \n );\n}\n\nconst genericMemo: (component: T) => T = React.memo;\n/**\n * Renders a scrollable list\n */\nexport const CometChatList = genericMemo(List);\n","import React, { JSX, useEffect } from \"react\";\n\nimport { DivElementRef } from \".\";\n\ntype Args = {\n onSearchRef: React.MutableRefObject<((searchStr: string) => void) | undefined>,\n searchInputElement: JSX.IntrinsicElements[\"cometchat-search-input\"] | null,\n intersectionObserverRootRef: React.MutableRefObject,\n intersectionObserverBottomTargetRef: React.MutableRefObject,\n intersectionObserverTopTargetRef: React.MutableRefObject,\n onScrolledToBottomRef: React.MutableRefObject<(() => void) | undefined>,\n onScrolledToTopRef: React.MutableRefObject<(() => void) | undefined>,\n timeoutIdRef: React.MutableRefObject,\n scrollToBottom: boolean,\n didComponentScrollToBottomRef: React.MutableRefObject,\n scrollHeightTupleRef: React.MutableRefObject<[number, number]>,\n didTopObserverCallbackRunRef: React.MutableRefObject,\n errorHandler: (error: unknown) => void,\n scrolledUpCallback?: (boolean?: boolean) => void\n};\n\nexport function Hooks(args: Args) {\n const {\n onSearchRef,\n searchInputElement,\n intersectionObserverRootRef,\n intersectionObserverBottomTargetRef,\n intersectionObserverTopTargetRef,\n onScrolledToBottomRef,\n onScrolledToTopRef,\n timeoutIdRef,\n scrollToBottom,\n didComponentScrollToBottomRef,\n scrollHeightTupleRef,\n didTopObserverCallbackRunRef,\n errorHandler,\n scrolledUpCallback\n } = args;\n\n\n\n useEffect(\n /**\n * Attaches search changed event listener on the search input element\n */\n () => {\n if (!searchInputElement) {\n return;\n }\n function handleSearchChanged(e: CustomEvent) {\n const newSearchText = e.detail.searchText;\n if (timeoutIdRef.current !== null) {\n window.clearTimeout(timeoutIdRef.current);\n }\n timeoutIdRef.current = window.setTimeout(() => {\n onSearchRef.current?.(newSearchText);\n timeoutIdRef.current = null;\n }, 500);\n }\n const eventName = \"cc-search-changed\";\n searchInputElement.addEventListener(eventName, handleSearchChanged);\n return () => {\n searchInputElement.removeEventListener(eventName, handleSearchChanged);\n };\n }, [searchInputElement, onSearchRef, timeoutIdRef]);\n\n useEffect(\n /**\n * Creates an observer and sets it to observe a dummy element that is the bottom-most child of the scrollable list\n */\n () => {\n if (!intersectionObserverRootRef.current || !intersectionObserverBottomTargetRef.current) {\n\n return;\n }\n let stopCallingOnScrolledToBottomCallback = false;\n const rootElement = intersectionObserverRootRef.current;\n const targetElement = intersectionObserverBottomTargetRef.current;\n async function observerCallBack(entry: IntersectionObserverEntry[]) {\n const relevantEntry = entry[0];\n if (relevantEntry) {\n if (scrolledUpCallback) {\n scrolledUpCallback(relevantEntry.isIntersecting)\n }\n }\n if (didComponentScrollToBottomRef.current && relevantEntry.isIntersecting) {\n\n didComponentScrollToBottomRef.current = false;\n return;\n }\n if (!relevantEntry.isIntersecting || stopCallingOnScrolledToBottomCallback || rootElement.scrollHeight <= rootElement.clientHeight) {\n return;\n }\n stopCallingOnScrolledToBottomCallback = true;\n try {\n await Promise.all([onScrolledToBottomRef.current?.()]);\n }\n catch (error) {\n errorHandler(error);\n }\n stopCallingOnScrolledToBottomCallback = false;\n\n }\n const options = { root: rootElement, threshold: 0.1 };\n const observer = new IntersectionObserver(observerCallBack, options);\n observer.observe(targetElement);\n return () => {\n observer.unobserve(targetElement);\n };\n }, [errorHandler, didComponentScrollToBottomRef, intersectionObserverBottomTargetRef, intersectionObserverRootRef, onScrolledToBottomRef, scrolledUpCallback]);\n\n useEffect(\n /**\n * Creates an observer and sets it to observe a dummy element that the top-most child of the scrollable list\n */\n () => {\n if (!intersectionObserverRootRef.current || !intersectionObserverTopTargetRef.current) {\n return;\n }\n let stopCallingOnScrolledToTopCallback = false;\n const rootElement = intersectionObserverRootRef.current;\n const targetElement = intersectionObserverTopTargetRef.current;\n async function observerCallBack(entry: IntersectionObserverEntry[]) {\n\n const relevantEntry = entry[0];\n if (!relevantEntry.isIntersecting || stopCallingOnScrolledToTopCallback || rootElement.scrollHeight <= rootElement.clientHeight) {\n return;\n }\n stopCallingOnScrolledToTopCallback = true;\n try {\n await Promise.all([onScrolledToTopRef.current?.()]);\n }\n catch (error) {\n errorHandler(error);\n }\n stopCallingOnScrolledToTopCallback = false;\n didTopObserverCallbackRunRef.current = true;\n }\n const options = { root: rootElement, threshold: 0.1 };\n const observer = new IntersectionObserver(observerCallBack, options);\n observer.observe(targetElement);\n return () => {\n observer.unobserve(targetElement);\n };\n }, [errorHandler, didTopObserverCallbackRunRef, intersectionObserverRootRef, intersectionObserverTopTargetRef, onScrolledToTopRef]);\n\n useEffect(\n /**\n * Record the change in the scroll height of the scrollable list and manually set the scrollbar position of the scrollable list if some conditions are met\n */\n () => {\n if (!intersectionObserverRootRef.current) {\n return;\n }\n if (intersectionObserverRootRef.current.scrollHeight > intersectionObserverRootRef.current.clientHeight) {\n if (Math.round(intersectionObserverRootRef.current.scrollHeight - scrollHeightTupleRef.current[1]) !== 0) {\n // Recompute scroll height tuple\n scrollHeightTupleRef.current[0] = scrollHeightTupleRef.current[1];\n scrollHeightTupleRef.current[1] = intersectionObserverRootRef.current.scrollHeight;\n // If the topObserverCallback is invoked and the scrollbar position will not be handled by the scrollToBottom handler,\n // set the scrollbar position\n if (!scrollToBottom && didTopObserverCallbackRunRef.current && scrollHeightTupleRef.current[0] !== 0) {\n intersectionObserverRootRef.current.scrollTop = Math.max(scrollHeightTupleRef.current[1] - scrollHeightTupleRef.current[0], 0);\n }\n }\n }\n else {\n // Reset scroll height tuple\n scrollHeightTupleRef.current[0] = 0;\n scrollHeightTupleRef.current[1] = 0;\n }\n if (didTopObserverCallbackRunRef.current) {\n didTopObserverCallbackRunRef.current = false;\n }\n });\n\n useEffect(\n /**\n * Set the scrollbar to be at the bottom-most position of the scrollable list if some conditions are met\n */\n () => {\n setTimeout(() => {\n const rootElement = intersectionObserverRootRef.current;\n const isRootScrollable = (rootElement?.scrollHeight ?? 0) > (rootElement?.clientHeight ?? 0);\n const shouldRootScrollToBottom = scrollToBottom && isRootScrollable && intersectionObserverBottomTargetRef.current !== null;\n if (shouldRootScrollToBottom) {\n didComponentScrollToBottomRef.current = true;\n intersectionObserverBottomTargetRef.current!.scrollIntoView(false);\n }\n });\n });\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\nimport LoadingIcon from \"./assets/LoadingIcon.svg\"\nimport { UserPresencePlacement } from \"@cometchat/uikit-resources\";\n\ninterface IListItemProps {\n id?: string,\n avatarURL?: string,\n avatarName?: string,\n statusIndicatorColor?: string | null,\n statusIndicatorIcon?: string,\n title?: string,\n isActive?: boolean,\n subtitleView?: JSX.Element | null,\n tailView?: JSX.Element | null,\n menuView?: JSX.Element | null,\n hideSeparator?: boolean,\n avatarStyle?: AvatarStyle,\n statusIndicatorStyle?: CSSProperties | null,\n listItemStyle?: ListItemStyle\n onClick?: (customEvent: CustomEvent<{ id: string }>) => void,\n subtitleViewClassName?: string,\n tailViewClassName?: string,\n menuViewClassName?: string,\n loadingIconURL?: string,\n userPresencePlacement ?: UserPresencePlacement,\n};\n\nexport function CometChatListItem(props: IListItemProps) {\n const {\n id,\n avatarURL,\n avatarName,\n statusIndicatorColor,\n statusIndicatorIcon,\n title,\n isActive,\n subtitleView,\n tailView,\n menuView,\n hideSeparator,\n avatarStyle,\n statusIndicatorStyle,\n listItemStyle,\n onClick,\n subtitleViewClassName,\n tailViewClassName,\n menuViewClassName,\n loadingIconURL = LoadingIcon,\n userPresencePlacement = UserPresencePlacement.bottom\n } = props;\n\n const ref = useRef();\n const onListItemClickPropRef = useRefSync(onClick);\n\n function getIsActivePropSpreadObject(): { isActive?: true } {\n return isActive ? { isActive } : {};\n }\n\n function getHideSeparatorPropSpreadObject(): { hideSeparator?: true } {\n return hideSeparator ? { hideSeparator } : {};\n }\n\n function getClassNamePropSpreadObject(className: string | undefined): { className?: string } {\n return className !== undefined ? { className } : {};\n }\n\n function getStylePropSpreadObject(styleObject: T1, stylePropName: T2): { T2?: string } {\n return styleObject ? { [stylePropName]: JSON.stringify(styleObject) } : {};\n }\n\n Hooks({\n ref,\n onListItemClickPropRef\n });\n\n return (\n \n {\n subtitleView\n ?\n (\n \n {subtitleView}\n \n )\n :\n null\n }\n {\n tailView\n ?\n (\n \n {tailView}\n \n )\n :\n null\n }\n {\n menuView\n ?\n (\n \n {menuView}\n \n )\n :\n null\n }\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onListItemClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{id: string}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onListItemClickPropRef\n } = args;\n\n useEffect(() => {\n const listItemElement = ref.current;\n const eventName = \"cc-listitem-clicked\";\n const handleEvent = (e : CustomEvent<{id : string}>) => onListItemClickPropRef.current?.(e);\n listItemElement.addEventListener(eventName, handleEvent);\n return () => {\n listItemElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onListItemClickPropRef]);\n}\n","import { MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { CometChatOption } from \"@cometchat/uikit-resources\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface IMenuListProps {\n data : CometChatOption[],\n moreIconURL? : string,\n topMenuSize? : number,\n menuListStyle? : MenuListStyle,\n onOptionClick? : (customEvent : CustomEvent<{data : CometChatOption}>) => void\n};\n\nexport function CometChatMenuList(props : IMenuListProps) {\n const {\n data,\n moreIconURL,\n topMenuSize,\n menuListStyle,\n onOptionClick\n } = props;\n\n const ref = useRef();\n const onOptionClickPropRef = useRefSync(onOptionClick);\n let idToOnClickMapRef = useRef void) | undefined> | null>(null);\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n data,\n idToOnClickMapRef,\n ref,\n onOptionClickPropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\nimport { CometChatOption } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\n\ntype Args = {\n data : CometChatOption[],\n idToOnClickMapRef : React.MutableRefObject void) | undefined> | null>,\n ref : React.MutableRefObject,\n onOptionClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{data: CometChatOption}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n data,\n idToOnClickMapRef,\n ref,\n onOptionClickPropRef\n } = args;\n\n useEffect(() => {\n const idToOnClickMap = new Map void) | undefined>();\n idToOnClickMapRef.current = idToOnClickMap;\n for (let i = 0; i < data.length; i++) {\n const { id, onClick } = data[i];\n idToOnClickMap.set(id, onClick);\n }\n }, [data, idToOnClickMapRef]);\n\n useEffect(() => {\n const menuListElement = ref.current;\n const eventName = \"cc-menu-clicked\";\n const handleEvent = (event : CustomEvent<{data : CometChatOption}>) => {\n const option = CometChatUIKitUtility.clone(event.detail.data);\n option.onClick = idToOnClickMapRef.current?.get(option.id);\n event.detail.data = option; \n onOptionClickPropRef.current?.(event);\n };\n menuListElement.addEventListener(eventName, handleEvent);\n return () => {\n menuListElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, idToOnClickMapRef, onOptionClickPropRef]);\n}\n","import { RadioButtonStyle } from \"@cometchat/uikit-elements\";\nimport { useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ninterface IRadioButtonProps {\n name? : string,\n labelText? : string,\n checked? : boolean,\n disabled? : boolean,\n radioButtonStyle? : RadioButtonStyle,\n onChange? : (customEvent : CustomEvent<{checked : true}>) => void\n};\n\nexport function CometChatRadioButton(props : IRadioButtonProps) {\n const {\n name,\n labelText,\n checked,\n disabled,\n radioButtonStyle,\n onChange\n } = props;\n\n const ref = useRef();\n const onChangePropRef = useRefSync(onChange);\n\n function getCheckedPropSpreadObject() : {checked? : true} {\n return checked ? {checked} : {};\n }\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onChangePropRef\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onChangePropRef : React.MutableRefObject<((customEvent: CustomEvent<{checked: true}>) => void) | undefined>\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onChangePropRef\n } = args;\n\n useEffect(() => {\n const radioBtnElement = ref.current;\n const eventName = \"cc-radio-button-changed\";\n const handleEvent = (event : CustomEvent<{checked : true}>) => onChangePropRef.current?.(event);\n radioBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n radioBtnElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onChangePropRef]);\n}\n","import { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { createContext } from \"react\";\n\nexport const CometChatThemeContext = createContext({\n theme: new CometChatTheme({})\n});\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\ntype Args = {\n searchText: string,\n usersRequestBuilder: CometChat.UsersRequestBuilder | null,\n searchRequestBuilder: CometChat.UsersRequestBuilder | null\n usersSearchText:React.MutableRefObject,\n};\n\nexport class UsersManager {\n private usersRequest: CometChat.UsersRequest;\n private static defaultLimit = 30;\n\n /**\n * Set `usersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n usersSearchText\n } = args;\n \n let currentUsersRequestBuilder = usersRequestBuilder || this.getDefaultRequestBuilder(); // Use provided builder or create a new one if not provided\n if(searchText && searchRequestBuilder) {\n currentUsersRequestBuilder = searchRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && usersRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && usersRequestBuilder && searchRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else if(!searchText && usersRequestBuilder && !searchRequestBuilder){\n currentUsersRequestBuilder = usersRequestBuilder;\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else if(!searchText && !usersRequestBuilder && searchRequestBuilder){\n currentUsersRequestBuilder = this.getDefaultRequestBuilder();\n currentUsersRequestBuilder.setSearchKeyword(usersSearchText.current)\n }else{\n currentUsersRequestBuilder.setSearchKeyword(searchText)\n }\n this.usersRequest = currentUsersRequestBuilder.build();\n }\n\n private getDefaultRequestBuilder() {\n return new CometChat.UsersRequestBuilder().setLimit(UsersManager.defaultLimit);\n }\n\n /**\n * Calls `fetchNext` method of the set `usersRequest`\n */\n fetchNext() {\n return this.usersRequest.fetchNext();\n }\n\n getCurrentPage(): number {\n return (this.usersRequest as any).pagination.current_page;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static atttachListeners(cb: (user: CometChat.User) => void) {\n const listenerId = \"UsersList_\" + String(Date.now());\n const userListener = new CometChat.UserListener({ onUserOnline: cb, onUserOffline: cb });\n CometChat.addUserListener(listenerId, userListener);\n return () => CometChat.removeUserListener(listenerId);\n }\n /**\n* Attaches an SDK websocket listener\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnestionListener(callback: () => void) {\n const listenerId = \"UsersList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n CometChatTheme,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const MessageBubbleWrapperStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n display: \"flex\",\n position: \"relative\",\n maxWidth: \"65%\",\n width: \"fit-content\",\n gap: '4px'\n } as CSSProperties;\n};\n\nexport const MessageBubbleAvatarStyles = () => {\n return {\n position: \"relative\",\n borderRadius: \"inherit\",\n display: \"flex\",\n width: \"fit-content\",\n alignSelf: \"flex-start\",\n marginTop: \"5px\",\n padding: \"8px 4px\",\n } as CSSProperties;\n};\n\nexport const MessageBubbleAlignmentStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n flex: \"1 1 0\",\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: \"inherit\",\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n position: \"relative\",\n width: \"100%\"\n } as CSSProperties;\n};\n\nexport const MessageBubbleTitleStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any\n) => {\n return {\n display: \"flex\",\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems: \"flex-start\",\n };\n};\n\nexport const MessageOptionsStyles = (\n alignment: MessageBubbleAlignment,\n MessageBubbleAlignment: any,\n headerView: any,\n theme: CometChatTheme\n) => {\n return {\n justifyContent:\n alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n top: headerView ? \"-17px\" : \"-36px\",\n right: alignment === MessageBubbleAlignment.right ? \"unset\" : \"0\",\n left: alignment === MessageBubbleAlignment.left ? \"0\" : \"unset\",\n position: \"absolute\",\n background: theme.palette.getBackground(),\n borderRadius: \"8px\",\n width: \"fit-content\",\n zIndex: \"2\",\n } as CSSProperties;\n};\n\nexport const menuListStyles = (theme: CometChatTheme) => {\n return {\n border: `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: \"8px\",\n background: theme.palette.getBackground(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground(),\n moreIconTint: theme.palette.getAccent600(),\n };\n};\n","import {CSSProperties} from 'react';\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { MenuListStyle } from \"@cometchat/uikit-elements\";\n\nexport const contextMenuStyle = () => {\n return {\n display: \"flex\",\n position: \"relative\"\n } as CSSProperties\n}\n\nexport const topMenuStyle = () => {\n return {\n listStyleType: \"none\",\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: \"0\",\n padding: \"0\",\n border: \"1px solid #e8e8e8\",\n zIndex: \"2\",\n borderRadius: \"8px\"\n } as CSSProperties\n}\n\nexport const subMenuStyle = (showSubMenu: boolean, theme: CometChatTheme) => {\n return {\n listStyleType: \"none\",\n display: showSubMenu ? \"flex\" : \"none\",\n position: \"absolute\",\n right: \"24px\",\n top: \"0\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n alignItems: \"flex-start\",\n border: \"1px solid #e8e8e8\",\n width: \"100%\",\n zIndex: \"3\",\n background: theme.palette.getBackground(),\n marginTop: \"35px\",\n padding: \"0\",\n borderRadius: \"8px\"\n } as CSSProperties\n}\n\nexport const menuItemStyle = () => {\n return {\n background: \"transparent\",\n padding: \"4px 4px\"\n }\n}\n\nexport const moreButtonStyle = (ContextMenuStyle: MenuListStyle) => {\n return {\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: ContextMenuStyle?.moreIconTint || \"\",\n }\n}\n\nexport const menuButtonStyle = (isSubMenu: boolean, menuData: any) => {\n return {\n background: menuData?.backgroundColor || \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: menuData?.iconTint,\n buttonTextFont: menuData?.titleFont,\n buttonTextColor: menuData?.titleColor,\n }\n}\n\nexport const popoverStyle = {\n width: \"300px\",\n height: \"300px\"\n}","import { CSSProperties, useRef, JSX } from \"react\";\nimport { useRefSync } from \"../../../CometChatCustomHooks\";\nimport { Hooks } from \"./hooks\";\n\ntype ButtonStyle = {\n buttonTextFont? : string,\n buttonTextColor? : string,\n buttonIconTint? : string\n} & CSSProperties;\n\ninterface ICometChatButtonProps {\n text? : string,\n hoverText? : string,\n iconURL? : string,\n disabled? : boolean,\n buttonStyle? : ButtonStyle,\n onClick? : (customEvent : CustomEvent<{event : PointerEvent}>) => void ,\n childRefCallback?:(ref:React.RefObject) => void;\n};\n\nexport function CometChatButton(props : ICometChatButtonProps) {\n const {\n text,\n hoverText,\n iconURL,\n disabled,\n buttonStyle,\n onClick,\n childRefCallback\n } = props;\n\n const ref = useRef();\n const onClickPropRef = useRefSync(onClick);\n\n function getDisabledPropSpreadObject() : {disabled? : true} {\n return disabled ? {disabled} : {};\n }\n\n function getStylePropSpreadObject(styleObject : T1, stylePropName : T2) : {T2?: string} {\n return styleObject ? {[stylePropName] : JSON.stringify(styleObject)} : {};\n }\n\n Hooks({\n ref,\n onClickPropRef,\n childRefCallback\n });\n\n return (\n \n );\n}\n","import React, { useEffect, JSX } from \"react\";\nimport { CometChatButton } from \".\";\n\ntype Args = {\n ref : React.MutableRefObject,\n onClickPropRef : React.MutableRefObject<((customEvent: CustomEvent<{event: PointerEvent}>) => void) | undefined>,\n childRefCallback?:(ref:React.RefObject) => void,\n};\n\nexport function Hooks(args : Args) {\n const {\n ref,\n onClickPropRef,\n childRefCallback\n } = args;\n\n useEffect(() => {\n const buttonElement = ref.current;\n if(childRefCallback){\n childRefCallback(ref.current)\n }\n const eventName = \"cc-button-clicked\";\n const handleEvent = (e : CustomEvent<{event : PointerEvent}>) => onClickPropRef.current?.(e);\n buttonElement.addEventListener(eventName, handleEvent);\n return () => {\n buttonElement.removeEventListener(eventName, handleEvent);\n };\n }, [ref, onClickPropRef]);\n}\n","import { CometChatActionsIcon, CometChatActionsView, Placement } from \"@cometchat/uikit-resources\";\nimport React, { JSX, useCallback, useContext } from 'react';\nimport { contextMenuStyle, menuButtonStyle, menuItemStyle, moreButtonStyle, popoverStyle, subMenuStyle, topMenuStyle } from \"./style\";\n\nimport { CometChatButton } from '../CometChatButton';\nimport { CometChatThemeContext } from \"../../../CometChatThemeContext\";\nimport { MenuListStyle } from '@cometchat/uikit-elements';\n\ninterface ContextMenuProps {\n data: Array,\n topMenuSize: number,\n moreIconURL: string,\n moreIconHoverText: string,\n ContextMenuStyle: MenuListStyle,\n onOptionClicked: (option : CometChatActionsIcon | CometChatActionsView) => void,\n placement: Placement\n}\n\nexport const CometChatContextMenu = (props: ContextMenuProps) => {\n const { theme } = useContext(CometChatThemeContext)\n const [showSubMenu, setShowSubMenu] = React.useState(false);\n const moreButtonRef = React.useRef(null);\n // store the reference pf all the menu items and popover\n const menuButtonRefArray = React.useRef>([]);\n const {\n data,\n topMenuSize,\n moreIconURL,\n moreIconHoverText,\n ContextMenuStyle,\n onOptionClicked,\n placement\n } = props;\n \n const handleMenuClick = useCallback(() => setShowSubMenu((showSubMenu: boolean) => !showSubMenu), []);\n\n const getMoreButton = useCallback(() => {\n return (\n
  • \n \n
  • \n )\n }, [ContextMenuStyle, moreIconHoverText, moreIconURL, handleMenuClick])\n\n const getMenu = useCallback((menu : Array, isSubMenu : boolean) => {\n return menu?.map((menuData, index: number) => {\n \n let menuButton, moreButton = null;\n\n if (menuData instanceof CometChatActionsView && menuData?.customView) {\n \n menuButton = (\n
  • \n { menuButtonRefArray.current[menuData.id] = el }} \n popoverStyle={JSON.stringify(popoverStyle)} placement={placement}>\n
    \n \n
    \n
    \n {menuData?.customView(closeCallback(menuData.id))}\n
    \n \n
  • );\n } else {\n menuButton = (\n
  • \n { onOptionClicked(menuData) }}\n />\n
  • \n );\n };\n\n if(!isSubMenu && data?.length > menu?.length && index === menu?.length - 1) {\n moreButton = getMoreButton();\n }\n\n return (\n \n {menuButton}\n {moreButton}\n \n )\n })\n }, [placement, data, onOptionClicked, getMoreButton])\n\n const getTopMenu = useCallback(() => {\n return getMenu(data.slice(0, topMenuSize - 1), false);\n }, [getMenu, topMenuSize, data])\n\n const getSubMenu = useCallback(() => {\n return getMenu(data.slice(topMenuSize - 1), true);\n }, [getMenu, topMenuSize, data])\n\n const closeCallback = useCallback((id:string) => {\n return () =>{\n if (menuButtonRefArray.current[id]?.closeContentView) {\n menuButtonRefArray.current[id]?.closeContentView();\n }\n }\n },[]);\n\n return (\n
    \n
      {getTopMenu()}
    \n
      {getSubMenu()}
    \n
    \n )\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMore%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C6.66666667%20C3.26666667%2C6.66666667%202.66666667%2C7.26666667%202.66666667%2C8%20C2.66666667%2C8.73333333%203.26666667%2C9.33333333%204%2C9.33333333%20C4.73333333%2C9.33333333%205.33333333%2C8.73333333%205.33333333%2C8%20C5.33333333%2C7.26666667%204.73333333%2C6.66666667%204%2C6.66666667%20Z%20M12%2C6.66666667%20C11.2666667%2C6.66666667%2010.6666667%2C7.26666667%2010.6666667%2C8%20C10.6666667%2C8.73333333%2011.2666667%2C9.33333333%2012%2C9.33333333%20C12.7333333%2C9.33333333%2013.3333333%2C8.73333333%2013.3333333%2C8%20C13.3333333%2C7.26666667%2012.7333333%2C6.66666667%2012%2C6.66666667%20Z%20M8%2C6.66666667%20C7.26666667%2C6.66666667%206.66666667%2C7.26666667%206.66666667%2C8%20C6.66666667%2C8.73333333%207.26666667%2C9.33333333%208%2C9.33333333%20C8.73333333%2C9.33333333%209.33333333%2C8.73333333%209.33333333%2C8%20C9.33333333%2C7.26666667%208.73333333%2C6.66666667%208%2C6.66666667%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import \"@cometchat/uikit-elements\";\n\nimport { CometChatActionsIcon, CometChatActionsView, MessageBubbleAlignment, Placement } from \"@cometchat/uikit-resources\";\nimport { MessageBubbleAlignmentStyles, MessageBubbleAvatarStyles, MessageBubbleTitleStyles, MessageBubbleWrapperStyles, MessageOptionsStyles, menuListStyles } from \"./style\";\nimport React, { useCallback, useContext, useEffect, useState } from 'react';\n\nimport { BaseStyle } from '@cometchat/uikit-shared';\nimport { CometChatContextMenu } from \"../CometChatContextMenu\";\nimport { CometChatThemeContext } from \"../../../CometChatThemeContext\";\nimport MoreIcon from \"./assets/More.svg\";\n\ninterface IMessageBubbleProps {\n id: any;\n setRef?: (ref: any) => void;\n leadingView: any;\n headerView: any;\n replyView: any;\n contentView: any;\n bottomView: any;\n threadView: any;\n footerView: any;\n statusInfoView?: any;\n options: (CometChatActionsIcon | CometChatActionsView)[];\n alignment: MessageBubbleAlignment;\n messageBubbleStyle: BaseStyle,\n moreIconURL?: string,\n topMenuSize?: number\n};\n\nconst CometChatMessageBubble = (props: IMessageBubbleProps) => {\n const {\n id,\n leadingView = null,\n headerView = null,\n replyView = null,\n contentView = null,\n bottomView = null,\n threadView = null,\n footerView = null,\n statusInfoView = null,\n options = [],\n alignment = MessageBubbleAlignment.right,\n messageBubbleStyle = new BaseStyle({\n width: \"100%\",\n height: \"auto\",\n background: \"\",\n borderRadius: \"12px\",\n border: \"none\"\n }),\n moreIconURL = MoreIcon,\n topMenuSize = 5,\n setRef\n } = props;\n\n const contentStyle = {\n borderRadius: '8px',\n };\n\n const getMessageBubbleStyle = () => {\n const object = {\n ...messageBubbleStyle,\n ...contentStyle,\n };\n return object;\n };\n\n const getMessageBubbleStyleDimension = () => {\n const object = {\n height: messageBubbleStyle.height,\n width: messageBubbleStyle.width,\n };\n\n return object;\n };\n\n const { theme } = useContext(CometChatThemeContext);\n const messageRef = React.useRef(null);\n\n useEffect(() => {\n if (messageRef && messageRef.current && setRef) {\n setRef(messageRef);\n }\n }, [messageRef, setRef]);\n\n\n\n const [isHovering, setIsHovering] = useState(false);\n useEffect(() => {\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, []);\n let timeoutId: NodeJS.Timeout | null = null;\n\n const hideMessageOptions =\n () => {\n timeoutId = setTimeout(() => {\n setIsHovering(false);\n }, 150);\n }\n\n const showMessageOptions =\n () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n setIsHovering(true);\n }\n\n const getLeadingView = () => {\n if (leadingView && alignment === MessageBubbleAlignment.left) {\n return (\n\n \n {leadingView}\n \n )\n }\n }\n\n const getHeaderView = () => {\n if (headerView) {\n return (\n \n {headerView}\n \n )\n }\n }\n\n const onOptionClicked = (data: CometChatActionsIcon | CometChatActionsView) => {\n options.forEach((option) => {\n if (option instanceof CometChatActionsIcon) {\n if (option.id === data?.id && id) {\n option.onClick?.(parseInt(id));\n }\n }\n });\n }\n\n const getMessageOptions = () => {\n\n if (options && options.length > 0 && isHovering) {\n\n return (\n
    \n \n
    \n )\n }\n }\n\n const getPlacementAlignment = () => {\n if (isMobile()) {\n return checkBubblePosition();\n }\n\n return props.alignment === MessageBubbleAlignment.left\n ? Placement.right\n : Placement.left;\n };\n\n const isMobile = () => {\n return window.innerWidth <= 768;\n };\n\n const checkBubblePosition = () => {\n const bubble = messageRef.current;\n if (bubble) {\n const rect = bubble.getBoundingClientRect();\n const isAtTop = rect.top < window.innerHeight / 2;\n const isAtBottom = rect.bottom > window.innerHeight / 2;\n if (isAtTop) {\n return Placement.bottom;\n } else if (isAtBottom) {\n return Placement.top;\n } else {\n return Placement.bottom\n }\n } else {\n return Placement.bottom\n }\n };\n\n return (\n
    \n {getLeadingView()}\n
    \n {getMessageOptions()}\n {getHeaderView()}\n \n
    \n {replyView ? replyView : null}\n {contentView ? contentView : null}\n {statusInfoView ? statusInfoView : null}\n
    \n {bottomView ? bottomView : null}\n {footerView ? footerView : null}\n {threadView ? threadView : null}\n
    \n
    \n {/* */}\n \n )\n}\n\nexport { CometChatMessageBubble }\n","import {\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIKitConstants,\n MessageBubbleAlignment\n} from \"@cometchat/uikit-resources\";\nimport { CometChatMessageBubble } from \"../Views/CometChatMessageBubble\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nexport class MessageUtils {\n messageBubbleStyle(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageBubbleAlignment,\n currentUser: any\n ) {\n if (message.getDeletedAt()) {\n return {\n background: \"transparent\",\n border: `1px dashed ${theme.palette.getAccent400()}`,\n borderRadius: \"12px\",\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n (!message.getSender() ||\n currentUser?.getUid() === message.getSender().getUid())\n ) {\n return {\n background:\n alignment === MessageBubbleAlignment.left\n ? theme.palette.getAccent100()\n : theme.palette.getPrimary(),\n borderRadius: \"12px\",\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return {\n borderRadius: \"\",\n background: theme.palette.getAccent100(),\n };\n } else if (\n message.getType() === CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n return {\n background: \"transparent\",\n borderRadius: \"12px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n };\n } else {\n if (\n message.getSender() &&\n message.getSender().getUid() !== currentUser?.getUid()\n ) {\n return {\n background: theme.palette.getAccent100(),\n borderRadius: \"12px\",\n };\n } else {\n return {\n background: theme.palette.getAccent100(),\n borderRadius: \"12px\",\n };\n }\n }\n }\n\n getContentView(\n message: CometChat.BaseMessage,\n template: CometChatMessageTemplate\n ) {\n let view;\n const messageTypesMap: { [key: string]: CometChatMessageTemplate } = {};\n messageTypesMap[`${template.category}_${template.type}`] = template;\n\n if (\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`] &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n ?.contentView\n ) {\n view = messageTypesMap[\n `${message?.getCategory()}_${message?.getType()}`\n ]?.contentView(message, MessageBubbleAlignment.right);\n // default would be html string using lit components\n if (typeof view === \"string\") {\n return {\n html: view,\n };\n }\n return view;\n } else {\n return null;\n }\n }\n\n getBubbleWrapper(\n message: CometChat.BaseMessage,\n template: CometChatMessageTemplate\n ) {\n let view;\n const messageTypesMap: { [key: string]: CometChatMessageTemplate } = {};\n messageTypesMap[`${template.category}_${template.type}`] = template;\n\n if (\n messageTypesMap &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`] &&\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n .bubbleView\n ) {\n view =\n messageTypesMap[`${message?.getCategory()}_${message?.getType()}`]\n .bubbleView(message);\n return view;\n } else {\n view = null;\n return view;\n }\n }\n\n getMessageBubble(\n baseMessage: CometChat.BaseMessage,\n template: CometChatMessageTemplate,\n messageBubbleStyle: any,\n alignment: MessageBubbleAlignment\n ) {\n return this.getBubbleWrapper(baseMessage, template)\n ? this.getBubbleWrapper(baseMessage, template)\n : \n }\n\n getUserStatusVisible(\n user: CometChat.User | CometChat.GroupMember | any\n ) {\n let userBlockedFlag = false;\n if (user instanceof (CometChat.User || CometChat.GroupMember)) {\n if (user.getBlockedByMe() || user.getHasBlockedMe() || user.getStatus() === CometChatUIKitConstants.userStatusType.offline) {\n userBlockedFlag = true;\n }\n }\n return userBlockedFlag;\n }\n}\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n} from \"react\";\nimport {\n CometChatOption,\n CometChatUIKitConstants,\n SelectionMode,\n States,\n TitleAlignment,\n localize,\n UserPresencePlacement,\n} from \"@cometchat/uikit-resources\";\nimport {\n UsersWrapperStyle,\n avatarStyle,\n listItemStyle,\n listStyle,\n menuStyles,\n statusIndicatorStyle,\n tailViewSelectionContainerStyle,\n} from \"./style\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport { UsersManager } from \"./controller\";\nimport { UsersStyle } from \"@cometchat/uikit-shared\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\n\nexport interface IUsersProps {\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"USERS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n tileAlignment?: TitleAlignment;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholderText?: string;\n /**\n * Custom list item view to be rendered for each user in the fetched list\n */\n listItemView?: (user: CometChat.User) => JSX.Element;\n /**\n * Show alphabetical header\n *\n * @defaultValue `true`\n */\n showSectionHeader?: boolean;\n /**\n * Property on the user object\n *\n * @remarks\n * This property will be used to extract the section header character from the user object\n *\n * @defaultValue `getName`\n */\n sectionHeaderKey?: keyof CometChat.User;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Custom subtitle view to be rendered for each user in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (user: CometChat.User) => JSX.Element;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (user: CometChat.User) => CometChatOption[];\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean;\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Function to call when a user from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (users: CometChat.User, selected: boolean) => void;\n /**\n * Request builder to fetch users\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n usersRequestBuilder?: CometChat.UsersRequestBuilder;\n /**\n * Request builder with search parameters to fetch users\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.UsersRequestBuilder;\n /**\n * Function to call on click of the default list item view of a user\n */\n onItemClick?: (user: CometChat.User) => void;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to this component\n */\n usersStyle?: UsersStyle;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * User to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeUser?: CometChat.User;\n\n /**\n * Search keyword to filter the list of users.\n *\n * @defaultValue `\"\"`\n */\n searchKeyword?: string;\n /**\n * Callback function to be executed when the user list is empty.\n */\n onEmpty?: () => void;\n\n /**\n * Flag to indicate whether users are currently being fetched.\n *\n * @defaultValue `false`\n */\n fetchingUsers?: boolean;\n /**\n * Timeout reference for fetching users.\n */\n fetchTimeOut?: any;\n /**\n * Placement of user presence information within the user interface.\n * @defaultValue `bottom`\n */\n userPresencePlacement?: UserPresencePlacement;\n /**\n * Flag to indicate whether to disable loading state while fetching users.\n * @defaultValue `false`\n */\n disableLoadingState?: boolean;\n /**\n * URL of the icon to be used for the close button.\n */\n closeButtonIconURL?: string;\n}\n\ntype State = {\n searchText: string;\n userList: CometChat.User[];\n fetchState: States;\n isFirstReload: boolean;\n fetchingUsers: boolean;\n fetchTimeOut: any;\n disableLoadingState: boolean;\n};\n\nexport type Action =\n | { type: \"setSearchText\"; searchText: State[\"searchText\"] }\n | {\n type: \"appendUsers\";\n users: CometChat.User[];\n removeOldUsers?: boolean;\n usersManager?: UsersManager | null;\n onEmpty?: () => void;\n }\n | { type: \"setFetchState\"; fetchState: States }\n | { type: \"setUserList\"; userList: CometChat.User[] }\n | { type: \"updateUser\"; user: CometChat.User }\n | { type: \"setIsFirstReload\"; isFirstReload: boolean };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"appendUsers\":\n let users: CometChat.User[] = [];\n if (action.removeOldUsers) {\n if (!state.disableLoadingState) {\n state.userList = [];\n }\n users = action.users;\n if (!state.disableLoadingState) {\n newState = { ...state, userList: users };\n }\n } else {\n if (\n action.usersManager &&\n [0].includes(action.usersManager?.getCurrentPage()) &&\n !action.users.length\n ) {\n if (!action.users.length && action.onEmpty) {\n setTimeout(() => {\n action.onEmpty!();\n });\n newState = {\n ...state,\n fetchState: States.empty,\n };\n }\n } else if (action.users.length !== 0) {\n newState = {\n ...state,\n userList:\n action.usersManager?.getCurrentPage() == 1\n ? [...action.users]\n : [...state.userList, ...action.users],\n };\n }\n }\n break;\n case \"setUserList\":\n newState = { ...state, userList: action.userList };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"updateUser\": {\n const { userList } = state;\n const { user: targetUser } = action;\n const targetUserUid = targetUser.getUid();\n const targetIdx = userList.findIndex(\n (user) => user.getUid() === targetUserUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n userList: userList.map((user, i) => {\n return i === targetIdx ? targetUser : user;\n }),\n };\n }\n break;\n }\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of users that has been created in a CometChat app\n */\nexport function CometChatUsers(props: IUsersProps) {\n const {\n title = localize(\"USERS\"),\n tileAlignment = TitleAlignment.left,\n hideSearch = false,\n searchIconURL = SearchIcon,\n searchPlaceholderText = localize(\"SEARCH\"),\n listItemView = null,\n showSectionHeader = true,\n sectionHeaderKey = \"getName\",\n loadingStateView, // Will use the default provided by CometChatList if undefined\n loadingIconURL = SpinnerIcon,\n hideError = false,\n errorStateView, // Will use the default provided by CometChatList if undefined\n errorStateText = localize(\"SOMETHING_WRONG\"),\n emptyStateView, // Will use the default provided by CometChatList if undefined\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n subtitleView = null,\n disableUsersPresence = false,\n menus = null,\n options = null,\n hideSeparator = false,\n selectionMode = SelectionMode.none,\n onSelect, // Won't use if undefined\n usersRequestBuilder = null,\n searchRequestBuilder = null,\n onItemClick, // Won't use if undefined\n onError,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n usersStyle: usersStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n activeUser = null,\n searchKeyword = \"\",\n onEmpty,\n fetchingUsers = false,\n fetchTimeOut,\n userPresencePlacement = UserPresencePlacement.bottom,\n disableLoadingState = false,\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n userList: [],\n fetchState: States.loading,\n isFirstReload: false,\n fetchingUsers,\n fetchTimeOut,\n disableLoadingState: disableLoadingState,\n });\n const errorHandler = useCometChatErrorHandler(onError);\n const usersManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n const usersSearchText = useRef(\"\");\n let isJustMounted = useRef(true);\n (() => {\n if (state.searchText && state.searchText !== usersSearchText.current) {\n usersSearchText.current = state.searchText;\n }\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Initiates a fetch request and appends the fetched users to the `userList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `userList` state\n */\n const fetchNextAndAppendUsers = useCallback(\n async (fetchId: string): Promise => {\n const usersManager = usersManagerRef.current;\n if (!usersManager) {\n return;\n }\n let initialState =\n isConnectionReestablished.current ||\n (disableLoadingState && !isJustMounted)\n ? States.loaded\n : States.loading;\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const newUsers = await usersManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n let removeOldUsers = isConnectionReestablished.current ? true : false;\n dispatch({\n type: \"appendUsers\",\n users: newUsers,\n removeOldUsers,\n usersManager,\n onEmpty,\n });\n if (attachListenerOnFetch.current) {\n UsersManager.attachConnestionListener(() => {\n const requestBuilder =\n usersRequestBuilder === null\n ? new CometChat.UsersRequestBuilder().setLimit(30)\n : usersRequestBuilder;\n usersManagerRef.current = new UsersManager({\n searchText: usersSearchText.current,\n usersRequestBuilder: requestBuilder,\n searchRequestBuilder,\n usersSearchText\n });\n isConnectionReestablished.current = true;\n });\n attachListenerOnFetch.current = false;\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } else {\n isConnectionReestablished.current = false;\n }\n } catch (error: unknown) {\n if (fetchId === fetchNextIdRef.current && state.userList?.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n isJustMounted.current = false;\n },\n [errorHandler, dispatch]\n );\n\n /**\n * Updates the `searchText` state\n */\n const onSearch = useCallback(\n (newSearchText: string): void => {\n const trimmedText = newSearchText.trim();\n if (\n newSearchText.length === 0 ||\n (trimmedText.length === newSearchText.length && trimmedText.length > 0)\n ) {\n usersSearchText.current = \"\";\n dispatch({ type: \"setSearchText\", searchText: newSearchText });\n }\n // dispatch({type: \"setSearchText\", searchText: newSearchText});\n },\n [dispatch]\n );\n\n /**\n * Update the user object if found in the `userList` state\n */\n const updateUser = useCallback(\n (user: CometChat.User): void => {\n dispatch({ type: \"updateUser\", user });\n },\n [dispatch]\n );\n\n /**\n * Creates menus to display\n */\n function getMenus(): JSX.Element | null {\n if (!menus) {\n return null;\n }\n return (\n
    \n {menus}\n
    \n );\n }\n\n /**\n * Creates tail view for the default list item view\n */\n function getDefaultListItemTailView(\n user: CometChat.User\n ): JSX.Element | null {\n if (\n selectionMode !== SelectionMode.single &&\n selectionMode !== SelectionMode.multiple\n ) {\n return null;\n }\n let tailViewContent: JSX.Element;\n if (selectionMode === SelectionMode.single) {\n tailViewContent = (\n onSelect?.(user, e.detail.checked)}\n />\n );\n } else {\n tailViewContent = (\n onSelect?.(user, e.detail.checked)}\n />\n );\n }\n return (\n
    {tailViewContent}
    \n );\n }\n\n /**\n * Creates menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of this view is handled by the default list item view\n */\n function getDefaultListItemMenuView(\n user: CometChat.User\n ): JSX.Element | null {\n let curOptions: CometChatOption[] | undefined;\n if (!(curOptions = options?.(user))?.length) {\n return null;\n }\n return (\n e.detail.data.onClick?.()}\n />\n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(user: CometChat.User): string | null {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(user);\n if (disableUsersPresence || userBlockedFlag) {\n return null;\n }\n return (\n usersStyleObject?.onlineStatusColor || theme.palette.getSuccess() || null\n );\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (user: CometChat.User) => JSX.Element {\n if (listItemView) {\n return listItemView;\n }\n return function (user: CometChat.User): JSX.Element {\n return (\n onItemClick?.(user)}\n userPresencePlacement={userPresencePlacement}\n />\n );\n };\n }\n\n Hooks({\n usersManagerRef,\n fetchNextAndAppendUsers,\n searchText: state.searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n updateUser,\n fetchNextIdRef,\n searchKeyword,\n disableLoadingState,\n usersSearchText\n });\n return (\n \n {getMenus()}\n \n fetchNextAndAppendUsers(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n showSectionHeader={showSectionHeader}\n sectionHeaderKey={sectionHeaderKey}\n listItemKey='getUid'\n state={\n state.fetchState === States.loaded &&\n state.userList.length === 0 &&\n !onEmpty\n ? States.empty\n : state.fetchState\n }\n loadingView={loadingStateView}\n loadingIconURL={loadingIconURL}\n hideError={hideError}\n errorStateView={errorStateView}\n errorStateText={errorStateText}\n emptyStateView={emptyStateView}\n emptyStateText={emptyStateText}\n listStyle={listStyle(usersStyleObject, theme)}\n />\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatUserEvents } from \"@cometchat/uikit-resources\";\nimport { Action } from \".\";\nimport { UsersManager } from \"./controller\";\n\ntype Args = {\n usersManagerRef : React.MutableRefObject,\n fetchNextAndAppendUsers : (fetchId : string) => Promise,\n searchText : string,\n usersRequestBuilder : CometChat.UsersRequestBuilder | null,\n searchRequestBuilder : CometChat.UsersRequestBuilder | null,\n dispatch : React.Dispatch,\n updateUser : (user : CometChat.User) => void,\n fetchNextIdRef : React.MutableRefObject,\n searchKeyword: string,\n disableLoadingState: boolean,\n usersSearchText:React.MutableRefObject,\n};\n\nexport function Hooks(args : Args) {\n const {\n usersManagerRef,\n fetchNextAndAppendUsers,\n searchText,\n usersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n updateUser,\n fetchNextIdRef,\n searchKeyword,\n disableLoadingState,\n usersSearchText,\n } = args;\n\n\n\n \n useEffect(() => {\n if(usersRequestBuilder?.searchKeyword){\n usersSearchText.current = usersRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n usersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n return ()=> {\n /* \n When the prop (usersRequestBuilder) gets updated (setSearchKeyword), reference in parent component gets updated too. \n This was causing an issue in mentions since the previous search keyword remained in the request builder reference in \n composer.\n */\n usersRequestBuilder?.setSearchKeyword(\"\")\n }\n }, []); \n useEffect(\n /**\n * Creates a new request builder -> empties the `userList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n usersManagerRef.current = new UsersManager({searchText, usersRequestBuilder, searchRequestBuilder,usersSearchText});\n if(!disableLoadingState){\n dispatch({type: \"setUserList\", userList: []});\n }\n fetchNextAndAppendUsers(fetchNextIdRef.current = \"initialFetch_\" + String(Date.now()));\n }, [searchText, usersRequestBuilder, searchRequestBuilder, fetchNextAndAppendUsers, dispatch, fetchNextIdRef, usersManagerRef]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return UsersManager.atttachListeners(updateUser);\n }, [updateUser]);\n\n useEffect(\n /**\n * Subscribes to User UI events\n */\n () => {\n const subUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(updateUser);\n const subUserUnblocked = CometChatUserEvents.ccUserUnblocked.subscribe(updateUser);\n return () => {\n subUserBlocked.unsubscribe();\n subUserUnblocked.unsubscribe();\n };\n }, [updateUser]);\n\n useEffect(\n () => {\n dispatch({type: \"setSearchText\", searchText: searchKeyword});\n }, [searchKeyword , dispatch]);\n}\n","import { AvatarStyle, BackdropStyle, ChangeScopeStyle, LabelStyle, ListItemStyle, MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { BaseStyle, GroupMembersStyle, ListStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint?: string};\n\nexport function groupMembersWrapperStyle(groupMemberSyleObject : GroupMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n overflowX: \"hidden\",\n width: groupMemberSyleObject?.width || \"100%\",\n height: groupMemberSyleObject?.height || \"100%\",\n boxSizing: \"border-box\",\n border: groupMemberSyleObject?.border || \"none\",\n borderRadius: groupMemberSyleObject?.borderRadius || \"0\",\n background: groupMemberSyleObject?.background || theme.palette.getBackground(),\n padding: groupMemberSyleObject?.padding || \"0\",\n boxShadow: groupMemberSyleObject?.boxShadow || \"0\"\n };\n}\n\nexport function listStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n titleTextFont: groupMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: groupMemberStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: groupMemberStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: groupMemberStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading), \n errorStateTextColor: groupMemberStyleObject?.errorStateTextColor || theme.palette.getAccent600(), \n loadingIconTint: groupMemberStyleObject?.loadingIconTint || theme.palette.getAccent600(), \n searchIconTint: groupMemberStyleObject?.searchIconTint || theme.palette.getAccent500(), \n searchBorder: groupMemberStyleObject?.searchBorder || \"none\", \n searchBorderRadius: groupMemberStyleObject?.searchBorderRadius || \"8px\", \n searchBackground: groupMemberStyleObject?.searchBackground || theme.palette.getAccent50(), \n searchPlaceholderTextFont: groupMemberStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1), \n searchPlaceholderTextColor: groupMemberStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(), \n searchTextFont: groupMemberStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1), \n searchTextColor: groupMemberStyleObject?.searchTextColor || theme.palette.getAccent()\n });\n}\n\nexport function backBtnContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n left: \"16px\",\n top: \"19px\",\n width: 'fit-content',\n height: 'fit-content'\n };\n}\n\nexport function defaultBackBtnStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: groupMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\"\n };\n}\n\nexport function closeBtnStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: groupMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n }; \n}\n\nexport function menusContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"12px\",\n top: \"8px\",\n cursor: \"pointer\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || 'inherit',\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent() \n });\n}\nexport function scopeLabelStyle(groupScopeStyleObject : ChangeScopeStyle | null, theme : CometChatTheme) : LabelStyle {\n return new LabelStyle({\n textFont: groupScopeStyleObject?.textFont || fontHelper(theme.typography.subtitle1),\n textColor: groupScopeStyleObject?.textColor || theme.palette.getAccent600(),\n background: \"inherit\"\n });\n}\n\nexport function menuListStyle(groupMembersStyle: GroupMembersStyle | null, theme : CometChatTheme) : MenuListStyle {\n return new MenuListStyle({\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n moreIconTint: theme.palette.getPrimary(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: groupMembersStyle?.background || theme.palette.getBackground()\n });\n}\n\nexport function groupScopeStyle(groupScopeStyleObject : ChangeScopeStyle | null, theme : CometChatTheme) : ChangeScopeStyle {\n return new ChangeScopeStyle({\n height: groupScopeStyleObject?.height || \"212px\",\n width: groupScopeStyleObject?.width || \"360px\",\n border: groupScopeStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: groupScopeStyleObject?.borderRadius || \"12px\",\n background: groupScopeStyleObject?.background || theme.palette.getBackground(),\n titleTextFont: groupScopeStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupScopeStyleObject?.titleTextColor || theme.palette.getAccent(),\n activeTextFont: groupScopeStyleObject?.activeTextFont || fontHelper(theme.typography.subtitle1),\n activeTextColor: groupScopeStyleObject?.activeTextColor || theme.palette.getAccent(),\n activeTextBackground: groupScopeStyleObject?.activeTextBackground || theme.palette.getAccent200(),\n arrowIconTint: groupScopeStyleObject?.arrowIconTint || theme.palette.getAccent900(),\n textFont: groupScopeStyleObject?.textFont || fontHelper(theme.typography.subtitle1),\n textColor: groupScopeStyleObject?.textColor || theme.palette.getAccent600(),\n optionBackground: groupScopeStyleObject?.optionBackground || theme.palette.getBackground(),\n optionBorder: groupScopeStyleObject?.optionBorder || \"none\",\n optionBorderRadius: groupScopeStyleObject?.optionBorderRadius || \"0\",\n hoverTextFont: groupScopeStyleObject?.hoverTextFont || fontHelper(theme.typography.subtitle1),\n hoverTextColor: groupScopeStyleObject?.hoverTextColor || theme.palette.getAccent900(),\n hoverTextBackground: groupScopeStyleObject?.hoverTextBackground || theme.palette.getAccent100(),\n buttonTextFont: groupScopeStyleObject?.buttonTextFont || fontHelper(theme.typography.title2),\n buttonTextColor: groupScopeStyleObject?.buttonTextColor || theme.palette.getAccent(\"dark\"),\n buttonBackground: groupScopeStyleObject?.buttonBackground || theme.palette.getPrimary(),\n closeIconTint: groupScopeStyleObject?.closeIconTint || theme.palette.getPrimary()\n });\n}\n\n\nexport function listWrapperStyle() : CSSProperties {\n return {\n position: \"relative\",\n height: \"100%\"\n };\n}\n\nexport function tailViewStyle() : CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n columnGap: \"8px\"\n };\n}\n\nexport function closeBtnContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"16px\",\n top: \"19px\",\n width: 'fit-content',\n height: 'fit-content'\n };\n}\n\nexport const getBackdropStyle = (groupsMembersStyle: GroupMembersStyle | null) : BackdropStyle => {\n return {\n height: groupsMembersStyle?.height,\n width: groupsMembersStyle?.width ,\n position: 'absolute'\n } as BaseStyle;\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20%5Ci-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%5Ci%20%20%5Cihttp%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%5Ci%3E%3Csvg%20enable-background%3D%22new%200%200%2032%2032%22%20%20id%3D%22%D0%A1%D0%BB%D0%BE%D0%B9_1%22%20version%3D%221.1%22%20viewBox%3D%220%200%2032%2032%22%20%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20d%3D%22M24.285%2C11.284L16%2C19.571l-8.285-8.288c-0.395-0.395-1.034-0.395-1.429%2C0%20%20c-0.394%2C0.395-0.394%2C1.035%2C0%2C1.43l8.999%2C9.002l0%2C0l0%2C0c0.394%2C0.395%2C1.034%2C0.395%2C1.428%2C0l8.999-9.002%20%20c0.394-0.395%2C0.394-1.036%2C0-1.431C25.319%2C10.889%2C24.679%2C10.889%2C24.285%2C11.284z%22%20fill%3D%22%23121313%22%20id%3D%22Expand_More%22%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3Cg%2F%3E%3C%2Fsvg%3E\"","import { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport React from \"react\";\n\ntype Args = {\n searchText: string,\n groupMemberRequestBuilder: CometChat.GroupMembersRequestBuilder | null,\n searchRequestBuilder: CometChat.GroupMembersRequestBuilder | null,\n groupGuid: string,\n groupMembersSearchText:React.MutableRefObject\n};\n\nexport class GroupMembersManager {\n private groupMembersRequest: CometChat.GroupMembersRequest;\n\n /**\n * Sets `groupMembersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n groupMemberRequestBuilder,\n searchRequestBuilder,\n groupGuid,\n groupMembersSearchText\n } = args;\n let finalGroupRequestBuilder = groupMemberRequestBuilder || new CometChat.GroupMembersRequestBuilder(groupGuid).setLimit(30);\n if(searchText && searchRequestBuilder) {\n finalGroupRequestBuilder = searchRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && groupMemberRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && groupMemberRequestBuilder && searchRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else if(!searchText && groupMemberRequestBuilder && !searchRequestBuilder){\n finalGroupRequestBuilder = groupMemberRequestBuilder;\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else if(!searchText && !groupMemberRequestBuilder && searchRequestBuilder){\n finalGroupRequestBuilder.setSearchKeyword(groupMembersSearchText.current)\n }else{\n finalGroupRequestBuilder.setSearchKeyword(searchText)\n }\n this.groupMembersRequest = finalGroupRequestBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `groupMembersRequest`\n */\n fetchNext(): Promise {\n return this.groupMembersRequest.fetchNext();\n }\n\n getCurrentPage(): number {\n return (this.groupMembersRequest as any).pagination.current_page;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachUserListener(callback: (user: CometChat.User) => void): () => void {\n const listenerId = \"GroupMembers_User_\" + String(Date.now());\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: callback,\n onUserOffline: callback\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n\n /**\n * Creates a `CometChat.GroupMember` instance from the provided `user` and `group`\n */\n static createParticipantGroupMember(user: CometChat.User, group: CometChat.Group): CometChat.GroupMember {\n const groupMember = new CometChat.GroupMember(user.getUid(), CometChatUIKitConstants.groupMemberScope.participant);\n groupMember.setName(user.getName());\n groupMember.setGuid(group.getGuid());\n groupMember.setUid(user.getUid());\n return groupMember;\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachGroupListener(groupGuid: string, dispatch: React.Dispatch): () => void {\n const listenerId = \"GroupMembers_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (\n message: CometChat.Action,\n changedUser: CometChat.GroupMember,\n newScope: CometChat.GroupMemberScope,\n oldScope: CometChat.GroupMemberScope,\n changedGroup: CometChat.Group\n ) => {\n if (changedGroup.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"updateGroupMemberScopeIfPresent\", groupMemberUid: changedUser.getUid(), newScope });\n },\n onGroupMemberKicked: (\n message: CometChat.Action,\n kickedUser: CometChat.User,\n kickedBy: CometChat.User,\n kickedFrom: CometChat.Group\n ) => {\n if (kickedFrom.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: kickedUser.getUid() });\n },\n onGroupMemberBanned: (\n message: CometChat.Action,\n bannedUser: CometChat.User,\n bannedBy: CometChat.User,\n bannedFrom: CometChat.Group\n ) => {\n if (bannedFrom.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: bannedUser.getUid() });\n },\n onMemberAddedToGroup: (\n message: CometChat.Action,\n userAdded: CometChat.User,\n userAddedBy: CometChat.User,\n userAddedIn: CometChat.Group\n ) => {\n if (userAddedIn.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"appendGroupMember\", groupMember: GroupMembersManager.createParticipantGroupMember(userAdded, userAddedIn) });\n },\n onGroupMemberLeft: (\n message: CometChat.Action,\n leavingUser: CometChat.User,\n group: CometChat.Group\n ) => {\n if (group.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"removeGroupMemberIfPresent\", groupMemberUid: leavingUser.getUid() });\n },\n onGroupMemberJoined: (\n message: CometChat.Action,\n joinedUser: CometChat.User,\n joinedGroup: CometChat.Group\n ) => {\n if (joinedGroup.getGuid() !== groupGuid) {\n return;\n }\n dispatch({ type: \"appendGroupMember\", groupMember: GroupMembersManager.createParticipantGroupMember(joinedUser, joinedGroup) });\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fmoreicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMore%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.5%2C10%20C5.88071187%2C10%207%2C11.1192881%207%2C12.5%20C7%2C13.8807119%205.88071187%2C15%204.5%2C15%20C3.11928813%2C15%202%2C13.8807119%202%2C12.5%20C2%2C11.1192881%203.11928813%2C10%204.5%2C10%20Z%20M12%2C10%20C13.3807119%2C10%2014.5%2C11.1192881%2014.5%2C12.5%20C14.5%2C13.8807119%2013.3807119%2C15%2012%2C15%20C10.6192881%2C15%209.5%2C13.8807119%209.5%2C12.5%20C9.5%2C11.1192881%2010.6192881%2C10%2012%2C10%20Z%20M19.5%2C10%20C20.8807119%2C10%2022%2C11.1192881%2022%2C12.5%20C22%2C13.8807119%2020.8807119%2C15%2019.5%2C15%20C18.1192881%2C15%2017%2C13.8807119%2017%2C12.5%20C17%2C11.1192881%2018.1192881%2C10%2019.5%2C10%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n ChangeScopeStyle,\n ListItemStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport {\n CometChatGroupEvents,\n CometChatOption,\n CometChatUIKitConstants,\n SelectionMode,\n States,\n TitleAlignment,\n UserPresencePlacement,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n GroupMemberUtils,\n GroupMembersStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n avatarStyle,\n backBtnContainerStyle,\n closeBtnContainerStyle,\n closeBtnStyle,\n defaultBackBtnStyle,\n getBackdropStyle,\n groupMembersWrapperStyle,\n groupScopeStyle,\n listItemStyle,\n listStyle,\n listWrapperStyle,\n menuListStyle,\n menusContainerStyle,\n scopeLabelStyle,\n statusIndicatorStyle,\n tailViewStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport DownArrowIcon from \"./assets/down-arrow.svg\";\nimport { GroupMembersManager } from \"./controller\";\nimport { Hooks } from \"./hooks\";\nimport MoreIcon from \"./assets/more-icon.svg\";\nimport SearchIcon from \"./assets/search.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\n\ninterface IGroupMembersProps {\n /**\n * Image URL for the back button\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string;\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean;\n /**\n * Function to call when the default back button is clicked\n */\n onBack?: () => void;\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"MEMBERS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string;\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string;\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean;\n /**\n * Request builder to fetch group members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n /**\n * Request builder with search parameters to fetch group members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n /**\n * Group the fetched groupMembers belong to\n */\n group: CometChat.Group;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'errorStateView'. It will be removed in subsequent versions.\n */\n errorSateView?: JSX.Element;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `true`\n */\n hideSeparator?: boolean;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Custom subtitle view to be rendered for each group member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * Custom list item view to be rendered for each group member in the fetched list\n */\n listItemView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (\n group: CometChat.Group,\n groupMember: CometChat.GroupMember\n ) => CometChatOption[];\n /**\n * Image URL for the change scope component's `arrowIconURL` prop\n *\n * @defaultValue `./assets/down-arrow.svg`\n */\n dropDownIconURL?: string;\n /**\n * View to be placed in the tail view\n *\n * @remarks\n * This prop will be used if `listItemView` is not provided\n */\n tailView?: (groupMember: CometChat.GroupMember) => JSX.Element;\n /**\n * Selection mode to use for the default list item view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Function to call on click of the default list item view of a group member\n */\n onItemClick?: (groupMember: CometChat.GroupMember) => void;\n /**\n * Function to call when a group member from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (groupMember: CometChat.GroupMember, selected: boolean) => void;\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string;\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * Styles to apply to the change scope component\n */\n groupScopeStyle?: ChangeScopeStyle;\n /**\n * Styles to apply to this component\n */\n groupMembersStyle?: GroupMembersStyle;\n\n /**\n * Search keyword to filter the list of users.\n *\n * @defaultValue `\"\"`\n */\n searchKeyword?: string;\n /**\n * Callback function to be executed when the user list is empty.\n */\n onEmpty?: () => void;\n\n /**\n * Timeout reference for fetching users.\n */\n fetchTimeOut?: any;\n /**\n * Placement of user presence information within the user interface.\n * @defaultValue `bottom`\n */\n userPresencePlacement?: UserPresencePlacement;\n /**\n * Flag to indicate whether to disable loading state while fetching users.\n * @defaultValue `false`\n */\n disableLoadingState?: boolean;\n}\n\ntype State = {\n groupMemberList: CometChat.GroupMember[];\n fetchState: States;\n searchText: string;\n groupMemberToChangeScopeOf: CometChat.GroupMember | null;\n fetchTimeOut: any;\n disableLoadingState: boolean;\n};\n\nexport type Action =\n | {\n type: \"appendGroupMembers\";\n groupMembers: CometChat.GroupMember[];\n groupMembersManager?: GroupMembersManager | null;\n onEmpty?: () => void;\n }\n | { type: \"setGroupMemberList\"; groupMemberList: CometChat.GroupMember[] }\n | { type: \"setSearchText\"; searchText: string }\n | { type: \"setFetchState\"; fetchState: States }\n | { type: \"removeGroupMemberIfPresent\"; groupMemberUid: string }\n | {\n type: \"setGroupMemberToChangeScopeOf\";\n groupMember: CometChat.GroupMember | null;\n }\n | {\n type: \"replaceGroupMemberIfPresent\";\n updatedGroupMember: CometChat.GroupMember;\n }\n | { type: \"updateGroupMemberStatusIfPresent\"; user: CometChat.User }\n | {\n type: \"updateGroupMemberScopeIfPresent\";\n groupMemberUid: string;\n newScope: CometChat.GroupMemberScope;\n }\n | { type: \"appendGroupMember\"; groupMember: CometChat.GroupMember };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendGroupMembers\": {\n const { groupMembers, groupMembersManager, onEmpty } = action;\n if (\n (groupMembersManager &&\n [0].includes(groupMembersManager?.getCurrentPage()) && !groupMembers.length)) {\n if (!groupMembers.length && onEmpty) {\n setTimeout(() => {\n onEmpty();\n });\n newState = {\n ...state,\n fetchState: States.empty,\n };\n }\n } else if (groupMembers.length !== 0) {\n newState = {\n ...state,\n groupMemberList:\n groupMembersManager?.getCurrentPage() == 1\n ? [...groupMembers]\n : [...state.groupMemberList, ...groupMembers],\n };\n }\n break;\n }\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"setGroupMemberList\":\n newState = { ...state, groupMemberList: action.groupMemberList };\n break;\n case \"removeGroupMemberIfPresent\": {\n const targetUid = action.groupMemberUid;\n const targetIdx = state.groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: state.groupMemberList.filter(\n (groupMember, i) => i !== targetIdx\n ),\n };\n }\n break;\n }\n case \"setGroupMemberToChangeScopeOf\":\n newState = { ...state, groupMemberToChangeScopeOf: action.groupMember };\n break;\n case \"replaceGroupMemberIfPresent\": {\n const { updatedGroupMember } = action;\n const targetUid = updatedGroupMember.getUid();\n const targetIdx = state.groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: state.groupMemberList.map((groupMember, i) => {\n if (i !== targetIdx) {\n return groupMember;\n }\n\n return updatedGroupMember;\n }),\n };\n }\n break;\n }\n case \"updateGroupMemberStatusIfPresent\": {\n const { user } = action;\n const { groupMemberList } = state;\n const targetUid = user.getUid();\n const targetIdx = groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === targetUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: groupMemberList.map((groupMember, i) => {\n if (i === targetIdx) {\n groupMember.setStatus(user.getStatus());\n }\n return groupMember;\n }),\n };\n }\n break;\n }\n case \"updateGroupMemberScopeIfPresent\": {\n const { groupMemberUid, newScope } = action;\n const { groupMemberList } = state;\n const targetIdx = groupMemberList.findIndex(\n (groupMember) => groupMember.getUid() === groupMemberUid\n );\n if (targetIdx > -1) {\n newState = {\n ...state,\n groupMemberList: groupMemberList.map((groupMember, i) => {\n if (i === targetIdx) {\n groupMember.setScope(newScope);\n }\n return groupMember;\n }),\n };\n }\n break;\n }\n case \"appendGroupMember\": {\n newState = {\n ...state,\n groupMemberList: [...state.groupMemberList, action.groupMember],\n };\n break;\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\nexport function CometChatGroupMembers(props: IGroupMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n menus = null,\n title = localize(\"MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n searchPlaceholder = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = false,\n groupMemberRequestBuilder = null,\n searchRequestBuilder = null,\n group,\n onError,\n emptyStateText = localize(\"NO_USERS_FOUND\"), // According to me, this is the most suitable\n errorStateText = localize(\"SOMETHING_WRONG\"),\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n errorStateView,\n errorSateView,\n emptyStateView,\n hideError = false,\n hideSeparator = true,\n disableUsersPresence = false,\n subtitleView = null,\n listItemView = null,\n options = null,\n dropDownIconURL = DownArrowIcon,\n tailView = null,\n selectionMode = SelectionMode.none,\n onItemClick = null,\n onSelect = null,\n closeButtonIconURL = \"\",\n onClose,\n avatarStyle: avatarStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n groupScopeStyle: groupScopeStyleObject = null,\n groupMembersStyle: groupMemberStyleObject = null,\n searchKeyword = \"\",\n onEmpty,\n fetchTimeOut,\n userPresencePlacement = UserPresencePlacement.bottom,\n disableLoadingState = false,\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n groupMemberList: [],\n fetchState: States.loading,\n searchText: \"\",\n groupMemberToChangeScopeOf: null,\n fetchTimeOut,\n disableLoadingState,\n });\n const groupMembersManagerRef = useRef(null);\n const loggedInUserRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const [changeScopeElement, setChangeScopeRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-change-scope\"] | null\n >(null);\n const groupPropRef = useRefSync(group);\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n const groupMembersSearchText = useRef(\"\");\n\n /**\n * Updates the `searchText` state\n */\n const onSearchTextChange = useCallback(\n (searchText: string): void => {\n const trimmedText = searchText.trim();\n if (\n searchText.length === 0 ||\n (trimmedText.length === searchText.length && trimmedText.length > 0)\n ) {\n groupMembersSearchText.current = \"\";\n dispatch({ type: \"setSearchText\", searchText });\n }\n },\n [dispatch]\n );\n\n /**\n * Initiates a fetch request and appends the fetched group members to the `groupMemberList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `groupMemberList` state\n */\n const fetchNextAndAppendGroupMembers = useCallback(\n async (fetchId: string): Promise => {\n const groupMembersManager = groupMembersManagerRef.current;\n if (!groupMembersManager) {\n return;\n }\n if (!disableLoadingState) {\n dispatch({ type: \"setFetchState\", fetchState: States.loading });\n }\n try {\n const groupMembers = await groupMembersManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n\n dispatch({\n type: \"appendGroupMembers\",\n groupMembers,\n groupMembersManager,\n onEmpty,\n });\n\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } catch (error) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n errorHandler(error);\n }\n },\n [dispatch, errorHandler]\n );\n\n /**\n * Creates an action message\n */\n const createActionMessage = useCallback(\n (\n actionOn: CometChat.GroupMember,\n action: string,\n group: CometChat.Group,\n loggedInUser: CometChat.User\n ): CometChat.Action => {\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory\n .action as CometChat.MessageCategory\n );\n actionMessage.setAction(action);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setMessage(\n `${loggedInUser.getUid()} ${action} ${actionOn.getUid()}`\n );\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(actionOn));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n actionMessage.setReceiverType(\n CometChatUIKitConstants.MessageReceiverType.group\n );\n actionMessage.setRawData({\n extras: {\n scope: {\n new: actionOn.getScope(),\n },\n },\n });\n return actionMessage;\n },\n []\n );\n\n /**\n * Bans the provided `groupMember`\n */\n const banGroupMember = async (\n groupMember: CometChat.GroupMember\n ): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!loggedInUser) {\n return;\n }\n try {\n const currentGroup = groupPropRef.current;\n await CometChat.banGroupMember(\n currentGroup.getGuid(),\n groupMember.getUid()\n );\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: groupMember.getUid(),\n });\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setMembersCount(groupClone.getMembersCount() - 1);\n CometChatGroupEvents.ccGroupMemberBanned.next({\n kickedBy: CometChatUIKitUtility.clone(loggedInUser),\n kickedFrom: groupClone,\n kickedUser: CometChatUIKitUtility.clone(groupMember),\n message: createActionMessage(\n groupMember,\n CometChatUIKitConstants.groupMemberAction.BANNED,\n groupClone,\n loggedInUser\n ),\n });\n } catch (error) {\n errorHandler(error);\n }\n };\n\n /**\n * Kicks the provided `groupMember`\n */\n const kickGroupMember = async (\n groupMember: CometChat.GroupMember\n ): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!loggedInUser) {\n return;\n }\n try {\n const currentGroup = groupPropRef.current;\n await CometChat.kickGroupMember(\n currentGroup.getGuid(),\n groupMember.getUid()\n );\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: groupMember.getUid(),\n });\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setMembersCount(groupClone.getMembersCount() - 1);\n CometChatGroupEvents.ccGroupMemberKicked.next({\n kickedBy: CometChatUIKitUtility.clone(loggedInUser),\n kickedFrom: CometChatUIKitUtility.clone(groupClone),\n kickedUser: CometChatUIKitUtility.clone(groupMember),\n message: createActionMessage(\n groupMember,\n CometChatUIKitConstants.groupMemberAction.KICKED,\n groupClone,\n loggedInUser\n ),\n });\n } catch (error) {\n errorHandler(error);\n }\n };\n\n const { groupMemberToChangeScopeOf: groupMember } = state;\n\n /**\n * Updates the scope of the provided `groupMember`\n */\n const updateGroupMemberScope = useCallback(\n async (newScope: string): Promise => {\n const loggedInUser = loggedInUserRef.current;\n if (!groupMember || !loggedInUser) {\n return;\n }\n try {\n const newScopeCasted = newScope as CometChat.GroupMemberScope;\n const currentGroup = groupPropRef.current;\n await CometChat.updateGroupMemberScope(\n currentGroup.getGuid(),\n groupMember.getUid(),\n newScopeCasted\n );\n const updatedGroupMember = CometChatUIKitUtility.clone(groupMember);\n updatedGroupMember.setScope(newScopeCasted);\n dispatch({ type: \"replaceGroupMemberIfPresent\", updatedGroupMember });\n CometChatGroupEvents.ccGroupMemberScopeChanged.next({\n scopeChangedFrom: groupMember.getScope(),\n scopeChangedTo: updatedGroupMember.getScope(),\n message: createActionMessage(\n updatedGroupMember,\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE,\n currentGroup,\n loggedInUser\n ),\n group: CometChatUIKitUtility.clone(currentGroup),\n updatedUser: CometChatUIKitUtility.clone(updatedGroupMember),\n });\n } catch (error) {\n errorHandler(error);\n } finally {\n dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember: null });\n }\n },\n [errorHandler, dispatch, createActionMessage, groupMember, groupPropRef]\n );\n\n /**\n * Handles user created action on a groupMember from the fetched list\n */\n function handleActionOnGroupMember(\n action: string,\n groupMember: CometChat.GroupMember\n ): void | Promise {\n if (action === CometChatUIKitConstants.GroupMemberOptions.ban) {\n return banGroupMember(groupMember);\n }\n if (action === CometChatUIKitConstants.GroupMemberOptions.kick) {\n return kickGroupMember(groupMember);\n }\n if (action === CometChatUIKitConstants.GroupMemberOptions.changeScope) {\n return dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember });\n }\n }\n\n /**\n * Creates the default back button\n */\n function getDefaultBackBtnView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates the back button view of the component\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n {\n getDefaultBackBtnView()\n }\n \n\n );\n }\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n
    \n {menus}\n
    \n );\n }\n\n /**\n * Creates the close button view of the component\n */\n function getCloseBtnView(): JSX.Element | null {\n if (!closeButtonIconURL) {\n return null;\n }\n\n return (\n \n \n \n );\n }\n\n /**\n * Creates the menu view of the default list item view\n */\n function getDefaultListItemMenuView(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n let groupMemberOptions: CometChatOption[] | undefined;\n if (\n tailView === null &&\n (groupMemberOptions = options?.(group, groupMember))?.length\n ) {\n return (\n {\n const { id, onClick } = e.detail.data;\n if (onClick) {\n onClick();\n } else if (typeof id === \"string\") {\n handleActionOnGroupMember(id, groupMember);\n }\n }}\n />\n );\n }\n return null;\n }\n\n /**\n * Creates selection input component based on `selectionMode`\n */\n function getSelectionInput(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n if (selectionMode === SelectionMode.single) {\n return (\n onSelect?.(groupMember, e.detail.checked)}\n />\n );\n }\n if (selectionMode === SelectionMode.multiple) {\n return (\n onSelect?.(groupMember, e.detail.checked)}\n />\n );\n }\n return null;\n }\n\n /**\n * Creates options view of the default tail view\n *\n * @param groupMemberOptions - Return value of `GroupMemberUtils.getViewMemberOptions` function\n */\n function getDefaultTailOptionsView(\n groupMemberOptions: string | CometChatOption[],\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n if (typeof groupMemberOptions === \"string\") {\n return (\n \n );\n }\n return (\n {\n const { id } = e.detail.data;\n if (typeof id === \"string\") {\n handleActionOnGroupMember(id, groupMember);\n }\n }}\n />\n );\n }\n\n /**\n * Creates the default tail view\n */\n function getDefaultTailView(\n groupMember: CometChat.GroupMember\n ): JSX.Element | null {\n if (tailView !== null) {\n return null;\n }\n return (\n
    \n {getDefaultTailOptionsView(\n GroupMemberUtils.getViewMemberOptions(\n groupMember,\n group,\n loggedInUserRef.current?.getUid(),\n theme\n ),\n groupMember\n )}\n
    \n );\n }\n\n /**\n * Creates the tail view for the default list item view\n */\n function getDefaultListItemTailView(\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n return (\n
    \n {tailView?.(groupMember)}\n {getSelectionInput(groupMember)}\n {getDefaultTailView(groupMember)}\n
    \n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(\n groupMember: CometChat.GroupMember\n ): string | null {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(groupMember);\n if (disableUsersPresence || userBlockedFlag) {\n return null;\n }\n return (\n groupMemberStyleObject?.onlineStatusColor ||\n theme.palette.getSuccess() ||\n null\n );\n }\n\n /**\n * Creates the default list item view\n */\n function getDefaultListItemView(\n groupMember: CometChat.GroupMember\n ): JSX.Element {\n return (\n onItemClick?.(groupMember)}\n userPresencePlacement={userPresencePlacement}\n />\n );\n }\n\n /**\n * Gets the list item view of the component\n */\n function getListItem(): (groupMember: CometChat.GroupMember) => JSX.Element {\n return listItemView !== null ? listItemView : getDefaultListItemView;\n }\n\n /**\n * Creates the group member scope change modal view\n */\n function getGroupMemberScopeChangeModal(): JSX.Element | null {\n let groupMemberAllowedScopes: string[];\n const { groupMemberToChangeScopeOf } = state;\n if (\n groupMemberToChangeScopeOf !== null &&\n (groupMemberAllowedScopes = GroupMemberUtils.allowScopeChange(\n group,\n groupMemberToChangeScopeOf\n )).length > 0\n ) {\n return (\n \n \n \n );\n }\n return null;\n }\n\n Hooks({\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText: state.searchText,\n groupMembersManagerRef,\n groupGuid: group.getGuid(),\n fetchNextAndAppendGroupMembers,\n fetchNextIdRef,\n dispatch,\n loggedInUserRef,\n errorHandler,\n changeScopeElement,\n updateGroupMemberScope,\n searchKeyword,\n disableLoadingState,\n groupMembersSearchText\n });\n\n return (\n \n \n {getMenusView()}\n \n fetchNextAndAppendGroupMembers(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n state={state.fetchState === States.loaded && state.groupMemberList.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n emptyStateText={emptyStateText}\n errorStateText={errorStateText}\n loadingView={loadingStateView}\n emptyStateView={emptyStateView}\n errorStateView={errorStateView || errorSateView}\n hideError={hideError}\n listStyle={listStyle(groupMemberStyleObject, theme)}\n />\n \n {getBackBtnView()}\n {getCloseBtnView()}\n {getGroupMemberScopeChangeModal()}\n \n );\n}\n","import React, { JSX, useEffect } from \"react\";\n\nimport { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatGroupEvents } from \"@cometchat/uikit-resources\";\nimport { GroupMembersManager } from \"./controller\";\n\ntype Args = {\n groupMemberRequestBuilder: CometChat.GroupMembersRequestBuilder | null;\n searchRequestBuilder: CometChat.GroupMembersRequestBuilder | null;\n searchText: string;\n groupMembersManagerRef: React.MutableRefObject;\n groupGuid: string;\n fetchNextAndAppendGroupMembers: (id: string) => void;\n fetchNextIdRef: React.MutableRefObject;\n dispatch: React.Dispatch;\n loggedInUserRef: React.MutableRefObject;\n errorHandler: (error: unknown) => void;\n changeScopeElement: JSX.IntrinsicElements[\"cometchat-change-scope\"] | null;\n updateGroupMemberScope: (newScope: string) => Promise;\n searchKeyword: string;\n disableLoadingState: boolean;\n groupMembersSearchText:React.MutableRefObject;\n};\n\nexport function Hooks(args: Args) {\n const {\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupMembersManagerRef,\n groupGuid,\n fetchNextAndAppendGroupMembers,\n fetchNextIdRef,\n dispatch,\n loggedInUserRef,\n errorHandler,\n changeScopeElement,\n updateGroupMemberScope,\n searchKeyword,\n disableLoadingState,\n groupMembersSearchText\n } = args;\n\n useEffect(() => {\n\n if(groupMemberRequestBuilder?.searchKeyword){\n groupMembersSearchText.current = groupMemberRequestBuilder?.searchKeyword;\n } else if(searchRequestBuilder?.searchKeyword){\n groupMembersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n return ()=> {\n /* \n When the prop (groupMemberRequestBuilder) gets updated (setSearchKeyword), reference in parent component gets updated too. \n This was causing an issue in mentions since the previous search keyword remained in the request builder reference in \n composer.\n */\n groupMemberRequestBuilder?.setSearchKeyword(\"\")\n }\n \n}, []);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n loggedInUserRef.current = await CometChat.getLoggedinUser();\n } catch (error) {\n errorHandler(error);\n }\n })();\n },\n [errorHandler, loggedInUserRef]\n );\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `groupMemberList` state -> initiates a new fetch\n */\n () => {\n groupMembersManagerRef.current = new GroupMembersManager({\n searchText,\n groupMemberRequestBuilder,\n searchRequestBuilder,\n groupGuid,\n groupMembersSearchText\n \n });\n if (!disableLoadingState) {\n dispatch({ type: \"setGroupMemberList\", groupMemberList: [] });\n }\n fetchNextAndAppendGroupMembers(\n (fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()))\n );\n },\n [\n groupMemberRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupGuid,\n fetchNextAndAppendGroupMembers,\n dispatch,\n fetchNextIdRef,\n groupMembersManagerRef,\n ]\n );\n\n useEffect(\n /**\n * Attaches event listeners to some elements related to the change scope view\n */\n () => {\n if (!changeScopeElement) {\n return;\n }\n const changeScopeClosedEventName = \"cc-changescope-close-clicked\";\n const scopeChangedEventName = \"cc-changescope-changed\";\n function handleChangeScopeClose() {\n dispatch({ type: \"setGroupMemberToChangeScopeOf\", groupMember: null });\n }\n function handleScopeChange(e: CustomEvent) {\n const newScope = e.detail?.value;\n if (newScope) {\n updateGroupMemberScope(newScope);\n }\n }\n changeScopeElement.addEventListener(\n changeScopeClosedEventName,\n handleChangeScopeClose\n );\n changeScopeElement.addEventListener(\n scopeChangedEventName,\n handleScopeChange\n );\n return () => {\n changeScopeElement.removeEventListener(\n changeScopeClosedEventName,\n handleChangeScopeClose\n );\n changeScopeElement.removeEventListener(\n scopeChangedEventName,\n handleScopeChange\n );\n };\n },\n [changeScopeElement, updateGroupMemberScope, dispatch]\n );\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return GroupMembersManager.attachUserListener((user: CometChat.User) =>\n dispatch({ type: \"updateGroupMemberStatusIfPresent\", user })\n );\n },\n [dispatch]\n );\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return GroupMembersManager.attachGroupListener(groupGuid, dispatch);\n },\n [groupGuid, dispatch]\n );\n\n useEffect(\n /**\n * Subscribes to Group UI events\n */\n () => {\n const groupMemberKickedSub =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe((item) => {\n const { kickedUser } = item;\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: kickedUser.getUid(),\n });\n });\n const groupMemberBannedSub =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe((item) => {\n const { kickedUser } = item;\n dispatch({\n type: \"removeGroupMemberIfPresent\",\n groupMemberUid: kickedUser.getUid(),\n });\n });\n const groupMemberChangeScopeSub =\n CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe((item) => {\n const { updatedUser, scopeChangedTo } = item;\n dispatch({\n type: \"updateGroupMemberScopeIfPresent\",\n groupMemberUid: updatedUser.getUid(),\n newScope: scopeChangedTo,\n });\n });\n const groupMemberAddedSub =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe((item) => {\n const { usersAdded, userAddedIn } = item;\n let groupMembersManager: GroupMembersManager | null = groupMembersManagerRef.current;\n dispatch({\n type: \"appendGroupMembers\",\n groupMembersManager,\n groupMembers: usersAdded.map((user) =>\n GroupMembersManager.createParticipantGroupMember(\n user,\n userAddedIn\n )\n ),\n });\n });\n return () => {\n groupMemberKickedSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupMemberChangeScopeSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n };\n },\n [dispatch]\n );\n\n useEffect(() => {\n dispatch({ type: \"setSearchText\", searchText: searchKeyword });\n }, [searchKeyword, dispatch]);\n}\n","import { CSSProperties, useContext } from 'react';\nimport { CometChatUsers } from '../CometChatUsers';\nimport { CometChatGroupMembers } from '../CometChatGroupMembers';\nimport { UserMemberListType, UserPresencePlacement } from \"@cometchat/uikit-resources\";\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatThemeContext } from '../CometChatThemeContext';\n\n\nexport interface IMentionsProps {\n userMemberListType?: UserMemberListType;\n onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;\n listItemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element\n avatarStyle?: AvatarStyle;\n statusIndicatorStyle?: CSSProperties;\n searchKeyword?: string;\n group?: CometChat.Group;\n subtitleView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;\n usersRequestBuilder?: CometChat.UsersRequestBuilder;\n disableUsersPresence?: boolean;\n userPresencePlacement?: UserPresencePlacement;\n hideSeparator?: boolean;\n loadingStateView?: JSX.Element;\n onEmpty?: () => void;\n groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;\n loadingIconUrl?: string;\n disableLoadingState?: boolean,\n onError?: () => void;\n}\n\nfunction CometChatUserMemberWrapper(props: IMentionsProps) {\n const {\n userMemberListType = UserMemberListType.users,\n onItemClick,\n listItemView,\n avatarStyle,\n statusIndicatorStyle,\n searchKeyword,\n group,\n subtitleView,\n usersRequestBuilder,\n userPresencePlacement = UserPresencePlacement.bottom,\n loadingStateView,\n onEmpty,\n groupMemberRequestBuilder,\n loadingIconUrl,\n disableLoadingState = false,\n hideSeparator = false,\n onError,\n disableUsersPresence\n } = props;\n const { theme } = useContext(CometChatThemeContext);\n\n const getUsersStyle = () => {\n return{\n border: '1px solid ' + theme.palette.getAccent300(),\n background: theme.palette.getBackground(),\n minHeight: '45px',\n borderRadius: '12px 12px 12px 12px'\n };\n };\n\n const getGroupMemebersStyle = () => {\n return {\n border: '1px solid ' + theme.palette.getAccent300(),\n padding: \"0px\",\n background: theme.palette.getBackground(),\n borderRadius: '12px 12px 12px 12px'\n };\n };\n\n\n\n return (\n <>\n {userMemberListType === UserMemberListType.users && (\n \n )}\n\n {userMemberListType === UserMemberListType.groupmembers && group && (\n { return <> }}\n disableLoadingState={disableLoadingState}\n disableUsersPresence={disableUsersPresence}\n onError={onError}\n groupMembersStyle={getGroupMemebersStyle()}\n />\n )}\n \n );\n}\n\nexport default CometChatUserMemberWrapper;\n","/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),e=new WeakMap,n=(t,n,s,i,o)=>{const l=null==o?void 0:o[n];void 0===l||s===i?null==s&&n in HTMLElement.prototype?t.removeAttribute(n):t[n]=s:((t,n,s)=>{let i=e.get(t);void 0===i&&e.set(t,i=new Map);let o=i.get(n);void 0!==s?void 0===o?(i.set(n,o={handleEvent:s}),t.addEventListener(n,o)):o.handleEvent=s:void 0!==o&&(i.delete(n),t.removeEventListener(n,o))})(t,l,s)},s=(t,e)=>{\"function\"==typeof t?t(e):t.current=e};function i(e=window.React,i,o,l,d){let a,c,r;if(void 0===i){const t=e;({tagName:c,elementClass:r,events:l,displayName:d}=t),a=t.react}else a=e,r=o,c=i;const h=a.Component,u=a.createElement,f=new Set(Object.keys(null!=l?l:{}));class v extends h{constructor(){super(...arguments),this.o=null}t(t){if(null!==this.o)for(const e in this.i)n(this.o,e,this.props[e],t?t[e]:void 0,l)}componentDidMount(){var t;this.t(),null===(t=this.o)||void 0===t||t.removeAttribute(\"defer-hydration\")}componentDidUpdate(t){this.t(t)}render(){const{_$Gl:e,...n}=this.props;this.h!==e&&(this.u=t=>{null!==e&&s(e,t),this.o=t,this.h=e}),this.i={};const i={ref:this.u};for(const[e,s]of Object.entries(n))t.has(e)?i[\"className\"===e?\"class\":e]=s:f.has(e)||e in r.prototype?this.i[e]=s:i[e]=s;return i.suppressHydrationWarning=!0,u(c,i)}}v.displayName=null!=d?d:r.name;const m=a.forwardRef(((t,e)=>u(v,{...t,_$Gl:e},null==t?void 0:t.children)));return m.displayName=v.displayName,m}export{i as createComponent};\n//# sourceMappingURL=create-component.js.map\n","import {\n AIOptionsStyle,\n CalendarStyle,\n CardBubbleStyle,\n CometChatCardBubble,\n CometChatFormBubble,\n CometChatMentionsFormatter,\n CometChatSchedulerBubble,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUrlsFormatter,\n ComposerId,\n ConversationUtils,\n DetailsUtils,\n FormBubbleStyle,\n SchedulerBubbleStyle,\n TimeSlotStyle,\n UrlFormatterStyle,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n AvatarStyle,\n BaseStyle,\n CheckboxStyle,\n CometChatAudioBubble,\n CometChatFileBubble,\n CometChatFullScreenViewer,\n CometChatImageBubble,\n CometChatTextBubble,\n CometChatVideoBubble,\n DropdownStyle,\n FileBubbleStyle,\n ImageBubbleStyle,\n InputStyle,\n LabelStyle,\n ListItemStyle,\n QuickViewStyle,\n RadioButtonStyle,\n SingleSelectStyle,\n TextBubbleStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatDetailsTemplate,\n CometChatMessageComposerAction,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n FormMessage,\n MentionsTargetElement,\n MessageBubbleAlignment,\n SchedulerMessage,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\n\nimport AudioIcon from \"./assets/audio-file.svg\";\nimport { ChatConfigurator } from \"../Framework/ChatConfigurator\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport CopyIcon from \"./assets/Copy.svg\";\nimport { DataSource } from \"../Framework/DataSource\";\nimport DeleteIcon from \"./assets/deleteicon.svg\";\nimport DownloadIcon from \"./assets/download.svg\";\nimport EditIcon from \"./assets/editicon.svg\";\nimport FileIcon from \"./assets/attachment-file.svg\";\nimport ImageIcon from \"./assets/photolibrary.svg\";\nimport InformationIcon from \"./assets/Info.svg\";\nimport PlaceholderImage from \"./assets/placeholder.png\";\nimport PrivateMessageIcon from \"./assets/send-message-in-private.svg\";\nimport React from \"react\";\nimport ReactionIcon from \"./assets/addreaction.svg\";\nimport ThreadIcon from \"./assets/threadicon.svg\";\nimport VideoIcon from \"./assets/video.svg\";\nimport { createComponent } from \"@lit-labs/react\";\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nconst ImageMessageBubble = createComponent({\n tagName: \"cometchat-image-bubble\",\n elementClass: CometChatImageBubble,\n react: React,\n events: {\n ccImageClicked: \"cc-image-clicked\",\n },\n});\n\nconst AudioMessageBubble = createComponent({\n tagName: \"cometchat-audio-bubble\",\n elementClass: CometChatAudioBubble,\n react: React,\n});\n\nconst VideoMessageBubble = createComponent({\n tagName: \"cometchat-video-bubble\",\n elementClass: CometChatVideoBubble,\n react: React,\n});\n\nconst FileMessageBubble = createComponent({\n tagName: \"cometchat-file-bubble\",\n elementClass: CometChatFileBubble,\n react: React,\n});\n\nconst FormMessageBubble = createComponent({\n tagName: \"cometchat-form-bubble\",\n elementClass: CometChatFormBubble,\n react: React,\n events: {\n ccSubmitClicked: \"cc-submit-clicked\",\n },\n});\n\nconst SchedulerMessageBubble = createComponent({\n tagName: \"cometchat-scheduler-bubble\",\n elementClass: CometChatSchedulerBubble,\n react: React,\n});\n\nconst CardMessageBubble = createComponent({\n tagName: \"cometchat-card-bubble\",\n elementClass: CometChatCardBubble,\n react: React,\n});\n\nconst FullScreenImageViewer = createComponent({\n tagName: \"cometchat-full-screen-viewer\",\n elementClass: CometChatFullScreenViewer,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n});\n\nconst defaultTheme: CometChatTheme = new CometChatTheme({});\nexport class MessagesDataSource implements DataSource {\n getEditOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.editMessage,\n title: localize(\"EDIT\"),\n iconURL: EditIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getDeleteOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.deleteMessage,\n title: localize(\"DELETE\"),\n iconURL: DeleteIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600()!,\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getReactionOption(theme: CometChatTheme): CometChatActionsView {\n return new CometChatActionsView({\n id: CometChatUIKitConstants.MessageOption.reactToMessage,\n title: localize(\"REACT\"),\n iconURL: ReactionIcon,\n customView: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getReplyInThreadOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.replyInThread,\n title: localize(\"REPLY\"),\n iconURL: ThreadIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getSendMessagePrivatelyOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.sendMessagePrivately,\n title: localize(\"MESSAGE_PRIVATELY\"),\n iconURL: PrivateMessageIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getCopyOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.copyMessage,\n title: localize(\"COPY\"),\n iconURL: CopyIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600()!,\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n getMessageInfoOption(theme: CometChatTheme): CometChatActionsIcon {\n return new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.messageInformation,\n title: localize(\"INFO\"),\n iconURL: InformationIcon,\n onClick: undefined as any,\n iconTint: theme.palette.getAccent600(),\n backgroundColor: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent600(),\n });\n }\n\n isSentByMe(\n loggedInUser: CometChat.User,\n message: CometChat.BaseMessage\n ): boolean {\n return (\n !message.getSender() ||\n loggedInUser.getUid() === message.getSender().getUid()\n );\n }\n\n getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);\n let isParticipant: boolean = false;\n\n if (\n group?.getScope() === CometChatUIKitConstants.groupMemberScope.participant\n ) {\n isParticipant = true;\n }\n\n let messageOptionList: Array = []\n messageOptionList.push(this.getReactionOption(theme));\n if (!messageObject.getParentMessageId()) {\n messageOptionList.push(this.getReplyInThreadOption(theme));\n }\n messageOptionList.push(this.getCopyOption(theme));\n if (isSentByMe || (!isParticipant && group)) {\n messageOptionList.push(this.getEditOption(theme));\n }\n if (isSentByMe) {\n messageOptionList.push(this.getMessageInfoOption(theme));\n }\n if (isSentByMe || (!isParticipant && group))\n messageOptionList.push(this.getDeleteOption(theme));\n if (group && !isSentByMe) {\n messageOptionList.push(this.getSendMessagePrivatelyOption(theme));\n }\n\n return messageOptionList;\n }\n\n getImageMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getVideoMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getAudioMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getFileMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let messageOptionList: Array =\n [];\n messageOptionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n\n return messageOptionList;\n }\n\n getBottomView(\n _messageObject: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) {\n return null;\n }\n\n getTextMessageTemplate(\n theme: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.text,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let textMessage: CometChat.TextMessage =\n message as CometChat.TextMessage;\n if (textMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(textMessage, theme);\n }\n return ChatConfigurator.getDataSource().getTextMessageContentView(\n textMessage,\n _alignment,\n theme,\n additionalConfigurations\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.audio,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let audioMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (audioMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getAudioMessageContentView(\n audioMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.video,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let videoMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (videoMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getVideoMessageContentView(\n videoMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.image,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let imageMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (imageMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n\n return ChatConfigurator.getDataSource().getImageMessageContentView(\n imageMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.groupMember,\n category: CometChatUIKitConstants.MessageCategory.action,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getGroupActionBubble(message, theme);\n },\n });\n }\n\n getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.file,\n category: CometChatUIKitConstants.MessageCategory.message,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let fileMessage: CometChat.MediaMessage =\n message as CometChat.MediaMessage;\n if (fileMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n\n return ChatConfigurator.getDataSource().getFileMessageContentView(\n fileMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.form,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: CometChat.InteractiveMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const formMessage: FormMessage = message as FormMessage;\n if (formMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getFormMessageContentView(\n formMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.scheduler,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: SchedulerMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const schedulerMessage: SchedulerMessage = message as SchedulerMessage;\n if (schedulerMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getSchedulerMessageContentView(\n schedulerMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.card,\n category: CometChatUIKitConstants.MessageCategory.interactive,\n contentView: (\n message: CometChat.InteractiveMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n const cardMessage: CardMessage = message as CardMessage;\n if (cardMessage.getDeletedAt() != null) {\n return this.getDeleteMessageBubble(message, theme);\n }\n return ChatConfigurator.getDataSource().getCardMessageContentView(\n cardMessage,\n _alignment,\n theme\n );\n },\n options: ChatConfigurator.getDataSource().getMessageOptions,\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getAllMessageTemplates(\n theme?: CometChatTheme,\n additionalConfigurations?: any\n ): Array {\n let _theme: CometChatTheme = theme ?? defaultTheme;\n if (!additionalConfigurations) {\n additionalConfigurations = {\n disableMentions: false,\n };\n }\n return [\n ChatConfigurator.getDataSource().getTextMessageTemplate(\n _theme,\n additionalConfigurations\n ),\n ChatConfigurator.getDataSource().getImageMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getVideoMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getAudioMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getFileMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getGroupActionTemplate(_theme),\n ChatConfigurator.getDataSource().getFormMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getSchedulerMessageTemplate(_theme),\n ChatConfigurator.getDataSource().getCardMessageTemplate(_theme),\n ];\n }\n\n getMessageTemplate(\n messageType: string,\n messageCategory: string,\n theme?: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate | null {\n let _theme: CometChatTheme = theme ?? defaultTheme;\n\n if (!additionalConfigurations) {\n additionalConfigurations = {\n disableMentions: false,\n };\n }\n\n let _template: CometChatMessageTemplate | null = null;\n if (messageCategory !== CometChatUIKitConstants.MessageCategory.call) {\n switch (messageType) {\n case CometChatUIKitConstants.MessageTypes.text:\n _template =\n ChatConfigurator.getDataSource().getTextMessageTemplate(_theme, additionalConfigurations);\n break;\n\n case CometChatUIKitConstants.MessageTypes.image:\n _template =\n ChatConfigurator.getDataSource().getImageMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.video:\n _template =\n ChatConfigurator.getDataSource().getVideoMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.groupMember:\n _template =\n ChatConfigurator.getDataSource().getGroupActionTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.file:\n _template =\n ChatConfigurator.getDataSource().getFileMessageTemplate(_theme);\n break;\n\n case CometChatUIKitConstants.MessageTypes.audio:\n _template =\n ChatConfigurator.getDataSource().getAudioMessageTemplate(_theme);\n break;\n case CometChatUIKitConstants.MessageTypes.form:\n _template =\n ChatConfigurator.getDataSource().getFormMessageTemplate(_theme);\n break;\n case CometChatUIKitConstants.MessageTypes.scheduler:\n _template =\n ChatConfigurator.getDataSource().getSchedulerMessageTemplate(\n _theme\n );\n break;\n case CometChatUIKitConstants.MessageTypes.card:\n _template =\n ChatConfigurator.getDataSource().getCardMessageTemplate(_theme);\n break;\n }\n }\n return _template;\n }\n\n getMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let _optionList: Array = [];\n\n if (\n messageObject.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message\n ) {\n switch (messageObject.getType()) {\n case CometChatUIKitConstants.MessageTypes.text:\n _optionList = ChatConfigurator.getDataSource().getTextMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.image:\n _optionList = ChatConfigurator.getDataSource().getImageMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.video:\n _optionList = ChatConfigurator.getDataSource().getVideoMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.groupMember:\n _optionList = [];\n break;\n case CometChatUIKitConstants.MessageTypes.file:\n _optionList = ChatConfigurator.getDataSource().getFileMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n case CometChatUIKitConstants.MessageTypes.audio:\n _optionList = ChatConfigurator.getDataSource().getAudioMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n default:\n _optionList = ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n break;\n }\n }\n return _optionList;\n }\n\n getCommonOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n let isSentByMe: boolean = this.isSentByMe(loggedInUser, messageObject);\n let isParticipant: boolean = false;\n if (group?.getScope() === CometChatUIKitConstants.groupMemberScope.participant)\n isParticipant = true;\n\n let messageOptionList: Array =\n [];\n\n messageOptionList.push(this.getReactionOption(theme));\n\n if (!messageObject?.getParentMessageId()) {\n messageOptionList.push(this.getReplyInThreadOption(theme));\n }\n if (isSentByMe) {\n messageOptionList.push(this.getMessageInfoOption(theme));\n }\n if (isSentByMe || (!isParticipant && group))\n messageOptionList.push(this.getDeleteOption(theme));\n\n if (group?.getGuid() && !isSentByMe) {\n messageOptionList.push(this.getSendMessagePrivatelyOption(theme));\n }\n\n return messageOptionList;\n }\n\n getAllMessageTypes(): Array {\n return [\n CometChatUIKitConstants.MessageTypes.text,\n CometChatUIKitConstants.MessageTypes.image,\n CometChatUIKitConstants.MessageTypes.audio,\n CometChatUIKitConstants.MessageTypes.video,\n CometChatUIKitConstants.MessageTypes.file,\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageTypes.form,\n CometChatUIKitConstants.MessageTypes.scheduler,\n CometChatUIKitConstants.MessageTypes.card,\n ];\n }\n\n addList(): string {\n return \"\";\n }\n\n getAllMessageCategories(): Array {\n return [\n CometChatUIKitConstants.MessageCategory.message,\n CometChatUIKitConstants.MessageCategory.action,\n CometChatUIKitConstants.MessageCategory.interactive,\n ];\n }\n\n getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ): any {\n return [];\n }\n\n getId(): string {\n return \"messageUtils\";\n }\n\n getTextMessageContentView(\n message: CometChat.TextMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n return ChatConfigurator.getDataSource().getTextMessageBubble(\n message.getText(),\n message,\n _alignment,\n theme,\n undefined,\n additionalConfigurations\n );\n }\n\n getAudioMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getAudioMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme,\n message?.getAttachments()[0]?.getName()\n );\n }\n\n getFileMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getFileMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme,\n message?.getAttachments()[0]?.getName()\n );\n }\n\n getFormMessageContentView(\n message: FormMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getFormMessageBubble(\n message,\n theme\n );\n }\n getSchedulerMessageContentView(\n message: SchedulerMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getSchedulerMessageBubble(\n message,\n theme\n );\n }\n\n getCardMessageContentView(\n message: CardMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getCardMessageBubble(\n message,\n theme\n );\n }\n\n getImageMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n let imageUrl = message?.getAttachments()[0]?.getUrl() || \"\";\n return ChatConfigurator.getDataSource().getImageMessageBubble(\n imageUrl,\n PlaceholderImage,\n message,\n theme\n );\n }\n\n getVideoMessageContentView(\n message: CometChat.MediaMessage,\n _alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ): any {\n return ChatConfigurator.getDataSource().getVideoMessageBubble(\n message?.getAttachments()[0]?.getUrl(),\n message,\n theme\n );\n }\n\n getActionMessage(message: any): string {\n let actionMessage = \"\";\n if (\n message.hasOwnProperty(\"actionBy\") === false ||\n message.hasOwnProperty(\"actionOn\") === false\n ) {\n return actionMessage;\n }\n if (\n message.action !== CometChatUIKitConstants.groupMemberAction.JOINED &&\n message.action !== CometChatUIKitConstants.groupMemberAction.LEFT &&\n (message.actionBy.hasOwnProperty(\"name\") === false ||\n message.actionOn.hasOwnProperty(\"name\") === false)\n ) {\n return actionMessage;\n }\n if (\n message.action === CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE\n ) {\n if (\n message.hasOwnProperty(\"data\") &&\n message.data.hasOwnProperty(\"extras\")\n ) {\n if (message.data.extras.hasOwnProperty(\"scope\")) {\n if (message.data.extras.scope.hasOwnProperty(\"new\") === false) {\n return actionMessage;\n }\n } else {\n return actionMessage;\n }\n } else {\n return actionMessage;\n }\n }\n if (\n message.action ===\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE &&\n message.data.extras.hasOwnProperty(\"scope\") === false\n ) {\n return actionMessage;\n }\n if (\n message.action ===\n CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE &&\n message.data.extras.scope.hasOwnProperty(\"new\") === false\n ) {\n return actionMessage;\n }\n const byEntity = message.actionBy;\n const onEntity = message.actionOn;\n const byString = byEntity.name;\n const forString =\n message.action !== CometChatUIKitConstants.groupMemberAction.JOINED &&\n message.action !== CometChatUIKitConstants.groupMemberAction.LEFT\n ? onEntity.name\n : \"\";\n switch (message.action) {\n case CometChatUIKitConstants.groupMemberAction.ADDED:\n actionMessage = `${byString} ${localize(\"ADDED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.JOINED:\n actionMessage = `${byString} ${localize(\"JOINED\")}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.LEFT:\n actionMessage = `${byString} ${localize(\"LEFT\")}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.KICKED:\n actionMessage = `${byString} ${localize(\"KICKED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.BANNED:\n actionMessage = `${byString} ${localize(\"BANNED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.UNBANNED:\n actionMessage = `${byString} ${localize(\"UNBANNED\")} ${forString}`;\n break;\n case CometChatUIKitConstants.groupMemberAction.SCOPE_CHANGE: {\n const newScope = message[\"data\"][\"extras\"][\"scope\"][\"new\"];\n actionMessage = `${byString} ${localize(\n \"MADE\"\n )} ${forString} ${newScope}`;\n break;\n }\n default:\n break;\n }\n return actionMessage;\n }\n\n getDeleteMessageBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n let defaultStyle = style;\n let messageText = localize(\"MESSAGE_IS_DELETED\");\n if (!defaultStyle) {\n defaultStyle = {\n textFont: fontHelper(theme.typography.text2),\n textColor: theme.palette.getAccent400() || \"\",\n border: `1px dashed ${theme.palette.getAccent400()}`,\n borderRadius: \"12px\",\n };\n }\n\n return ;\n }\n\n getGroupActionBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n let defaultStyle = style;\n let messageText = this.getActionMessage(message);\n if (!defaultStyle) {\n defaultStyle = {\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent600() || \"\",\n };\n }\n\n return ;\n }\n\n getTextMessageBubbleStyle(\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n const isLeftAligned = alignment !== MessageBubbleAlignment.left;\n\n if (isLeftAligned) {\n return {\n textFont: fontHelper(theme.typography.text3),\n textColor: theme.palette.getAccent900(\"light\") || \"\",\n };\n } else {\n return {\n textFont: fontHelper(theme.typography.text3),\n textColor: theme.palette.getAccent() || \"\",\n };\n }\n }\n\n getFormMessageBubbleStyle(theme: CometChatTheme) {\n const textStyle = new InputStyle({\n width: \"100%\",\n height: \"30px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"6px\",\n padding: \"0px 0px 0px 5px\",\n placeholderTextColor: theme.palette.getAccent400(),\n placeholderTextFont: fontHelper(theme.typography.subtitle2),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n background: theme.palette.getBackground(),\n });\n const labelStyle = new LabelStyle({\n textFont: fontHelper(theme.typography.subtitle1),\n textColor: theme.palette.getAccent(),\n background: \"transparent\",\n });\n const radioButtonStyle = new RadioButtonStyle({\n height: \"16px\",\n width: \"16px\",\n border: \"none\",\n labelTextFont: fontHelper(theme.typography.subtitle2),\n labelTextColor: theme.palette.getAccent600(),\n borderRadius: \"4px\",\n background: \"\",\n });\n const checkboxStyle = new CheckboxStyle({\n height: \"16px\",\n width: \"16px\",\n border: \"none\",\n borderRadius: \"4px\",\n background: \"\",\n labelTextFont: fontHelper(theme.typography.subtitle2),\n labelTextColor: theme.palette.getAccent(),\n });\n const dropdownStyle = new DropdownStyle({\n height: \"35px\",\n width: \"100%\",\n background: theme.palette.getBackground(),\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"6px\",\n activeTextFont: fontHelper(theme.typography.subtitle2),\n activeTextColor: theme.palette.getAccent(),\n arrowIconTint: theme.palette.getAccent700(),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n optionBackground: theme.palette.getBackground(),\n optionBorder: `1px solid ${theme.palette.getAccent100()}`,\n optionHoverBorder: `1px solid ${theme.palette.getAccent100()}`,\n hoverTextFont: fontHelper(theme.typography.subtitle2),\n hoverTextColor: theme.palette.getAccent(),\n hoverTextBackground: theme.palette.getAccent100(),\n });\n const buttonGroupStyle = {\n height: \"40px\",\n width: \"100%\",\n background: theme.palette.getPrimary(),\n border: `none`,\n borderRadius: \"6px\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: theme.palette.getBackground(),\n justifyContent: \"center\",\n };\n const singleSelectStyle = new SingleSelectStyle({\n height: \"100%\",\n width: \"100%\",\n background: theme.palette.getBackground(),\n border: \"none\",\n borderRadius: \"12px\",\n activeTextFont: fontHelper(theme.typography.subtitle2),\n activeTextColor: theme.palette.getAccent(),\n activeTextBackground: theme.palette.getAccent100(),\n textFont: fontHelper(theme.typography.subtitle2),\n textColor: theme.palette.getAccent(),\n optionBackground: theme.palette.getBackground(),\n optionBorder: `1px solid ${theme.palette.getAccent100()}`,\n optionBorderRadius: \"3px\",\n hoverTextFont: fontHelper(theme.typography.subtitle2),\n hoverTextColor: theme.palette.getAccent(),\n hoverTextBackground: theme.palette.getAccent100(),\n });\n const quickViewStyle = new QuickViewStyle({\n background: \"transparent\",\n height: \"fit-content\",\n width: \"100%\",\n titleFont: fontHelper(theme.typography.subtitle2),\n titleColor: theme.palette.getPrimary(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n leadingBarTint: theme.palette.getPrimary(),\n leadingBarWidth: \"4px\",\n borderRadius: \"8px\",\n });\n return new FormBubbleStyle({\n width: \"300px\",\n height: \"fit-content\",\n border: \"none\",\n background: \"transparent\",\n wrapperBackground: theme.palette.getBackground(),\n borderRadius: \"8px\",\n wrapperBorderRadius: \"8px\",\n textInputStyle: textStyle,\n labelStyle: labelStyle,\n radioButtonStyle: radioButtonStyle,\n checkboxStyle: checkboxStyle,\n dropdownStyle: dropdownStyle,\n buttonStyle: buttonGroupStyle,\n singleSelectStyle: singleSelectStyle,\n quickViewStyle: quickViewStyle,\n titleColor: theme.palette.getAccent(),\n titleFont: fontHelper(theme.typography.title1),\n goalCompletionTextColor: theme.palette.getAccent(),\n goalCompletionTextFont: fontHelper(theme.typography.subtitle1),\n wrapperPadding: \"2px\",\n datePickerBorder: `1px solid ${theme.palette.getAccent100()}`,\n datePickerBorderRadius: \"6px\",\n datePickerFont: fontHelper(theme.typography.subtitle2),\n datePickerFontColor: theme.palette.getAccent(),\n });\n }\n\n getSchedulerBubbleStyle = (theme: CometChatTheme) => {\n let avatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"48px\",\n height: \"48px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n });\n let listItemStyle = new ListItemStyle({\n height: \"auto\",\n width: \"100%\",\n background: \"inherit\",\n activeBackground: \"transparent\",\n borderRadius: \"0\",\n titleFont: fontHelper(theme.typography.text1),\n titleColor: theme.palette.getAccent(),\n border: \"none\",\n separatorColor: \"\",\n hoverBackground: \"transparent\",\n });\n let calendarStyle = new CalendarStyle({\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n dateTextFont: fontHelper(theme.typography.subtitle2),\n dateTextColor: theme.palette.getAccent(),\n dayTextFont: fontHelper(theme.typography.text2),\n dayTextColor: theme.palette.getAccent(),\n monthYearTextFont: fontHelper(theme.typography.text2),\n monthYearTextColor: theme.palette.getAccent(),\n defaultDateTextBackground: \"transparent\",\n disabledDateTextColor: theme.palette.getAccent400(),\n disabledDateTextFont: fontHelper(theme.typography.subtitle2),\n disabledDateTextBackground: \"transparent\",\n titleTextFont: fontHelper(theme.typography.text1),\n titleTextColor: theme.palette.getAccent(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n timezoneTextColor: theme.palette.getAccent(),\n arrowButtonTextColor: theme.palette.getAccent(),\n arrowButtonTextFont: fontHelper(theme.typography.title2),\n });\n let timeSlotStyle = new TimeSlotStyle({\n background: \"transparent\",\n height: \"fit-content\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n calendarIconTint: theme.palette.getAccent(),\n timezoneIconTint: theme.palette.getAccent(),\n emptySlotIconTint: theme.palette.getAccent500(),\n emptySlotTextColor: theme.palette.getAccent500(),\n emptySlotTextFont: fontHelper(theme.typography.subtitle1),\n dateTextColor: theme.palette.getAccent(),\n dateTextFont: fontHelper(theme.typography.subtitle1),\n seperatorTint: theme.palette.getAccent100(),\n slotBackground: theme.palette.getAccent900(),\n slotBorder: \"none\",\n slotBorderRadius: \"8px\",\n slotTextColor: theme.palette.getAccent(),\n slotTextFont: fontHelper(theme.typography.caption2),\n timezoneTextColor: theme.palette.getAccent(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n titleTextColor: theme.palette.getAccent(),\n titleTextFont: fontHelper(theme.typography.text1),\n });\n let qucikViewStyle = new QuickViewStyle({\n background: theme.palette.getAccent50(),\n height: \"fit-content\",\n width: \"100%\",\n titleFont: fontHelper(theme.typography.subtitle2),\n titleColor: theme.palette.getAccent(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n leadingBarTint: theme.palette.getPrimary(),\n leadingBarWidth: \"4px\",\n borderRadius: \"8px\",\n });\n return new SchedulerBubbleStyle({\n avatarStyle: avatarStyle,\n listItemStyle: listItemStyle,\n quickViewStyle: qucikViewStyle,\n dateSelectorStyle: calendarStyle,\n timeSlotSelectorStyle: timeSlotStyle,\n backButtonIconTint: theme.palette.getPrimary(),\n background: \"transparent\",\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"8px\",\n loadingIconTint: theme.palette.getAccent600(),\n suggestedTimeBackground: theme.palette.getAccent900(),\n suggestedTimeBorder: `1px solid ${theme.palette.getPrimary()}`,\n suggestedTimeBorderRadius: \"8px\",\n suggestedTimeDisabledBackground: theme.palette.getAccent50(),\n suggestedTimeDisabledBorder: `1px solid ${theme.palette.getAccent200()}`,\n suggestedTimeDisabledBorderRadius: \"8px\",\n suggestedTimeDisabledTextColor: theme.palette.getAccent700(),\n suggestedTimeDisabledTextFont: fontHelper(theme.typography.text3),\n suggestedTimeTextColor: theme.palette.getPrimary(),\n suggestedTimeTextFont: fontHelper(theme.typography.text3),\n moreButtonDisabledTextBackground: \"transparent\",\n moreButtonDisabledTextBorder: \"none\",\n moreButtonDisabledTextBorderRadius: \"0\",\n moreButtonDisabledTextColor: theme.palette.getAccent600(),\n moreButtonDisabledTextFont: fontHelper(theme.typography.caption2),\n moreButtonTextBackground: \"transparent\",\n moreButtonTextBorder: \"none\",\n moreButtonTextBorderRadius: \"0\",\n moreButtonTextColor: theme.palette.getPrimary(),\n moreButtonTextFont: fontHelper(theme.typography.caption2),\n goalCompletionTextColor: theme.palette.getAccent(),\n goalCompletionTextFont: fontHelper(theme.typography.text3),\n errorTextColor: theme.palette.getError(),\n errorTextFont: fontHelper(theme.typography.text3),\n scheduleButtonStyle: {\n iconHeight: \"16px\",\n iconWidth: \"16px\",\n buttonIconTint: theme.palette.getAccent(),\n buttonTextFont: fontHelper(theme.typography.name),\n buttonTextColor: theme.palette.getAccent(\"dark\"),\n border: \"none\",\n borderRadius: \"8px\",\n background: theme.palette.getPrimary(),\n width: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"8px\",\n },\n seperatorTint: theme.palette.getAccent200(),\n subtitleTextColor: theme.palette.getAccent400(),\n subtitleTextFont: fontHelper(theme.typography.name),\n summaryTextColor: theme.palette.getAccent(),\n summaryTextFont: fontHelper(theme.typography.subtitle1),\n timezoneTextColor: theme.palette.getAccent600(),\n timezoneTextFont: fontHelper(theme.typography.caption2),\n titleTextColor: theme.palette.getAccent(),\n titleTextFont: fontHelper(theme.typography.title1),\n timezoneIconTint: theme.palette.getAccent(),\n calendarIconTint: theme.palette.getAccent(),\n clockIconTint: theme.palette.getAccent(),\n });\n };\n\n getCardMessageBubbleStyle(theme: CometChatTheme) {\n const buttonStyle = {\n height: \"40px\",\n width: \"100%\",\n background: \"transparent\",\n border: `none`,\n borderRadius: \"0px\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: `${theme.palette.getPrimary()}`,\n justifyContent: \"center\",\n };\n\n return new CardBubbleStyle({\n background: \"transparent\",\n borderRadius: \"8px\",\n height: \"fit-content\",\n width: \"300px\",\n imageHeight: \"auto\",\n imageWidth: \"100%\",\n imageRadius: \"8px\",\n imageBackgroundColor: \"transparent\",\n descriptionFontColor: theme.palette.getAccent(),\n descriptionFont: fontHelper(theme.typography.subtitle2),\n buttonStyle: buttonStyle,\n dividerTintColor: theme.palette.getAccent100(),\n wrapperBackground: theme.palette.getBackground(),\n wrapperBorderRadius: \"8px\",\n wrapperPadding: \"2px\",\n disabledButtonColor: theme.palette.getAccent600(),\n });\n }\n\n getTextMessageBubble(\n messageText: string,\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n style?: TextBubbleStyle,\n additionalConfigurations?: any\n ): any {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n\n let textFormatters: Array = config.textFormatters;\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter({\n theme,\n alignment,\n });\n textFormatters.push(urlTextFormatter);\n }\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getTextMessageBubbleStyle(alignment, theme);\n }\n\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n );\n }\n\n getAudioMessageBubble(\n audioUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: BaseStyle\n ): any {\n return ;\n }\n\n getFileMessageBubble(\n fileUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: FileBubbleStyle\n ): any {\n let defaulStyle = style;\n if (!defaulStyle) {\n defaulStyle = {\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent(),\n subtitleFont: fontHelper(theme.typography.subtitle2),\n subtitleColor: theme.palette.getAccent600(),\n iconTint: theme.palette.getPrimary(),\n };\n }\n return (\n \n );\n /*\n return (\n \n )\n */\n }\n\n getFormMessageBubble(\n message: FormMessage,\n theme: CometChatTheme,\n style?: any,\n onSubmitClick?: Function\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getFormMessageBubbleStyle(theme);\n }\n\n const hasCustomCallback = onSubmitClick ? true : false;\n\n return (\n {\n if (onSubmitClick) onSubmitClick(e.detail);\n }}\n hasCustomCallback={hasCustomCallback}\n />\n );\n }\n getSchedulerMessageBubble(\n message: SchedulerMessage,\n theme: CometChatTheme,\n style?: any,\n onSubmitClick?: (timestamp: string, message: SchedulerMessage) => void\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getSchedulerBubbleStyle(theme);\n }\n\n return (\n \n );\n }\n getSchedulerWrapperStyle() {\n return { height: \"inherit\", width: \"inherit\", display: \"block\" };\n }\n\n getCardMessageBubble(\n message: CardMessage,\n theme: CometChatTheme,\n style?: CardBubbleStyle\n ): any {\n let defaultStyle: any = style;\n if (!defaultStyle) {\n defaultStyle = this.getCardMessageBubbleStyle(theme);\n }\n return (\n \n );\n }\n\n getImageMessageBubble(\n imageUrl: string,\n placeholderImage: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n onClick?: Function,\n style?: ImageBubbleStyle\n ) {\n if (!style) {\n style = new ImageBubbleStyle({\n height: 'auto',\n maxHeight: '500px',\n maxWidth: '400px',\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n });\n }\n\n const fullScreenViewer = (\n {\n CometChatUIEvents.ccHideDialog.next();\n }}\n />\n );\n return (\n {\n CometChatUIEvents.ccShowDialog.next({\n child: fullScreenViewer,\n confirmCallback: null,\n });\n }}\n />\n );\n }\n\n getVideoMessageBubble(\n videoUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n thumbnailUrl?: string,\n onClick?: Function,\n style?: BaseStyle\n ): any {\n if (!style) {\n style = new BaseStyle({\n height: \"130px\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px 8px\",\n background: \"transparent\",\n });\n }\n\n return (\n \n );\n }\n\n imageAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.image,\n title: localize(\"ATTACH_IMAGE\"),\n iconURL: ImageIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n videoAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.video,\n title: localize(\"ATTACH_VIDEO\"),\n iconURL: VideoIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n audioAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.audio,\n title: localize(\"ATTACH_AUDIO\"),\n iconURL: AudioIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n fileAttachmentOption(theme: CometChatTheme): CometChatMessageComposerAction {\n return new CometChatMessageComposerAction({\n id: CometChatUIKitConstants.MessageTypes.file,\n title: localize(\"ATTACH_FILE\"),\n iconURL: FileIcon,\n onClick: null,\n iconTint: theme.palette.getAccent700(),\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent700(),\n borderRadius: \"8px\",\n background: theme.palette.getAccent100(),\n });\n }\n\n getAttachmentOptions(\n theme: CometChatTheme,\n id: ComposerId\n ): Array {\n let actions: Array = [\n this.imageAttachmentOption(theme),\n this.videoAttachmentOption(theme),\n this.audioAttachmentOption(theme),\n this.fileAttachmentOption(theme),\n ];\n\n return actions;\n }\n\n getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : [this.getMentionsTextFormatter({ theme: additionalConfigurations.theme, disableMentions: additionalConfigurations.disableMentions })],\n };\n let message = ConversationUtils.getLastConversationMessage(\n conversation,\n loggedInUser,\n config\n );\n let messageObject = conversation.getLastMessage();\n\n\n if (messageObject) {\n\n let textFormatters: Array = config.textFormatters;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(messageObject);\n if (messageObject.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n messageObject.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n }\n if (mentionsTextFormatter) {\n break;\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n messageObject,\n ...config,\n alignment: null,\n theme: additionalConfigurations.theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n }\n\n if (\n messageObject &&\n messageObject instanceof CometChat.TextMessage\n ) {\n for (let i = 0; i < textFormatters.length; i++) {\n message = textFormatters[i].getFormattedText(message, { mentionsTargetElement: MentionsTargetElement.conversation });\n }\n }\n }\n\n\n return message;\n }\n\n getDefaultDetailsTemplate(\n loggedInUser: CometChat.User,\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme\n ): CometChatDetailsTemplate[] {\n return DetailsUtils.getDefaultDetailsTemplate(\n loggedInUser,\n user,\n group,\n theme\n );\n }\n\n getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): any {\n return [];\n }\n\n getAIOptions(\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme,\n id?: Map,\n AIOptionsStyle?: AIOptionsStyle\n ): Array {\n return [];\n }\n\n /**\n * Adds styled @ for every mention in the text by matching uid\n *\n * @param {CometChat.TextMessage} message\n * @param {string} subtitle\n * @returns {void}\n */\n getMentionsFormattedText(\n message: CometChat.TextMessage,\n subtitle: string,\n mentionsFormatterParams: {\n mentionsTargetElement: MentionsTargetElement;\n theme: CometChatTheme;\n }\n ) {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp: string = subtitle;\n let match = regex.exec(messageText);\n let cometChatUsers: Array = [];\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] == mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n cometChatUsers.push(user);\n }\n match = regex.exec(messageText);\n }\n let mentionsFormatter = this.getMentionsTextFormatter({\n theme: new CometChatTheme({}),\n });\n\n mentionsFormatter.setClasses([\"cc-mentions\"]);\n mentionsFormatter.setCometChatUserGroupMembers(cometChatUsers);\n\n messageTextTmp = mentionsFormatter.getFormattedText(\n messageTextTmp,\n mentionsFormatterParams\n ) as string;\n return messageTextTmp;\n }\n\n getAllTextFormatters(formatterParams: any): CometChatTextFormatter[] {\n let formatters = [];\n const mentionsFormatter = formatterParams.disableMentions ? null : ChatConfigurator.getDataSource().getMentionsTextFormatter(\n formatterParams\n );\n const urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(formatterParams);\n if (mentionsFormatter) {\n formatters.push(mentionsFormatter);\n }\n if (urlTextFormatter) {\n formatters.push(urlTextFormatter);\n }\n return formatters;\n }\n\n getMentionsTextFormatter(params: any): CometChatMentionsFormatter {\n let mentionsTextFormatter = new CometChatMentionsFormatter();\n if (params && params.theme) {\n mentionsTextFormatter.setComposerMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text2),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text2),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setConversationMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setRightBubbleMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getTertiary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getTertiary(),\n mentionTextBackground: \"\",\n })\n );\n mentionsTextFormatter.setLeftBubbleMentionStyle(\n new UserMentionStyle({\n loggedInUserTextFont: fontHelper(params.theme.typography.text3),\n loggedInUserTextColor: params.theme.palette.getPrimary(),\n loggedInUserTextBackground: \"\",\n mentionTextFont: fontHelper(params.theme.typography.text3),\n mentionTextColor: params.theme.palette.getPrimary(),\n mentionTextBackground: \"\",\n })\n );\n }\n return mentionsTextFormatter;\n }\n\n getUrlTextFormatter(params: any = {}): CometChatUrlsFormatter {\n let urlTextFormatter = new CometChatUrlsFormatter([\n /(https?:\\/\\/[^\\s]+)/g,\n ]);\n if (params.alignment == MessageBubbleAlignment.left) {\n urlTextFormatter.setStyle({\n formattedTextColor: params.theme.palette.getPrimary(),\n formattedTextFont: fontHelper(params.theme.typography.text3),\n });\n } else {\n urlTextFormatter.setStyle({\n formattedTextColor: params.theme.palette.getTertiary(),\n formattedTextFont: fontHelper(params.theme.typography.text3),\n });\n }\n return urlTextFormatter;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fediticon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FEdit%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.8666667%2C0.883555287%20C17.2934403%2C0.312679329%2016.5158214%2C-0.00540815756%2015.7068357%2C0%20C14.8978501%2C0.00554734575%2014.1246099%2C0.334135909%2013.5591667%2C0.912721954%20L1.47583333%2C12.9960553%20L0%2C18.750222%20L5.75416667%2C17.2743886%20L17.8375%2C5.19105529%20C18.416086%2C4.6256121%2018.7446746%2C3.8523719%2018.750222%2C3.04338623%20C18.7556301%2C2.23440057%2018.4375426%2C1.45678164%2017.8666667%2C0.883555287%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2213.2133333%22%20y1%3D%221.25855529%22%20x2%3D%2217.4916667%22%20y2%3D%225.53688862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211.4683333%22%20y1%3D%223.00355529%22%20x2%3D%2215.7466667%22%20y2%3D%227.28188862%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%221.47583333%22%20y1%3D%2212.9960553%22%20x2%3D%225.75833333%22%20y2%3D%2217.270222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fdeleteicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FReactions%20Add%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FReactions-Add%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C1.25%20C13.2547515%2C1.25%2014.4810955%2C1.46534515%2015.6383943%2C1.88154366%20C16.0281686%2C2.02171794%2016.2305095%2C2.45132619%2016.0903352%2C2.84110054%20C15.9501609%2C3.2308749%2015.5205527%2C3.43321574%2015.1307783%2C3.29304146%20C14.1357379%2C2.9351958%2013.0810879%2C2.75%2012%2C2.75%20C6.89136606%2C2.75%202.75%2C6.89136606%202.75%2C12%20C2.75%2C17.1086339%206.89136606%2C21.25%2012%2C21.25%20C17.1086339%2C21.25%2021.25%2C17.1086339%2021.25%2C12%20C21.25%2C11.2729266%2021.1662576%2C10.5573695%2021.0020875%2C9.8629795%20C20.906785%2C9.45987863%2021.1563049%2C9.05584287%2021.5594058%2C8.96054036%20C21.9625066%2C8.86523784%2022.3665424%2C9.11475771%2022.4618449%2C9.51785857%20C22.6527043%2C10.3251362%2022.75%2C11.1565032%2022.75%2C12%20C22.75%2C17.9370611%2017.9370611%2C22.75%2012%2C22.75%20C6.06293894%2C22.75%201.25%2C17.9370611%201.25%2C12%20C1.25%2C6.06293894%206.06293894%2C1.25%2012%2C1.25%20Z%20M17.6586667%2C13.25%20C18.1185754%2C13.25%2018.5498402%2C13.4733153%2018.8153335%2C13.8488361%20C19.0808092%2C14.2243322%2019.1475058%2C14.7053253%2018.9944111%2C15.1383417%20C17.9483179%2C18.1044405%2015.1451634%2C20.0881971%2012%2C20.0881971%20C8.85483662%2C20.0881971%206.05168206%2C18.1044405%205.00578211%2C15.1388889%20C4.85249421%2C14.7053253%204.91919084%2C14.2243322%205.18466653%2C13.8488361%20C5.45015977%2C13.4733153%205.88142461%2C13.25%206.34133333%2C13.25%20L6.34133333%2C13.25%20Z%20M17.558%2C14.695%20L17.538%2C14.749%20L6.461%2C14.749%20L6.50827179%2C14.8734156%20C7.3732069%2C17.0322917%209.42640021%2C18.4853104%2011.750045%2C18.5829516%20L11.750045%2C18.5829516%20L12%2C18.5881971%20C14.5090629%2C18.5881971%2016.7452873%2C17.0056497%2017.5800043%2C14.6388889%20L17.558%2C14.695%20Z%20M8.11422222%2C8.58288148%20C9.2798673%2C8.58288148%2010.3188817%2C9.31776232%2010.7071667%2C10.4168361%20C10.8451443%2C10.8073935%2010.6403879%2C11.2358557%2010.2498306%2C11.3738333%20C9.89181964%2C11.5003128%209.50195808%2C11.3388005%209.33318946%2C11.0101749%20L9.29283333%2C10.9164972%20C9.11634015%2C10.4169182%208.6440609%2C10.0828815%208.11422222%2C10.0828815%20C7.62853677%2C10.0828815%207.19121722%2C10.3635651%206.98575875%2C10.7951488%20L6.93561111%2C10.9164972%20C6.79763351%2C11.3070546%206.36917126%2C11.5118109%205.97861389%2C11.3738333%20C5.58805653%2C11.2358557%205.38330017%2C10.8073935%205.52127778%2C10.4168361%20C5.90956279%2C9.31776232%206.94857714%2C8.58288148%208.11422222%2C8.58288148%20Z%20M15.8857778%2C8.58288148%20C17.0514229%2C8.58288148%2018.0904372%2C9.31776232%2018.4787222%2C10.4168361%20C18.6166998%2C10.8073935%2018.4119435%2C11.2358557%2018.0213861%2C11.3738333%20C17.6633752%2C11.5003128%2017.2735136%2C11.3388005%2017.104745%2C11.0101749%20L17.0643889%2C10.9164972%20C16.8878957%2C10.4169182%2016.4156165%2C10.0828815%2015.8857778%2C10.0828815%20C15.4000923%2C10.0828815%2014.9627728%2C10.3635651%2014.7573143%2C10.7951488%20L14.7071667%2C10.9164972%20C14.5691891%2C11.3070546%2014.1407268%2C11.5118109%2013.7501694%2C11.3738333%20C13.3596121%2C11.2358557%2013.1548557%2C10.8073935%2013.2928333%2C10.4168361%20C13.6811183%2C9.31776232%2014.7201327%2C8.58288148%2015.8857778%2C8.58288148%20Z%20M19.5%2C0.25%20C19.8796958%2C0.25%2020.193491%2C0.532153882%2020.2431534%2C0.898229443%20L20.25%2C1%20L20.25%2C4.25%20L23%2C4.25%20C23.4142136%2C4.25%2023.75%2C4.58578644%2023.75%2C5%20C23.75%2C5.37969577%2023.4678461%2C5.69349096%2023.1017706%2C5.74315338%20L23%2C5.75%20L20.25%2C5.75%20L20.25%2C9%20C20.25%2C9.41421356%2019.9142136%2C9.75%2019.5%2C9.75%20C19.1203042%2C9.75%2018.806509%2C9.46784612%2018.7568466%2C9.10177056%20L18.75%2C9%20L18.75%2C5.75%20L16%2C5.75%20C15.5857864%2C5.75%2015.25%2C5.41421356%2015.25%2C5%20C15.25%2C4.62030423%2015.5321539%2C4.30650904%2015.8982294%2C4.25684662%20L16%2C4.25%20L18.75%2C4.25%20L18.75%2C1%20C18.75%2C0.585786438%2019.0857864%2C0.25%2019.5%2C0.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fthreadicon%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FThread%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.6578236%2C0%20C7.2733682%2C-0.00487001799%204.15271669%2C1.82840041%202.50707282%2C4.78828665%20C0.861428952%2C7.74817289%200.949909343%2C11.3686229%202.73817252%2C14.2444485%20L0%2C20%20L5.74989584%2C17.2595575%20C9.11259725%2C19.3520226%2013.4289699%2C19.0910325%2016.5155083%2C16.6086132%20C19.6020468%2C14.1261939%2020.7857069%2C9.9636565%2019.4677154%2C6.22668649%20C18.1497239%2C2.48971647%2014.6174794%2C-0.00681020874%2010.6578236%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%226.66667597%22%20x2%3D%2214.6527312%22%20y2%3D%226.66667597%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%225.3271355%22%20y1%3D%229.33334078%22%20x2%3D%2215.9849591%22%20y2%3D%229.33334078%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226.65936346%22%20y1%3D%2212.0000056%22%20x2%3D%2214.6527312%22%20y2%3D%2212.0000056%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.8%2015.0099H21V21H13.8V15.0099Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.4%2011.4158C16.7635%2011.4158%2016.153%2011.6682%2015.7029%2012.1176C15.2529%2012.5669%2015%2013.1764%2015%2013.8118V15.0099H19.8V13.8118C19.8%2013.1764%2019.5471%2012.5669%2019.0971%2012.1176C18.647%2011.6682%2018.0365%2011.4158%2017.4%2011.4158Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M17.3995%2017.7286C17.3402%2017.7286%2017.2823%2017.7461%2017.2331%2017.7791C17.1838%2017.812%2017.1454%2017.8587%2017.1228%2017.9135C17.1001%2017.9682%2017.0942%2018.0284%2017.1057%2018.0865C17.1173%2018.1446%2017.1458%2018.198%2017.1877%2018.2399C17.2296%2018.2818%2017.283%2018.3103%2017.3411%2018.3218C17.3992%2018.3334%2017.4594%2018.3275%2017.5141%2018.3048C17.5688%2018.2821%2017.6156%2018.2437%2017.6485%2018.1945C17.6814%2018.1452%2017.699%2018.0873%2017.699%2018.0281C17.699%2017.9486%2017.6674%2017.8725%2017.6113%2017.8163C17.5551%2017.7601%2017.4789%2017.7286%2017.3995%2017.7286%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%2010.8503C20.9168%209.57663%2020.5439%208.33868%2019.9096%207.23051C19.2753%206.12235%2018.3962%205.17314%2017.3393%204.45503C16.2824%203.73692%2015.0754%203.26882%2013.8101%203.0863C12.5448%202.90378%2011.2545%203.01164%2010.0372%203.4017C8.81989%203.79176%207.70769%204.45374%206.78512%205.33732C5.86254%206.22091%205.15388%207.30285%204.71298%208.5009C4.27209%209.69895%204.11057%2010.9816%204.24071%2012.2513C4.37084%2013.521%204.78921%2014.7444%205.464%2015.8285L3%2021L8.1768%2018.5368C9.14753%2019.1412%2010.2319%2019.5408%2011.3632%2019.7109%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCopy%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCopy%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6%2C6.00000118%20L15.6%2C3.60000142%20C15.6%2C2.93725978%2015.0627417%2C2.40000154%2014.4%2C2.40000154%20L11.2%2C2.40000154%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.4%2C2.40000154%20L1.2%2C2.40000154%20C0.5372583%2C2.40000154%200%2C2.93725978%200%2C3.60000142%20L0%2C16.8000001%20C0%2C17.4627418%200.5372583%2C18%201.2%2C18%20L6%2C18%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9368%2C3.18960146%20C10.8549236%2C3.43464248%2010.625558%2C3.59990166%2010.3672%2C3.60000142%20L5.2328%2C3.60000142%20C4.97444201%2C3.59990166%204.74507642%2C3.43464248%204.6632%2C3.18960146%20L3.8632%2C0.789601696%20C3.80186075%2C0.606570139%203.8324564%2C0.405197059%203.94539051%2C0.248643741%20C4.05832463%2C0.0920904237%204.23976415%2C-0.000467229348%204.4328%2C0%20L11.1672%2C0%20C11.3602359%2C-0.000467229348%2011.5416754%2C0.0920904237%2011.6546095%2C0.248643741%20C11.7675436%2C0.405197059%2011.7981392%2C0.606570139%2011.7368%2C0.789601696%20L10.9368%2C3.18960146%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolygon%20id%3D%22Path%22%20points%3D%228.4%208.40000095%2018%208.40000095%2018%2018%208.4%2018%22%3E%3C%2Fpolygon%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2210.8000007%22%20x2%3D%2215.6%22%20y2%3D%2210.8000007%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2213.2000005%22%20x2%3D%2215.6%22%20y2%3D%2213.2000005%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210.8%22%20y1%3D%2215.6000002%22%20x2%3D%2212.6%22%20y2%3D%2215.6000002%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%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lBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPhoto%20Library%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPhoto-Library%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C2.25%20C9.0543618%2C2.25%209.91816512%2C3.06587779%209.99451426%2C4.10073766%20L10%2C4.25%20L10%2C4.749%20L19.25%2C4.75%20C20.3043618%2C4.75%2021.1681651%2C5.56587779%2021.2445143%2C6.60073766%20L21.25%2C6.75%20L21.25%2C8.647%20L21.3090595%2C8.67075883%20C21.560776%2C8.78204037%2021.7890445%2C8.94502905%2021.9776884%2C9.15176047%20L22.0859904%2C9.28098473%20C22.4268417%2C9.7243264%2022.5648157%2C10.2875838%2022.4792305%2C10.8049438%20L20.599742%2C19.7646666%20C20.3801645%2C20.5892111%2019.6644249%2C21.1776759%2018.8253479%2C21.243794%20L18.6666667%2C21.25%20L4.41416667%2C21.25%20C4.34513107%2C21.25%204.27827401%2C21.2406726%204.21478696%2C21.2232093%20L4.198%2C21.217%20L4.13447967%2C21.2119882%20C3.12077897%2C21.0788944%202.34585208%2C20.2581085%202.25808253%2C19.244849%20L2.25%2C19.0833333%20L2.25%2C4.25%20C2.25%2C3.1956382%203.06587779%2C2.33183488%204.10073766%2C2.25548574%20L4.25%2C2.25%20L8%2C2.25%20Z%20M20.5%2C9.9999998%20L8.94041369%2C9.9999998%20C8.7494078%2C9.99989301%208.57810253%2C10.1081415%208.50251018%2C10.2403227%20L8.47304199%2C10.3080169%20L6.50183631%2C19.6519318%20L6.47%2C19.749%20L18.6669246%2C19.7500001%20C18.8652457%2C19.7500001%2019.0419017%2C19.6334019%2019.1157978%2C19.483767%20L19.1409396%2C19.4178635%20L20.9835913%2C10.6286666%20C21.0235655%2C10.4785581%2020.991501%2C10.3183966%2020.8968201%2C10.1952461%20C20.8210754%2C10.0967258%2020.71214%2C10.0308462%2020.5919295%2C10.0084626%20L20.5%2C9.9999998%20Z%20M8%2C3.75%20L4.25%2C3.75%20C4.00454011%2C3.75%203.80039163%2C3.92687516%203.75805567%2C4.16012437%20L3.7499284%2C4.25%20L3.7499284%2C19.0729701%20C3.75450399%2C19.4040804%204.00142215%2C19.6816449%204.32974627%2C19.7247522%20C4.62158992%2C19.7630698%204.89911328%2C19.6058121%205.0118617%2C19.3809093%20L5.04612468%2C19.2936497%20L7.01858631%2C9.94533345%20C7.25034003%2C9.14246197%207.95397669%2C8.57422367%208.77513888%2C8.50674095%20L8.94083333%2C8.5%20L19.75%2C8.5%20L19.75%2C6.75%20C19.75%2C6.50454011%2019.5731248%2C6.30039163%2019.3398756%2C6.25805567%20L19.25%2C6.25%20L9.25%2C6.25%20C8.87030423%2C6.25%208.55650904%2C5.96784612%208.50684662%2C5.60177056%20L8.5%2C5.5%20L8.5%2C4.25%20C8.5%2C4.00454011%208.32312484%2C3.80039163%208.08987563%2C3.75805567%20L8%2C3.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.5%2C11.3125%20L10.6157711%2C11.3187346%20C11.1481147%2C11.3764201%2011.5625%2C11.8273176%2011.5625%2C12.375%20C11.5625%2C12.9618025%2011.0868025%2C13.4375%2010.5%2C13.4375%20C9.91319745%2C13.4375%209.4375%2C12.9618025%209.4375%2C12.375%20C9.4375%2C11.8273176%209.85188534%2C11.3764201%2010.3842289%2C11.3187346%20L10.5%2C11.3125%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.7615505%2C13.3341733%20C15.1650281%2C13.339062%2015.5432492%2C13.5206846%2015.7989971%2C13.8261321%20L15.8889717%2C13.9463759%20L18.3148051%2C17.5838759%20C18.5446241%2C17.928486%2018.4515675%2C18.3941527%2018.1069574%2C18.6239717%20C17.7936756%2C18.8328981%2017.3803468%2C18.7749852%2017.1351188%2C18.5038182%20L17.0668616%2C18.4161241%20L14.742%2C14.93%20L13.1806552%2C17.1565514%20C12.9524338%2C17.481881%2012.5156848%2C17.5682521%2012.1842442%2C17.371143%20L12.096698%2C17.3103241%20L11.179%2C16.572%20L9.94871059%2C18.4165154%20C9.73958776%2C18.7296662%209.33567986%2C18.8347993%209.00516806%2C18.6784976%20L8.90848458%2C18.6237106%20C8.59533381%2C18.4145878%208.49020073%2C18.0106799%208.64650244%2C17.6801681%20L8.70128941%2C17.5834846%20L10.0076608%2C15.6272604%20C10.2213273%2C15.3068138%2010.5595979%2C15.0906712%2010.9401624%2C15.0314258%20C11.2731564%2C14.9795861%2011.6118179%2C15.0520295%2011.8942272%2C15.2330124%20L12.0116353%2C15.3171759%20L12.412%2C15.639%20L13.6194632%2C13.9191131%20C13.8512845%2C13.5888451%2014.2147222%2C13.3792001%2014.6114213%2C13.3405523%20L14.7615505%2C13.3341733%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0%29%22%3E%3Cpath%20d%3D%22M1%205C1%203.89543%201.89543%203%203%203H21.5C22.6046%203%2023.5%203.89543%2023.5%205V19C23.5%2020.1046%2022.6046%2021%2021.5%2021H3C1.89543%2021%201%2020.1046%201%2019V5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%2015.5C9%2015.8978%209.15803%2016.2794%209.43934%2016.5607C9.72064%2016.842%2010.1022%2017%2010.5%2017C10.8978%2017%2011.2794%2016.842%2011.5607%2016.5607C11.842%2016.2794%2012%2015.8978%2012%2015.5C12%2015.1022%2011.842%2014.7206%2011.5607%2014.4393C11.2794%2014.158%2010.8978%2014%2010.5%2014C10.1022%2014%209.72064%2014.158%209.43934%2014.4393C9.15803%2014.7206%209%2015.1022%209%2015.5Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%2015V7L14.7141%209.27566C15.3657%209.82133%2015.7957%2010.5251%2015.9433%2011.2871C16.0909%2012.0491%2015.9486%2012.8307%2015.5365%2013.5211%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FAttachment%20File%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FAttachment-File%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.33333333%2C14.6666667%20C9.33333333%2C17.6121853%2011.721148%2C20%2014.6666667%2C20%20C17.6121853%2C20%2020%2C17.6121853%2020%2C14.6666667%20C20%2C11.721148%2017.6121853%2C9.33333333%2014.6666667%2C9.33333333%20C11.721148%2C9.33333333%209.33333333%2C11.721148%209.33333333%2C14.6666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2214.6666667%22%20y1%3D%2212%22%20x2%3D%2214.6666667%22%20y2%3D%2217.3333333%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212%22%20y1%3D%2214.6666667%22%20x2%3D%2217.3333333%22%20y2%3D%2214.6666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6%2C17.3333333%20L1.33333333%2C17.3333333%20C0.596953667%2C17.3333333%200%2C16.7363797%200%2C16%20L0%2C1.33333333%20C0%2C0.596953667%200.596953667%2C0%201.33333333%2C0%20L10.7813333%2C0%20C11.1347086%2C0%2011.4736014%2C0.140428224%2011.7235556%2C0.390222222%20L14.2764444%2C2.94311111%20C14.5262384%2C3.19306523%2014.6666667%2C3.53195804%2014.6666667%2C3.88533333%20L14.6666667%2C6%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { MessagesDataSource } from \"../Utils/MessagesDataSource\";\nimport { DataSource } from \"./DataSource\";\n\nexport class ChatConfigurator {\n static dataSource: DataSource;\n static names: Array = [\"message utils\"];\n\n static init(initialSource?: DataSource) {\n this.dataSource = initialSource ?? new MessagesDataSource();\n if (!initialSource) {\n this.names = [];\n }\n this.names.push(this.dataSource.getId());\n }\n\n static enable(callback: (dataSource: DataSource) => DataSource) {\n let oldSource: DataSource = this.dataSource;\n let newSource: DataSource = callback(oldSource);\n\n if (!this.names.find(nm => nm === newSource.getId())) {\n this.dataSource = newSource;\n this.names.push(this.dataSource.getId());\n }\n }\n\n static getDataSource(): DataSource {\n return this.dataSource;\n }\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nabstract class AIExtensionDataSource {\n abstract addExtension(): void;\n abstract getExtensionId(): string;\n\n enable(): void {\n CometChat.isAIFeatureEnabled(this.getExtensionId()).then(\n (enabled: Boolean) => {\n if (enabled) this.addExtension();\n }\n );\n }\n\n}\n\nexport { AIExtensionDataSource };","import {\n BaseStyle,\n FileBubbleStyle,\n ImageBubbleStyle,\n TextBubbleStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CardBubbleStyle,\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUrlsFormatter,\n ComposerId,\n FormBubbleStyle,\n SchedulerBubbleStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatDetailsTemplate,\n CometChatMessageComposerAction,\n CometChatMessageTemplate,\n CometChatTheme,\n FormMessage,\n MessageBubbleAlignment,\n SchedulerMessage,\n} from \"@cometchat/uikit-resources\";\n\nimport { AIOptionsStyle } from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"./DataSource\";\nimport { MessagesDataSource } from \"../Utils/MessagesDataSource\";\n\nexport abstract class DataSourceDecorator implements DataSource {\n dataSource: DataSource;\n constructor(dataSource: DataSource) {\n this.dataSource = dataSource;\n }\n\n getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getImageMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getImageMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getVideoMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getVideoMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getAudioMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getAudioMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getFileMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getBottomView(\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getBottomView(\n message,\n alignment\n );\n }\n getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n getImageMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getImageMessageContentView(message, alignment, theme);\n }\n getVideoMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getVideoMessageContentView(message, alignment, theme);\n }\n getAudioMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAudioMessageContentView(message, alignment, theme);\n }\n getFileMessageContentView(\n message: CometChat.MediaMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getFileMessageContentView(message, alignment, theme);\n }\n getFormMessageContentView(\n message: FormMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getFormMessageContentView(message, alignment, theme);\n }\n getSchedulerMessageContentView(\n message: SchedulerMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageContentView(message, alignment, theme);\n }\n getCardMessageContentView(\n message: CardMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getCardMessageContentView(message, alignment, theme);\n }\n getTextMessageTemplate(\n theme: CometChatTheme,\n additionalConfigurations?: any\n ): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageTemplate(\n theme,\n additionalConfigurations\n );\n }\n getImageMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getImageMessageTemplate(theme);\n }\n getVideoMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getVideoMessageTemplate(theme);\n }\n getAudioMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAudioMessageTemplate(theme);\n }\n getFileMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageTemplate(\n theme\n );\n }\n getGroupActionTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getGroupActionTemplate(\n theme\n );\n }\n getFormMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getFormMessageTemplate(\n theme\n );\n }\n getSchedulerMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageTemplate(theme);\n }\n getCardMessageTemplate(theme: CometChatTheme): CometChatMessageTemplate {\n return (this.dataSource ?? new MessagesDataSource()).getCardMessageTemplate(\n theme\n );\n }\n getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n return (this.dataSource ?? new MessagesDataSource()).getAllMessageTemplates(\n theme,\n additionalConfigurations\n );\n }\n getMessageTemplate(\n messageType: string,\n messageCategory: string,\n theme?: CometChatTheme | undefined\n ): CometChatMessageTemplate | null {\n return (this.dataSource ?? new MessagesDataSource()).getMessageTemplate(\n messageType,\n messageCategory,\n theme\n );\n }\n getMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getMessageOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getCommonOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): Array {\n return (this.dataSource ?? new MessagesDataSource()).getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n }\n getAttachmentOptions(\n theme: CometChatTheme,\n id: ComposerId\n ): CometChatMessageComposerAction[] {\n return (this.dataSource ?? new MessagesDataSource()).getAttachmentOptions(\n theme,\n id\n );\n }\n getAllMessageTypes(): string[] {\n return (this.dataSource ?? new MessagesDataSource()).getAllMessageTypes();\n }\n getAllMessageCategories(): string[] {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getAllMessageCategories();\n }\n getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ): any {\n return (this.dataSource ?? new MessagesDataSource()).getAuxiliaryOptions(\n id,\n theme,\n user,\n group\n );\n }\n getId(): string {\n return (this.dataSource ?? new MessagesDataSource()).getId();\n }\n getDeleteMessageBubble(\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getDeleteMessageBubble(\n messageObject,\n theme,\n style\n );\n }\n getGroupActionBubble(\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n style?: TextBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getGroupActionBubble(\n message,\n theme,\n style\n );\n }\n getTextMessageBubble(\n messageText: string,\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n style?: TextBubbleStyle,\n additionalConfigurations?: any\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getTextMessageBubble(\n messageText,\n message,\n alignment,\n theme,\n style,\n additionalConfigurations\n );\n }\n getVideoMessageBubble(\n videoUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n thumbnailUrl?: string,\n onClick?: Function,\n style?: BaseStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getVideoMessageBubble(\n videoUrl,\n message,\n theme,\n thumbnailUrl,\n onClick,\n style\n );\n }\n getImageMessageBubble(\n imageUrl: string,\n placeholderImage: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n onClick?: Function,\n style?: ImageBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getImageMessageBubble(\n imageUrl,\n placeholderImage,\n message,\n theme,\n onClick,\n style\n );\n }\n getAudioMessageBubble(\n audioUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: BaseStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getAudioMessageBubble(\n audioUrl,\n message,\n theme,\n title,\n style\n );\n }\n getFileMessageBubble(\n fileUrl: string,\n message: CometChat.MediaMessage,\n theme: CometChatTheme,\n title?: string,\n style?: FileBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getFileMessageBubble(\n fileUrl,\n message,\n theme,\n title,\n style\n );\n }\n getFormMessageBubble(\n message: FormMessage,\n theme: CometChatTheme,\n style?: FormBubbleStyle,\n onSubmitClick?: Function\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getFormMessageBubble(\n message,\n theme,\n style,\n onSubmitClick\n );\n }\n getSchedulerMessageBubble(\n message: SchedulerMessage,\n theme: CometChatTheme,\n style?: SchedulerBubbleStyle,\n onSubmitClick?: Function\n ) {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getSchedulerMessageBubble(message, theme, style, onSubmitClick);\n }\n getCardMessageBubble(\n message: CardMessage,\n theme: CometChatTheme,\n style?: CardBubbleStyle\n ) {\n return (this.dataSource ?? new MessagesDataSource()).getCardMessageBubble(\n message,\n theme,\n style\n );\n }\n getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n getDefaultDetailsTemplate(\n loggedInUser: CometChat.User,\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme\n ): CometChatDetailsTemplate[] {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getDefaultDetailsTemplate(loggedInUser, user, group, theme);\n }\n getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): any {\n return (this.dataSource ?? new MessagesDataSource()).getAuxiliaryHeaderMenu(\n user,\n group\n );\n }\n getAIOptions(\n user: CometChat.User | null,\n group: CometChat.Group | null,\n theme: CometChatTheme,\n id?: Map,\n AIOptionsStyle?: AIOptionsStyle\n ): (CometChatMessageComposerAction | CometChatActionsView)[] {\n return (this.dataSource ?? new MessagesDataSource()).getAIOptions(\n user,\n group,\n theme,\n id,\n AIOptionsStyle\n );\n }\n getAllTextFormatters(formatterParams: any): CometChatTextFormatter[] {\n let formatters = [];\n const mentionsFormatter = formatterParams.disableMentions ? null : (this.dataSource ?? new MessagesDataSource()).getMentionsTextFormatter(\n formatterParams\n );\n const urlTextFormatter = (this.dataSource ?? new MessagesDataSource()).getUrlTextFormatter(\n formatterParams\n );\n if (mentionsFormatter) {\n formatters.push(mentionsFormatter);\n }\n if (urlTextFormatter) {\n formatters.push(urlTextFormatter);\n }\n return formatters;\n }\n\n getMentionsTextFormatter(params: any = {}): CometChatMentionsFormatter {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getMentionsTextFormatter(params);\n }\n getUrlTextFormatter(params: any = {}): CometChatUrlsFormatter {\n return (this.dataSource ?? new MessagesDataSource()).getUrlTextFormatter(\n params\n );\n }\n getMentionsFormattedText(\n message: CometChat.TextMessage,\n subtitle: string,\n additionalConfigurations: any\n ): string {\n return (\n this.dataSource ?? new MessagesDataSource()\n ).getMentionsFormattedText(message, subtitle, additionalConfigurations);\n }\n}\n","import {\n AIAssistBotConfiguration,\n AIBotMessageBubbleStyle,\n AISenderMessageBubbleStyle,\n } from \"@cometchat/uikit-shared\";\nimport {\n CometChatTheme,\n DatePatterns,\n MessageBubbleAlignment,\n Receipts,\n fontHelper,\n} from \"@cometchat/uikit-resources\";\nimport { getMessageBubbleDateStyle, getMessageReceiptStyle } from \"./style\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from 'react';\n\n\nconst TextMessageBubble = createComponent({\n tagName: 'cometchat-text-bubble',\n elementClass: CometChatTextBubble,\n react: React\n});\n\nexport const getBubbleAlignment = (\n message: CometChat.TextMessage,\n sender: CometChat.User\n): MessageBubbleAlignment => {\n // @ts-ignore\n if (message.sender.getUid() === sender.getUid()) {\n return MessageBubbleAlignment.right;\n } else {\n return MessageBubbleAlignment.left;\n }\n}\n\nexport const getContentView = (\n message: CometChat.TextMessage,\n theme: CometChatTheme,\n alignment: MessageBubbleAlignment,\n configuration: AIAssistBotConfiguration\n): JSX.Element => {\n let style: AIBotMessageBubbleStyle | AISenderMessageBubbleStyle = {};\n\n if (alignment === MessageBubbleAlignment.right) {\n style = configuration?.senderMessageBubbleStyle || {};\n } else {\n style = configuration?.botMessageBubbleStyle || {};\n }\n\n const defaultStyle: any = {\n textFont: style?.textFont || fontHelper(theme.typography.text3),\n };\n\n if (alignment === MessageBubbleAlignment.right) {\n defaultStyle[\"textColor\"] = style?.textColor || theme.palette.getAccent900();\n } else {\n defaultStyle[\"textColor\"] = style?.textColor || theme.palette.getAccent();\n }\n\n return \n}\n\nexport const getBubbleFooterView = (\n item: CometChat.TextMessage,\n configuration: AIAssistBotConfiguration,\n theme: CometChatTheme\n): JSX.Element => {\n let status;\n let displayReceipt = false;\n\n if (\n item.getStatus() === \"send\" ||\n item.getStatus() === \"wait\" ||\n item.getStatus() === \"error\"\n ) {\n if (item.getStatus() === \"wait\") {\n status = Receipts.wait;\n } else if (item.getStatus() === \"sent\") {\n status = Receipts.sent;\n } else if (item.getStatus() === \"error\") {\n status = Receipts.error;\n }\n\n displayReceipt = true;\n }\n\n return (\n
    \n
    \n \n \n
    \n {\n displayReceipt ?\n
    \n \n
    :\n null\n }\n
    \n )\n}\n\n\n","import {\n AIAssistBotConfiguration,\n AIAssistBotStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n AvatarStyle,\n MessageInputStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, MessageBubbleAlignment, fontHelper } from \"@cometchat/uikit-resources\";\nimport { getBubbleAlignment } from \"./utils\";\n\nexport const getContainerStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\",\n background: style?.background || theme?.palette?.getBackground(),\n borderRadius: style?.borderRadius || \"8px\",\n } as React.CSSProperties;\n};\n\nexport const getBotsContainerStyle = () => {\n return {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n } as React.CSSProperties;\n};\n\nexport const getBotTitleStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n font:\n style?.optionTitleFont || (theme && fontHelper(theme?.typography?.text2)),\n color: style?.optionTitleColor || theme?.palette?.getAccent(),\n } as React.CSSProperties;\n};\n\nexport const getBackButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.backIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport const getOptionsContainerStyle = () => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n height: \"100%\",\n boxSizing: \"border-box\",\n } as React.CSSProperties;\n};\n\nexport const getOptionStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return new ActionSheetStyle({\n ActionSheetSeparatorTint: theme?.palette?.getAccent400(),\n background: style?.buttonBackground || theme?.palette?.getBackground(),\n titleColor: style?.buttonTextColor || theme?.palette?.getAccent(),\n titleFont:\n style?.buttonTextFont || (theme && fontHelper(theme?.typography?.text2)),\n listItemBackground: \"transparent\",\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n });\n};\n\nexport const getBotBackgroundStyle = (theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n justifyContent: \"flex-end\",\n height: \"100%\",\n width: \"100%\",\n background: theme?.palette?.getAccent600(),\n } as React.CSSProperties;\n};\n\nexport const getBotChatContainerStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n width: \"40%\",\n minWidth: \"350px\",\n maxWidth: \"100%\",\n height: \"100%\",\n overflow: \"hidden\",\n boxSizing: \"border-box\",\n background: style?.background || theme?.palette.getBackground(),\n } as React.CSSProperties;\n};\n\nexport const getBotChatHeaderStyle = (theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n height: \"40px\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n background: theme?.palette.getAccent200(),\n marginBottom: \"10px\"\n } as React.CSSProperties;\n};\n\nexport const getAvatarStyle = (style: AvatarStyle) => {\n if (style) {\n return style;\n } else {\n return new AvatarStyle({\n borderRadius: \"16px\",\n width: \"28px\",\n height: \"28px\",\n });\n }\n};\n\nexport const getBotHeaderTitleStyle = (\n style: AIAssistBotStyle = {},\n theme: CometChatTheme\n) => {\n return {\n font: style.titleFont || fontHelper(theme.typography.subtitle1),\n color: style.titleColor || theme.palette.getAccent(),\n } as React.CSSProperties;\n};\n\nexport const getBotHeaderSubtitleStyle = (\n style: AIAssistBotStyle = {},\n theme: CometChatTheme\n) => {\n return {\n font: style.subtitleFont || fontHelper(theme.typography.caption2),\n color: style.subtitleColor || theme.palette.getAccent500(),\n } as React.CSSProperties;\n};\n\nexport const getCloseButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.closeIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n } as React.CSSProperties;\n};\n\nexport const getMessageBubbleStyle = (\n message: CometChat.TextMessage,\n theme: CometChatTheme,\n sender: CometChat.User,\n configuration: AIAssistBotConfiguration\n) => {\n // @ts-ignore\n if (message.sender.getUid() === sender.getUid()) {\n const style = configuration?.senderMessageBubbleStyle || {};\n return {\n background: style.background || theme.palette.getPrimary(),\n borderRadius: style.borderRadius || \"12px\",\n border: style.border || \"none\",\n };\n } else {\n const style = configuration?.botMessageBubbleStyle || {};\n return {\n background: style.background || theme.palette.getAccent100(),\n borderRadius: style.borderRadius || \"12px\",\n border: style.border || \"none\",\n };\n }\n};\n\nexport const getMessageListFooterStyle = () => {\n return {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n height: \"40px\",\n padding: \"5px\",\n boxSizing: \"border-box\",\n } as React.CSSProperties; \n}\n\nexport const getMessageInputStyle = (\n style: MessageInputStyle,\n theme: CometChatTheme\n): MessageInputStyle => {\n if (style) {\n return style;\n } else {\n return new MessageInputStyle({\n height: \"40px\",\n width: \"100%\",\n maxHeight: \"40px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"12px\",\n background: theme.palette.getAccent50(),\n textFont: fontHelper(theme.typography.text2),\n textColor: theme.palette.getAccent(),\n dividerColor: theme.palette.getAccent100(),\n inputBorder: \"none\",\n inputBorderRadius: \"0px\",\n inputBackground: \"transparent\",\n });\n }\n};\n\nexport const getSendButtonStyle = (\n style?: AIAssistBotStyle,\n theme?: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.sendIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n } as React.CSSProperties;\n};\n\nexport const getMessageBubbleDateStyle = (theme: CometChatTheme) => {\n return {\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.caption2),\n padding: \"0px\",\n } as React.CSSProperties;\n};\n\nexport const getMessageReceiptStyle = (\n style: AIAssistBotStyle,\n theme: CometChatTheme\n) => {\n return new ReceiptStyle({\n waitIconTint: style?.loadingIconTint || theme?.palette?.getAccent700(),\n errorIconTint: style?.errorIconTint || theme?.palette?.getError(),\n });\n};\n\nexport const getMessageBubbleContainerStyle = (message: CometChat.TextMessage, sender: CometChat.User) => {\n const bubbleAlignment = getBubbleAlignment(message, sender);\n return {\n flex: \"1 1 0\",\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: \"inherit\",\n justifyContent: bubbleAlignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n alignItems: bubbleAlignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n position: \"relative\",\n } as React.CSSProperties;\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import React, { useContext } from 'react';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { CometChatActionSheet } from '@cometchat/uikit-elements';\nimport { AIAssistBotConfiguration } from '@cometchat/uikit-shared';\nimport { CometChatMessageComposerAction } from '@cometchat/uikit-resources';\nimport { getBackButtonStyle, getBotTitleStyle, getBotsContainerStyle, getContainerStyle, getOptionStyle, getOptionsContainerStyle } from './style';\nimport { createComponent } from \"@lit-labs/react\";\nimport backIcon from '../assets/backbutton.svg';\n\ninterface IAIAssistBotProps {\n title?: string\n bots?: CometChatMessageComposerAction[]\n closeCallback?: () => void\n backCallback?:() => void\n configuration?: AIAssistBotConfiguration\n};\n\nconst defaultProps: IAIAssistBotProps = {\n title: undefined,\n bots: undefined,\n closeCallback: undefined,\n backCallback: undefined,\n configuration: undefined\n}\n\nconst ActionSheet = createComponent({\n tagName: 'cometchat-action-sheet',\n elementClass: CometChatActionSheet,\n react: React,\n events: {\n 'onClick': 'cc-actionsheet-clicked',\n }\n})\n\nconst AIAssistBotOptoinsView = (props: IAIAssistBotProps) => {\n\n const {theme} = useContext(CometChatThemeContext);\n\n const onBotClick = (event: any) => {\n const bot: CometChatMessageComposerAction = event?.detail?.action;\n if (bot.onClick) {\n bot.onClick();\n }\n if (props.closeCallback) {\n props.closeCallback();\n }\n }\n\n return (\n
    \n
    \n
    \n
    \n props.backCallback ? props.backCallback() : null} buttonStyle={JSON.stringify(getBackButtonStyle(props.configuration?.assistBotStyle, theme))} />\n
    \n
    \n {props.title}\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n )\n};\n\nAIAssistBotOptoinsView.defaultProps = defaultProps\nexport default AIAssistBotOptoinsView;\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AIAssistBotConfiguration, CometChatUIKitUtility } from '@cometchat/uikit-shared';\nimport { CometChatUIKitConstants, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { getAvatarStyle, getBotBackgroundStyle, getBotChatContainerStyle, getBotChatHeaderStyle, getBotHeaderSubtitleStyle, getBotHeaderTitleStyle, getCloseButtonStyle, getMessageBubbleContainerStyle, getMessageBubbleStyle, getMessageInputStyle, getMessageListFooterStyle, getSendButtonStyle } from './style';\nimport { getBubbleAlignment, getBubbleFooterView, getContentView } from './utils';\n\nimport Close2xIcon from '../assets/close2x.svg'\nimport { CometChat } from '@cometchat/chat-sdk-javascript';\nimport { CometChatList } from '../../Shared/Views/CometChatList';\nimport { CometChatMessageBubble } from '../../Shared/Views/CometChatMessageBubble';\nimport { CometChatTextInput } from '@cometchat/uikit-elements';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport SendIcon from \"../assets/send.svg\";\nimport { createComponent } from \"@lit-labs/react\";\n\ninterface IAIAssistBotProps {\n configuration?: AIAssistBotConfiguration\n bot: CometChat.User | undefined\n sender: CometChat.User | undefined\n messageSendCallBack?: (message: string, bot: CometChat.User) => Promise\n closeCallback?: () => void\n};\n\nconst defaultProps: IAIAssistBotProps = {\n bot: undefined,\n sender: undefined,\n messageSendCallBack: undefined,\n closeCallback: undefined,\n configuration: undefined\n}\n\nconst MessageInput = createComponent({\n tagName: 'cometchat-text-input',\n elementClass: CometChatTextInput,\n react: React,\n events: {\n 'ccTextInputChanged': 'cc-text-input-changed',\n 'ccTextInputEntered': 'cc-text-input-entered'\n }\n})\n\nconst AIAssistBotChatView = (props: IAIAssistBotProps) => {\n const scrollBottom = useRef(true);\n const subtitleText = localize(\"COMETCHAT_ASK_BOT_SUBTITLE\");\n const botFirstMessage = useRef(localize(\"COMETCHAT_BOT_FIRST_MESSAGE\"));\n const messageInputRef = useRef(null);\n const inputTextRef = useRef(\"\");\n const [messagesList, setMessagesList] = useState([]);\n const { theme } = useContext(CometChatThemeContext);\n const sender = props.sender!;\n const bot = props.bot!;\n\n useEffect(\n () => {\n insertFirstMessage();\n }, []\n );\n\n const insertFirstMessage = useCallback(\n () => {\n if (props.configuration?.botFirstMessageText) {\n botFirstMessage.current = props.configuration.botFirstMessageText(bot);\n }\n const message = new CometChat.TextMessage(sender.getUid(), botFirstMessage.current, CometChatUIKitConstants.MessageReceiverType.user);\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n message.setMuid(CometChatUIKitUtility.ID());\n message.setSender(bot);\n setMessagesList([message]);\n }, [messagesList, setMessagesList]\n )\n\n const onComposerEditTextChange = useCallback(\n (value: string) => {\n inputTextRef.current = value;\n }, [inputTextRef]\n )\n\n const getBotResponse = useCallback(\n (id: any) => {\n if (props.messageSendCallBack) {\n props.messageSendCallBack(inputTextRef.current, bot).then(\n (response) => {\n const newMessage = new CometChat.TextMessage(\n sender.getUid(),\n response,\n CometChatUIKitConstants.MessageReceiverType.user\n );\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(CometChatUIKitUtility.ID());\n newMessage.setSender(bot);\n newMessage.setStatus(\"sent\");\n\n setMessagesList(prevMessages => {\n const messages = prevMessages.map((message) => {\n if (message.getMuid() === id) {\n message.setStatus('sent');\n }\n return message;\n })\n messages.push(newMessage);\n return messages;\n });\n }\n )\n .catch(\n (error) => {\n setMessagesList(\n (prevMessages) => {\n const messages = prevMessages.map(\n (message) => {\n if (message.getMuid() === id) {\n message.setStatus(\"error\");\n }\n return message;\n }\n );\n return messages;\n }\n );\n }\n );\n }\n }, [messagesList, setMessagesList, inputTextRef]\n );\n\n const onMessageSendClick = useCallback(\n () => {\n if (!inputTextRef.current) {\n return;\n }\n const id = CometChatUIKitUtility.ID();\n const newMessage = new CometChat.TextMessage(\n bot.getUid(),\n inputTextRef.current,\n CometChatUIKitConstants.MessageReceiverType.user\n );\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(id);\n newMessage.setSender(sender);\n newMessage.setStatus(\"wait\");\n setMessagesList(prevMessages => ([...prevMessages, newMessage]));\n messageInputRef?.current?.emptyInputField();\n getBotResponse(id)\n }, [messagesList, setMessagesList, getBotResponse, inputTextRef]\n );\n\n const triggerClose = () => {\n if (props.closeCallback) {\n props.closeCallback();\n }\n }\n\n const getListItem = useMemo(() => {\n return function (message: any, index: number): any {\n return (\n
    \n \n
    \n )\n };\n }, [getMessageBubbleStyle, getBubbleAlignment, getContentView, getBubbleFooterView]);\n\n return (\n
    \n
    \n
    \n
    \n \n
    \n
    \n {bot?.getName()}\n
    \n
    \n {subtitleText}\n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n onComposerEditTextChange(e?.detail?.value)}\n ccTextInputEntered={() => onMessageSendClick()}\n />\n onMessageSendClick()}\n buttonStyle={JSON.stringify(getSendButtonStyle(props.configuration?.assistBotStyle!, theme))}\n />\n
    \n
    \n
    \n )\n};\n\nAIAssistBotChatView.defaultProps = defaultProps\nexport default AIAssistBotChatView;\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatActionsView,\n CometChatMessageComposerAction,\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatUIEvents,\n PanelAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { AIAssistBotConfiguration, AIOptionsStyle } from \"@cometchat/uikit-shared\";\nimport AIAssistBotOptoinsView from \"./AIAssistBotOptionsView\";\nimport AIAssistBotChatView from \"./AIAssistBotChatView\";\n\nexport class AIAssistBotDecorator extends DataSourceDecorator {\n public configuration?: AIAssistBotConfiguration;\n public newDataSource!: DataSource;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public bots: CometChat.User[] | [] = [];\n public theme: CometChatTheme = new CometChatTheme({});\n\n constructor(\n dataSource: DataSource,\n configuration?: AIAssistBotConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n this.getAllBots();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiassistbot\";\n }\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n\n const generalAskBotText = localize(\"COMETCHAT_ASK_AI_BOT\");\n const askText = localize(\"COMETCHAT_ASK_BOT\");\n\n const numberOfBots = this.bots?.length;\n const titleName = numberOfBots > 1 ? generalAskBotText : `${askText} ${this.bots[0]?.getName()}`;\n\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.assistBotStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.assistBotStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.assistBotStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n\n if(numberOfBots === 1) {\n const newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n title: titleName,\n onClick: () => { this.onOptionClick(this.bots[0]);},\n id: \"ai-assist-bot\",\n iconURL: \"\",\n iconTint: \"\",\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background\n });\n messageComposerActions.push(newAction);\n }else if(numberOfBots > 1) {\n const botList = this.bots.map((bot) => {\n return new CometChatMessageComposerAction({\n title: bot.getName(),\n onClick: () => {this.onOptionClick(bot);},\n id: bot.getUid(),\n });\n });\n\n const newAction: CometChatActionsView = new CometChatActionsView({\n title: titleName,\n customView: (callBacks: any) => {\n return \n },\n id: \"ai-assist-bot\",\n iconURL: \"\",\n iconTint: \"\",\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n\n messageComposerActions.push(newAction);\n }\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n onMessageSent = async (message: string, bot: CometChat.User): Promise => {\n return new Promise(async (resolve, reject) => {\n try{\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n bot,\n this.user,\n this.group\n );\n }\n const response = await CometChat.askBot(\n receiverId,\n receiverType,\n bot.getUid(),\n message,\n configuration ? configuration : {}\n );\n return resolve(response);\n }catch(e){\n reject(e);\n }\n });\n };\n\n closeChat = () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messages);\n };\n\n onOptionClick = (bot: CometChat.User) => {\n CometChatUIEvents.ccShowPanel.next({\n child: ,\n position: PanelAlignment.messages,\n });\n };\n\n private getAllBots(): void {\n new CometChat.UsersRequestBuilder().setLimit(30).setTags([\"aibot\"]).build().fetchNext().then(\n (bots: CometChat.User[] | []) => {\n this.bots = bots;\n }\n )\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(() => {\n this.closeChat();\n });\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIAssistBotDecorator } from \"./AIAssistBotDecorator\";\nimport { AIAssistBotConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIAssistBotExtension extends AIExtensionDataSource {\n private configuration?: AIAssistBotConfiguration;\n\n constructor(configuration?: AIAssistBotConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIAssistBotDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"bots\";\n }\n}","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { AIConversationStarterStyle } from \"@cometchat/uikit-shared\";\n\nexport const getContainerStyle = (style?: AIConversationStarterStyle) => {\n return {\n display: \"flex\",\n overflow: \"hidden\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\"\n }\n};\n\nexport const contentContainerStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n};\n\nexport const getConversationStarterStyle = (\n theme?: CometChatTheme,\n style?: AIConversationStarterStyle\n) => {\n return {\n replyTextFont:\n style?.textFont ||\n fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.textBackground || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n border: style?.textBorder || \"none\",\n borderRadius: style?.textBorderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20standalone%3D%22no%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%2020010904%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2F2001%2FREC-SVG-20010904%2FDTD%2Fsvg10.dtd%22%3E%3Csvg%20version%3D%221.0%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100.000000pt%22%20height%3D%22100.000000pt%22%20viewBox%3D%220%200%20100.000000%20100.000000%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%3E%3Cg%20transform%3D%22translate%280.000000%2C100.000000%29%20scale%280.100000%2C-0.100000%29%22fill%3D%22%23000000%22%20stroke%3D%22none%22%3E%3Cpath%20d%3D%22M375%20847%20c-221%20-73%20-326%20-269%20-254%20-472%20l22%20-62%20-25%20-74%20c-14%20-41-23%20-80%20-21%20-86%206%20-17%2042%20-15%20138%206%2077%2017%2082%2017%20138%20-1%2072%20-22%20199%20-25%20216%20-46%207%209%2021%205%2030%20-5%2013%20-21%2016%20-79%2016%20-44%200%20-98%208%20-136%2019%20-58%2018%20-67%2019%20-123%206-89%20-21%20-88%20-23%20-65%2042%20l20%2058%20-26%2056%20c-52%20116%20-25%20240%2069%20327%2077%2071%20123%2087246%2087%20123%200%20169%20-16%20245%20-86%2064%20-59%2088%20-108%2094%20-199%205%20-68%208%20-75%2028%20-78%2036-5%2048%2038%2033%20118%20-22%20125%20-94%20215%20-218%20273%20-59%2028%20-79%2032%20-167%2034%20-63%202%20-115-2%20-140%20-10z%22%2F%3E%3Cpath%20d%3D%22M687%20313%20c-16%20-15%20-4%20-42%2038%20-83%20l45%20-44%20-45%20-46%20c-47%20-48%20-56%20-74-28%20-84%2011%20-5%2031%208%2064%2040%20l48%2047%2050%20-46%20c54%20-50%2061%20-53%2079%20-35%2018%2018%2015%2025-35%2079%20l-46%2050%2048%2049%20c41%2042%2046%2051%2035%2065%20-19%2023%20-30%2019%20-80%20-30%20l-46%20-45%20-4445%20c-41%2042%20-68%2054%20-83%2038z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABqxJREFUeF7tnY2x5DQMgHUdcBUAFXBUAFQAVABXAVABUAFQAVDBQQVABRwVABUAFcB8MzEsef6RbHmjl9gzO%2B%2FmNnFkfZIs%2F6zzRFYJpYEnoaRZwsgCEswIFpAFJJgGgomzPGQBCaaBYOIsD1lAgmkgmDjLQxaQYBoIJs7ykAUkmAaCifMYPeQVEXlt%2B%2FDvXPlt%2B8%2BXIvJnMJ1XxYkOBMW%2FJyJviMizBoRSQwECID4%2FiciPIgKokCUaECz%2BbRF5dwNR8oBRZQIJMN9vf5NHjdY7fH8UIED4YDKEmrK%2BE5FvRYS%2Fh5YjgWD9hCNAACRCwVM%2B38Ac0vccBeRDEflCRGaFpFG4gPlKRL4crch6%2F72B4Alfb52zVdZ0PZb7101HnauHZADYrw5CTx7zTa%2Bw1vvuBQTlYG2EJ2shMyIrStmRtQPm2WRoGAOft6wCiAhACGXWZ5sfdQ8gVq%2FAA8h%2B6GCBMCOWIxNhk2xOGzaR45MNjlnR2htmA%2FlURD5TCoMnAAFrnAGhJAZg%2BGg9B08HzJQyCwhW90KZPQECaHjDkQWvQQ4NGELo%2BzNC2AwgdKjAIG7XCvEYSzs8998JSSpOBkg7WvK%2F4w3FGwiN%2BEHRGFJKrPGeocnqfchHyL0rFE8gGhh4xfMA4UkLR9smN0%2FxAkKfgWfUwhR9BeEgslfkQNE2vOWjCkUMzQWKFxBi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hgLTCFUrE6pPlo%2FzWyZ6lhtPo28OUPXWLfBygjGwcWa7eM7UJEQZI7dCABMNTcamu9K6PX27WHrQehNLTi2A4jzfnoSiYny1rz4IMM7lYClczIGjqTG%2FO2SsyeaXFOy1LBrkFOrcZCu1sb%2BsoP40CI19j%2FVnF7Uy3et%2BuRgFaIGxuSGecaA%2BvLz0fi%2F795m0H6e06GnlnXdOz%2BxI98HHNDLVAkpuiTCuQW%2BWzXYgG5MIMYNjKn1LhWcrf18urjugfQxQtkNrJabcNQdG3b0LreW1dejMbXqk5GL9HkUlGDKT7BNGeB7fu0QKhnn1nhvJT5pNeuOLqvpvwaRCZMiY8SOulKTwi3%2B1Hm1G19Of%2BvQUID09KQfHa1NNd6K3C9FqjPZxkFDOMY1Zb%2Fq3XCmS6QFd%2FwALSbwFhNsr1N%2BEcd4bcKHcO1fa1IuRGub6mnOOuMHNZ51DneCtKc3qm42BLYqxO3Q4oN0hWHSyjedQCotHSw2vS79AZA6V3L%2FbVtLtrAXFRo18lC4ifLl1qWkBc1OhXyQLip0uXmhYQFzX6VfIP%2BqZ1dOfAgekAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Icons%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20viewBox%3D%220%200%2032%2032%22%20style%3D%22enable-background%3Anew%200%200%2032%2032%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%20.st0%7Bfill%3Anone%3Bstroke%3A%23000000%3Bstroke-width%3A2%3Bstroke-linecap%3Around%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A10%3B%7D%3C%2Fstyle%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%223%22%20x2%3D%2216%22%20y2%3D%228%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%226.8%22%20x2%3D%2210.3%22%20y2%3D%2210.3%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%223%22%20y1%3D%2216%22%20x2%3D%228%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%226.8%22%20y1%3D%2225.2%22%20x2%3D%2210.3%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2216%22%20y1%3D%2229%22%20x2%3D%2216%22%20y2%3D%2224%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%2225.2%22%20x2%3D%2221.7%22%20y2%3D%2221.7%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2229%22%20y1%3D%2216%22%20x2%3D%2224%22%20y2%3D%2216%22%2F%3E%3Cline%20class%3D%22st0%22%20x1%3D%2225.2%22%20y1%3D%226.8%22%20x2%3D%2221.7%22%20y2%3D%2210.3%22%2F%3E%3C%2Fsvg%3E\"","/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport { AIConversationStarterConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getContainerStyle, getConversationStarterStyle } from './style';\n\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAIConversationStarterProps {\n getConversationStarterCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n configuration?: AIConversationStarterConfiguration\n};\n\nconst defaultProps: IAIConversationStarterProps = {\n getConversationStarterCallback: undefined,\n editReplyCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatConversationStarterView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst AIConversationStarterView = (props: IAIConversationStarterProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_ICEBREAKERS\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getConversationStarterCallback) {\n props.getConversationStarterCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(conversationStarters: string[]): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(conversationStarters).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let conversationStarterView = { props && props.editReplyCallback ? props.editReplyCallback(e?.detail?.reply) : null }}\n key = {\"conversation-starter\"}\n closeIconURL = \"\"\n />\n return resolve(conversationStarterView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n
    \n
    \n
    \n {messageListState === States.loaded ? activeView : getStateView()}\n
    \n\n
    \n
    \n );\n};\n\nAIConversationStarterView.defaultProps = defaultProps\nexport default AIConversationStarterView;\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatMessageEvents,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n IActiveChatChanged,\n PanelAlignment,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport AIConversationStarterView from \"./AIConversationStarterView\";\nimport { AIConversationStarterConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationStarterDecorator extends DataSourceDecorator {\n public configuration?: AIConversationStarterConfiguration;\n public newDataSource!: DataSource;\n public currentMessage: CometChat.BaseMessage | null = null;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n\n constructor(\n dataSource: DataSource,\n configuration?: AIConversationStarterConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiconversationstarter\";\n }\n\n editReply(reply: string) {\n CometChatUIEvents.ccComposeMessage.next(reply);\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n }\n\n closeIfMessageReceived(message: CometChat.BaseMessage) {\n if (message?.getReceiverId() === this.loggedInUser?.getUid() && !this.currentMessage) {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n }\n }\n\n getConversationStarter = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response = await CometChat.getConversationStarter(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n private loadConversationStarter(): void {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: , position: PanelAlignment.messageListFooter });\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n \n CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.user = data.user!;\n this.group = data.group!;\n if (!this.currentMessage) {\n this.loadConversationStarter();\n }\n }\n );\n\n CometChatMessageEvents.ccMessageSent.subscribe(() => {\n if(!this.currentMessage){\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n });\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIConversationStarterDecorator } from \"./AIConversationStarterDecorator\";\nimport { AIConversationStarterConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationStarterExtension extends AIExtensionDataSource {\n private configuration?: AIConversationStarterConfiguration;\n\n constructor(configuration?: AIConversationStarterConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIConversationStarterDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"conversation-starter\";\n }\n}","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { AIConversationSummaryStyle } from \"@cometchat/uikit-shared\";\nimport { PanelStyle } from \"@cometchat/uikit-elements\";\n\nexport const getContainerStyle = (style?: AIConversationSummaryStyle) => {\n return {\n display: \"flex\",\n overflow: \"hidden\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\"\n }\n};\nexport const contentContainerStyle: React.CSSProperties = {\n width:\"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"hidden\",\n};\n\nexport const getConversationSummaryStyle = (\n theme?: CometChatTheme,\n style?: AIConversationSummaryStyle\n) => {\n return {\n replyTextFont:\n style?.textFont ||\n fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.background || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n border: style?.border || \"none\",\n borderRadius: style?.borderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport const getPanelStyle = (theme: CometChatTheme, summaryStyle: AIConversationSummaryStyle): PanelStyle => {\n const style = new PanelStyle({\n width: '100%',\n height: 'fit-content',\n border: `1px solid ${theme.palette.getPrimary()}`,\n borderRadius: '8px',\n background: theme.palette.getBackground(),\n textColor: summaryStyle?.textColor || theme.palette.getAccent600(),\n titleColor: summaryStyle?.titleTextColor || theme.palette.getAccent(),\n textFont: summaryStyle?.textFont || fontHelper(theme.typography.text2),\n titleFont: summaryStyle?.titleTextFont || fontHelper(theme.typography.text1),\n })\n return style;\n};","import { AIConversationSummaryConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getContainerStyle, getConversationSummaryStyle, getPanelStyle } from './style';\n\nimport Close2xIcon from '../assets/close2x.svg'\nimport { CometChatPanel } from '@cometchat/uikit-elements';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAIConversationSummaryProps {\n getConversationSummaryCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n closeCallback?: () => void\n configuration?: AIConversationSummaryConfiguration\n};\n\nconst defaultProps: IAIConversationSummaryProps = {\n getConversationSummaryCallback: undefined,\n editReplyCallback: undefined,\n closeCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatConversationSummaryView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst CometChatPanelView = createComponent({\n tagName: 'cometchat-panel',\n elementClass: CometChatPanel,\n react: React,\n events: {\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst AIConversationSummaryView = (props: IAIConversationSummaryProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_SUMMARY\");\n const titleText: string = localize(\"CONVERSATION_SUMMARY\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getConversationSummaryCallback) {\n props.getConversationSummaryCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(conversationSummary: string): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(conversationSummary, props?.closeCallback).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let conversationSummaryView = props.closeCallback!()}\n />\n return resolve(conversationSummaryView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n
    \n
    \n
    \n {messageListState === States.loaded ? activeView : getStateView()}\n
    \n\n
    \n
    \n );\n};\n\nAIConversationSummaryView.defaultProps = defaultProps\nexport default AIConversationSummaryView;\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatMessageEvents,\n CometChatUIEvents,\n IActiveChatChanged,\n PanelAlignment,\n CometChatMessageComposerAction,\n localize,\n CometChatActionsView,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport AIConversationSummaryView from \"./AIConversationSummaryView\";\nimport { AIConversationSummaryConfiguration, AIOptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationSummaryDecorator extends DataSourceDecorator {\n public configuration?: AIConversationSummaryConfiguration;\n public newDataSource!: DataSource;\n public currentMessage: CometChat.BaseMessage | null = null;\n public unreadMessageCount: number = 0;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n private LISTENER_ID: string = \"aiconversationsummary__listener\";\n\n constructor(\n dataSource: DataSource,\n configuration?: AIConversationSummaryConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n override getId(): string {\n return \"aiconversationsummary\";\n }\n\n closePanel = () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n };\n\n getConversationSummary = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response = await CometChat.getConversationSummary(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n private loadConversationSummary(): void {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: , position: PanelAlignment.messageListFooter });\n }\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.conversationSummaryStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.conversationSummaryStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.conversationSummaryStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n let newAction: CometChatMessageComposerAction = new CometChatMessageComposerAction({\n title: localize(\"CONVERSATION_SUMMARY\"),\n onClick: () => { this.loadConversationSummary() },\n id: \"ai-conversation-summary\",\n iconURL: '',\n iconTint: '',\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.user = data.user!;\n this.group = data.group!;\n this.unreadMessageCount = data.unreadMessageCount ?? 0;\n if (this.unreadMessageCount > (this.configuration?.unreadMessageThreshold ?? 30)) {\n this.loadConversationSummary();\n }\n }\n );\n }\n}","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AIConversationSummaryDecorator } from \"./AIConversationSummaryDecorator\";\nimport { AIConversationSummaryConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AIConversationSummaryExtension extends AIExtensionDataSource {\n private configuration?: AIConversationSummaryConfiguration;\n\n constructor(configuration?: AIConversationSummaryConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AIConversationSummaryDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"conversation-summary\";\n }\n}","import { AISmartRepliesStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport const getContainerStyle = (style?: AISmartRepliesStyle, theme?: CometChatTheme) => {\n return {\n display: \"flex\",\n width: style?.width || \"100%\",\n height: style?.height || \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n minHeight: \"50px\",\n background: style?.background || theme?.palette.getBackground(),\n borderRadius: style?.borderRadius || \"8px\",\n }\n};\n\nexport const contentContainerStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"transparent\",\n overflow: \"auto\",\n height: \"100%\",\n};\n\nexport const getSmartReplyStyle = (\n theme?: CometChatTheme,\n style?: AISmartRepliesStyle\n) => {\n return {\n replyTextFont: style?.textFont || fontHelper((theme as CometChatTheme).typography.caption1),\n replyTextColor: style?.textColor || theme?.palette.getAccent(),\n replyBackground: style?.textBackground || \"inherit\",\n boxShadow: `0px 0px 1px ${theme?.palette.getAccent600()}`,\n background: style?.background || \"inherit\",\n border: style?.textBorder || \"none\",\n borderRadius: style?.textBorderRadius || \"8px\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n};\n\nexport function getBackButtonStyle(style?: AISmartRepliesStyle, theme?: CometChatTheme): any {\n return {\n height: \"24px\",\n width: \"24px\",\n buttonIconTint: style?.backIconTint || theme?.palette.getPrimary() || \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n };\n}\n\nexport function getSmartRepliesContainerStyle(): any {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n };\n}\n\nexport function getSmartRepliesTitleStyle(style?: AISmartRepliesStyle, theme?: CometChatTheme): any {\n return {\n display: \"flex\", \n justifyContent: \"space-between\",\n alignItems: \"center\",\n font: style?.titleFont || fontHelper(theme!.typography.text2),\n color: style?.titleColor || theme?.palette.getAccent(),\n };\n}","import { AISmartRepliesConfiguration, CometChatAICard, SmartReplies } from '@cometchat/uikit-shared';\nimport { CometChatTheme, States, localize } from '@cometchat/uikit-resources';\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React, { useContext, useEffect, useState } from 'react';\nimport { contentContainerStyle, getBackButtonStyle, getContainerStyle, getSmartRepliesContainerStyle, getSmartRepliesTitleStyle, getSmartReplyStyle } from './style';\n\nimport { CometChatButton } from '../../Shared/Views/CometChatButton';\nimport { CometChatThemeContext } from '../../CometChatThemeContext';\nimport backIcon from '../assets/backbutton.svg';\nimport { createComponent } from \"@lit-labs/react\";\nimport emptyIcon from '../assets/ai-empty.svg';\nimport errorIcon from '../assets/ai-error.svg';\nimport loadingIconURL from '../assets/loading.svg';\n\ninterface IAISmartRepliesProps {\n title: string\n getSmartRepliesCallback?: (theme?: CometChatTheme) => Promise\n editReplyCallback?: (reply: string) => void\n closeCallback?: () => void\n backCallback?:() => void\n configuration?: AISmartRepliesConfiguration\n};\n\nconst defaultProps: IAISmartRepliesProps = {\n title: localize(\"SUGGEST_A_REPLY\"),\n getSmartRepliesCallback: undefined,\n editReplyCallback: undefined,\n closeCallback: undefined,\n backCallback: undefined,\n configuration: undefined\n}\n\nconst CometChatSmartRepliesView = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nconst CometChatAICardView = createComponent({\n tagName: 'cometchat-ai-card',\n elementClass: CometChatAICard,\n react: React\n});\n\nconst AISmartRepliesView = (props: IAISmartRepliesProps) => {\n\n const [messageListState, setMessageListState] = useState(States.loading);\n const [activeView, setActiveView] = useState(null);\n\n const {theme} = useContext(CometChatThemeContext)\n\n const errorStateText: string = localize(\"SOMETHING_WRONG\");\n const emptyStateText: string = localize(\"NO_MESSAGES_FOUND\");\n const loadingStateText: string = localize(\"GENERATING_REPLIES\");\n\n useEffect(() => {\n fetchButtonContent();\n }, []);\n\n function fetchButtonContent() {\n setMessageListState(States.loading);\n if (props && props.getSmartRepliesCallback) {\n props.getSmartRepliesCallback(theme).then(async (response) => {\n if (response) {\n setMessageListState(States.loaded);\n setActiveView(await getLoadedView(response));\n } else {\n setMessageListState(States.empty);\n }\n })\n .catch((err) => {\n setMessageListState(States.error);\n })\n }\n }\n\n /**\n * Create a view based on the value of the `state` prop.\n */\n function getStateView(): JSX.Element | null {\n let res: JSX.Element | null = null;\n switch (messageListState) {\n case States.loading:\n res = getLoadingView();\n break;\n case States.error:\n res = getErrorView();\n break;\n case States.empty:\n res = getEmptyView();\n break;\n case States.loaded:\n break;\n default:\n const x: never = messageListState;\n }\n return res;\n }\n\n /**\n * Creates the loading view\n */\n function getLoadingView(): JSX.Element {\n let LoadingView = props.configuration?.loadingStateView;\n return (\n \n { LoadingView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the error view\n */\n function getErrorView(): JSX.Element | null {\n let ErrorView = props.configuration?.errorStateView;\n return (\n \n { ErrorView ?
    {}
    : null }\n
    \n );\n }\n\n /**\n * Creates the empty view\n */\n function getEmptyView(): JSX.Element {\n let EmptyView = props.configuration?.emptyStateView;\n return (\n \n { EmptyView ?
    {}
    : null }\n
    \n );\n }\n \n /**\n * Creates the loaded view\n */\n async function getLoadedView(smartReplies: any): Promise {\n return new Promise((resolve, reject) =>{\n try{\n let CustomView = props.configuration?.customView;\n\n if (CustomView) {\n props.configuration?.customView!(smartReplies, props?.closeCallback, props?.backCallback).then((res: any) => {\n return resolve(res);\n })\n .catch((err: CometChat.CometChatException) => {\n return reject(err)\n })\n } else {\n let repliesArray: string[] = [];\n Object.keys(smartReplies).forEach((reply) => {\n if (smartReplies[reply] && smartReplies[reply] !== \"\") {\n repliesArray.push(smartReplies[reply]);\n }\n });\n let SmartRepliesView = (\n
    \n \n
    \n \n props.backCallback ? props.backCallback() : null\n }\n buttonStyle={getBackButtonStyle(\n props.configuration?.smartRepliesStyle,\n theme\n )}\n />\n
    \n
    {props.title}
    \n
    \n
    \n {\n props && props.editReplyCallback\n ? props.editReplyCallback(e?.detail?.reply)\n : null;\n props && props.closeCallback\n ? props.closeCallback()\n : null;\n }}\n key={\"smart-replies\"}\n closeIconURL=\"\"\n />\n \n );\n return resolve(SmartRepliesView);\n }\n }catch(e){\n reject(e);\n }\n })\n }\n\n return (\n \n
    \n {messageListState === States.loaded ? (\n
    \n {activeView}\n
    \n ) : null}\n {messageListState !== States.loaded ? getStateView() : null}\n
    \n \n );\n};\n\nAISmartRepliesView.defaultProps = defaultProps\nexport default AISmartRepliesView;\n","/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport React from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatMessageComposerAction,\n localize,\n CometChatActionsView,\n} from \"@cometchat/uikit-resources\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport AISmartRepliesView from \"./AISmartRepliesView\";\nimport { AIOptionsStyle, AISmartRepliesConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AISmartRepliesDecorator extends DataSourceDecorator {\n public configuration?: AISmartRepliesConfiguration;\n public newDataSource!: DataSource;\n public loggedInUser!: CometChat.User | null;\n public user!: CometChat.User;\n public group!: CometChat.Group;\n public theme: CometChatTheme = new CometChatTheme({});\n public buttonRef: any;\n public isModalClosed: boolean = true;\n private closeCallback?: () => void;\n\n constructor(\n dataSource: DataSource,\n configuration?: AISmartRepliesConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n setTimeout(() => {\n this.addMessageListener();\n }, 1000);\n }\n\n childRefCallback = (childRef: React.RefObject): void => {\n this.buttonRef = childRef\n };\n\n override getId(): string {\n return \"aismartreplies\";\n }\n\n editReply(reply: string) {\n CometChatUIEvents.ccComposeMessage.next(reply);\n }\n\n closeIfMessageReceived(message: CometChat.BaseMessage) {\n if (message?.getReceiverId() === this.loggedInUser?.getUid()) {\n if (this.closeCallback) {\n if (!this.isModalClosed) {\n this.closeCallback();\n this.isModalClosed = true;\n }\n\n }\n }\n }\n\n getSmartReplies = (theme?: CometChatTheme): Promise => {\n this.theme = theme ?? new CometChatTheme({});\n return new Promise(async (resolve, reject) => {\n try {\n let receiverId: string = this.user\n ? this.user?.getUid()\n : this.group?.getGuid();\n let receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let configuration;\n\n if (this.configuration?.apiConfiguration) {\n configuration = await this.configuration?.apiConfiguration(\n this.user,\n this.group\n );\n }\n const response: any = await CometChat.getSmartReplies(\n receiverId,\n receiverType,\n configuration ? configuration : {}\n );\n\n return resolve(response);\n } catch (e) {\n reject(e);\n }\n });\n };\n\n override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, aiOptionsStyle?: AIOptionsStyle): (CometChatMessageComposerAction | CometChatActionsView)[] {\n this.user = user!;\n this.group = group!;\n if (!id?.parentMessageId) {\n let style;\n if (aiOptionsStyle) {\n style = {\n titleColor: this.configuration?.smartRepliesStyle?.buttonTextColor || aiOptionsStyle?.listItemTextColor,\n titleFont: this.configuration?.smartRepliesStyle?.buttonTextFont || aiOptionsStyle?.listItemTextFont,\n background: this.configuration?.smartRepliesStyle?.buttonBackground || aiOptionsStyle?.listItemBackground\n }\n }\n const messageComposerActions: (CometChatMessageComposerAction | CometChatActionsView)[] = super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n\n let newAction: CometChatActionsView = new CometChatActionsView({\n title: localize(\"SUGGEST_A_REPLY\"),\n customView: (callback: any) => {\n\n this.isModalClosed = false;\n this.closeCallback = callback?.closePopover;\n return \n },\n id: \"ai-smart-replies\",\n iconURL: '',\n iconTint: '',\n titleColor: style?.titleColor,\n titleFont: style?.titleFont,\n background: style?.background,\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAIOptions(user, group, theme, id, aiOptionsStyle);\n }\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n });\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onMediaMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((message) => {\n this.closeIfMessageReceived(message);\n });\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { AIExtensionDataSource } from \"../../Shared/Framework/AIExtensionDataSource\";\nimport { AISmartRepliesDecorator } from \"./AISmartRepliesDecorator\";\nimport { AISmartRepliesConfiguration } from \"@cometchat/uikit-shared\";\n\nexport class AISmartRepliesExtension extends AIExtensionDataSource {\n private configuration?: AISmartRepliesConfiguration;\n\n constructor(configuration?: AISmartRepliesConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new AISmartRepliesDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return \"smart-replies\";\n }\n}","import { CSSProperties } from \"react\";\nexport const callScreenWrapperStyle = () => {\n return {\n width: \"100%\",\n height: \"100%\",\n inset: \"0\",\n } as CSSProperties;\n};\n","import {\n CallWorkflow,\n CometChatCallEvents,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { useCallback, useRef, useState } from \"react\";\n\nimport { CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitCalls } from \"@cometchat/uikit-shared\";\nimport { Hooks } from \"./hooks\";\nimport IncreaseSizeIcon from \"./assets/increase-size.svg\";\nimport ReduceSizeIcon from \"./assets/reduce-size.svg\";\nimport { callScreenWrapperStyle } from \"./style\";\n\ninterface IOngoingCallProps {\n callSettingsBuilder?: typeof CometChatUIKitCalls.CallSettings;\n sessionID: string;\n ongoingCallStyle?: CallscreenStyle;\n resizeIconHoverText?: string;\n minimizeIconURL?: string;\n maximizeIconURL?: string;\n onError?: Function;\n callWorkflow?: CallWorkflow;\n}\nconst defaultProps: IOngoingCallProps = {\n resizeIconHoverText: localize(\"RESIZE\"),\n sessionID: \"\",\n minimizeIconURL: ReduceSizeIcon,\n maximizeIconURL: IncreaseSizeIcon,\n callSettingsBuilder: undefined,\n ongoingCallStyle: {\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"grey\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: \"white\",\n maximizeIconTint: \"white\",\n },\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n callWorkflow: CallWorkflow.defaultCalling,\n};\n\nconst CometChatOngoingCall = (props: IOngoingCallProps) => {\n const [loggedInUser, setLoggedInuser] = useState(null);\n const callScreenFrameRef = useRef(null);\n\n const {\n resizeIconHoverText,\n sessionID,\n minimizeIconURL,\n maximizeIconURL,\n ongoingCallStyle,\n callSettingsBuilder,\n onError,\n callWorkflow,\n } = props;\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const getCallBuilder = useCallback((): any => {\n if (callSettingsBuilder) {\n return callSettingsBuilder;\n } else {\n let audioOnlyCall: boolean = false;\n const callSettings: any = new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (callWorkflow === CallWorkflow.defaultCalling) {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n }\n },\n onCallEndButtonPressed: () => {\n if (callWorkflow === CallWorkflow.defaultCalling) {\n CometChat.endCall(sessionID)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n })\n .catch((err: CometChat.CometChatException) => {\n onErrorCallback(err);\n });\n } else {\n CometChatCallEvents.ccCallEnded.next(null as any);\n CometChatUIKitCalls.endSession();\n }\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n )\n .build();\n return callSettings;\n }\n }, [callSettingsBuilder, callWorkflow, onErrorCallback, sessionID]);\n\n const startCall = useCallback(() => {\n // const ccCallScreenRef = document.getElementById(\"cc-callscreen_ref\");\n if (loggedInUser) {\n const authToken = loggedInUser!.getAuthToken();\n\n CometChatUIKitCalls.generateToken(sessionID, authToken).then(\n (res: any) => {\n CometChatUIKitCalls.startSession(\n res?.token,\n getCallBuilder(),\n callScreenFrameRef.current\n );\n },\n (err: any) => {\n onErrorCallback(err);\n }\n );\n } else {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n const authToken = user!.getAuthToken();\n\n CometChatUIKitCalls.generateToken(sessionID, authToken).then(\n (res: any) => {\n CometChatUIKitCalls.startSession(\n res?.token,\n getCallBuilder(),\n callScreenFrameRef.current\n );\n },\n (err: any) => {\n onErrorCallback(err);\n }\n );\n });\n }\n }, [sessionID, getCallBuilder, loggedInUser, onErrorCallback]);\n\n Hooks(setLoggedInuser, sessionID, startCall);\n return sessionID !== \"\" ? (\n \n \n \n ) : (\n <>\n );\n};\n\nCometChatOngoingCall.defaultProps = defaultProps;\nexport { CometChatOngoingCall };\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2019.2V13.8H4.80005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.8%204.8V10.2H19.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.2%2013.8L3%2021%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%208.4V3H15.6%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3%2015.6V21H8.4%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M21%203L13.8%2010.2%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","import { useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n\tsetLoggedInUser: any,\n sessionID: string,\n startCall: any,\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user: CometChat.User | null)=>{\n if(user){\n setLoggedInUser(user);\n }\n }\n )\n }, [setLoggedInUser]\n );\n\n useEffect(\n () => {\n if(sessionID !== \"\"){\n startCall();\n \n }\n }, [sessionID, startCall]\n )\n}\n\nexport { Hooks };","import { CallButtonsStyle, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport {CSSProperties} from \"react\";\n\nexport const CallButtonsWrapperStyle = (callButtonStyle : CallButtonsStyle) => {\n return {\n height: callButtonStyle?.height,\n width: callButtonStyle?.width,\n background: callButtonStyle?.background,\n border: callButtonStyle?.border,\n borderRadius: callButtonStyle?.borderRadius,\n display: 'flex',\n justifyContent: 'center'\n }\n}\n\nexport const outgoingCallStyle: OutgoingCallStyle = {\n width: \"360px\",\n height: \"581px\",\n titleTextFont: \"700 22px Inter\",\n titleTextColor: \"RGB(20, 20, 20)\",\n subtitleTextFont: \"400 15px Inter\",\n subtitleTextColor: \"RGBA(20, 20, 20, 0.58)\",\n borderRadius: \"8px\"\n}\n\nexport const buttonStyle = {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n}\n\nexport const defaultCallsButtonStyle = (theme: CometChatTheme) : CallButtonsStyle => { \n return new CallButtonsStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n voiceCallIconTint: theme.palette.getPrimary(),\n videoCallIconTint: theme.palette.getPrimary(),\n voiceCallIconTextFont: fontHelper(theme.typography.caption1),\n videoCallIconTextFont: fontHelper(theme.typography.caption1),\n voiceCallIconTextColor: theme.palette.getPrimary(),\n videoCallIconTextColor: theme.palette.getPrimary(),\n buttonPadding: \"8px 32px\",\n buttonBackground: theme.palette.getAccent100(),\n buttonBorder: \"0\",\n buttonBorderRadius: \"8px\"\n })\n}\n\nexport const ongoingCallStyle = (theme: CometChatTheme): CallscreenStyle => {\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n}\n\nexport const getVoiceCallButtonTint = (disableButtons : boolean, callButtonStyle : CallButtonsStyle | undefined, theme : CometChatTheme) => {\n return disableButtons ? theme.palette.getAccent600() : callButtonStyle?.voiceCallIconTint\n}\n\nexport const getVideoCallButtonTint = (disableButtons : boolean, callButtonStyle : CallButtonsStyle | undefined, theme : CometChatTheme) => {\n return disableButtons ? theme.palette.getAccent600() : callButtonStyle?.videoCallIconTint\n}\n\nexport const VideoCallButtonStyle = (callButtonStyle : CallButtonsStyle | undefined) => {\n return {\n buttonIconTint: callButtonStyle?.videoCallIconTint ?? \"RGB(51, 153, 255)\",\n buttonTextFont: callButtonStyle?.videoCallIconTextFont ?? \"400 12px Inter\",\n buttonTextColor: callButtonStyle?.videoCallIconTextColor ?? \"RGB(51, 153, 255)\",\n padding: callButtonStyle?.buttonPadding ?? \"8px 32px\",\n background:callButtonStyle?.buttonBackground ?? \"transparent\",\n border:callButtonStyle?.border ?? \"none\",\n borderRadius:callButtonStyle?.buttonBorderRadius ?? \"0\",\n ...buttonStyle\n } as CSSProperties\n}\n\nexport const VoiceCallButtonStyle = (callButtonStyle : CallButtonsStyle | undefined) => {\n return {\n buttonIconTint: callButtonStyle?.voiceCallIconTint ?? \"RGB(51, 153, 255)\",\n buttonTextFont: callButtonStyle?.voiceCallIconTextFont ?? \"400 12px Inter\",\n buttonTextColor: callButtonStyle?.voiceCallIconTextColor ?? \"RGB(51, 153, 255)\",\n padding: callButtonStyle?.buttonPadding ?? \"8px 32px\",\n background: callButtonStyle?.buttonBackground ?? \"transparent\",\n border: callButtonStyle?.border ?? \"none\",\n borderRadius: callButtonStyle?.buttonBorderRadius ?? \"0\",\n ...buttonStyle\n } as CSSProperties\n}","import { AvatarStyle, CardStyle } from \"@cometchat/uikit-elements\";\nimport { OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport const OutgoingCallWrapperStyle = (outgoingCallStyle : OutgoingCallStyle) => {\n return {\n height: outgoingCallStyle?.height,\n width: outgoingCallStyle?.width,\n background: outgoingCallStyle?.background,\n border: outgoingCallStyle?.border,\n borderRadius: outgoingCallStyle?.borderRadius\n }\n}\n\nexport const OutgoingCallSubtitleStyle = (outgoingCallStyle : OutgoingCallStyle) => {\n return {\n textFont: outgoingCallStyle?.subtitleTextFont,\n textColor: outgoingCallStyle?.subtitleTextColor\n }\n}\n\nexport const OutgoingCallCancelButtonStyle = (outgoingCallStyle : OutgoingCallStyle) => { \n return {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: outgoingCallStyle?.declineButtonTextFont,\n buttonTextColor: outgoingCallStyle?.declineButtonTextColor,\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: outgoingCallStyle?.declineButtonIconTint,\n background: \"\",\n iconBackground: outgoingCallStyle?.declineButtonIconBackground\n }\n}\n\nexport const buttonStyle = {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: \"400 12px Inter\",\n buttonTextColor: \"RGBA(20, 20, 20, 0.58)\",\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: \"white\",\n background: \"\",\n iconBackground: \"red\"\n};\n\nexport const OutgoingCallCardStyle: CardStyle = {\n height: \"100%\",\n width: \"100%\",\n border: \"inherite\",\n borderRadius: \"inherite\",\n background: \"transparent\",\n titleFont: \"700 22px Inter\",\n titleColor: \"black\",\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme) : AvatarStyle => {\n return new AvatarStyle(\n {\n borderRadius: \"50%\",\n width: \"180px\",\n height: \"180px\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n }\n );\n}\n\nexport const defaultOutgoingCallStyle = (theme: CometChatTheme): OutgoingCallStyle =>{\n return new OutgoingCallStyle(\n {\n width: \"100%\",\n height: \"100%\",\n background: theme.palette.getBackground(),\n border: \"none\",\n borderRadius: \"0\",\n titleTextFont: fontHelper(theme.typography.title1),\n titleTextColor: theme.palette.getAccent(),\n subtitleTextFont: fontHelper(theme.typography.subtitle1),\n subtitleTextColor: theme.palette.getAccent600(),\n declineButtonTextFont:fontHelper(theme.typography.caption1),\n declineButtonTextColor:theme.palette.getAccent600(),\n declineButtonIconTint:theme.palette.getAccent(\"dark\"),\n declineButtonIconBackground:theme.palette.getError()\n }\n );\n} ","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CSSProperties, useCallback, useContext, useRef } from \"react\";\nimport { CometChatSoundManager, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatUIKitConstants, IconButtonAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { OutgoingCallCancelButtonStyle, OutgoingCallCardStyle, OutgoingCallSubtitleStyle, OutgoingCallWrapperStyle, buttonStyle, defaultAvatarStyle, defaultOutgoingCallStyle } from \"./style\";\n\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport Close2xIcon from './assets/close2x.svg';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\n\ninterface IOutgoingCallProps {\n call: CometChat.Call,\n disableSoundForCalls?: boolean,\n customSoundForCalls?: string,\n declineButtonText?: string,\n declineButtonIconURL?: string,\n customView?: any,\n onError?: Function,\n avatarStyle?: AvatarStyle,\n outgoingCallStyle?: OutgoingCallStyle,\n onCloseClicked?: Function\n}\n\ntype IconButtonStyle = CSSProperties & Partial<{\n buttonTextFont : string,\n buttonTextColor : string,\n iconTint : string,\n iconBackground : string,\n}>;\n\nconst CometChatOutgoingCall = (props: IOutgoingCallProps) => {\n \n const {\n call,\n disableSoundForCalls = false,\n customSoundForCalls = \"\",\n declineButtonText = localize(\"CANCEL\"),\n declineButtonIconURL = Close2xIcon,\n customView = null,\n onError = (error: CometChat.CometChatException) => { console.log(error); },\n avatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"180px\",\n height: \"180px\",\n }),\n outgoingCallStyle = new OutgoingCallStyle({\n width: \"100%\",\n height: \"100%\",\n titleTextFont: \"700 22px Inter\",\n titleTextColor: \"RGB(20, 20, 20)\",\n subtitleTextFont: \"400 15px Inter\",\n subtitleTextColor: \"RGBA(20, 20, 20, 0.58)\",\n declineButtonTextFont:\"400 12px Inter\",\n declineButtonTextColor:\"RGBA(20, 20, 20, 0.58)\",\n declineButtonIconTint:\"white\",\n declineButtonIconBackground:\"red\"\n }),\n onCloseClicked = () => {}\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const iconAlignment: IconButtonAlignment = IconButtonAlignment.top;\n \n const avatarStyleRef = useRef(avatarStyle);\n const outgoingCallStyleRef = useRef(outgoingCallStyle);\n const buttonStyleRef = useRef(buttonStyle);\n const callRef = useRef(null);\n const cancelCallButtonRef = useRef(null);\n\n callRef.current = call;\n\n avatarStyleRef.current = { ...defaultAvatarStyle(theme), ...avatarStyleRef?.current };\n\n outgoingCallStyleRef.current = { ...defaultOutgoingCallStyle(theme), ...outgoingCallStyleRef?.current };\n\n buttonStyleRef.current = OutgoingCallCancelButtonStyle(outgoingCallStyleRef?.current);\n\n OutgoingCallCardStyle.titleColor = outgoingCallStyleRef?.current?.titleTextColor;\n OutgoingCallCardStyle.titleFont = outgoingCallStyleRef?.current?.titleTextFont;\n \n let subtitleText: string = localize(\"CALLING\");\n\n const onErrorCallback = useCallback((error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details\n }\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n }, [onError]);\n\n const onClose = useCallback(() => {\n try{\n CometChatSoundManager.pause();\n if (onCloseClicked) {\n onCloseClicked();\n }\n }catch(e){\n onErrorCallback(e);\n }\n }, [onCloseClicked, onErrorCallback])\n\n const getAvatarURL = () => {\n return callRef.current?.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user ? (callRef.current?.getReceiver() as CometChat.User)?.getAvatar() : (callRef.current?.getReceiver() as CometChat.Group)?.getIcon();\n }\n\n const playAudio = useCallback(() => {\n try{\n if(!disableSoundForCalls){\n if (customSoundForCalls) {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall, customSoundForCalls)\n } else {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall)\n }\n }\n }catch(e){\n onErrorCallback(e);\n }\n }, [disableSoundForCalls, customSoundForCalls, onErrorCallback])\n\n Hooks(\n playAudio, \n call, \n onClose, \n cancelCallButtonRef\n );\n\n return (\n <>\n
    \n {\n customView ? \n
    \n {customView}\n
    :\n callRef.current ?\n \n \n
    \n \n
    \n
    :\n null\n }\n
    \n \n );\n};\n\nexport { CometChatOutgoingCall };","import { useEffect } from \"react\";\nimport { CometChatSoundManager } from \"@cometchat/uikit-shared\";\n\nfunction Hooks(\n playAudio: Function,\n\tcall: any,\n\tonClose: Function,\n cancelCallButtonRef: any\n) {\n useEffect(\n () => {\n return () => {\n CometChatSoundManager.pause();\n }\n }, []\n );\n\n useEffect(\n () => {\n setTimeout(() => {\n playAudio();\n });\n return () => {\n CometChatSoundManager.pause();\n }\n }, [call, playAudio]\n );\n\n useEffect(\n () => {\n const cancleCallButton = cancelCallButtonRef.current;\n if(!cancleCallButton) return;\n cancleCallButton.addEventListener(\"cc-button-clicked\", onClose);\n return () => {\n cancleCallButton.removeEventListener(\"cc-button-clicked\", onClose);\n }\n }, [onClose, cancelCallButtonRef]\n );\n\n}\n\nexport { Hooks };","import { CSSProperties, useCallback, useContext, useRef, useState } from \"react\";\nimport { CallButtonsStyle, CometChatSoundManager, CometChatUIKitCalls, CometChatUIKitUtility, StorageUtils } from \"@cometchat/uikit-shared\";\nimport {\n CallButtonsWrapperStyle,\n VideoCallButtonStyle,\n VoiceCallButtonStyle,\n defaultCallsButtonStyle,\n getVideoCallButtonTint,\n getVoiceCallButtonTint,\n ongoingCallStyle,\n outgoingCallStyle,\n} from \"./style\";\nimport { CometChatCallEvents, CometChatMessageEvents, CometChatUIKitConstants, MessageStatus, localize } from \"@cometchat/uikit-resources\";\n\nimport AudioCall2xIcon from \"./assets/Audio-Call2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatOutgoingCall } from \"../CometChatOutgoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport VideoCall2xIcon from \"./assets/VideoCall2xIcon.svg\";\nimport { useRefSync } from \"../../CometChatCustomHooks\";\n\ninterface ICallButtonsBaseProps {\n voiceCallIconURL?: string;\n voiceCallIconText?: string;\n voiceCallIconHoverText?: string;\n videoCallIconURL?: string;\n videoCallIconText?: string;\n videoCallIconHoverText?: string;\n callButtonsStyle?: CallButtonsStyle;\n onVoiceCallClick?: () => void;\n onVideoCallClick?: () => void;\n onError?: (error: CometChat.CometChatException) => void;\n}\n\ninterface ICallButtonsUserProps extends ICallButtonsBaseProps {\n user: CometChat.User;\n group?: CometChat.Group | null;\n}\n\ninterface ICallButtonsGroupProps extends ICallButtonsBaseProps {\n user?: CometChat.User | null;\n group: CometChat.Group;\n}\n\ntype ICallButtonsProps = ICallButtonsUserProps | ICallButtonsGroupProps\n\ntype ButtonStyle = CSSProperties & {\n buttonIconTint?: string;\n buttonTextFont?: string;\n buttonTextColor?: string;\n};\n\nconst defaultProps = {\n voiceCallIconURL: AudioCall2xIcon,\n voiceCallIconText: localize(\"VOICE_CALL\"),\n voiceCallIconHoverText: localize(\"VOICE_CALL\"),\n videoCallIconURL: VideoCall2xIcon,\n videoCallIconText: localize(\"VIDEO_CALL\"),\n videoCallIconHoverText: localize(\"VIDEO_CALL\"),\n callButtonsStyle: {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n },\n onVoiceCallClick: undefined,\n onVideoCallClick: undefined,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n};\n\nconst CometChatCallButtons = (props: ICallButtonsProps) => {\n const {\n user,\n group,\n voiceCallIconURL,\n voiceCallIconText,\n voiceCallIconHoverText,\n videoCallIconURL,\n videoCallIconText,\n videoCallIconHoverText,\n callButtonsStyle,\n onVoiceCallClick,\n onVideoCallClick,\n onError,\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [loggedInUser, setLoggedInuser] = useState(null);\n\n const callButtonStyleRef = useRef(null);\n callButtonStyleRef.current = {\n ...defaultCallsButtonStyle(theme),\n ...callButtonsStyle,\n };\n\n const voiceCallButtonStyleRef = useRef(null);\n\n voiceCallButtonStyleRef.current = VoiceCallButtonStyle(\n callButtonStyleRef?.current\n );\n\n const videoCallButtonStyleRef = useRef(null);\n\n videoCallButtonStyleRef.current = VideoCallButtonStyle(\n callButtonStyleRef?.current\n );\n\n const [activeUser, setActiveUser] = useState(user);\n const [activeGroup, setActiveGroup] = useState(group);\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const [showOutgoingCallScreen, setShowOutgoingCallScreen] = useState(false);\n const [disableButtons, setDisableButtons] = useState(false);\n\n const audioCallButtonRef = useRef(null);\n const videoCallButtonRef = useRef(null);\n const callRef = useRef(null);\n const sessionIdRef = useRef(\"\");\n\n const onVoiceCallClickRef = useRefSync(onVoiceCallClick);\n const onVideoCallClickRef = useRefSync(onVideoCallClick);\n\n let callbuttonsListenerId: string = \"callbuttons_\" + new Date().getTime();\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallRejected = CometChatCallEvents.ccCallRejected.subscribe(\n () => {\n setDisableButtons(false);\n }\n );\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n () => {\n setDisableButtons(true);\n }\n );\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(() => {\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n setShowOngoingCall(false);\n setShowOutgoingCallScreen(false);\n });\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n ccCallRejected?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n } catch (e) {\n onErrorCallback(e);\n }\n };\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const attachListeners = useCallback(() => {\n try {\n CometChat.addCallListener(\n callbuttonsListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: () => {\n setDisableButtons(true);\n },\n onIncomingCallCancelled: () => {\n setDisableButtons(false);\n },\n onOutgoingCallRejected: () => {\n setShowOutgoingCallScreen(false);\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n },\n onOutgoingCallAccepted: (call: CometChat.Call) => {\n if (call.getSender()?.getUid() === loggedInUser?.getUid()\n || call.getSessionId() !== callRef.current?.getSessionId()\n ) {\n setShowOutgoingCallScreen(false);\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n return;\n }\n setShowOutgoingCallScreen(false);\n setShowOngoingCall(true);\n setDisableButtons(true);\n callRef.current = call;\n sessionIdRef.current = call.getSessionId();\n },\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback, callbuttonsListenerId]);\n\n const removeListener = useCallback(() => {\n try {\n CometChat.removeCallListener(callbuttonsListenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback, callbuttonsListenerId]);\n\n const closeCallScreen = () => {\n setDisableButtons(false);\n callRef.current = null;\n sessionIdRef.current = \"\";\n setShowOngoingCall(false);\n setShowOutgoingCallScreen(false);\n };\n\n function getCallBuilder(): typeof CometChatUIKitCalls.CallSettings {\n let audioOnlyCall: boolean =\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? true\n : false;\n\n const sessionId = sessionIdRef.current;\n\n return new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n closeCallScreen();\n }\n },\n onCallEndButtonPressed: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChat.endCall(sessionId)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n closeCallScreen()\n })\n .catch((err: CometChat.CometChatException) => {\n onErrorCallback(err);\n });\n }else{\n closeCallScreen();\n }\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n )\n .build();\n }\n\n const initiateCall = useCallback(\n (type: string) => {\n try {\n const receiverType: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n\n const receiverId: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n\n const callObj: CometChat.Call = new CometChat.Call(\n receiverId,\n type,\n receiverType\n );\n\n CometChat.initiateCall(callObj).then(\n (outgoingCall: CometChat.Call) => {\n callRef.current = outgoingCall;\n setShowOutgoingCallScreen(true);\n CometChatCallEvents.ccOutgoingCall.next(outgoingCall);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [activeUser, activeGroup, onErrorCallback]\n );\n\n const initiateAudioCall = useCallback(() => {\n try {\n if (activeUser) {\n initiateCall(CometChatUIKitConstants.MessageTypes.audio);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, initiateCall, onErrorCallback]);\n\n const sendCustomMessage = useCallback(() => {\n try {\n const receiverType: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n\n const receiverId: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n const sessionID = sessionIdRef.current;\n\n const customData = {\n sessionID: sessionID,\n sessionId: sessionID,\n callType: CometChatUIKitConstants.MessageTypes.video,\n };\n\n const customType = CometChatUIKitConstants.calls.meeting;\n const conversationId = `group_${sessionID}`;\n\n const customMessage: any = new CometChat.CustomMessage(\n receiverId,\n receiverType,\n customType,\n customData\n );\n\n customMessage.setMetadata({ incrementUnreadCount: true });\n customMessage.shouldUpdateConversation(true);\n customMessage.setSender(loggedInUser);\n customMessage.setConversationId(conversationId);\n customMessage.sentAt = CometChatUIKitUtility.getUnixTimestamp();\n customMessage.muid = CometChatUIKitUtility.ID();\n\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.inprogress,\n });\n\n CometChat.sendCustomMessage(customMessage).then(\n (m) => {\n CometChatMessageEvents.ccMessageSent.next({\n message: m,\n status: MessageStatus.success,\n });\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, activeGroup, loggedInUser, onErrorCallback]);\n\n const initiateVideoCall = useCallback(() => {\n try {\n if (activeUser) {\n initiateCall(CometChatUIKitConstants.MessageTypes.video);\n }\n if (activeGroup) {\n sessionIdRef.current = activeGroup?.getGuid();\n sendCustomMessage();\n setShowOngoingCall(true);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [activeUser, activeGroup, sendCustomMessage, onErrorCallback, initiateCall]);\n\n const cancelOutgoingCall = useCallback(() => {\n const call = callRef.current;\n if (!call) {\n return;\n }\n try {\n CometChatSoundManager.pause();\n CometChat.rejectCall(\n call.getSessionId(),\n CometChatUIKitConstants.calls.cancelled\n ).then(\n (call: CometChat.Call) => {\n setDisableButtons(false);\n setShowOutgoingCallScreen(false);\n CometChatCallEvents.ccCallRejected.next(call);\n callRef.current = null;\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n setShowOutgoingCallScreen(false);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const getVoiceCallButtonStyle = useCallback(() => {\n if (!voiceCallButtonStyleRef.current) {\n return;\n }\n voiceCallButtonStyleRef.current.buttonIconTint = getVoiceCallButtonTint(\n disableButtons,\n callButtonStyleRef.current ?? undefined,\n theme\n );\n return voiceCallButtonStyleRef.current;\n }, [disableButtons, theme]);\n\n const getVideoCallButtonStyle = useCallback(() => {\n if (!videoCallButtonStyleRef.current) {\n return;\n }\n videoCallButtonStyleRef.current.buttonIconTint = getVideoCallButtonTint(\n disableButtons,\n callButtonStyleRef.current ?? undefined,\n theme\n );\n return videoCallButtonStyleRef.current;\n }, [disableButtons, theme]);\n\n Hooks(\n loggedInUser,\n setLoggedInuser,\n user,\n group,\n subscribeToEvents,\n onErrorCallback,\n attachListeners,\n removeListener,\n setActiveUser,\n setActiveGroup,\n audioCallButtonRef,\n videoCallButtonRef,\n initiateAudioCall,\n initiateVideoCall,\n disableButtons,\n onVoiceCallClickRef,\n onVideoCallClickRef\n );\n\n const ccBtnDisabledPropSpreadObject = disableButtons\n ? { disabled: true }\n : {};\n return (\n <>\n \n \n {activeUser ? (\n \n ) : null}\n\n {activeUser || activeGroup ? (\n \n ) : null}\n \n \n\n {showOngoingCall && sessionIdRef.current != null ? (\n \n ) : null}\n\n {showOutgoingCallScreen && callRef.current ? (\n \n \n \n ) : null}\n \n );\n};\n\nCometChatCallButtons.defaultProps = defaultProps;\nexport { CometChatCallButtons };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n user: any,\n group: any,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n attachListeners: Function,\n removeListener: Function,\n setActiveUser: any,\n setActiveGroup: any,\n audioCallButtonRef: any,\n videoCallButtonRef: any,\n initiateAudioCall: Function,\n initiateVideoCall: Function,\n disableButtons: boolean,\n onVoiceCallClickRef : React.MutableRefObject,\n onVideoCallClickRef : React.MutableRefObject\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null) => {\n if(user){\n setLoggedInUser(user);\n }\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }, [setLoggedInUser, onErrorCallback]\n )\n \n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n attachListeners();\n }\n return () => {\n unsubscribeFromEvents?.();\n removeListener();\n }\n }, [loggedInUser, attachListeners, removeListener, subscribeToEvents])\n \n useEffect(\n () => {\n if(user){\n setActiveUser(user);\n setActiveGroup(null);\n }\n }, [user, setActiveUser, setActiveGroup]\n )\n \n useEffect(\n () => {\n if(group){\n setActiveUser(null);\n setActiveGroup(group);\n }\n }, [group, setActiveUser, setActiveGroup]\n )\n\n useEffect(\n () => {\n const audioCallButton = audioCallButtonRef.current;\n const videoCallButton = videoCallButtonRef.current;\n\n if(!audioCallButton && !videoCallButton) return;\n\n const audioCallButtonClicked = () => {\n const onVoiceCallClick = onVoiceCallClickRef.current;\n if (onVoiceCallClick) {\n onVoiceCallClick();\n }\n else {\n initiateAudioCall();\n }\n } \n\n const videoCallButtonClicked = () => {\n const onVideoCallClick = onVideoCallClickRef.current;\n if (onVideoCallClick) {\n onVideoCallClick();\n }\n else {\n initiateVideoCall();\n }\n }\n\n if(!disableButtons){\n audioCallButton?.addEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.addEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }else{\n audioCallButton?.removeEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.removeEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }\n\n return () => {\n audioCallButton?.removeEventListener(\"cc-button-clicked\", audioCallButtonClicked);\n videoCallButton?.removeEventListener(\"cc-button-clicked\", videoCallButtonClicked);\n }\n }, [disableButtons, initiateAudioCall, initiateVideoCall, onVoiceCallClickRef, onVideoCallClickRef, audioCallButtonRef, videoCallButtonRef]\n )\n\n}\n\nexport { Hooks };","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n localize,\n DocumentIconAlignment,\n fontHelper,\n CometChatUIEvents,\n CometChatLocalize,\n MessageBubbleAlignment,\n CallWorkflow,\n} from \"@cometchat/uikit-resources\";\nimport {\n CallingDetailsUtils,\n CallButtonsStyle,\n CometChatUIKitCalls,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport {\n CometChatDocumentBubble,\n CometChatIconButton,\n CallscreenStyle,\n} from \"@cometchat/uikit-elements\";\nimport React from \"react\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { DataSource } from \"../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../Shared/Framework/DataSourceDecorator\";\nimport { CometChatOngoingCall } from \"./CometChatOngoingCall\";\nimport { CometChatCallButtons } from \"./CometChatCallButtons\";\nimport AudioCallIcon from \"./assets/Audio-Call.svg\";\nimport VideoCallIcon from \"./assets/Video-call.svg\";\nimport VideoCall2xIcon from \"./assets/Video-call2x.svg\";\n\nconst CallingConstants = Object.freeze({\n meeting: \"meeting\",\n ongoing: \"ongoing\",\n ended: \"ended\",\n initiated: \"initiated\",\n cancelled: \"cancelled\",\n rejected: \"rejected\",\n unanswered: \"unanswered\",\n});\n\nconst CometChatDefaultCallBubble = createComponent({\n tagName: \"cometchat-icon-button\",\n elementClass: CometChatIconButton,\n react: React,\n});\n\nexport class CallingExtensionDecorator extends DataSourceDecorator {\n public theme!: CometChatTheme;\n public loggedInUser: CometChat.User | null = null;\n\n constructor(dataSource: DataSource) {\n super(dataSource);\n this.addLoginListener();\n this.getLoggedInUser();\n }\n\n addLoginListener() {\n var listenerID: string = \"login_listener\";\n CometChat.addLoginListener(\n listenerID,\n new CometChat.LoginListener({\n logoutSuccess: () => {\n try {\n let call: CometChat.Call = CometChat.getActiveCall();\n if (call) {\n CometChat.endCall(call.getSessionId());\n }\n } catch (error) {\n console.log(\"error in endCall on logout\", error);\n }\n },\n })\n );\n }\n\n async getLoggedInUser() {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(CallingConstants.meeting)) {\n types.push(CallingConstants.meeting);\n }\n if (!types.includes(CometChatUIKitConstants.MessageTypes.audio)) {\n types.push(CometChatUIKitConstants.MessageTypes.audio);\n }\n if (!types.includes(CometChatUIKitConstants.MessageTypes.video)) {\n types.push(CometChatUIKitConstants.MessageTypes.video);\n }\n return types;\n }\n\n override getId(): string {\n return \"calling\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.call)) {\n categories.push(CometChatUIKitConstants.MessageCategory.call);\n }\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateTypeExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n checkIfTemplateCategoryExist(\n template: CometChatMessageTemplate[],\n category: string\n ): boolean {\n return template.some((obj) => obj.category === category);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n _theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateTypeExist(templates, CallingConstants.meeting)) {\n templates.push(this.getDirectCallTemplate(this.theme));\n }\n if (\n !this.checkIfTemplateCategoryExist(\n templates,\n CometChatUIKitConstants.MessageCategory.call\n )\n ) {\n templates.push(...this.getDefaultCallTemplate(this.theme));\n }\n return templates;\n }\n\n getDirectCallTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CallingConstants.meeting,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n if (message.getDeletedAt()) {\n return super.getDeleteMessageBubble(message, this.theme)\n }\n return this.getDirectCallMessageBubble(\n message as CometChat.CustomMessage,\n _alignment,\n _theme\n );\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return ChatConfigurator.getDataSource().getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getDefaultCallTemplate(_theme: CometChatTheme): CometChatMessageTemplate[] {\n let templates: CometChatMessageTemplate[] = [\n new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.audio,\n category: CometChatUIKitConstants.MessageCategory.call,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getDefaultAudioCallMessageBubble(\n message as CometChat.Call,\n _alignment,\n _theme\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n }),\n new CometChatMessageTemplate({\n type: CometChatUIKitConstants.MessageTypes.video,\n category: CometChatUIKitConstants.MessageCategory.call,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return this.getDefaultVideoCallMessageBubble(\n message as CometChat.Call,\n _alignment,\n _theme\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n }),\n ];\n return templates;\n }\n\n getCallBubbleStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment === MessageBubbleAlignment.left;\n if (!isLeftAligned) {\n return {\n titleFont: fontHelper(_theme.typography.text2),\n titleColor: _theme.palette.getAccent(\"dark\"),\n iconTint: _theme.palette.getAccent(\"dark\"),\n buttonTextFont: fontHelper(_theme.typography.text2),\n buttonTextColor: _theme.palette.getPrimary(),\n buttonBackground: _theme.palette.getAccent(\"dark\"),\n width: \"240px\",\n background: _theme.palette.getPrimary(),\n borderRadius: \"12px\",\n };\n } else {\n return {\n titleFont: fontHelper(_theme.typography.text2),\n titleColor: _theme.palette.getAccent(),\n iconTint: _theme.palette.getPrimary(),\n buttonTextFont: fontHelper(_theme.typography.text2),\n buttonTextColor: _theme.palette.getAccent(\"dark\"),\n buttonBackground: _theme.palette.getPrimary(),\n width: \"240px\",\n borderRadius: \"12px\",\n };\n }\n }\n\n getSessionId(_message: CometChat.CustomMessage) {\n let data = _message.getData();\n return data?.customData?.sessionID;\n }\n\n getCallBubbleTitle(_message: CometChat.CustomMessage) {\n if (\n !_message.getSender() ||\n _message.getSender().getUid() === this.loggedInUser?.getUid()\n ) {\n return localize(\"YOU_INITIATED_GROUP_CALL\");\n } else {\n return `${_message.getSender().getName()} ${localize(\n \"INITIATED_GROUP_CALL\"\n )}`;\n }\n }\n\n getDirectCallMessageBubble(\n _message: CometChat.CustomMessage,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n let callBubbleAlignment: DocumentIconAlignment = DocumentIconAlignment.left;\n let callBubbleStyle = this.getCallBubbleStyle(_alignment, _theme);\n let sessionId = this.getSessionId(_message);\n let directCallIconURL = VideoCall2xIcon;\n let callBubbleTitle = this.getCallBubbleTitle(_message);\n let joinCallButtonText = localize(\"JOIN\");\n\n const CometChatDirectCallBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n });\n\n return (\n {\n this.startDirectCall(sessionId, this.theme || _theme);\n }}\n />\n );\n }\n\n startDirectCall(sessionId: string, theme: CometChatTheme) {\n const style = new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n const ongoingCallScreen = (\n \n );\n CometChatUIEvents.ccShowOngoingCall.next({ child: ongoingCallScreen });\n }\n\n callStatusStyle(_message: CometChat.Call, theme: CometChatTheme) {\n\n if (this.loggedInUser) {\n\n return {\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: CallingDetailsUtils.isMissedCall(\n _message,\n this.loggedInUser\n )\n ? theme.palette.getError()\n : theme.palette.getAccent600(),\n borderRadius: \"10px\",\n border: CallingDetailsUtils.isMissedCall(_message, this.loggedInUser)\n ? `1px solid RGBA(255, 59, 48, 0.2)`\n : `1px solid ${theme.palette.getAccent100()}`,\n buttonIconTint: CallingDetailsUtils.isMissedCall(\n _message,\n this.loggedInUser\n )\n ? theme.palette.getError()\n : theme.palette.getAccent600(),\n background: \"transparent\",\n iconBackground: \"transparent\",\n padding: \"2px 12px 2px 0\",\n gap: \"0\",\n height: \"25px\",\n justifyContent: \"center\",\n };\n }\n return {};\n }\n\n getCallActionMessage(_message: CometChat.Call) {\n return CallingDetailsUtils.getCallStatus(_message, this.loggedInUser!);\n }\n\n getDefaultAudioCallMessageBubble(\n _message: CometChat.Call,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const style = this.callStatusStyle(_message, _theme);\n const actionMessage = this.getCallActionMessage(_message);\n return (\n \n );\n }\n\n getDefaultVideoCallMessageBubble(\n _message: CometChat.Call,\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const style = this.callStatusStyle(_message, _theme);\n const actionMessage = this.getCallActionMessage(_message);\n return (\n \n );\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalParams?: any\n ): string {\n let actionMessage: string = \"\";\n\n if (\n conversation.getLastMessage() &&\n conversation.getLastMessage().category ==\n CometChatUIKitConstants.MessageCategory.call\n ) {\n let call: CometChat.Call = conversation.getLastMessage();\n\n actionMessage = CallingDetailsUtils.getCallStatus(call, loggedInUser);\n } else if (\n conversation?.getLastMessage() &&\n conversation.getLastMessage().type ==\n CometChatUIKitConstants.calls.meeting\n ) {\n let message: CometChat.CustomMessage = conversation.getLastMessage();\n if (\n !message.getSender() ||\n message?.getSender()?.getUid() == loggedInUser.getUid()\n ) {\n actionMessage = localize(\"YOU_INITIATED_GROUP_CALL\");\n } else {\n actionMessage = `${message.getSender().getName()} ${localize(\n \"INITIATED_GROUP_CALL\"\n )}`;\n }\n\n let messageObject = conversation.getLastMessage();\n if (\n messageObject &&\n messageObject.getMentionedUsers().length &&\n messageObject instanceof CometChat.TextMessage &&\n additionalParams &&\n !additionalParams.disableMentions\n ) {\n actionMessage = this.getMentionsFormattedText(\n messageObject,\n actionMessage,\n additionalParams\n );\n }\n } else {\n actionMessage = super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalParams\n );\n }\n return actionMessage;\n }\n\n override getAuxiliaryHeaderMenu(\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n let auxMenus: Array = [];\n let style: CallButtonsStyle = {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonPadding: \"0\",\n buttonBackground: \"transparent\",\n buttonBorder: \"0 4px\",\n buttonBorderRadius: \"8px\",\n };\n let callButtons = (\n \n );\n auxMenus.push(callButtons);\n return auxMenus;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nabstract class ExtensionsDataSource {\n abstract addExtension(): void;\n abstract getExtensionId(): string;\n\n enable(): void {\n CometChat.isExtensionEnabled(this.getExtensionId()).then(\n (enabled: Boolean) => {\n if (enabled) this.addExtension();\n }, error => {}\n );\n }\n}\n\nexport { ExtensionsDataSource };\n","import { DataSource } from '../Shared/Framework/DataSource';\nimport { CallingExtensionDecorator } from './CallingExtensionDecorator';\nimport { ChatConfigurator } from '../Shared/Framework/ChatConfigurator';\nimport { ExtensionsDataSource } from '../Shared/Framework/ExtensionsDataSource';\n\nexport class CallingExtension extends ExtensionsDataSource {\n enable(): void {\n ChatConfigurator.enable((dataSource: DataSource) =>\n new CallingExtensionDecorator(dataSource)\n );\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new CallingExtensionDecorator(dataSource));\n }\n \n override getExtensionId(): string {\n return \"calling\";\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Document%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Document%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.019664%2C11.0497498%20C20.2968766%2C11.0497498%2019.6037718%2C11.3372517%2019.0931699%2C11.8488579%20L11.9722287%2C18.9696649%20C11.8675218%2C19.07437%2011.7961523%2C19.207727%2011.7671152%2C19.3529288%20L11.0671938%2C22.8529288%20C10.9622469%2C23.3777219%2011.4249469%2C23.8404018%2011.9497354%2C23.7354323%20L15.4493424%2C23.0354323%20C15.5945931%2C23.0063789%2015.7279879%2C22.9349647%2015.8327036%2C22.830196%20L22.9504376%2C15.7088627%20C24.0147495%2C14.6469387%2024.0170552%2C12.9221237%2022.9548584%2C11.8566265%20L22.9136114%2C11.8181375%20C22.4355563%2C11.3372517%2021.7424514%2C11.0497498%2021.019664%2C11.0497498%20Z%20M21.019664%2C12.5497498%20C21.2977603%2C12.5497498%2021.5660731%2C12.6445675%2021.7814054%2C12.816289%20L21.9254022%2C12.9466625%20L22.00838%2C13.0404351%20C22.3677898%2C13.4966868%2022.3370963%2C14.2018865%2021.890239%2C14.6477416%20L14.931%2C21.609%20L12.758%2C22.043%20L13.193%2C19.869%20L20.1543459%2C12.9090017%20C20.3840891%2C12.6788071%2020.6952184%2C12.5497498%2021.019664%2C12.5497498%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.3982707%2C1.25%20C18.5339913%2C1.25%2019.463993%2C2.13072139%2019.5427157%2C3.24645803%20L19.5481135%2C3.4%20L19.5481135%2C9.7%20C19.5481135%2C10.1142136%2019.2123271%2C10.45%2018.7981135%2C10.45%20C18.4184177%2C10.45%2018.1046226%2C10.1678461%2018.0549601%2C9.80177056%20L18.0481135%2C9.7%20L18.0481135%2C3.4%20C18.0481135%2C3.07363278%2017.8076479%2C2.80347042%2017.4942955%2C2.75704724%20L17.3982707%2C2.75%20L3.39984279%2C2.75%20C3.07358878%2C2.75%202.80346372%2C2.99049261%202.75704639%2C3.30394351%20L2.75%2C3.4%20L2.75%2C18.8%20C2.75%2C19.1263672%202.99046561%2C19.3965296%203.30381804%2C19.4429528%20L3.39984279%2C19.45%20L8.99921396%2C19.45%20C9.41342753%2C19.45%209.74921396%2C19.7857864%209.74921396%2C20.2%20C9.74921396%2C20.5796958%209.46706008%2C20.893491%209.10098452%2C20.9431534%20L8.99921396%2C20.95%20L3.39984279%2C20.95%20C2.26412221%2C20.95%201.33412057%2C20.0692786%201.25539778%2C18.953542%20L1.25%2C18.8%20L1.25%2C3.4%20C1.25%2C2.26423244%202.13062249%2C1.33412985%203.24630755%2C1.25539838%20L3.39984279%2C1.25%20L17.3982707%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C5.45%20C15.0127987%2C5.45%2015.3485851%2C5.78578644%2015.3485851%2C6.2%20C15.3485851%2C6.57969577%2015.0664313%2C6.89349096%2014.7003557%2C6.94315338%20L14.5985851%2C6.95%20L8.99921396%2C6.95%20C8.5850004%2C6.95%208.24921396%2C6.61421356%208.24921396%2C6.2%20C8.24921396%2C5.82030423%208.53136785%2C5.50650904%208.89744341%2C5.45684662%20L8.99921396%2C5.45%20L14.5985851%2C5.45%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M14.5985851%2C9.65%20C15.0127987%2C9.65%2015.3485851%2C9.98578644%2015.3485851%2C10.4%20C15.3485851%2C10.7796958%2015.0664313%2C11.093491%2014.7003557%2C11.1431534%20L14.5985851%2C11.15%20L6.19952838%2C11.15%20C5.78531482%2C11.15%205.44952838%2C10.8142136%205.44952838%2C10.4%20C5.44952838%2C10.0203042%205.73168226%2C9.70650904%206.09775782%2C9.65684662%20L6.19952838%2C9.65%20L14.5985851%2C9.65%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.1987423%2C13.85%20C13.6129559%2C13.85%2013.9487423%2C14.1857864%2013.9487423%2C14.6%20C13.9487423%2C14.9796958%2013.6665885%2C15.293491%2013.3005129%2C15.3431534%20L13.1987423%2C15.35%20L6.19952838%2C15.35%20C5.78531482%2C15.35%205.44952838%2C15.0142136%205.44952838%2C14.6%20C5.44952838%2C14.2203042%205.73168226%2C13.906509%206.09775782%2C13.8568466%20L6.19952838%2C13.85%20L13.1987423%2C13.85%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatMessageTemplate,\n CometChatMessageComposerAction,\n fontHelper,\n CometChatUIKitConstants,\n localize,\n DocumentIconAlignment,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CollaborativeDocumentConstants,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { CometChatDocumentBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CollaborativeDocumentConfiguration } from \"./CollaborativeDocumentConfiguration\";\nimport DocumentIcon from \"./assets/collaborativedocument.svg\";\n\nconst CometChatDocumentExtensionBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n});\n\nexport class CollaborativeDocumentExtensionDecorator extends DataSourceDecorator {\n public configuration?: CollaborativeDocumentConfiguration;\n public newDataSource!: DataSource;\n public theme!: CometChatTheme;\n\n constructor(\n dataSource: DataSource,\n configuration?: CollaborativeDocumentConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(CollaborativeDocumentConstants.extension_document)) {\n types.push(CollaborativeDocumentConstants.extension_document);\n }\n return types;\n }\n\n override getId(): string {\n return \"collaborativedocument\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (\n !this.checkIfTemplateExist(\n templates,\n CollaborativeDocumentConstants.extension_document\n )\n ) {\n templates.push(this.getDocumentTemplate(this.theme));\n }\n return templates;\n }\n\n getDocumentTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CollaborativeDocumentConstants.extension_document,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let documentMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (documentMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(documentMessage, _theme);\n }\n return this.getDocumentContentView(documentMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getDocumentContentView(\n documentMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let documentBubbleAlignment: DocumentIconAlignment =\n DocumentIconAlignment.right;\n let configurationDocumentBubbleStyle =\n this.configuration?.getDocumentBubbleStyle();\n let documentBubbleStyle = {\n titleFont:\n configurationDocumentBubbleStyle?.titleFont ||\n fontHelper(this.theme.typography.text2),\n titleColor:\n configurationDocumentBubbleStyle?.titleColor ||\n this.theme.palette.getAccent(),\n subtitleFont:\n configurationDocumentBubbleStyle?.subtitleFont ||\n fontHelper(this.theme.typography.subtitle2),\n subtitleColor:\n configurationDocumentBubbleStyle?.subtitleColor ||\n this.theme.palette.getAccent600(),\n iconTint:\n configurationDocumentBubbleStyle?.iconTint ||\n this.theme.palette.getAccent700(),\n buttonTextFont:\n configurationDocumentBubbleStyle?.buttonTextFont ||\n fontHelper(this.theme.typography.text2),\n buttonTextColor:\n configurationDocumentBubbleStyle?.buttonTextColor ||\n this.theme.palette.getPrimary(),\n buttonBackground:\n configurationDocumentBubbleStyle?.buttonBackground || \"transparent\",\n separatorColor:\n configurationDocumentBubbleStyle?.separatorColor ||\n this.theme.palette.getAccent200(),\n };\n const documentURL = this.getDocumentURL(documentMessage);\n const documentTitle = localize(\"COLLABORATIVE_DOCUMENT\");\n const documentButtonText = localize(\"OPEN_DOCUMENT\");\n const documentSubitle = localize(\"DRAW_DOCUMENT_TOGETHER\");\n\n return (\n \n );\n }\n\n launchCollaborativeDocument(documentURL: string) {\n window.open(documentURL, \"\", \"fullscreen=yes, scrollbars=auto\");\n }\n\n getDocumentURL(message: CometChat.CustomMessage) {\n try {\n if (message?.getData()) {\n const data: any = message.getData();\n if (data?.metadata) {\n const metadata = data?.metadata;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(metadata, \"@injected\")\n ) {\n const injectedObject = metadata[\"@injected\"];\n if (injectedObject?.extensions) {\n const extensionObject = injectedObject.extensions;\n return extensionObject[CollaborativeDocumentConstants.document]\n ? extensionObject[CollaborativeDocumentConstants.document]\n .document_url\n : extensionObject[CollaborativeDocumentConstants.document]\n .board_url;\n }\n }\n }\n }\n } catch (error: any) {\n console.log(\"error in fetching document url\", error);\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let isUser = id?.user ? true : false;\n let receiverType: string = isUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let receiverId: string | undefined = isUser ? id.user : id.group;\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: CollaborativeDocumentConstants.document,\n title: localize(\"COLLABORATIVE_DOCUMENT\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : DocumentIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: () => {\n CometChat.callExtension(\n CollaborativeDocumentConstants.document,\n CollaborativeDocumentConstants.post,\n CollaborativeDocumentConstants.v1_create,\n { receiver: receiverId, receiverType: receiverType }\n ).then(\n (res: any) => {},\n (error: any) => {}\n );\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === CollaborativeDocumentConstants.extension_document &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_DOCUMENT\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { CollaborativeDocumentConfiguration } from \"./CollaborativeDocumentConfiguration\";\nimport { CollaborativeDocumentExtensionDecorator } from \"./CollaborativeDocumentExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeDocumentExtension extends ExtensionsDataSource {\n private configuration?: CollaborativeDocumentConfiguration;\n\n constructor(configuration?: CollaborativeDocumentConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable((dataSource: any) => new CollaborativeDocumentExtensionDecorator(dataSource, this.configuration));\n }\n\n override getExtensionId(): string {\n return ExtensionsId.document;\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FCollaborative%20Whiteboard%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FCollaborative-Whiteboard%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C1.25%20C4.2473527%2C1.25%202.65%2C2.77128829%202.65%2C4.66666667%20C2.65%2C6.56204505%204.2473527%2C8.08333333%206.2%2C8.08333333%20C8.1526473%2C8.08333333%209.75%2C6.56204505%209.75%2C4.66666667%20C9.75%2C2.77128829%208.1526473%2C1.25%206.2%2C1.25%20Z%20M6.2%2C2.75%20C7.3401473%2C2.75%208.25%2C3.61652638%208.25%2C4.66666667%20C8.25%2C5.71680695%207.3401473%2C6.58333333%206.2%2C6.58333333%20C5.0598527%2C6.58333333%204.15%2C5.71680695%204.15%2C4.66666667%20C4.15%2C3.61652638%205.0598527%2C2.75%206.2%2C2.75%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666667%20C6.57969577%2C7.91666667%206.89349096%2C8.19882055%206.94315338%2C8.56489611%20L6.95%2C8.66666667%20L6.95%2C14%20C6.95%2C14.4142136%206.61421356%2C14.75%206.2%2C14.75%20C5.82030423%2C14.75%205.50650904%2C14.4678461%205.45684662%2C14.1017706%20L5.45%2C14%20L5.45%2C8.66666667%20C5.45%2C8.2524531%205.78578644%2C7.91666667%206.2%2C7.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.2%2C7.91666673%20C3.47415406%2C7.91666673%201.25%2C10.0349087%201.25%2C12.6666667%20L1.25%2C15.3333333%20L1.25684662%2C15.4351039%20C1.30650904%2C15.8011795%201.62030423%2C16.0833333%202%2C16.0833333%20L2.725%2C16.083%20L3.3541005%2C22.0783194%20C3.39418895%2C22.4601142%203.71610639%2C22.75%204.1%2C22.75%20L8.3%2C22.75%20L8.40299648%2C22.7429615%20C8.74009489%2C22.6965339%209.00945546%2C22.4254056%209.0458995%2C22.0783194%20L9.674%2C16.083%20L10.4%2C16.0833333%20C10.8142136%2C16.0833333%2011.15%2C15.7475469%2011.15%2C15.3333333%20L11.15%2C12.6666667%20C11.15%2C10.0349087%208.92584594%2C7.91666673%206.2%2C7.91666673%20Z%20M6.39003599%2C9.42150275%20C8.21408216%2C9.514591%209.65%2C10.9396974%209.65%2C12.6666667%20L9.649%2C14.583%20L9%2C14.5833333%20L8.89700352%2C14.5903718%20C8.55990511%2C14.6367994%208.29054454%2C14.9079278%208.2541005%2C15.2550139%20L7.624%2C21.25%20L4.775%2C21.25%20L4.1458995%2C15.2550139%20L4.12814397%2C15.1533155%20C4.04676841%2C14.8229084%203.74899419%2C14.5833333%203.4%2C14.5833333%20L2.75%2C14.583%20L2.75%2C12.6666667%20C2.75%2C10.8801468%204.28665405%2C9.41666673%206.2%2C9.41666673%20L6.39003599%2C9.42150275%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.6%2C1.25%20C22.7281683%2C1.25%2023.6652093%2C2.09570502%2023.7445585%2C3.18354707%20L23.75%2C3.33333333%20L23.75%2C14.6666667%20C23.75%2C15.7752741%2022.8620097%2C16.6691795%2021.7525939%2C16.7448147%20L21.6%2C16.75%20L13.2%2C16.75%20C12.7857864%2C16.75%2012.45%2C16.4142136%2012.45%2C16%20C12.45%2C15.6203042%2012.7321539%2C15.306509%2013.0982294%2C15.2568466%20L13.2%2C15.25%20L21.6%2C15.25%20C21.9335897%2C15.25%2022.1978428%2C15.0272126%2022.2431318%2C14.7509728%20L22.25%2C14.6666667%20L22.25%2C3.33333333%20C22.25%2C3.04809641%2022.0160733%2C2.79937841%2021.6978472%2C2.75651429%20L21.6%2C2.75%20L11.8%2C2.75%20C11.3857864%2C2.75%2011.05%2C2.41421356%2011.05%2C2%20C11.05%2C1.62030423%2011.3321539%2C1.30650904%2011.6982294%2C1.25684662%20L11.8%2C1.25%20L21.6%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport {\n CometChatTheme,\n CometChatMessageTemplate,\n CometChatMessageComposerAction,\n fontHelper,\n CometChatUIKitConstants,\n localize,\n MessageBubbleAlignment,\n DocumentIconAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CollaborativeWhiteboardConstants,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { CometChatDocumentBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CollaborativeWhiteboardConfiguration } from \"./CollaborativeWhiteboardConfiguration\";\nimport WhiteboardIcon from \"./assets/collaborativewhiteboard.svg\";\n\nconst CometChatWhiteboardExtensionBubble = createComponent({\n tagName: \"cometchat-document-bubble\",\n elementClass: CometChatDocumentBubble,\n react: React,\n});\n\nexport class CollaborativeWhiteBoardExtensionDecorator extends DataSourceDecorator {\n public configuration?: CollaborativeWhiteboardConfiguration;\n public newDataSource!: DataSource;\n public theme!: CometChatTheme;\n\n constructor(\n dataSource: DataSource,\n configuration?: CollaborativeWhiteboardConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getAllMessageTypes(): string[] {\n let types: string[] = super.getAllMessageTypes();\n if (\n !types.some(\n (type) => type === CollaborativeWhiteboardConstants.extension_whiteboard\n )\n ) {\n types.push(CollaborativeWhiteboardConstants.extension_whiteboard);\n }\n return types;\n }\n\n override getId(): string {\n return \"collaborativewhiteboard\";\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (\n !this.checkIfTemplateExist(\n templates,\n CollaborativeWhiteboardConstants.extension_whiteboard\n )\n ) {\n templates.push(this.getWhiteBoardTemplate(this.theme));\n }\n return templates;\n }\n\n getWhiteBoardTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: CollaborativeWhiteboardConstants.extension_whiteboard,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let whiteboardMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (whiteboardMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(whiteboardMessage, _theme);\n }\n return this.getWhiteboardContentView(whiteboardMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n ) => {\n return super.getBottomView(message, alignment);\n },\n });\n }\n\n getWhiteboardContentView(\n whiteboardMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let documentBubbleAlignment: DocumentIconAlignment =\n DocumentIconAlignment.right;\n let configurationWhiteboardBubbleStyle =\n this.configuration?.getWhiteboardBubbleStyle();\n let documentBubbleStyle = {\n titleFont:\n configurationWhiteboardBubbleStyle?.titleFont ||\n fontHelper(this.theme.typography.text2),\n titleColor:\n configurationWhiteboardBubbleStyle?.titleColor ||\n this.theme.palette.getAccent(),\n subtitleFont:\n configurationWhiteboardBubbleStyle?.subtitleFont ||\n fontHelper(this.theme.typography.subtitle2),\n subtitleColor:\n configurationWhiteboardBubbleStyle?.subtitleColor ||\n this.theme.palette.getAccent600(),\n iconTint:\n configurationWhiteboardBubbleStyle?.iconTint ||\n this.theme.palette.getAccent700(),\n buttonTextFont:\n configurationWhiteboardBubbleStyle?.buttonTextFont ||\n fontHelper(this.theme.typography.text2),\n buttonTextColor:\n configurationWhiteboardBubbleStyle?.buttonTextColor ||\n this.theme.palette.getPrimary(),\n buttonBackground:\n configurationWhiteboardBubbleStyle?.buttonBackground || \"transparent\",\n separatorColor:\n configurationWhiteboardBubbleStyle?.separatorColor ||\n this.theme.palette.getAccent200(),\n };\n const whiteboardURL = this.getWhiteboardDocument(whiteboardMessage);\n const whiteboardTitle = localize(\"COLLABORATIVE_WHITEBOARD\");\n const whiteboardButtonText = localize(\"OPEN_WHITEBOARD\");\n const whiteboardSubitle = localize(\"DRAW_WHITEBOARD_TOGETHER\");\n\n return (\n \n );\n }\n\n launchCollaborativeWhiteboardDocument(whiteboardURL: string) {\n window.open(whiteboardURL, \"\", \"fullscreen=yes, scrollbars=auto\");\n }\n\n getWhiteboardDocument(message: CometChat.CustomMessage) {\n try {\n if (message?.getData()) {\n const data: any = message.getData();\n if (data?.metadata) {\n const metadata = data?.metadata;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(metadata, \"@injected\")\n ) {\n const injectedObject = metadata[\"@injected\"];\n if (injectedObject?.extensions) {\n const extensionObject = injectedObject.extensions;\n return extensionObject[\n CollaborativeWhiteboardConstants.whiteboard\n ]\n ? extensionObject[CollaborativeWhiteboardConstants.whiteboard]\n .board_url\n : extensionObject[CollaborativeWhiteboardConstants.whiteboard]\n .document_url;\n }\n }\n }\n }\n } catch (error: any) {\n console.log(\"error in getting whiteboard details\", error);\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let isUser = id?.user ? true : false;\n let receiverType: string = isUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let receiverId: string | undefined = isUser ? id.user : id.group;\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: CollaborativeWhiteboardConstants.whiteboard,\n title: localize(\"COLLABORATIVE_WHITEBOARD\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : WhiteboardIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: () => {\n CometChat.callExtension(\n CollaborativeWhiteboardConstants.whiteboard,\n CollaborativeWhiteboardConstants.post,\n CollaborativeWhiteboardConstants.v1_create,\n { receiver: receiverId, receiverType: receiverType }\n ).then(\n (res: any) => {},\n (error: any) => {\n console.log(\"error in sending whiteboard\", error);\n }\n );\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() ===\n CollaborativeWhiteboardConstants.extension_whiteboard &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_WHITEBOARD\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { CollaborativeWhiteboardConfiguration } from \"./CollaborativeWhiteboardConfiguration\";\nimport { CollaborativeWhiteBoardExtensionDecorator } from \"./CollaborativeWhiteboardExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeWhiteboardExtension extends ExtensionsDataSource {\n private configuration?: CollaborativeWhiteboardConfiguration;\n\n constructor(configuration?: CollaborativeWhiteboardConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new CollaborativeWhiteBoardExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.whiteboard;\n }\n}","import React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CometChatTheme, CometChatUIEvents, fontHelper, localize, MessageBubbleAlignment } from \"@cometchat/uikit-resources\";\nimport { ImageModeration } from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ImageModerationConfiguration } from \"./ImageModerationConfiguration\";\nimport { BaseStyle, CometChatBackdrop, CometChatConfirmDialog } from \"@cometchat/uikit-elements\";\nimport PlaceholderImage from './assets/placeholder.png';\nimport { CometChatImageBubble, CometChatFullScreenViewer } from '@cometchat/uikit-elements';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nimport Close2xIcon from './assets/close2x.svg';\n\nconst CometChatImageModerationBubble = createComponent({\n tagName: 'image-moderation',\n elementClass: ImageModeration,\n react: React,\n events: {\n CCShowDialog: 'cc-show-dialog'\n }\n});\n\nconst CometChatBackDropElement = createComponent({\n tagName: 'cometchat-backdrop',\n elementClass: CometChatBackdrop,\n react: React\n});\n\nconst CometChatConfirmDialogBox = createComponent({\n tagName: 'cometchat-confirm-dialog',\n elementClass: CometChatConfirmDialog,\n react: React,\n events: {\n ccCancelClicked: 'cc-cancel-clicked',\n ccConfirmClicked: 'cc-confirm-clicked'\n }\n});\n\nconst ImageMessageBubble = createComponent({\n tagName: 'cometchat-image-bubble',\n elementClass: CometChatImageBubble,\n react: React,\n events: {\n 'ccImageClicked': 'cc-image-clicked'\n }\n});\n\nconst FullScreenImageViewer = createComponent({\n tagName: 'cometchat-full-screen-viewer',\n elementClass: CometChatFullScreenViewer,\n react: React,\n events: {\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nexport class ImageModerationExtensionDecorator extends DataSourceDecorator {\n public configuration?: ImageModerationConfiguration;\n public newDataSource!: DataSource;\n private theme!: CometChatTheme;\n public loggedInUser!: CometChat.User;\n\n constructor(dataSource: DataSource, configuration?: ImageModerationConfiguration) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration!;\n\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user;\n }\n }).catch((error: CometChat.CometChatException) => {\n console.error(error)\n })\n }\n\n override getId(): string {\n return \"imagemoderation\";\n }\n\n override getImageMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignment, theme: CometChatTheme) {\n\n\n if (this.loggedInUser?.getUid() !== undefined && this.loggedInUser?.getUid() === message?.getSender()?.getUid()) {\n\n return super.getImageMessageContentView(message, alignment, theme)\n }\n\n this.theme = theme;\n let metadata = message.getMetadata() as any;\n const style = this.getImageModerationStyle(theme);\n let imageUrl = message.getAttachments()[0]?.getUrl() || \"\";\n\n if (ChatConfigurator.names.includes(\"thumbnailgeneration\") && metadata && typeof metadata === \"object\" && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]) {\n imageUrl = (message.getMetadata() as any)[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n\n const fullScreenViewer = { CometChatUIEvents.ccHideDialog.next() }} />\n return (\n { this.showDialog(e) }}>\n { CometChatUIEvents.ccShowDialog.next({ child: fullScreenViewer, confirmCallback: null }) }} />\n \n );\n }\n\n showDialog(_event: any) {\n const confirmModal = this.getConfirmationModal(_event);\n\n CometChatUIEvents.ccShowDialog.next({\n confirmCallback: _event?.detail?.onConfirm,\n child: confirmModal\n });\n }\n\n getConfirmationModal(_event: any) {\n let configurationBackdropStyle = this.configuration?.getBackDropStyle();\n let configurationConfirmDialogStyle = this.configuration?.getConfirmDialogSyle();\n let backdropStyle: BaseStyle = {\n height: configurationBackdropStyle?.height || \"100%\",\n width: configurationBackdropStyle?.width || \"100%\",\n background: configurationBackdropStyle?.background || \"rgba(0, 0, 0, 0.5)\",\n border: configurationBackdropStyle?.border,\n borderRadius: configurationBackdropStyle?.borderRadius\n },\n warningText: string = localize(\"SHOW_UNSAFE_CONTENT\"),\n confirmText: string = localize(\"YES\"),\n cancelText: string = localize(\"NO\"),\n confirmDialogStyle = {\n confirmButtonBackground: configurationConfirmDialogStyle?.confirmButtonBackground || this.theme.palette.getError(),\n cancelButtonBackground: configurationConfirmDialogStyle?.cancelButtonBackground || this.theme.palette.getSecondary(),\n confirmButtonTextColor: configurationConfirmDialogStyle?.confirmButtonTextColor || this.theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: configurationConfirmDialogStyle?.confirmButtonTextFont || fontHelper(this.theme.typography.text2),\n cancelButtonTextColor: configurationConfirmDialogStyle?.cancelButtonTextColor || this.theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: configurationConfirmDialogStyle?.cancelButtonTextFont || fontHelper(this.theme.typography.text2),\n titleFont: configurationConfirmDialogStyle?.titleFont || fontHelper(this.theme.typography.title1),\n titleColor: configurationConfirmDialogStyle?.titleColor || this.theme.palette.getAccent(),\n messageTextFont: configurationConfirmDialogStyle?.messageTextFont || fontHelper(this.theme.typography.subtitle2),\n messageTextColor: configurationConfirmDialogStyle?.messageTextColor || this.theme.palette.getAccent600(),\n background: configurationConfirmDialogStyle?.background || this.theme.palette.getBackground(),\n height: configurationConfirmDialogStyle?.height || \"100%\",\n width: configurationConfirmDialogStyle?.width || \"100%\",\n border: configurationConfirmDialogStyle?.border || `1px solid ${this.theme.palette.getAccent100()}`,\n borderRadius: configurationConfirmDialogStyle?.borderRadius || \"8px\"\n };\n return (\n \n { this.onConfirmClicked(_event) }}\n />\n \n )\n }\n\n onConfirmClicked(_event: any) {\n if (_event?.detail?.onConfirm) {\n _event?.detail?.onConfirm();\n }\n CometChatUIEvents.ccHideDialog.next();\n }\n\n onCancelClicked() {\n CometChatUIEvents.ccHideDialog.next();\n }\n\n getImageModerationStyle(_theme: CometChatTheme) {\n let configurationImageModerationBubbleStyle = this.configuration?.getImageModerationStyle();\n return {\n filterColor: configurationImageModerationBubbleStyle?.filterColor || _theme.palette.getPrimary(),\n height: configurationImageModerationBubbleStyle?.height || \"100%\",\n width: configurationImageModerationBubbleStyle?.width || \"100%\",\n border: configurationImageModerationBubbleStyle?.border || \"none\",\n borderRadius: configurationImageModerationBubbleStyle?.borderRadius || \"8px\",\n warningTextColor: configurationImageModerationBubbleStyle?.warningTextColor || _theme.palette.getAccent(\"dark\"),\n warningTextFont: configurationImageModerationBubbleStyle?.warningTextFont || fontHelper(_theme.typography.title2)\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAGVCAIAAABYSFGJAAAV1ElEQVR4Xu3d61LjSBKA0X3/x23AxrhhVzVETdDJki2MUhfXOf+mx40l2RH5tamS//MLAKDYf+IfAAAsTXAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwBQTnAAAOUEBwB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AEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlBMcAEA5wQEAlPsf5B6CEuYTLxcAAAAASUVORK5CYII=\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { ImageModerationConfiguration } from \"./ImageModerationConfiguration\";\nimport { ImageModerationExtensionDecorator } from \"./ImageModerationExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class ImageModerationExtension extends ExtensionsDataSource {\n private configuration?: ImageModerationConfiguration;\n\n constructor(configuration?: ImageModerationConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new ImageModerationExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.imageModeration\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n fontHelper,\n MessageBubbleAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n LinkPreview,\n LinkPreviewConstants,\n LinkPreviewStyle,\n CometChatUIKitLoginListener,\n CometChatTextFormatter,\n CometChatMentionsFormatter,\n CometChatUrlsFormatter,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { LinkPreviewConfiguration } from \"./LinkPreviewConfiguration\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatLinkPreviewBubble = createComponent({\n tagName: \"link-preview\",\n elementClass: LinkPreview,\n react: React,\n events: {\n ccLinkClicked: \"cc-link-clicked\",\n },\n});\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nexport class LinkPreviewExtensionDecorator extends DataSourceDecorator {\n public configuration?: LinkPreviewConfiguration;\n public newDataSource!: DataSource;\n\n constructor(\n dataSource: DataSource,\n configuration?: LinkPreviewConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getId(): string {\n return \"linkpreview\";\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n const linkPreviewObject: any = this.getLinkPreview(message);\n if (\n linkPreviewObject &&\n !message.getDeletedAt() &&\n message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n\n let textFormatters: Array = config.textFormatters;\n\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(\n {\n theme,\n alignment,\n }\n );\n textFormatters.push(urlTextFormatter);\n }\n\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n \n \n );\n } else {\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n }\n getLinkPreviewWrapperStyle() {\n return { height: \"inherit\", width: \"inherit\" };\n }\n\n openLink(event: any) {\n window.open(event?.detail?.url, \"_blank\");\n }\n\n getLinkPreviewStyle(_theme: CometChatTheme) {\n let configuarationLinkPreviewStyle =\n this.configuration?.getLinkPreviewStyle();\n return new LinkPreviewStyle({\n titleColor:\n configuarationLinkPreviewStyle?.titleColor ||\n _theme.palette.getAccent(),\n titleFont:\n configuarationLinkPreviewStyle?.titleFont ||\n fontHelper(_theme.typography.title2),\n descriptionColor:\n configuarationLinkPreviewStyle?.descriptionColor ||\n _theme.palette.getAccent600(),\n descriptionFont:\n configuarationLinkPreviewStyle?.descriptionFont ||\n fontHelper(_theme.typography.subtitle2),\n background: configuarationLinkPreviewStyle?.background || \"transparent\",\n height: configuarationLinkPreviewStyle?.height || \"100%\",\n width: configuarationLinkPreviewStyle?.width || \"100%\",\n });\n }\n\n getTextMessageStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n\n if (isLeftAligned) {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent900() || \"\",\n };\n } else {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent() || \"\",\n };\n }\n }\n\n getLinkPreview(message: CometChat.TextMessage): any {\n try {\n if (message?.getMetadata()) {\n const metadata: any = message.getMetadata();\n const injectedObject = metadata[LinkPreviewConstants.injected];\n if (injectedObject && injectedObject?.extensions) {\n const extensionsObject = injectedObject.extensions;\n if (\n extensionsObject &&\n CometChatUIKitUtility.checkHasOwnProperty(\n extensionsObject,\n LinkPreviewConstants.link_preview\n )\n ) {\n const linkPreviewObject =\n extensionsObject[LinkPreviewConstants.link_preview];\n if (\n linkPreviewObject &&\n CometChatUIKitUtility.checkHasOwnProperty(\n linkPreviewObject,\n LinkPreviewConstants.links\n ) &&\n linkPreviewObject[LinkPreviewConstants.links].length\n ) {\n return linkPreviewObject[LinkPreviewConstants.links][0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }\n } else {\n return null;\n }\n } catch (error: any) {\n console.log(\"error in getting link preview details\", error);\n }\n }\n\n getLinkPreviewDetails(linkPreviewObject: any, key: string): string {\n if (Object.keys(linkPreviewObject).length > 0) {\n return linkPreviewObject[key];\n } else {\n return \"\";\n }\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { LinkPreviewConfiguration } from \"./LinkPreviewConfiguration\";\nimport { LinkPreviewExtensionDecorator } from \"./LinkPreviewExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class LinkPreviewExtension extends ExtensionsDataSource {\n private configuration?: LinkPreviewConfiguration;\n\n constructor(configuration?: LinkPreviewConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new LinkPreviewExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.linkPreview;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { CometChatTextBubble } from \"@cometchat/uikit-elements\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n fontHelper,\n localize,\n CometChatMessageEvents,\n CometChatActionsIcon,\n CometChatActionsView,\n MessageBubbleAlignment,\n MessageStatus,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUrlsFormatter,\n MessageTranslationBubble,\n MessageTranslationStyle,\n} from \"@cometchat/uikit-shared\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { MessageTranslationConfiguration } from \"./MessageTranslationConfiguration\";\nimport TranslateIcon from \"./assets/translation.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatMessageTranslationBubble = createComponent({\n tagName: \"message-translation-bubble\",\n elementClass: MessageTranslationBubble,\n react: React,\n});\n\nconst TextMessageBubble = createComponent({\n tagName: \"cometchat-text-bubble\",\n elementClass: CometChatTextBubble,\n react: React,\n});\n\nexport class MessageTranslationExtensionDecorator extends DataSourceDecorator {\n public configuration?: MessageTranslationConfiguration;\n public newDataSource!: DataSource;\n\n constructor(\n dataSource: DataSource,\n configuration?: MessageTranslationConfiguration\n ) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n override getTextMessageOptions(\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ): (CometChatActionsIcon | CometChatActionsView)[] {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n let options: (CometChatActionsIcon | CometChatActionsView)[] =\n super.getTextMessageOptions(loggedInUser, messageObject, theme, group);\n if (\n !this.checkIfOptionExist(\n options,\n CometChatUIKitConstants.MessageOption.translateMessage\n )\n ) {\n let newOption: CometChatActionsIcon = new CometChatActionsIcon({\n id: CometChatUIKitConstants.MessageOption.translateMessage,\n title: localize(\"TRANSLATE\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : TranslateIcon,\n onClick: function () {\n CometChat.callExtension(\n \"message-translation\",\n \"POST\",\n \"v2/translate\",\n {\n msgId: messageObject.getId(),\n text: (messageObject as CometChat.TextMessage).getText(),\n languages: navigator.languages,\n }\n )\n .then((message_translations: any) => {\n if (\n message_translations &&\n message_translations.hasOwnProperty(\"translations\")\n ) {\n let translatedMessage =\n message_translations[\"translations\"]?.[0]?.[\n \"message_translated\"\n ];\n if (translatedMessage && translatedMessage.trim()) {\n let metadata: any =\n (messageObject as CometChat.TextMessage).getMetadata() ||\n {};\n metadata[\"translated_message\"] = translatedMessage;\n (messageObject as CometChat.TextMessage).setMetadata(\n metadata\n );\n CometChatMessageEvents.ccMessageTranslated.next({\n message: messageObject as CometChat.TextMessage,\n status: MessageStatus.success,\n });\n }\n }\n })\n .catch((error: any) => {\n console.log(\"error\", error);\n });\n },\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent600(),\n titleColor:\n configurationOptionStyle?.titleColor || theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n backgroundColor: configurationOptionStyle?.background || \"transparent\",\n });\n options.push(newOption);\n }\n return options;\n }\n\n getTranslationStyle = (\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) => {\n let configurationMessageTranslationStyle =\n this.configuration?.getMessageTranslationStyle();\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n if (isLeftAligned) {\n return new MessageTranslationStyle({\n translatedTextFont:\n configurationMessageTranslationStyle?.translatedTextFont ||\n fontHelper(_theme.typography.text3),\n translatedTextColor:\n configurationMessageTranslationStyle?.translatedTextColor ||\n _theme.palette.getAccent(\"dark\"),\n helpTextColor:\n configurationMessageTranslationStyle?.helpTextColor ||\n _theme.palette.getAccent700(\"dark\"),\n helpTextFont:\n configurationMessageTranslationStyle?.helpTextFont ||\n fontHelper(_theme.typography.caption2),\n background:\n configurationMessageTranslationStyle?.background || \"transparent\",\n });\n } else {\n return new MessageTranslationStyle({\n translatedTextFont:\n configurationMessageTranslationStyle?.translatedTextFont ||\n fontHelper(_theme.typography.text3),\n translatedTextColor:\n configurationMessageTranslationStyle?.translatedTextColor ||\n _theme.palette.getAccent(),\n helpTextColor:\n configurationMessageTranslationStyle?.helpTextColor ||\n _theme.palette.getAccent700(),\n helpTextFont:\n configurationMessageTranslationStyle?.helpTextFont ||\n fontHelper(_theme.typography.caption2),\n background:\n configurationMessageTranslationStyle?.background || \"transparent\",\n });\n }\n };\n\n getTextMessageStyle(\n _alignment: MessageBubbleAlignment,\n _theme: CometChatTheme\n ) {\n const isLeftAligned = _alignment !== MessageBubbleAlignment.left;\n if (isLeftAligned) {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent900(\"light\") || \"\",\n };\n } else {\n return {\n textFont: fontHelper(_theme.typography.text3),\n textColor: _theme.palette.getAccent() || \"\",\n };\n }\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n const metadata: any = message.getMetadata();\n if (\n metadata &&\n Object.prototype.hasOwnProperty.call(metadata, \"translated_message\") &&\n !message.getDeletedAt() &&\n message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember\n ) {\n const translatedText = metadata[\"translated_message\"];\n\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : this.getAllTextFormatters({ theme, alignment, disableMentions: additionalConfigurations.disableMentions }),\n };\n let textFormatters: Array = config.textFormatters;\n let urlTextFormatter!: CometChatUrlsFormatter;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(message);\n if (message.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n message.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (urlTextFormatter) {\n break;\n }\n }\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n message,\n ...config,\n alignment,\n theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n } else {\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatUrlsFormatter) {\n urlTextFormatter = textFormatters[i] as CometChatUrlsFormatter;\n break;\n }\n }\n }\n\n if (!urlTextFormatter) {\n urlTextFormatter = ChatConfigurator.getDataSource().getUrlTextFormatter(\n {\n theme,\n alignment,\n }\n );\n textFormatters.push(urlTextFormatter);\n }\n for (let i = 0; i < textFormatters.length; i++) {\n textFormatters[i].setMessageBubbleAlignment(alignment);\n textFormatters[i].setMessage(message);\n }\n return (\n \n \n \n );\n } else {\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n }\n\n checkIfOptionExist(\n template: (CometChatActionsIcon | CometChatActionsView)[],\n id: string\n ): boolean {\n return template.some((obj) => obj.id === id);\n }\n\n override getId(): string {\n return \"messagetranslation\";\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FMessage%20Translation%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FMessage-Translation%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M6.66666667%2C4.91666667%20C7.7672341%2C4.91666667%208.66848034%2C5.77006215%208.74476911%2C6.85121684%20L8.75%2C7%20L8.75%2C9.66666667%20C8.75%2C10.0808802%208.41421356%2C10.4166667%208%2C10.4166667%20C7.62030423%2C10.4166667%207.30650904%2C10.1345128%207.25684662%2C9.76843722%20L7.25%2C9.66666667%20L7.25%2C7%20C7.25%2C6.6778339%206.98883277%2C6.41666667%206.66666667%2C6.41666667%20C6.37671717%2C6.41666667%206.13617677%2C6.62821212%206.09096818%2C6.9053803%20L6.08333333%2C7%20L6.08333333%2C9.66666667%20C6.08333333%2C10.0808802%205.7475469%2C10.4166667%205.33333333%2C10.4166667%20C4.95363757%2C10.4166667%204.63984237%2C10.1345128%204.59017995%2C9.76843722%20L4.58333333%2C9.66666667%20L4.58333333%2C7%20C4.58333333%2C5.84940677%205.51607344%2C4.91666667%206.66666667%2C4.91666667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8%2C7.58333333%20C8.41421356%2C7.58333333%208.75%2C7.91911977%208.75%2C8.33333333%20C8.75%2C8.7130291%208.46784612%2C9.02682429%208.10177056%2C9.07648672%20L8%2C9.08333333%20L5.33333333%2C9.08333333%20C4.91911977%2C9.08333333%204.58333333%2C8.7475469%204.58333333%2C8.33333333%20C4.58333333%2C7.95363757%204.86548721%2C7.63984237%205.23156278%2C7.59017995%20L5.33333333%2C7.58333333%20L8%2C7.58333333%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C10.9166667%20C16.3796958%2C10.9166667%2016.693491%2C11.1988205%2016.7431534%2C11.5648961%20L16.75%2C11.6666667%20L16.75%2C13%20C16.75%2C13.4142136%2016.4142136%2C13.75%2016%2C13.75%20C15.6203042%2C13.75%2015.306509%2C13.4678461%2015.2568466%2C13.1017706%20L15.25%2C13%20L15.25%2C11.6666667%20C15.25%2C11.2524531%2015.5857864%2C10.9166667%2016%2C10.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M18.6666667%2C12.25%20C19.0808802%2C12.25%2019.4166667%2C12.5857864%2019.4166667%2C13%20C19.4166667%2C13.3796958%2019.1345128%2C13.693491%2018.7684372%2C13.7431534%20L18.6666667%2C13.75%20L13.3333333%2C13.75%20C12.9191198%2C13.75%2012.5833333%2C13.4142136%2012.5833333%2C13%20C12.5833333%2C12.6203042%2012.8654872%2C12.306509%2013.2315628%2C12.2568466%20L13.3333333%2C12.25%20L18.6666667%2C12.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.6218209%2C12.7628292%20C16.7528067%2C12.3698717%2017.1775467%2C12.1575017%2017.5705042%2C12.2884875%20C17.9634616%2C12.4194734%2018.1758316%2C12.8442133%2018.0448458%2C13.2371708%20L17.9816285%2C13.4141354%20L17.8896351%2C13.6471999%20L17.768692%2C13.9296038%20C17.5442054%2C14.4346986%2017.2746722%2C14.9400735%2016.9573711%2C15.4160251%20C15.999232%2C16.8532338%2014.8035437%2C17.75%2013.3333333%2C17.75%20C12.9191198%2C17.75%2012.5833333%2C17.4142136%2012.5833333%2C17%20C12.5833333%2C16.6203042%2012.8654872%2C16.306509%2013.2315628%2C16.2568466%20L13.3333333%2C16.25%20C14.1964563%2C16.25%2015.000768%2C15.6467662%2015.7092956%2C14.5839749%20C15.9753278%2C14.1849265%2016.2057946%2C13.7528014%2016.3979747%2C13.3203962%20L16.4992538%2C13.0842816%20L16.6012322%2C12.8221175%20C16.6092157%2C12.7998646%2016.6160798%2C12.7800523%2016.6218209%2C12.7628292%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.5822706%2C14.8366574%20C15.9262877%2C14.6059518%2016.3921926%2C14.697809%2016.6228982%2C15.0418261%20C17.0961654%2C15.7475396%2017.8695647%2C16.1943066%2018.717337%2C16.2517136%20C19.1306041%2C16.279698%2019.4429375%2C16.6374031%2019.4149531%2C17.0506703%20C19.3869686%2C17.4639375%2019.0292635%2C17.7762708%2018.6159964%2C17.7482864%20C17.3049794%2C17.6595107%2016.1089745%2C16.9686186%2015.3771018%2C15.877285%20C15.1463962%2C15.5332678%2015.2382534%2C15.067363%2015.5822706%2C14.8366574%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20.6666667%2C8.91666667%20L11.3333333%2C8.91666667%20C10.1827401%2C8.91666667%209.25%2C9.84940677%209.25%2C11%20L9.25%2C17.6666667%20L9.25523089%2C17.8154498%20C9.33151966%2C18.8966045%2010.2327659%2C19.75%2011.3333333%2C19.75%20L15.022%2C19.749%20L18.8030032%2C23.5303301%20L18.8802248%2C23.598293%20C19.3582766%2C23.9666561%2020.0833333%2C23.6330113%2020.0833333%2C23%20L20.083%2C19.749%20L20.6666667%2C19.75%20C21.8172599%2C19.75%2022.75%2C18.8172599%2022.75%2C17.6666667%20L22.75%2C11%20C22.75%2C9.84940677%2021.8172599%2C8.91666667%2020.6666667%2C8.91666667%20Z%20M11.3333333%2C10.4166667%20L20.6666667%2C10.4166667%20C20.9888328%2C10.4166667%2021.25%2C10.6778339%2021.25%2C11%20L21.25%2C17.6666667%20C21.25%2C17.9888328%2020.9888328%2C18.25%2020.6666667%2C18.25%20L19.3333333%2C18.25%20L19.2315628%2C18.2568466%20C18.8654872%2C18.306509%2018.5833333%2C18.6203042%2018.5833333%2C19%20L18.583%2C21.189%20L15.8636634%2C18.4696699%20C15.7230111%2C18.3290176%2015.5322457%2C18.25%2015.3333333%2C18.25%20L11.3333333%2C18.25%20C11.0111672%2C18.25%2010.75%2C17.9888328%2010.75%2C17.6666667%20L10.75%2C11%20C10.75%2C10.6778339%2011.0111672%2C10.4166667%2011.3333333%2C10.4166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.6666667%2C2.25%20C13.7672341%2C2.25%2014.6684803%2C3.10339548%2014.7447691%2C4.18455017%20L14.75%2C4.33333333%20L14.75%2C7%20C14.75%2C7.41421356%2014.4142136%2C7.75%2014%2C7.75%20C13.6203042%2C7.75%2013.306509%2C7.46784612%2013.2568466%2C7.10177056%20L13.25%2C7%20L13.25%2C4.33333333%20C13.25%2C4.04338384%2013.0384545%2C3.80284343%2012.7612864%2C3.75763485%20L12.6666667%2C3.75%20L3.33333333%2C3.75%20C3.04338384%2C3.75%202.80284343%2C3.96154546%202.75763485%2C4.23871364%20L2.75%2C4.33333333%20L2.75%2C11%20C2.75%2C11.2899495%202.96154546%2C11.5304899%203.23871364%2C11.5756985%20L3.33333333%2C11.5833333%20L4.66666667%2C11.5833333%20C5.04636243%2C11.5833333%205.36015763%2C11.8654872%205.40982005%2C12.2315628%20L5.41666667%2C12.3333333%20L5.416%2C14.523%20L6.80300325%2C13.1363366%20C7.06926981%2C12.87007%207.48593349%2C12.845864%207.77954499%2C13.0637184%20L7.86366342%2C13.1363366%20C8.12992998%2C13.4026031%208.15413603%2C13.8192668%207.93628157%2C14.1128783%20L7.86366342%2C14.1969968%20L5.19699675%2C16.8636634%20C4.74939014%2C17.31127%204.00077515%2C17.0344999%203.92321348%2C16.4359943%20L3.91666667%2C16.3333333%20L3.916%2C13.083%20L3.33333333%2C13.0833333%20C2.2327659%2C13.0833333%201.33151966%2C12.2299379%201.25523089%2C11.1487832%20L1.25%2C11%20L1.25%2C4.33333333%20C1.25%2C3.2327659%202.10339548%2C2.33151966%203.18455017%2C2.25523089%20L3.33333333%2C2.25%20L12.6666667%2C2.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { MessageTranslationExtensionDecorator } from \"./MessageTranslationExtensionDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { MessageTranslationConfiguration } from \"./MessageTranslationConfiguration\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class MessageTranslationExtension extends ExtensionsDataSource {\n private configuration?: MessageTranslationConfiguration;\n\n constructor(configuration?: MessageTranslationConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new MessageTranslationExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.messageTranslation;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatMessageComposerAction,\n localize,\n fontHelper,\n MessageBubbleAlignment,\n CometChatUIEvents,\n} from \"@cometchat/uikit-resources\";\nimport {\n PollsConstants,\n PollsBubble,\n CreatePoll,\n CreatePollStyle,\n} from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { PollsConfiguration } from \"./PollsConfiguration\";\nimport PollsIcon from \"./assets/polls.svg\";\nimport CloseIcon from \"./assets/close.svg\";\nimport DeleteIcon from \"./assets/delete.svg\";\nimport AddAnswerIcon from \"./assets/plus.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatPollsBubble = createComponent({\n tagName: \"polls-bubble\",\n elementClass: PollsBubble,\n react: React,\n});\n\nconst CometChatCreatePollView = createComponent({\n tagName: \"create-poll\",\n elementClass: CreatePoll,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n});\n\nexport class PollsExtensionDecorator extends DataSourceDecorator {\n public theme!: CometChatTheme;\n private loggedInUser: CometChat.User | null = null;\n public configuration?: PollsConfiguration;\n public newDataSource!: DataSource;\n\n constructor(dataSource: DataSource, configuration?: PollsConfiguration) {\n super(dataSource);\n this.getLoggedInUser();\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n async getLoggedInUser() {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n\n override getId(): string {\n return \"polls\";\n }\n\n override getAllMessageTypes(): string[] {\n const types = super.getAllMessageTypes();\n if (!types.includes(PollsConstants.extension_poll)) {\n types.push(PollsConstants.extension_poll);\n }\n return types;\n }\n\n override getAllMessageCategories(): string[] {\n const categories = super.getAllMessageCategories();\n if (!categories.includes(CometChatUIKitConstants.MessageCategory.custom)) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageTemplates(\n _theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = _theme as CometChatTheme;\n const templates = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateExist(templates, PollsConstants.extension_poll)) {\n templates.push(this.getPollsTemplate(this.theme));\n }\n return templates;\n }\n\n getPollsTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: PollsConstants.extension_poll,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let pollsMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (pollsMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(pollsMessage, _theme);\n }\n return this.getPollsContentView(pollsMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n getPollsContentView(\n message: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n let configurationPollsBubbleStyle =\n this.configuration?.getPollsBubbleStyle();\n let pollBubbleStyle = {\n borderRadius: configurationPollsBubbleStyle?.borderRadius || \"8px\",\n background: configurationPollsBubbleStyle?.background || \"transparent\",\n votePercentTextFont:\n configurationPollsBubbleStyle?.votePercentTextFont ||\n fontHelper(_theme.typography.subtitle2),\n votePercentTextColor:\n configurationPollsBubbleStyle?.votePercentTextColor ||\n _theme.palette.getAccent600(),\n pollQuestionTextFont:\n configurationPollsBubbleStyle?.pollQuestionTextFont ||\n fontHelper(_theme.typography.subtitle1),\n pollQuestionTextColor:\n configurationPollsBubbleStyle?.pollQuestionTextColor ||\n _theme.palette.getAccent(),\n pollOptionTextFont:\n configurationPollsBubbleStyle?.pollOptionTextFont ||\n fontHelper(_theme.typography.text2),\n pollOptionTextColor:\n configurationPollsBubbleStyle?.pollOptionTextColor ||\n _theme.palette.getAccent(),\n pollOptionBackground:\n configurationPollsBubbleStyle?.pollOptionBackground || \"transparent\",\n optionsIconTint:\n configurationPollsBubbleStyle?.optionsIconTint ||\n _theme.palette.getAccent600(),\n totalVoteCountTextFont:\n configurationPollsBubbleStyle?.totalVoteCountTextFont ||\n fontHelper(_theme.typography.subtitle2),\n totalVoteCountTextColor:\n configurationPollsBubbleStyle?.totalVoteCountTextColor ||\n _theme.palette.getAccent600(),\n selectedPollOptionBackground:\n configurationPollsBubbleStyle?.selectedPollOptionBackground ||\n _theme.palette.getAccent200(),\n userSelectedOptionBackground:\n configurationPollsBubbleStyle?.userSelectedOptionBackground ||\n _theme.palette.getPrimary(),\n pollOptionBorder:\n configurationPollsBubbleStyle?.pollOptionBorder ||\n `1px solid ${_theme.palette.getAccent100()}`,\n pollOptionBorderRadius:\n configurationPollsBubbleStyle?.pollOptionBorderRadius || \"8px\",\n };\n\n return (\n \n );\n }\n\n getPollBubbleData(message: CometChat.CustomMessage, key?: string) {\n let data: any = message.getCustomData();\n if (key) {\n if (key === \"options\") {\n return Object.values(data[key]);\n } else {\n return data[key];\n }\n } else {\n return message.getSender().getUid();\n }\n }\n\n override getAttachmentOptions(theme: CometChatTheme, id: any) {\n this.theme = theme;\n if (!id?.parentMessageId) {\n let configurationOptionStyle = this.configuration?.getOptionStyle();\n const messageComposerActions: CometChatMessageComposerAction[] =\n super.getAttachmentOptions(theme, id);\n let newAction: CometChatMessageComposerAction =\n new CometChatMessageComposerAction({\n id: PollsConstants.extension_poll,\n title: localize(\"POLLS\"),\n iconURL: this.configuration?.getOptionIconURL()\n ? this.configuration?.getOptionIconURL()\n : PollsIcon,\n iconTint:\n configurationOptionStyle?.iconTint || theme.palette.getAccent700(),\n titleColor:\n configurationOptionStyle?.titleColor ||\n theme.palette.getAccent600(),\n titleFont:\n configurationOptionStyle?.titleFont ||\n fontHelper(theme.typography.subtitle1),\n background:\n configurationOptionStyle?.background ||\n theme.palette.getAccent100(),\n onClick: (...args) => {\n this.onPollsButtonClicked(theme, ...args);\n },\n });\n messageComposerActions.push(newAction);\n return messageComposerActions;\n } else {\n return super.getAttachmentOptions(theme, id);\n }\n }\n\n onPollsButtonClicked(theme: CometChatTheme, ...args: any[]) {\n const [data] = args;\n let user = data[0];\n let group = data[1];\n let configurationCreatePollStyle = this.configuration?.getCreatePollStyle();\n let createPollStyle = {\n placeholderTextFont:\n configurationCreatePollStyle?.placeholderTextFont ||\n fontHelper(theme.typography.subtitle1),\n placeholderTextColor:\n configurationCreatePollStyle?.placeholderTextColor ||\n theme.palette.getAccent600(),\n deleteIconTint:\n configurationCreatePollStyle?.deleteIconTint ||\n theme.palette.getAccent600(),\n titleFont:\n configurationCreatePollStyle?.titleFont ||\n fontHelper(theme.typography.title1),\n titleColor:\n configurationCreatePollStyle?.titleColor || theme.palette.getAccent(),\n closeIconTint:\n configurationCreatePollStyle?.closeIconTint ||\n theme.palette.getPrimary(),\n questionInputBackground:\n configurationCreatePollStyle?.questionInputBackground ||\n theme.palette.getAccent100(),\n optionInputBackground:\n configurationCreatePollStyle?.optionInputBackground ||\n theme.palette.getAccent100(),\n answerHelpTextFont:\n configurationCreatePollStyle?.answerHelpTextFont ||\n fontHelper(theme.typography.caption1),\n answerHelpTextColor:\n configurationCreatePollStyle?.answerHelpTextColor ||\n theme.palette.getAccent400(),\n addAnswerIconTint:\n configurationCreatePollStyle?.addAnswerIconTint ||\n theme.palette.getPrimary(),\n createPollButtonTextFont:\n configurationCreatePollStyle?.createPollButtonTextFont ||\n fontHelper(theme.typography.text2),\n createPollButtonTextColor:\n configurationCreatePollStyle?.createPollButtonTextColor ||\n theme.palette.getAccent(\"dark\"),\n createPollButtonBackground:\n configurationCreatePollStyle?.createPollButtonBackground ||\n theme.palette.getPrimary(),\n addAnswerTextFont:\n configurationCreatePollStyle?.addAnswerTextFont ||\n fontHelper(theme.typography.text2),\n addAnswerTextColor:\n configurationCreatePollStyle?.addAnswerTextColor ||\n theme.palette.getPrimary(),\n errorTextFont:\n configurationCreatePollStyle?.errorTextFont ||\n fontHelper(theme.typography.subtitle1),\n errorTextColor:\n configurationCreatePollStyle?.errorTextColor ||\n theme.palette.getError(),\n optionPlaceholderTextFont:\n configurationCreatePollStyle?.optionPlaceholderTextFont ||\n fontHelper(theme.typography.subtitle1),\n optionPlaceholderTextColor:\n configurationCreatePollStyle?.optionPlaceholderTextColor ||\n theme.palette.getAccent600(),\n questionInputTextFont:\n configurationCreatePollStyle?.questionInputTextFont ||\n fontHelper(theme.typography.subtitle2),\n questionInputTextColor:\n configurationCreatePollStyle?.questionInputTextColor ||\n theme.palette.getAccent600(),\n optionInputTextFont:\n configurationCreatePollStyle?.optionInputTextFont ||\n fontHelper(theme.typography.subtitle2),\n optionInputTextColor:\n configurationCreatePollStyle?.optionInputTextColor ||\n theme.palette.getAccent600(),\n width: configurationCreatePollStyle?.width || \"360px\",\n height: configurationCreatePollStyle?.height || \"440px\",\n border: configurationCreatePollStyle?.border || \"\",\n borderRadius: configurationCreatePollStyle?.borderRadius || \"8px\",\n background:\n configurationCreatePollStyle?.background ||\n theme.palette.getAccent900(),\n position: \"absolute\",\n zIndex: 1,\n };\n CometChatUIEvents.ccShowModal.next({\n child: this.getPollView(user, group, createPollStyle),\n });\n }\n\n getPollView(\n user: CometChat.User,\n group: CometChat.Group,\n createPollStyle: CreatePollStyle\n ) {\n return (\n \n \n \n );\n }\n\n triggerCloseEvent() {\n CometChatUIEvents.ccHideModal.next();\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === PollsConstants.extension_poll &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_POLL\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FPolls%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FPolls%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.779983%2C1.25%20C14.2709124%2C1.25043259%2014.7438187%2C1.42418565%2015.1167078%2C1.73706699%20L15.2516928%2C1.86085235%20L20.4715927%2C7.08218001%20C20.8991636%2C7.51561025%2021.1196388%2C8.11205589%2021.0768145%2C8.71941733%20C21.0476811%2C9.13260508%2020.689109%2C9.44394267%2020.2759212%2C9.41480928%20C19.8971658%2C9.38810367%2019.6039928%2C9.08457801%2019.580201%2C8.71591608%20L19.5805293%2C8.613916%20C19.5905393%2C8.47194719%2019.5513165%2C8.33202895%2019.4730888%2C8.21873863%20L19.4072645%2C8.13914765%20L14.1905599%2C2.92103945%20C14.1031809%2C2.83352807%2013.9908865%2C2.77665655%2013.8706878%2C2.75733888%20L13.7793226%2C2.75%20L4.33297476%2C2.75%20C4.04324415%2C2.75%203.80281908%2C2.96150888%203.75763137%2C3.23870267%20L3.75%2C3.33333333%20L3.75%2C20.6666667%20C3.75%2C20.9566568%203.961452%2C21.1971647%204.2384242%2C21.2423664%20L4.33297476%2C21.25%20L9.6648738%2C21.25%20C10.0790874%2C21.25%2010.4148738%2C21.5857864%2010.4148738%2C22%20C10.4148738%2C22.3796958%2010.1327199%2C22.693491%209.76664435%2C22.7431534%20L9.6648738%2C22.75%20L4.33297476%2C22.75%20C3.23255355%2C22.75%202.33150187%2C21.8965632%202.25522974%2C20.8154444%20L2.25%2C20.6666667%20L2.25%2C3.33333333%20C2.25%2C2.23280908%203.10320728%2C1.33152341%204.18421182%2C1.25523113%20L4.33297476%2C1.25%20L13.779983%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M13.6637981%2C1.25%20C14.0434938%2C1.25%2014.357289%2C1.53215388%2014.4069515%2C1.89822944%20L14.4137981%2C2%20L14.4137981%2C7.33333333%20C14.4137981%2C7.62332346%2014.6252501%2C7.86383136%2014.9022223%2C7.90903304%20L14.9967728%2C7.91666667%20L20.3286719%2C7.91666667%20C20.7428854%2C7.91666667%2021.0786719%2C8.2524531%2021.0786719%2C8.66666667%20C21.0786719%2C9.04636243%2020.796518%2C9.36015763%2020.4304424%2C9.40982005%20L20.3286719%2C9.41666667%20L14.9967728%2C9.41666667%20C13.8963516%2C9.41666667%2012.9952999%2C8.56322987%2012.9190278%2C7.4821111%20L12.9137981%2C7.33333333%20L12.9137981%2C2%20C12.9137981%2C1.58578644%2013.2495845%2C1.25%2013.6637981%2C1.25%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C9.420279%20C9.24921801%2C9.09111393%209.71989329%2C9.02810717%2010.0490584%2C9.27954946%20C10.3482993%2C9.50813337%2010.4275748%2C9.91790155%2010.2506031%2C10.2378223%20L10.1897879%2C10.3308321%20L8.25879925%2C12.8586842%20C8.01208284%2C13.1778547%207.64305532%2C13.3791966%207.21567496%2C13.4156509%20C6.86419538%2C13.4339623%206.52012946%2C13.3223779%206.23838713%2C13.0959918%20L6.12161623%2C12.9919845%20L5.12632841%2C11.9608734%20C4.838658%2C11.6628489%204.84705165%2C11.1880493%205.14507615%2C10.9003789%20C5.41600752%2C10.6388603%205.83303397%2C10.6220228%206.1227489%2C10.845033%20L6.20557062%2C10.9191266%20L7.125%2C11.871%20L8.99777572%2C9.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M8.99777572%2C15.420279%20C9.24921801%2C15.0911139%209.71989329%2C15.0281072%2010.0490584%2C15.2795495%20C10.3482993%2C15.5081334%2010.4275748%2C15.9179016%2010.2506031%2C16.2378223%20L10.1897879%2C16.3308321%20L8.25879925%2C18.8586842%20C8.01208284%2C19.1778547%207.64305532%2C19.3791966%207.21567496%2C19.4156509%20C6.86419538%2C19.4339623%206.52012946%2C19.3223779%206.23838713%2C19.0959918%20L6.12161623%2C18.9919845%20L5.12632841%2C17.9608734%20C4.838658%2C17.6628489%204.84705165%2C17.1880493%205.14507615%2C16.9003789%20C5.41600752%2C16.6388603%205.83303397%2C16.6220228%206.1227489%2C16.845033%20L6.20557062%2C16.9191266%20L7.125%2C17.871%20L8.99777572%2C15.420279%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M15.6632602%2C11.9166667%20C16.0774738%2C11.9166667%2016.4132602%2C12.2524531%2016.4132602%2C12.6666667%20C16.4132602%2C13.0463624%2016.1311063%2C13.3601576%2015.7650308%2C13.4098201%20L15.6632602%2C13.4166667%20L12.3308233%2C13.4166667%20C11.9166098%2C13.4166667%2011.5808233%2C13.0808802%2011.5808233%2C12.6666667%20C11.5808233%2C12.2869709%2011.8629772%2C11.9731757%2012.2290528%2C11.9235133%20L12.3308233%2C11.9166667%20L15.6632602%2C11.9166667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M21.1106837%2C10.5779533%20C20.4095395%2C10.5779533%2019.7375424%2C10.8584991%2019.2444627%2C11.3570467%20L12.4669093%2C18.1364079%20C12.3622379%2C18.2411074%2012.2908946%2C18.3744435%2012.2618676%2C18.5196176%20L11.5953802%2C21.8529509%20C11.4904492%2C22.3777472%2011.953163%2C22.8404132%2012.4779485%2C22.7354279%20L15.8103854%2C22.0687612%20C15.9555979%2C22.0397109%2016.0889603%2C21.9683215%2016.1936616%2C21.8635921%20L22.9740599%2C15.0813699%20C23.4695748%2C14.5910412%2023.75%2C13.9189715%2023.75%2C13.2177778%20C23.75%2C12.516584%2023.4695748%2C11.8445143%2022.9711997%2C11.35134%20L22.8310414%2C11.2210775%20C22.3327458%2C10.7984458%2021.7321255%2C10.5779533%2021.1106837%2C10.5779533%20Z%20M21.1106837%2C12.0779533%20C21.3769595%2C12.0779533%2021.6343527%2C12.1724444%2021.8371937%2C12.3440921%20L21.9342889%2C12.4349375%20C22.129767%2C12.628969%2022.25%2C12.9171205%2022.25%2C13.2177778%20L22.242717%2C13.345678%20C22.2137413%2C13.5991981%2022.0992456%2C13.8367894%2021.9161173%2C14.0180067%20L15.293%2C20.642%20L13.287%2C21.043%20L13.688%2C19.035%20L20.3081104%2C12.4147032%20C20.5222805%2C12.1981735%2020.8102464%2C12.0779533%2021.1106837%2C12.0779533%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDelete%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDelete%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%223.6363627%22%20x2%3D%2220%22%20y2%3D%223.6363627%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.0454545%2C0%20L7.95454545%2C0%20C7.20142989%2C0%206.59090909%2C0.610520639%206.59090909%2C1.36363601%20L6.59090909%2C3.6363627%20L13.4090909%2C3.6363627%20L13.4090909%2C1.36363601%20C13.4090909%2C0.610520639%2012.7985701%2C0%2012.0454545%2C0%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%227.95454545%22%20y1%3D%2215.2272688%22%20x2%3D%227.95454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2212.0454545%22%20y1%3D%2215.2272688%22%20x2%3D%2212.0454545%22%20y2%3D%228.40908875%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16.2363636%2C18.7454497%20C16.1838968%2C19.4542339%2015.5925391%2C20.0019341%2014.8818182%2C20%20L5.11818182%2C20%20C4.40746088%2C20.0019341%203.81610324%2C19.4542339%203.76363636%2C18.7454497%20L2.5%2C3.6363627%20L17.5%2C3.6363627%20L16.2363636%2C18.7454497%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { PollsConfiguration } from \"./PollsConfiguration\";\nimport { PollsExtensionDecorator } from \"./PollsExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class PollsExtension extends ExtensionsDataSource {\n private configuration?: PollsConfiguration;\n \n constructor(configuration?: PollsConfiguration) {\n super();\n this.configuration = configuration;\n }\n \n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new PollsExtensionDecorator(dataSource, this.configuration)\n );\n }\n \n override getExtensionId(): string {\n return ExtensionsId.polls;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessageEvents, CometChatTheme, CometChatUIEvents, CometChatUIKitConstants, fontHelper, MessageStatus, PanelAlignment } from \"@cometchat/uikit-resources\";\nimport { IActiveChatChanged } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility, SmartRepliesConstants, SmartReplies } from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React, { CSSProperties } from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { SmartRepliesConfiguration } from \"./SmartRepliesConfiguration\";\n\nconst CometChatSmartReplyBubble = createComponent({\n tagName: 'smart-replies',\n elementClass: SmartReplies,\n react: React,\n events: {\n 'ccReplyClicked': 'cc-reply-clicked',\n 'ccCloseClicked': 'cc-close-clicked'\n }\n});\n\nexport class SmartReplyExtensionDecorator extends DataSourceDecorator {\n public configuration?: SmartRepliesConfiguration;\n public theme?: CometChatTheme;\n private LISTENER_ID: string = \"smartreply__listener\";\n private activeUser!: CometChat.User;\n private activeGroup!: CometChat.Group;\n public currentMessage: CometChat.BaseMessage | null = null;\n public loggedInUser!: CometChat.User | null;\n\n constructor(dataSource: DataSource, configuration?: SmartRepliesConfiguration, theme?: CometChatTheme) {\n super(dataSource)\n this.configuration = configuration;\n this.theme = theme || new CometChatTheme({});\n this.addMessageListener();\n }\n\n private addMessageListener(): void {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null) => {\n if (user) {\n this.loggedInUser = user\n }\n }\n );\n\n CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage: CometChat.TextMessage) => {\n if (textMessage != null && this.loggedInUser && this.loggedInUser?.getUid() != textMessage.getSender().getUid()) {\n this.currentMessage = textMessage;\n if (textMessage.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user && this.activeUser != null) {\n if (textMessage.getSender() !== null && textMessage.getSender().getUid() !== null && this.activeUser.getUid() === textMessage.getSender().getUid()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: textMessage, child: this.getSmartReplyView(textMessage), position: PanelAlignment.messageListFooter });\n }\n } else if (textMessage.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.group && this.activeGroup != null) {\n if (this.activeGroup.getGuid() !== null && this.activeGroup.getGuid() === textMessage.getReceiverId()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: textMessage, child: this.getSmartReplyView(textMessage), position: PanelAlignment.messageListFooter });\n }\n }\n }\n })\n\n CometChatUIEvents.ccActiveChatChanged.subscribe(\n (data: IActiveChatChanged) => {\n this.currentMessage = data.message!;\n this.activeUser = data.user!;\n this.activeGroup = data.group!;\n if (this.currentMessage instanceof CometChat.TextMessage && this.currentMessage !== null && this.currentMessage.getSender() !== null && this.loggedInUser !== null && this.currentMessage.getSender().getUid() !== null && this.currentMessage.getSender().getUid() !== this.loggedInUser.getUid()) {\n CometChatUIEvents.ccShowPanel.next({ configuration: this.configuration, message: this.currentMessage!, child: this.getSmartReplyView(this.currentMessage) });\n }\n }\n )\n CometChatMessageEvents.ccMessageSent.subscribe(\n () => {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n )\n }\n\n getReplies(message: CometChat.TextMessage) {\n let smartReply: any = message;\n const smartReplyObject = smartReply?.metadata?.[SmartRepliesConstants.injected]?.extensions?.[SmartRepliesConstants.smart_reply];\n if (smartReplyObject?.reply_positive && smartReplyObject?.reply_neutral && smartReplyObject?.reply_negative) {\n const { reply_positive, reply_neutral, reply_negative } = smartReplyObject;\n return [reply_positive, reply_neutral, reply_negative];\n }\n\n return null;\n }\n\n getSmartReplyStyle() {\n const configurationSmartRepliesStyle = this.configuration?.getSmartRepliesStyle();\n return {\n replyTextFont: configurationSmartRepliesStyle?.replyTextFont || fontHelper((this.theme as CometChatTheme).typography.caption1),\n replyTextColor: configurationSmartRepliesStyle?.replyTextColor || this.theme?.palette.getAccent(),\n replyBackground: configurationSmartRepliesStyle?.replyBackground || \"inherit\",\n boxShadow: configurationSmartRepliesStyle?.boxShadow || `0px 0px 1px ${this.theme?.palette.getAccent600()}`,\n closeIconTint: configurationSmartRepliesStyle?.closeIconTint || this.theme?.palette.getAccent600(),\n background: configurationSmartRepliesStyle?.background || \"inherit\",\n width: configurationSmartRepliesStyle?.width || \"100%\",\n height: configurationSmartRepliesStyle?.height || \"100%\",\n border: configurationSmartRepliesStyle?.border || \"none\",\n display: \"flex\",\n justifyContent: \"flex-start\"\n }\n }\n\n sendSmartReply(_event: any) {\n let receiverType: string = this.activeUser ? CometChatUIKitConstants.MessageReceiverType.user : CometChatUIKitConstants.MessageReceiverType.group;\n let reply = _event?.detail?.reply;\n let _message = this.currentMessage;\n if (reply && reply.trim().length > 0 && _message) {\n let newMessage: CometChat.TextMessage;\n if (_message.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.user) {\n newMessage = new CometChat.TextMessage(_message.getSender().getUid(), reply.trim(), receiverType);\n newMessage.setReceiver(this.activeUser);\n } else {\n const group: CometChat.Group = _message.getReceiver() as CometChat.Group;\n newMessage = new CometChat.TextMessage(group.getGuid(), reply.trim(), receiverType);\n newMessage.setReceiver(this.activeGroup);\n }\n if (_message.getParentMessageId() > 0) {\n newMessage.setParentMessageId(_message.getParentMessageId());\n }\n newMessage.setCategory(CometChatUIKitConstants.MessageCategory.message as CometChat.MessageCategory);\n newMessage.setSender(this.loggedInUser!);\n newMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n newMessage.setMuid(CometChatUIKitUtility.ID());\n CometChatMessageEvents.ccMessageSent.next({ message: newMessage, status: MessageStatus.inprogress });\n CometChat.sendMessage(newMessage).then(\n (message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success })\n }, (error: CometChat.CometChatException) => {\n newMessage.setMetadata({ error: true })\n CometChatMessageEvents.ccMessageSent.next({ message: newMessage, status: MessageStatus.error })\n }\n )\n }\n }\n\n closeSmartReply() {\n CometChatUIEvents.ccHidePanel.next(PanelAlignment.messageListFooter);\n this.currentMessage = null;\n }\n\n getSmartReplyButtonStyle() {\n return {\n \"background\": \"inherit\"\n } as CSSProperties;\n }\n\n getSmartReplyView(message: CometChat.TextMessage) {\n\n if (!this.getReplies(message)) {\n return null;\n }\n\n return (\n
    \n { e[\"msg\"] = message; this.sendSmartReply(e) }}\n ccCloseClicked={this.closeSmartReply}\n >\n
    \n )\n }\n\n override getId(): string {\n return \"smartreply\";\n }\n}\n","import { SmartReplyExtensionDecorator } from \"./SmartRepliesExtensionDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { SmartRepliesConfiguration } from \"./SmartRepliesConfiguration\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class SmartReplyExtension extends ExtensionsDataSource {\n private configuration?: SmartRepliesConfiguration;\n private theme?: CometChatTheme;\n\n constructor(configuration?: SmartRepliesConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new SmartReplyExtensionDecorator(dataSource, this.configuration, this.theme)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.smartReply;\n }\n}","import {\n CometChatUIKitConstants,\n CometChatMessageTemplate,\n CometChatTheme,\n localize,\n MessageBubbleAlignment,\n Placement,\n fontHelper,\n CometChatMessageEvents,\n MessageStatus,\n} from \"@cometchat/uikit-resources\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n StickersConstants,\n CometChatUIKitUtility,\n StickersKeyboard,\n} from \"@cometchat/uikit-shared\";\nimport { PopoverStyle, CometChatImageBubble } from \"@cometchat/uikit-elements\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\nimport { DataSource } from \"../../Shared/Framework/DataSource\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { StickersConfiguration } from \"./StickersConfiguration\";\nimport StickerIcon from \"./assets/Stickers.svg\";\nimport CloseIcon from \"./assets/close.svg\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nconst CometChatStickersKeyboard = createComponent({\n tagName: \"stickers-keyboard\",\n elementClass: StickersKeyboard,\n react: React,\n events: {\n ccStickerClicked: \"cc-sticker-clicked\",\n },\n});\n\nconst CometChatImageMessageBubble = createComponent({\n tagName: \"cometchat-image-bubble\",\n elementClass: CometChatImageBubble,\n react: React,\n});\n\nexport class StickersExtensionDecorator extends DataSourceDecorator {\n public configuration?: StickersConfiguration;\n public newDataSource!: DataSource;\n public showStickerKeyboard: boolean = false;\n public theme!: CometChatTheme;\n private id: any;\n private user: any;\n private group: any;\n\n constructor(dataSource: DataSource, configuration?: StickersConfiguration) {\n super(dataSource);\n this.newDataSource = dataSource;\n this.configuration = configuration;\n }\n\n getDataSource() {\n return this.newDataSource;\n }\n\n override getAllMessageTemplates(\n theme?: CometChatTheme | undefined,\n additionalConfigurations?: any\n ): CometChatMessageTemplate[] {\n this.theme = theme as CometChatTheme;\n let template: CometChatMessageTemplate[] = super.getAllMessageTemplates(\n this.theme,\n additionalConfigurations\n );\n if (!this.checkIfTemplateExist(template, StickersConstants.sticker)) {\n template.push(this.getStickerTemplate(this.theme));\n return template;\n }\n return template;\n }\n\n override getAuxiliaryOptions(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n this.id = id;\n this.user = user;\n this.group = group;\n let auxiliaryOptions = super.getAuxiliaryOptions(id, theme, user, group);\n auxiliaryOptions.push(\n this.getStickerAuxiliaryButton(id, theme, user, group)\n );\n return auxiliaryOptions;\n }\n\n getStickerAuxiliaryButton(\n id: Map,\n theme: CometChatTheme,\n user?: CometChat.User,\n group?: CometChat.Group\n ) {\n let configurationStickersStyle = this.configuration?.getStickersStyle();\n\n let emojiButtonStyle: any = {\n height: configurationStickersStyle?.sticketButtonHeight || \"24px\",\n width: configurationStickersStyle?.stickerButtonWidth || \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint:\n configurationStickersStyle?.stickerButtonIconTint ||\n theme.palette.getAccent500(),\n background: \"transparent\",\n };\n\n let style = new PopoverStyle({\n width: configurationStickersStyle?.width || \"300px\",\n height: configurationStickersStyle?.height || \"400px\",\n background: theme?.palette?.getBackground(),\n borderRadius: \"12px\",\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n\n let stickerKeyboardStyle = {\n width: configurationStickersStyle?.width || \"300px\",\n height: configurationStickersStyle?.height || \"400px\",\n border: configurationStickersStyle?.border || \"none\",\n emptyStateTextFont:\n configurationStickersStyle?.emptyStateTextFont ||\n fontHelper(theme.typography.title1),\n emptyStateTextColor:\n configurationStickersStyle?.emptyStateTextColor ||\n theme.palette.getAccent600(),\n errorStateTextFont:\n configurationStickersStyle?.errorStateTextFont ||\n fontHelper(theme.typography.title1),\n errorStateTextColor:\n configurationStickersStyle?.errorStateTextColor ||\n theme.palette.getAccent600(),\n loadingIconTint:\n configurationStickersStyle?.loadingIconTint ||\n theme.palette.getAccent600(),\n background:\n configurationStickersStyle?.background || theme.palette.getBackground(),\n borderRadius: configurationStickersStyle?.borderRadius || \"12px\",\n };\n\n let openIconURL = this.configuration?.getStickerIconURL() || StickerIcon;\n let closeIconURL = this.configuration?.getCloseIconURL() || CloseIcon;\n\n return (\n \n
    \n \n
    \n
    \n this.sendSticker(e)}\n />\n
    \n \n );\n }\n\n sendSticker(event: any) {\n try {\n let details = event?.detail;\n let sticker = {\n name: details?.stickerName,\n URL: details?.stickerURL,\n };\n const receiverId: string = this.user?.getUid() || this.group?.getGuid();\n const receiverType: string = this.user\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n const { parentMessageId } = this.id;\n\n const customData = {\n sticker_url: sticker.URL,\n sticker_name: sticker.name,\n };\n\n const customType = StickersConstants.sticker;\n\n const customMessage: CometChat.CustomMessage =\n new CometChat.CustomMessage(\n receiverId,\n receiverType,\n customType,\n customData\n );\n\n if (parentMessageId) {\n customMessage.setParentMessageId(parentMessageId);\n }\n\n customMessage.setMetadata({ incrementUnreadCount: true });\n customMessage.shouldUpdateConversation(true);\n (customMessage as any).setSentAt(\n CometChatUIKitUtility.getUnixTimestamp()\n );\n\n customMessage.setMuid(CometChatUIKitUtility.ID());\n\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.inprogress,\n });\n\n CometChat.sendCustomMessage(customMessage).then(\n (message) => {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.success,\n });\n },\n (error) => {\n customMessage.setMetadata({ error: true });\n CometChatMessageEvents.ccMessageSent.next({\n message: customMessage,\n status: MessageStatus.error,\n });\n }\n );\n } catch (error: any) {\n console.log(\"error in sending sticker\", error);\n }\n }\n\n getSticker(message: CometChat.CustomMessage) {\n let stickerData: any;\n if (\n CometChatUIKitUtility.checkHasOwnProperty(\n message,\n StickersConstants.data\n ) &&\n CometChatUIKitUtility.checkHasOwnProperty(\n (message as CometChat.CustomMessage).getData(),\n StickersConstants.custom_data\n )\n ) {\n stickerData = message.getCustomData();\n if (\n CometChatUIKitUtility.checkHasOwnProperty(\n stickerData,\n StickersConstants.sticker_url\n )\n ) {\n return stickerData?.sticker_url;\n } else {\n return \"\";\n }\n } else {\n return \"\";\n }\n }\n\n getStickerMessageContentView(\n stickerMessage: CometChat.CustomMessage,\n _theme: CometChatTheme\n ) {\n const imageBubbleStyle: any = {\n height: \"128px\",\n width: \"128px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n };\n return (\n \n );\n }\n\n getStickerTemplate(_theme: CometChatTheme): CometChatMessageTemplate {\n return new CometChatMessageTemplate({\n type: StickersConstants.sticker,\n category: CometChatUIKitConstants.MessageCategory.custom,\n contentView: (\n message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n let stickerMessage: CometChat.CustomMessage =\n message as CometChat.CustomMessage;\n if (stickerMessage.getDeletedAt()) {\n return super.getDeleteMessageBubble(stickerMessage, _theme);\n }\n return this.getStickerMessageContentView(stickerMessage, _theme);\n },\n options: (\n loggedInUser: CometChat.User,\n messageObject: CometChat.BaseMessage,\n theme: CometChatTheme,\n group?: CometChat.Group\n ) => {\n return super.getCommonOptions(\n loggedInUser,\n messageObject,\n theme,\n group\n );\n },\n bottomView: (\n _message: CometChat.BaseMessage,\n _alignment: MessageBubbleAlignment\n ) => {\n return ChatConfigurator.getDataSource().getBottomView(\n _message,\n _alignment\n );\n },\n });\n }\n\n checkIfTemplateExist(\n template: CometChatMessageTemplate[],\n type: string\n ): boolean {\n return template.some((obj) => obj.type === type);\n }\n\n override getAllMessageCategories(): string[] {\n let categories: string[] = super.getAllMessageCategories();\n if (\n !categories.some(\n (category) =>\n category === CometChatUIKitConstants.MessageCategory.custom\n )\n ) {\n categories.push(CometChatUIKitConstants.MessageCategory.custom);\n }\n return categories;\n }\n\n override getAllMessageTypes(): string[] {\n let types: string[] = super.getAllMessageTypes();\n if (!types.some((type) => type === StickersConstants.sticker)) {\n types.push(StickersConstants.sticker);\n }\n return types;\n }\n\n override getId(): string {\n return \"stickers\";\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations?: any\n ): string {\n const message: CometChat.BaseMessage | undefined =\n conversation.getLastMessage();\n if (\n message != null &&\n message.getType() === StickersConstants.sticker &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n ) {\n return localize(\"CUSTOM_MESSAGE_STICKER\");\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FStickers%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FStickers%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M5.67349142%2C7.33338221%20C5.86012572%2C7.33338221%206.01142272%2C7.48460989%206.01142272%2C7.67115869%20C6.01142272%2C7.85770748%205.86012572%2C8.00893516%205.67349142%2C8.00893516%20C5.48685711%2C8.00893516%205.33556012%2C7.85770748%205.33556012%2C7.67115869%20C5.33556012%2C7.58157479%205.37116349%2C7.49566003%205.4345379%2C7.43231465%20C5.49791231%2C7.36896927%205.58386646%2C7.33338221%205.67349142%2C7.33338221%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.23283692%2C13.0400269%20C5.36112225%2C15.1816508%207.58282264%2C16.5229567%2010.0043478%2C16.5244579%20C10.2778756%2C16.5227578%2010.5510655%2C16.5049493%2010.8224973%2C16.4711247%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M20%2C9.57337357%20C19.7666207%2C4.11103074%2015.187631%2C-0.151378825%209.72001617%2C0.00412271646%20C4.25240139%2C0.159624258%20-0.0767041446%2C4.67538425%200.00103066029%2C10.1421537%20C0.0787654651%2C15.6089231%204.5345202%2C20%2010.0043478%2C20%20L10.4489943%2C20%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.1831154%2C7.92004661%20C12.559175%2C7.32283168%2013.215699%2C6.96047481%2013.921683%2C6.96047481%20C14.6276671%2C6.96047481%2015.2841911%2C7.32283168%2015.6602507%2C7.92004661%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2220%22%20y1%3D%229.57337357%22%20x2%3D%2210.4489943%22%20y2%3D%2219.9911111%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.4489943%2C19.9911111%20L10.4489943%2C19.1022257%20C10.4588042%2C13.8367116%2014.7320632%2C9.57337357%2020%2C9.57337357%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { StickersConfiguration } from \"./StickersConfiguration\";\nimport { StickersExtensionDecorator } from './StickersExtensionDecorator';\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class StickersExtension extends ExtensionsDataSource {\n private configuration?: StickersConfiguration;\n\n constructor(configuration?: StickersConfiguration) {\n super();\n this.configuration = configuration;\n }\n\n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new StickersExtensionDecorator(dataSource, this.configuration)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.stickers;\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n MentionsTargetElement,\n MessageBubbleAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n} from \"@cometchat/uikit-shared\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\n\nexport class TextModeratorExtensionDecorator extends DataSourceDecorator {\n override getId(): string {\n return \"textmoderator\";\n }\n\n getModeratedtext(message: CometChat.TextMessage): string {\n let text: string = CometChatUIKitUtility.getExtensionData(message);\n if (text?.trim()?.length > 0) {\n return text;\n } else {\n return message.getText();\n }\n }\n\n override getLastConversationMessage(\n conversation: CometChat.Conversation,\n loggedInUser: CometChat.User,\n additionalConfigurations: any\n ): string {\n const message: CometChat.TextMessage = conversation.getLastMessage();\n\n if (\n message &&\n !message.getDeletedAt() &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message\n ) {\n let subtitle = this.getModeratedtext(message);\n let messageObj = conversation.getLastMessage();\n\n let config = {\n ...additionalConfigurations,\n textFormatters:\n additionalConfigurations?.textFormatters &&\n additionalConfigurations?.textFormatters.length\n ? [...additionalConfigurations.textFormatters]\n : [this.getMentionsTextFormatter({ theme: additionalConfigurations.theme, disableMentions: additionalConfigurations.disableMentions })],\n };\n\n let textFormatters: Array = config.textFormatters;\n if (config && !config.disableMentions) {\n let mentionsTextFormatter!: CometChatMentionsFormatter;\n for (let i = 0; i < textFormatters.length; i++) {\n if (textFormatters[i] instanceof CometChatMentionsFormatter) {\n mentionsTextFormatter = textFormatters[\n i\n ] as CometChatMentionsFormatter;\n mentionsTextFormatter.setMessage(messageObj);\n if (messageObj.getMentionedUsers().length) {\n mentionsTextFormatter.setCometChatUserGroupMembers(\n messageObj.getMentionedUsers()\n );\n }\n mentionsTextFormatter.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n if (mentionsTextFormatter) {\n break;\n }\n }\n }\n if (!mentionsTextFormatter) {\n mentionsTextFormatter =\n ChatConfigurator.getDataSource().getMentionsTextFormatter({\n messageObj,\n ...config,\n alignment: null,\n theme: additionalConfigurations.theme,\n });\n textFormatters.push(mentionsTextFormatter);\n }\n }\n\n if (\n messageObj &&\n messageObj instanceof CometChat.TextMessage\n ) {\n for (let i = 0; i < textFormatters.length; i++) {\n subtitle = textFormatters[i].getFormattedText(subtitle, { mentionsTargetElement: MentionsTargetElement.conversation })!;\n }\n }\n if (\n message &&\n conversation?.getConversationType() != CometChat.RECEIVER_TYPE.USER\n ) {\n if (\n message?.getSender().getUid() ==\n CometChatUIKitLoginListener?.getLoggedInUser()?.getUid()\n ) {\n subtitle = `${localize(\"YOU\")}: ${subtitle}`;\n } else {\n subtitle = `${message?.getSender().getName()}: ${subtitle}`;\n }\n }\n return subtitle;\n } else {\n return super.getLastConversationMessage(\n conversation,\n loggedInUser,\n additionalConfigurations\n );\n }\n }\n\n override getTextMessageContentView(\n message: CometChat.TextMessage,\n alignment: MessageBubbleAlignment,\n theme: CometChatTheme,\n additionalConfigurations?: any\n ) {\n let moderatedText = this.getModeratedtext(message);\n if (this.getModeratedtext(message) !== message.getText()) {\n message.setText(moderatedText);\n }\n return super.getTextMessageContentView(\n message,\n alignment,\n theme,\n additionalConfigurations\n );\n }\n}\n","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\"; \nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\"; \nimport {TextModeratorExtensionDecorator} from \"./TextModeratorExtensionDecorator\"; \nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nexport class TextModeratorExtension extends ExtensionsDataSource {\n\n override addExtension(): void {\n ChatConfigurator.enable(dataSource => new TextModeratorExtensionDecorator(dataSource));\n }\n\n override getExtensionId(): string {\n return ExtensionsId.profanityFilter;\n }\n\n override enable(): void {\n const promise1 = CometChat.isExtensionEnabled(ExtensionsId.profanityFilter);\n const promise2 = CometChat.isExtensionEnabled(ExtensionsId.dataMasking);\n Promise.all([promise1, promise2]).then((values) => {\n if(values.includes(true))\n {\n this.addExtension();\n }\n }).catch(error => {});\n }\n \n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { BaseStyle, ImageBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { DataSourceDecorator } from \"../../Shared/Framework/DataSourceDecorator\";\nimport PlaceholderImage from './assets/placeholder.png';\n\nexport class ThumbnailGenerationExtensionDecorator extends DataSourceDecorator {\n override getId(): string {\n return \"thumbnailgeneration\";\n }\n\n override getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, theme: CometChatTheme, onClick?: Function, style?: ImageBubbleStyle) {\n if(ChatConfigurator.names.includes(\"imagemoderation\")){\n return super.getImageMessageBubble(imageUrl, placeholderImage, message, theme);\n }else{\n let imageUrl = message.getAttachments()[0].getUrl();\n let metadata : any = message.getMetadata();\n if(metadata && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]){\n imageUrl = metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n return super.getImageMessageBubble(imageUrl, PlaceholderImage, message, theme);\n }\n }\n\n override getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, theme: CometChatTheme, thumbnailUrl?: string, onClick?: Function, style?: BaseStyle) {\n let metadata : any = message.getMetadata();\n let thumbnailImage = thumbnailUrl;\n if(metadata && metadata.hasOwnProperty(\"@injected\") && metadata[\"@injected\"].hasOwnProperty(\"extensions\") && metadata[\"@injected\"][\"extensions\"].hasOwnProperty(\"thumbnail-generation\") && metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"]){\n thumbnailImage = metadata[\"@injected\"][\"extensions\"][\"thumbnail-generation\"][\"url_small\"];\n }\n return super.getVideoMessageBubble(videoUrl, message, theme, thumbnailImage);\n }\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAuYAAAOBCAYAAAC9H2UFAAAABHNCSVQICAgIfAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAAzdEVYdENyZWF0aW9uIFRpbWUAVGh1cnNkYXkgMjkgRGV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AJCHMAAEhAmAMAQALCHAAAEhDmAACQgDAHAIAEhDkAACQgzAEAIAFhDgAACQhzAABIQJgDAEACwhwAABIQ5gAA/H/t1rEAAAAAwCB/62nsKIoYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgQcwAAGBBzAAAYEHMAABgIlsjTWURiJ80AAAAASUVORK5CYII=\"","import { ChatConfigurator } from \"../../Shared/Framework/ChatConfigurator\";\nimport { ExtensionsDataSource } from \"../../Shared/Framework/ExtensionsDataSource\";\nimport { ThumbnailGenerationExtensionDecorator } from \"./ThumbnailGenerationExtensionDecorator\";\nimport { ExtensionsId } from \"@cometchat/uikit-shared\";\n\nexport class ThumbnailGenerationExtension extends ExtensionsDataSource {\n \n override addExtension(): void {\n ChatConfigurator.enable(\n (dataSource: any) => new ThumbnailGenerationExtensionDecorator(dataSource)\n );\n }\n\n override getExtensionId(): string {\n return ExtensionsId.thumbnailGeneration;\n }\n}","import { CardMessage, ChatSdkEventInitializer, CometChatLocalize, CometChatMessageEvents, CustomInteractiveMessage, FormMessage, MessageStatus, SchedulerMessage } from \"@cometchat/uikit-resources\";\nimport { CometChatSoundManager, CometChatUIKitCalls, CometChatUIKitLoginListener, CometChatUIKitSharedSettings, CometChatUIKitUtility, InteractiveMessageUtils, UIKitSettings } from '@cometchat/uikit-shared';\n\nimport { AIAssistBotExtension } from \"../../AI/AIAssistBot/AIAssistBotExtension\";\nimport { AIConversationStarterExtension } from \"../../AI/AIConversationStarter/AIConversationStarterExtension\";\nimport { AIConversationSummaryExtension } from \"../../AI/AIConversationSummary/AIConversationSummaryExtension\";\nimport { AIExtensionDataSource } from \"../Framework/AIExtensionDataSource\";\nimport { AISmartRepliesExtension } from \"../../AI/AISmartReplies/AISmartRepliesExtension\";\nimport { CallingExtension } from \"../../Calling/CallingExtension\";\nimport { ChatConfigurator } from \"../Framework/ChatConfigurator\";\nimport { CollaborativeDocumentExtension } from \"../../Extensions/CollaborativeDocument/CollaborativeDocumentExtension\";\nimport { CollaborativeWhiteboardExtension } from \"../../Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { ExtensionsDataSource } from \"../Framework/ExtensionsDataSource\";\nimport { ImageModerationExtension } from \"../../Extensions/ImageModeration/ImageModerationExtension\";\nimport { LinkPreviewExtension } from \"../../Extensions/LinkPreview/LinkPreviewExtension\";\nimport { MessageTranslationExtension } from \"../../Extensions/MessageTranslation/MessageTranslationExtension\";\nimport { PollsExtension } from \"../../Extensions/Polls/PollsExtension\";\nimport { SmartReplyExtension } from \"../../Extensions/SmartReplies/SmartRepliesExtension\";\nimport { StickersExtension } from \"../../Extensions/Stickers/StickersExtension\";\nimport { TextModeratorExtension } from \"../../Extensions/TextModerator/TextModeratorExtension\";\nimport { ThumbnailGenerationExtension } from \"../../Extensions/ThumbnailGeneration/ThumbnailGenerationExtension\";\n\nclass CometChatUIKit {\n static uiKitSettings: UIKitSettings | null;\n static SoundManager: typeof CometChatSoundManager = CometChatSoundManager;\n static Localize: typeof CometChatLocalize = CometChatLocalize;\n static conversationUpdateSettings: CometChat.ConversationUpdateSettings;\n static init(uiKitSettings: UIKitSettings | null): Promise | undefined {\n CometChatUIKit.uiKitSettings = uiKitSettings\n if (!CometChatUIKit.checkAuthSettings()) return undefined;\n const appSettingsBuilder = new CometChat.AppSettingsBuilder();\n if (uiKitSettings!.getRoles()) {\n appSettingsBuilder.subscribePresenceForRoles(uiKitSettings!.getRoles());\n } else if (uiKitSettings!.getSubscriptionType() === \"ALL_USERS\") {\n appSettingsBuilder.subscribePresenceForAllUsers();\n } else if (uiKitSettings!.getSubscriptionType() === \"FRIENDS\") {\n appSettingsBuilder.subscribePresenceForFriends();\n }\n appSettingsBuilder.autoEstablishSocketConnection(uiKitSettings!.isAutoEstablishSocketConnection());\n appSettingsBuilder.setRegion(uiKitSettings!.getRegion());\n appSettingsBuilder.overrideAdminHost(uiKitSettings!.getAdminHost());\n appSettingsBuilder.overrideClientHost(uiKitSettings!.getClientHost());\n\n const appSettings = appSettingsBuilder.build();\n if (CometChat.setSource) {\n CometChat.setSource(\"uikit-v4\", \"web\", \"reactjs\");\n }\n CometChatUIKitSharedSettings.uikitSettings = CometChatUIKit.uiKitSettings;\n return new Promise((resolve, reject) => {\n (window).CometChatUiKit = {\n name: \"@cometchat/chat-uikit-react\",\n version: \"4.3.17\",\n };\n CometChat.init(uiKitSettings?.appId, appSettings).then(() => {\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n this.initiateAfterLogin()\n }\n return resolve(user!)\n }).catch((error: CometChat.CometChatException) => {\n console.log(error)\n return reject(error)\n })\n })\n .catch((error: CometChat.CometChatException) => {\n return reject(error)\n })\n });\n }\n\n static defaultExtensions: ExtensionsDataSource[] = [\n new StickersExtension(),\n new SmartReplyExtension(),\n new CollaborativeWhiteboardExtension(),\n new CollaborativeDocumentExtension(),\n new MessageTranslationExtension(),\n new TextModeratorExtension(),\n new ThumbnailGenerationExtension(),\n new LinkPreviewExtension(),\n new PollsExtension(),\n new ImageModerationExtension()\n ]\n\n static defaultAIFeatures: AIExtensionDataSource[] = [\n new AISmartRepliesExtension(),\n new AIConversationStarterExtension(),\n new AIConversationSummaryExtension(),\n new AIAssistBotExtension()\n ]\n\n static enableCalling() {\n try {\n if (CometChatUIKitCalls) {\n const callAppSetting = new CometChatUIKitCalls.CallAppSettingsBuilder()\n .setAppId(CometChatUIKit.uiKitSettings?.appId)\n .setRegion(CometChatUIKit.uiKitSettings?.region)\n .build();\n CometChatUIKitCalls.init(callAppSetting).then(\n () => {\n new CallingExtension().enable()\n },\n (error: any) => {\n console.log('CometChatCalls initialization failed with error:', error);\n },\n );\n }\n } catch (e) {\n console.log(e);\n }\n }\n\n private static initiateAfterLogin() {\n\n\n if (CometChatUIKit.uiKitSettings != null) {\n CometChat.getConversationUpdateSettings().then((res: CometChat.ConversationUpdateSettings) => {\n this.conversationUpdateSettings = res;\n })\n let extensionList: ExtensionsDataSource[] = this.uiKitSettings?.extensions || this.defaultExtensions;\n ChatSdkEventInitializer.attachListeners();\n CometChatUIKitLoginListener.attachListener();\n let aiFeaturesList: AIExtensionDataSource[] = this.uiKitSettings?.aiFeatures || this.defaultAIFeatures;\n\n if (extensionList.length > 0) {\n extensionList.forEach((extension: ExtensionsDataSource) => {\n extension?.enable();\n });\n }\n\n if (aiFeaturesList.length > 0) {\n aiFeaturesList.forEach((aiFeatures: AIExtensionDataSource) => {\n aiFeatures.enable();\n })\n }\n\n this.enableCalling();\n }\n }\n\n static login(uid: string): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChatUIKit.getLoggedinUser()?.then((user) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n this.initiateAfterLogin();\n return resolve(user);\n } else {\n CometChat.login(uid, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n CometChatUIKitLoginListener.setLoggedInUser(user);\n this.initiateAfterLogin();\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n }\n });\n });\n }\n\n static loginWithAuthToken(authToken: string): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.login(authToken).then((user: CometChat.User) => {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n ChatConfigurator.init();\n this.initiateAfterLogin();\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static getLoggedinUser(): Promise {\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n\n CometChat.getLoggedinUser().then((user: CometChat.User | null) => {\n if (user) {\n CometChatUIKitLoginListener.setLoggedInUser(user);\n }\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n })\n }\n\n static createUser(user: CometChat.User): Promise {\n\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.createUser(user, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static updateUser(user: CometChat.User): Promise {\n\n return new Promise((resolve, reject) => {\n if (!CometChatUIKit.checkAuthSettings()) return reject(\"uiKitSettings not available\");\n CometChat.updateUser(user, CometChatUIKit.uiKitSettings!.authKey!).then((user: CometChat.User) => {\n return resolve(user);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static logout(): Promise {\n\n return new Promise((resolve, reject) => {\n\n if (!CometChatUIKit.checkAuthSettings()) {\n const error = {\n code: \"ERROR_UIKIT_NOT_INITIALISED\",\n message: \"UIKItSettings not available\"\n }\n return reject(error);\n }\n CometChat.logout().then((message: object) => {\n CometChatUIKitLoginListener.removeLoggedInUser();\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n return reject(error);\n })\n });\n }\n\n static checkAuthSettings(): boolean {\n if (CometChatUIKit.uiKitSettings == null) {\n return false;\n }\n\n if (CometChatUIKit.uiKitSettings!.appId == null) {\n return false;\n }\n\n return true;\n }\n\n\n /**\n * Sends a form message and emits events based on the message status.\n * @param message - The form message to be sent.\n * @param disableLocalEvents - A boolean indicating whether to disable local events or not. Default value is false.\n */\n static sendFormMessage(\n message: FormMessage,\n disableLocalEvents: boolean = false\n ) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: FormMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as FormMessage;\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCardMessage(message: CardMessage, disableLocalEvents: boolean = false) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: CardMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as CardMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCustomInteractiveMessage(message: CustomInteractiveMessage, disableLocalEvents: boolean = false) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: CustomInteractiveMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as CustomInteractiveMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n });\n }\n\n static sendCustomMessage(message: CometChat.CustomMessage) {\n\n return new Promise((resolve, reject) => {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendCustomMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n });\n }\n\n static sendTextMessage(message: CometChat.TextMessage) {\n\n return new Promise((resolve, reject) => {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n });\n }\n\n static sendMediaMessage(message: CometChat.MediaMessage) {\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n return new Promise((resolve, reject) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.inprogress });\n\n CometChat.sendMediaMessage(message).then((message: CometChat.BaseMessage) => {\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.success });\n return resolve(message);\n }).catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error })\n CometChatMessageEvents.ccMessageSent.next({ message: message, status: MessageStatus.error });\n return reject(error);\n })\n })\n\n }\n\n\n static sendSchedulerMessage(message: SchedulerMessage, disableLocalEvents: boolean = false) {\n return new Promise((resolve, reject) => {\n if (!message?.getMuid()) {\n message.setMuid(CometChatUIKitUtility.ID());\n }\n message.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n CometChat.sendInteractiveMessage(message)\n .then((message: CometChat.BaseMessage) => {\n let interactiveMessage: SchedulerMessage = InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n ) as SchedulerMessage\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: interactiveMessage,\n status: MessageStatus.success,\n });\n }\n resolve(message);\n })\n .catch((error: CometChat.CometChatException) => {\n message.setMetadata({ error });\n if (!disableLocalEvents) {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n reject(error);\n });\n });\n }\n\n static getDataSource() {\n return ChatConfigurator.getDataSource();\n }\n\n}\n\nexport { CometChatUIKit };\n","import { CSSProperties } from \"react\";\nimport { BaseStyle, TabItemStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTabItem, TabAlignment } from \"@cometchat/uikit-resources\";\nimport { TabsStyle } from \"./TabsStyle\";\n\nexport const TabsWrapperStyle = (tabStyle: BaseStyle | undefined) => {\n\n return {\n height: tabStyle?.height || \"100%\", \n width: tabStyle?.width || \"100%\", \n borderRadius: tabStyle?.borderRadius || \"0\",\n border: tabStyle?.border || \"0 none\",\n background: tabStyle?.background || \"transparent\",\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'flex-start',\n position: 'relative'\n } as CSSProperties;\n}\n\nexport const ButtonStyle = (style: TabItemStyle, active: boolean, iconURL?: string) => {\n \n return {\n background: \"inherit\",\n buttonTextFont: active ? style?.activeTitleTextFont ?? style?.titleTextFont : style?.titleTextFont,\n buttonTextColor: active ? style?.activeTitleTextColor ?? style?.titleTextColor : style?.titleTextColor,\n buttonIconTint: active ? style?.activeIconTint ?? style?.iconTint : style?.iconTint,\n height: \"100%\",\n width: \"100%\",\n border: style?.border,\n borderRadius: style?.borderRadius,\n gap: \"8px\",\n padding: \"0\",\n justifyContent: !iconURL ? \"center\" : \"\",\n };\n}\n\nexport const getTabListStyle = (tabsStyle: TabsStyle | undefined, tabAlignment: TabAlignment) : CSSProperties => {\n let positionProperties;\n if(tabAlignment === TabAlignment.top || tabAlignment === TabAlignment.left){\n positionProperties = {\n top: \"0\",\n left: \"0\"\n };\n }else if(tabAlignment === TabAlignment.bottom){\n positionProperties = {\n bottom: \"2px\",\n left: \"2px\"\n };\n }else{\n positionProperties = {\n top: \"0\",\n right: \"0\"\n };\n }\n \n return {\n ...positionProperties,\n position: 'absolute',\n zIndex: \"2\",\n height: tabsStyle?.tabListHeight || '100%', \n width: tabsStyle?.tabListWidth || '100%', \n border: tabsStyle?.tabListBorder || '0 none', \n borderRadius: tabsStyle?.tabListBorderRadius || '0', \n background: tabsStyle?.tabListBackground || 'transparent',\n boxShadow: tabsStyle?.tabListBoxShadow || \"0\", \n padding: tabsStyle?.tabListPadding || \"0\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function getTabContentStyle(tabsStyle: TabsStyle | undefined) {\n\n return {\n height: tabsStyle?.tabPaneHeight || \"100%\",\n width: tabsStyle?.tabPaneWidth || \"100%\",\n display: \"flex\",\n position: \"absolute\",\n bottom: \"0\"\n } as CSSProperties;\n}\n\nexport function tabItemWrapperStyle() {\n return {\n display: 'flex',\n justifyContent: \"center\",\n height: '100%', \n width: '100%', \n }\n}\n\nexport const getTabItemStyle = (tabAlignment: TabAlignment | undefined, tab: CometChatTabItem, activeTab: CometChatTabItem | null, placement: string,tabsStyle:TabsStyle|undefined) => {\n\n let active = activeTab?.id === tab?.id;\n let style = tab?.style as TabItemStyle;\n let alignment: string = tabAlignment === TabAlignment.top || tabAlignment === TabAlignment.bottom ? \"row\" : \"column\";\n let borderRadiusStyle = style?.borderRadius;\n let borderRadius = placement === 'first' ? `${borderRadiusStyle} 0 0 ${borderRadiusStyle}` : placement === 'last' ? `0 ${borderRadiusStyle} ${borderRadiusStyle} 0` : '0';\n if(active && style.activeBorderRadius) {\n borderRadius = style.activeBorderRadius;\n }\n\n let boxShadow = \"0\";\n if(active && style?.boxShadow) {\n boxShadow = style.boxShadow;\n }\n\n return {\n display: \"flex\",\n flexDirection: alignment,\n justifyContent: \"center\",\n width: style?.width,\n height: style?.height,\n backgroundColor: active ? style?.activeBackground ?? style?.background : style?.background,\n borderRadius: borderRadius,\n boxShadow: boxShadow,\n } as CSSProperties;\n}\n\nexport const TabPaneContentViewStyle = (tabStyle: BaseStyle | undefined) => { \n\n let {borderRadius} = tabStyle ?? {};\n return {\n height: '100%', \n width: '100%', \n borderRadius\n } as CSSProperties;\n};\n\nexport function draggableStyle() {\n return {\n width: '100%',\n height: '100%',\n background: 'transparent'\n }\n}\n\nexport function tabPaneContentStyle(tab: CometChatTabItem, activeTab: CometChatTabItem | null) {\n return (tab.id !== activeTab?.id) \n ? {\n display:\"none\"\n } : {\n display: \"flex\", \n height: '100%', \n width: '100%', \n }\n}","import { ButtonStyle, TabPaneContentViewStyle, TabsWrapperStyle, draggableStyle, getTabContentStyle, getTabItemStyle, getTabListStyle, tabItemWrapperStyle, tabPaneContentStyle } from \"./style\";\nimport { CometChatDraggable, CometChatIconButton } from \"@cometchat/uikit-elements\";\nimport { CometChatTabItem, IconButtonAlignment, TabAlignment } from \"@cometchat/uikit-resources\";\nimport React, { useCallback, useRef, useState } from \"react\";\n\nimport { TabItemStyle } from \"@cometchat/uikit-shared\";\nimport { TabsStyle } from \"./TabsStyle\";\nimport { createComponent } from \"@lit-labs/react\";\n\ninterface TabsProps {\n tabAlignment?: TabAlignment,\n tabsStyle?: TabsStyle,\n tabs: CometChatTabItem[],\n // isDraggable?: boolean,\n keepAlive? : boolean,\n tabIconAlignment?: IconButtonAlignment\n}\n\nconst defaultProps: TabsProps = {\n tabAlignment: TabAlignment.bottom,\n tabsStyle: {},\n tabs: [],\n // isDraggable: false,\n keepAlive: false,\n tabIconAlignment: IconButtonAlignment.top\n}\n\nconst CometChatIconButtonBubble = createComponent({\n tagName: 'cometchat-icon-button',\n elementClass: CometChatIconButton,\n react: React,\n events: {\n 'ccButtonClicked': 'cc-button-clicked'\n }\n});\n\n// const CometChatDraggableComponent = createComponent({\n// tagName: \"cometchat-draggable\",\n// elementClass: CometChatDraggable,\n// react: React\n// })\n\nconst CometChatTabs = (props: TabsProps) => {\n const {\n tabAlignment,\n tabIconAlignment,\n tabsStyle,\n tabs,\n // isDraggable,\n keepAlive\n } = props;\n \n const [activeTab, setActiveTab] = useState(null);\n const [activeTabId, setActiveTabId] = useState(\"\");\n const childViewRef = useRef(null);\n\n const openViewOnCLick = useCallback((tabItem: CometChatTabItem) => {\n \n if(tabs && tabs.length > 0){\n childViewRef.current = null;\n let index = tabs.findIndex(\n (item: CometChatTabItem) => item.id === tabItem.id\n );\n \n if (index > -1 ) {\n setActiveTab(tabItem);\n setActiveTabId(tabItem.id!);\n childViewRef.current = tabs[index].childView;\n }\n }\n }, [childViewRef, tabs])\n\n React.useEffect(() => {\n if (activeTabId) {\n const tabItem = tabs?.find((item: CometChatTabItem) => item.id === activeTabId);\n if (tabItem) {\n openViewOnCLick(tabItem);\n }\n }else{\n const tabItem = tabs?.find((item: CometChatTabItem) => item.isActive);\n if(tabItem) {\n openViewOnCLick(tabItem);\n }\n }\n \n }, [activeTabId, openViewOnCLick, tabs]);\n\n const getButtonStyle = useCallback((tab: CometChatTabItem) => {\n const { style, iconURL } = tab || {};\n const { id } = activeTab || {};\n const active = id === tab?.id;\n return ButtonStyle(style as TabItemStyle, active, iconURL);\n }, [activeTab]);\n\n const getTabItems = useCallback(() => {\n\n return tabs?.map((tab, index) => {\n\n const placement = index === 0 ? 'first' : index === (tabs.length - 1) ? 'last' : '';\n let key = `${tab.id}-${Math.floor((Math.random() * 10) + 1)}`;\n return (\n //
    \n
    \n openViewOnCLick(tab)}\n /> \n
    \n )\n })\n }, [activeTab]);\n\n\n const getTabList = () => {\n\n const tabWrapperView = (\n
    \n {getTabItems()}\n
    \n );\n // return isDraggable ? (\n // {tabWrapperView}\n // ) : (tabWrapperView);\n return tabWrapperView;\n };\n\n const getTabPane = useCallback(() => {\n\n if(keepAlive) {\n\n return tabs.map((tab) => {\n\n return (\n
    \n {tab?.childView ?
    {tab?.childView}
    : null} \n
    \n );\n\n });\n\n } else {\n return childViewRef?.current ?
    {childViewRef?.current}
    : null\n }\n }, [activeTab])\n \n return (\n
    \n
    \n {getTabList()}\n
    \n
    \n {getTabPane()}\n
    \n
    \n )\n}\n\nCometChatTabs.defaultProps = defaultProps;\nexport { CometChatTabs };","import { CreatePollStyle, OptionsStyle, PollsBubbleStyle } from \"@cometchat/uikit-shared\";\n\nexport class PollsConfiguration {\n private style: PollsBubbleStyle;\n private createPollStyle: CreatePollStyle\n private createPollIconURL: string;\n private deleteIconURL: string;\n private closeIconURL: string;\n private optionIconURL: string;\n private addAnswerIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: PollsBubbleStyle, createPollStyle?: CreatePollStyle, createPollIconURL?: string, deleteIconURL?: string, closeIconURL?: string, optionIconURL?: string, addAnswerIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, createPollStyle, createPollIconURL, deleteIconURL, closeIconURL, optionIconURL, addAnswerIconURL, optionStyle } = configuration;\n this.style = (style as PollsBubbleStyle);\n this.createPollStyle = (createPollStyle as CreatePollStyle);\n this.createPollIconURL = (createPollIconURL as string);\n this.deleteIconURL = (deleteIconURL as string);\n this.closeIconURL = (closeIconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.addAnswerIconURL = (addAnswerIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getPollsBubbleStyle(): PollsBubbleStyle {\n return this.style;\n }\n\n getCreatePollStyle(): CreatePollStyle {\n return this.createPollStyle;\n }\n\n getCreatePollIconURL(): string {\n return this.createPollIconURL;\n }\n\n getDeleteIconURL(): string {\n return this.deleteIconURL;\n }\n\n getCloseIconURL(): string {\n return this.closeIconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getAddAnswerIconURL(): string {\n return this.addAnswerIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import {CSSProperties} from 'react';\nimport { AvatarStyle, ListItemStyle, CallscreenStyle } from \"@cometchat/uikit-elements\";\nimport { fontHelper, CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { IncomingCallStyle } from \"@cometchat/uikit-shared\";\n\nexport const IncomingCallWrapperStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n height: incomingCallStyle?.height,\n width: incomingCallStyle?.width,\n background: incomingCallStyle?.background,\n border: incomingCallStyle?.border,\n borderRadius: incomingCallStyle?.borderRadius,\n padding: \"8px\",\n position: \"absolute\",\n left: \"8px\",\n top: \"8px\",\n minHeight: \"95px\",\n minWidth: \"230px\",\n zIndex: 100,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n gap: \"8px\",\n alignItems: \"flex-start\"\n } as CSSProperties\n}\n\nexport const IncomingCallSubtitleStyle = { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-start\", gap: \"6px\" }\n\nexport const IncomingCallLabelStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n textFont: incomingCallStyle?.subtitleTextFont,\n textColor: incomingCallStyle?.subtitleTextColor\n }\n}\n\nexport const IncomingCallListItemStyle = { \n width: \"100%\", \n marginLeft: \"-4px\" \n}\n\nexport const IncomingCallTailViewStyle = { \n position: 'relative'\n} as CSSProperties\n\nexport const IncomingCallButtonsStyle = { \n display: 'flex', \n gap: '8px', \n paddingLeft: '8px', \n paddingRight: '8px'\n}\n\nexport const buttonStyle = {\n height:\"100%\",\n width:\"100%\",\n display:\"flex\",\n flexDirection:\"column\",\n justifyContent:\"center\",\n alignItems:\"center\",\n padding:\"8px 28px\"\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme): AvatarStyle => {\n return new AvatarStyle({\n borderRadius: \"16px\",\n width: \"38px\",\n height: \"38px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n });\n}\n\nexport const defaultIncomingCallStyle = (theme: CometChatTheme): IncomingCallStyle => {\n return new IncomingCallStyle({\n width: \"fit-content\",\n height: \"fit-content\",\n background: theme.palette.getAccent800(),\n border: \"none\",\n borderRadius: \"8px\",\n titleTextFont: fontHelper(theme.typography.title2),\n titleTextColor: theme.palette.getAccent(\"dark\"),\n subtitleTextFont: fontHelper(theme.typography.subtitle2),\n subtitleTextColor: theme.palette.getAccent(\"dark\"),\n acceptButtonTextFont: fontHelper(theme.typography.text2),\n acceptButtonTextColor: theme.palette.getAccent(\"dark\"),\n acceptButtonBackground: theme.palette.getPrimary(),\n acceptButtonBorderRadius: \"8px\",\n acceptButtonBorder: \"none\",\n declineButtonTextFont: fontHelper(theme.typography.text2),\n declineButtonTextColor: theme.palette.getAccent(\"dark\"),\n declineButtonBackground: theme.palette.getError(),\n declineButtonBorderRadius: \"8px\",\n declineButtonBorder: \"none\",\n });\n}\n\nexport const defaultListItemStyle = (incomingCallStyle : IncomingCallStyle, theme: CometChatTheme): ListItemStyle => {\n return new ListItemStyle({\n height: \"100%\",\n width: \"100%\",\n background: \"transparent\",\n activeBackground: \"transparent\",\n borderRadius: \"0\",\n titleFont: incomingCallStyle?.titleTextFont,\n titleColor: incomingCallStyle?.titleTextColor,\n border: \"none\",\n separatorColor: theme.palette.getAccent200(),\n hoverBackground: \"transparent\"\n });\n}\n\nexport const AcceptButtonStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n border: incomingCallStyle?.acceptButtonBorder,\n borderRadius: incomingCallStyle?.acceptButtonBorderRadius,\n background: incomingCallStyle?.acceptButtonBackground,\n buttonTextFont: incomingCallStyle?.acceptButtonTextFont,\n buttonTextColor: incomingCallStyle?.acceptButtonTextColor,\n ...buttonStyle\n };\n}\n\nexport const DeclineButtonStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n border: incomingCallStyle?.declineButtonBorder,\n borderRadius: incomingCallStyle?.declineButtonBorderRadius,\n background: incomingCallStyle?.declineButtonBackground,\n buttonTextFont: incomingCallStyle?.declineButtonTextFont,\n buttonTextColor: incomingCallStyle?.declineButtonTextColor,\n ...buttonStyle\n }\n}\n\nexport const defaultOngoingCallStyle = (theme: CometChatTheme) => {\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n}\n\nexport const IconStyle = (incomingCallStyle : IncomingCallStyle) => {\n return {\n height: \"16px\",\n width: \"16px\",\n iconTint: incomingCallStyle?.subtitleTextColor || \"RGBA(20, 20, 20, 0.68)\"\n }\n}","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants, localize } from \"@cometchat/uikit-resources\";\n\nexport function isSentByMe(call: any, loggedInUser: CometChat.User) {\n const senderUid: string = call.getInitiator()?.getUid();\n return !senderUid || senderUid === loggedInUser?.getUid();\n}\n\nexport function isMissedCall(\n call: CometChat.Call,\n loggedInUser: CometChat.User\n) {\n const callStatus = call.getStatus();\n const sentByMe = isSentByMe(call, loggedInUser);\n\n if (sentByMe && callStatus === CometChatUIKitConstants.calls.unanswered) {\n return false;\n }\n\n const missedStatuses = [\n CometChatUIKitConstants.calls.unanswered,\n CometChatUIKitConstants.calls.cancelled,\n CometChatUIKitConstants.calls.busy,\n CometChatUIKitConstants.calls.rejected,\n ];\n\n // If the user didn't send the call and the status matches one of the missed statuses, it's a missed call\n return !sentByMe && missedStatuses.includes(callStatus);\n}\n\nexport function verifyCallUser(call: any, loggedInUser: CometChat.User) {\n if (call.getInitiator().getUid() === loggedInUser.getUid()) {\n return call.getReceiver();\n } else {\n return call.getInitiator();\n }\n}\n\nexport function getCallStatusWithType(\n call: any,\n loggedInUser: CometChat.User,\n includeType: boolean = false\n): string {\n if (!call || !loggedInUser) {\n return \"\";\n }\n\n let callMessageText = \"\";\n const callStatus = call.getStatus();\n const sentByMe = isSentByMe(call, loggedInUser);\n const missedCall = isMissedCall(call, loggedInUser);\n const callTypeKey = \"_\";\n\n if (missedCall) {\n callMessageText = `MISSED${callTypeKey}CALL`;\n } else {\n switch (callStatus) {\n case CometChatUIKitConstants.calls.initiated:\n callMessageText = sentByMe\n ? `OUTGOING${callTypeKey}CALL`\n : `INCOMING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.ongoing:\n callMessageText = sentByMe\n ? `ONGOING${callTypeKey}CALL`\n : `ONGOING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.ended:\n callMessageText = sentByMe\n ? `OUTGOING${callTypeKey}CALL`\n : `INCOMING${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.unanswered:\n callMessageText = sentByMe\n ? `UNANSWERED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.cancelled:\n callMessageText = sentByMe\n ? `CANCELLED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.rejected:\n callMessageText = sentByMe\n ? `REJECTED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n case CometChatUIKitConstants.calls.busy:\n callMessageText = sentByMe\n ? `UNANSWERED${callTypeKey}CALL`\n : `MISSED${callTypeKey}CALL`;\n break;\n default:\n callMessageText = `INCOMING${callTypeKey}CALL`;\n }\n }\n\n return localize(callMessageText);\n}\n\nexport function convertMinutesToHoursMinutesSeconds(minutes: number): string {\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = Math.floor(minutes % 60);\n const seconds = Math.floor((minutes - Math.floor(minutes)) * 60);\n\n let hoursString = \"\";\n let minutesString = \"\";\n let secondsString = \"\";\n\n if (hours > 0) {\n hoursString = `${hours}h`;\n }\n\n if (remainingMinutes > 0) {\n minutesString = `${remainingMinutes}m`;\n }\n\n if (seconds >= 0) {\n secondsString = `${seconds}s`;\n }\n\n return `${hoursString} ${minutesString} ${secondsString}`;\n}\n\nexport function convertSecondsToHoursMinutesSeconds(seconds: number): string {\n const hours = Math.floor(seconds / 3600);\n const remainingMinutes = Math.floor((seconds % 3600) / 60);\n const remainingSeconds = Math.floor((seconds % 3600) % 60);\n\n let hoursString = \"\";\n let minutesString = \"\";\n let secondsString = \"\";\n\n if (hours > 0) {\n hoursString = `${hours}h`;\n }\n\n if (remainingMinutes > 0) {\n minutesString = `${remainingMinutes}m`;\n }\n\n if (remainingSeconds >= 0) {\n secondsString = `${remainingSeconds}s`;\n }\n\n return `${hoursString} ${minutesString} ${secondsString}`;\n}\n\nexport function downloadRecordingFromURL(url: string) {\n fetch(url)\n .then((response) => {\n return response.blob();\n })\n .then((blob) => {\n const blobURL = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = blobURL;\n a.download = \"recording.mp4\";\n document.body.appendChild(a);\n a.click();\n })\n .catch((error: any) => console.error(error));\n}\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { CallLogsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { isMissedCall } from \"../Utils/utils\";\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.callStatusTextColor || theme.palette.getAccent600(),\n font: style?.callStatusTextFont || fontHelper(theme.typography.caption1),\n alignItems: \"center\",\n gap: \"4px\",\n };\n}\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n call: any,\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle,\n loggedInUser?: CometChat.User\n) {\n const missedCall = isMissedCall(call, loggedInUser!);\n const titleColor = missedCall\n ? theme.palette.getError()\n : theme.palette.getAccent();\n return new ListItemStyle({\n height: listItemStyle?.height || \"50px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || titleColor,\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogsStyle\n): ListStyle {\n return new ListStyle({\n height: \"100%\",\n titleTextFont:\n callLogsStyle.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle.titleColor || theme.palette.getAccent(),\n emptyStateTextColor:\n callLogsStyle.emptyStateTextColor || theme.palette.getAccent600(),\n emptyStateTextFont:\n callLogsStyle.emptyStateTextFont || fontHelper(theme.typography.caption1),\n errorStateTextColor:\n callLogsStyle.errorStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont:\n callLogsStyle.errorStateTextFont || fontHelper(theme.typography.caption1),\n loadingIconTint:\n callLogsStyle.loadingIconTint || theme.palette.getAccent600(),\n });\n}\n\nexport function getCallDateStyle(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n background: \"transparent\",\n };\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n position: \"absolute\",\n top: \"7px\",\n right: \"12px\",\n };\n}\n\nexport function getDirectionIconStyle(\n call: any,\n theme: CometChatTheme,\n style: CallLogsStyle,\n loggedInUser: CometChat.User\n) {\n let tint;\n const missedCall = isMissedCall(call, loggedInUser);\n if (missedCall) {\n tint = style?.missedCallIconTint || theme.palette.getAccent600();\n } else if (call.getInitiator().getUid() === loggedInUser.getUid()) {\n tint = style?.outgoingCallIconTint || theme.palette.getAccent600();\n } else {\n tint = style?.incomingCallIconTint || theme.palette.getAccent600();\n }\n\n return {\n height: \"18px\",\n width: \"18px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: tint,\n };\n}\n\nexport function getInfoButtonStyle(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n height: \"20px\",\n width: \"20px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.infoIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDateSeparator(theme: CometChatTheme, style: CallLogsStyle) {\n return {\n textFont:\n style?.dateSeparatorTextFont || fontHelper(theme.typography.text2),\n textColor: style?.dateSeparatorTextColor || theme.palette.getAccent700(),\n background: \"transparent\",\n padding: \"0\",\n };\n}\n","import { AvatarStyle, CallscreenStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogsStyle, CometChatUIKitCalls, OutgoingCallConfiguration, OutgoingCallStyle } from \"@cometchat/uikit-shared\";\nimport { CallWorkflow, CometChatCallEvents, CometChatMessageEvents, CometChatUIKitConstants, DatePatterns, MessageStatus, States, TitleAlignment, fontHelper, localize } from \"@cometchat/uikit-resources\";\nimport { getAvatarStyle, getCallDateStyle, getContainerStyle, getDateSeparator, getDirectionIconStyle, getInfoButtonStyle, getListItemStyle, getListStyle, getSubtitleStyle } from \"./style\";\nimport { getCallStatusWithType, isMissedCall, isSentByMe, verifyCallUser } from \"../Utils/utils\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport {CometChat} from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatOutgoingCall } from \"../CometChatOutgoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport IncomingAudioCallIcon from \"./assets/IncomingAudio.svg\";\nimport IncomingVideoCallIcon from \"./assets/IncomingVideo.svg\";\nimport InfoIcon from \"./assets/Info.svg\"\nimport LoadingIcon from \"./assets/LoadingIcon.svg\";\nimport MissedAudioCallIcon from \"./assets/MissedAudio.svg\";\nimport MissedVideoCallIcon from \"./assets/MissedVideo.svg\";\nimport OutgoingAudioCallIcon from \"./assets/OutgoingAudio.svg\";\nimport OutgoingVideoCallIcon from \"./assets/OutgoingVideo.svg\";\n\ninterface ICallLogsProps {\n title?: string;\n titleAlignment?: TitleAlignment;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n emptyStateView?: any;\n errorStateView?: any;\n loadingStateView?: any;\n emptyStateText?: string;\n errorStateText?: string;\n loadingIconURL?: string;\n incomingAudioCallIconUrl?: string;\n incomingVideoCallIconUrl?: string;\n outgoingAudioCallIconUrl?: string;\n outgoingVideoCallIconUrl?: string;\n missedAudioCallIconUrl?: string;\n missedVideoCallIconUrl?: string;\n infoIconUrl?: string;\n activeCall?: any;\n callLogRequestBuilder?: any;\n onItemClick?: Function;\n onInfoClick?: Function;\n onError?: Function;\n hideSeparator?: boolean;\n datePattern?: DatePatterns;\n dateSeparatorPattern?: DatePatterns;\n callLogsStyle?: CallLogsStyle;\n avatarStyle?: AvatarStyle;\n listItemStyle?: ListItemStyle;\n outgoingCallConfiguration?: OutgoingCallConfiguration;\n}\n\nconst defaultProps: ICallLogsProps = {\n title: localize(\"CALLS\"),\n titleAlignment: TitleAlignment.left,\n listItemView: null,\n subtitleView: null,\n tailView: null,\n emptyStateView: null,\n errorStateView: null,\n loadingStateView: null,\n emptyStateText: localize(\"NO_CALLS_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n loadingIconURL: LoadingIcon,\n incomingAudioCallIconUrl: IncomingAudioCallIcon,\n incomingVideoCallIconUrl: IncomingVideoCallIcon,\n outgoingAudioCallIconUrl: OutgoingAudioCallIcon,\n outgoingVideoCallIconUrl: OutgoingVideoCallIcon,\n missedAudioCallIconUrl: MissedAudioCallIcon,\n missedVideoCallIconUrl: MissedVideoCallIcon,\n infoIconUrl: InfoIcon,\n callLogRequestBuilder: undefined,\n onItemClick: undefined,\n onInfoClick: undefined,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n hideSeparator: true,\n activeCall: undefined,\n datePattern: DatePatterns.time,\n dateSeparatorPattern: DatePatterns.DayDate,\n callLogsStyle: {} as CallLogsStyle,\n avatarStyle: {} as AvatarStyle,\n listItemStyle: {} as ListItemStyle,\n outgoingCallConfiguration: {} as OutgoingCallConfiguration,\n};\n\nconst CometChatCallLogs = (props: ICallLogsProps) => {\n const {\n title,\n titleAlignment,\n listItemView,\n subtitleView,\n tailView,\n errorStateView,\n emptyStateView,\n loadingStateView,\n emptyStateText,\n errorStateText,\n loadingIconURL,\n incomingAudioCallIconUrl,\n incomingVideoCallIconUrl,\n outgoingAudioCallIconUrl,\n outgoingVideoCallIconUrl,\n missedAudioCallIconUrl,\n missedVideoCallIconUrl,\n infoIconUrl,\n activeCall,\n callLogRequestBuilder,\n onItemClick,\n onInfoClick,\n onError,\n hideSeparator,\n datePattern,\n dateSeparatorPattern,\n callLogsStyle,\n avatarStyle,\n listItemStyle,\n outgoingCallConfiguration\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [callList, setCallList] = useState([]);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [callListState, setCallListState] = useState(States.loading);\n const [showOutgoingCallScreen, setShowOutgoingCallScreen] = useState(false);\n const [callInitiated, setCallInitiated] = useState(undefined);\n const [call, setCall] = useState(undefined);\n const [sessionId, setSessionId] = useState(null);\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const listenerId = \"callLogsScreen_\" + new Date().getTime();\n const requestBuilder = useRef(null);\n const initiatedCallRef = useRef(undefined);\n initiatedCallRef.current = callInitiated;\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const setCallLogRequestBuilder = useCallback((): any => {\n try {\n if (callLogRequestBuilder) {\n return callLogRequestBuilder.build();\n } else {\n const authToken = loggedInUser!.getAuthToken();\n return new CometChatUIKitCalls.CallLogRequestBuilder()\n .setLimit(30)\n .setCallCategory(\"call\")\n .setAuthToken(authToken)\n .build();\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [callLogRequestBuilder, loggedInUser, onErrorCallback]);\n\n const fetchNextCallList = useCallback(async (): Promise => {\n try {\n const calls = await requestBuilder?.current?.fetchNext();\n return calls;\n } catch (e) {\n onErrorCallback(e);\n throw e;\n }\n }, [requestBuilder, onErrorCallback]);\n\n const getCallList = useCallback(async () => {\n try {\n const calls = await fetchNextCallList();\n if (calls && calls.length) {\n setCallList((prevCallList) => {\n return [...prevCallList, ...calls]\n })\n setCallListState(States.loaded);\n } else {\n if (callList.length === 0) {\n setCallListState(States.empty);\n }\n }\n } catch (e) {\n if (callList.length === 0) {\n setCallListState(States.error);\n }\n onErrorCallback(e);\n }\n }, [fetchNextCallList, callList, setCallList, setCallListState, onErrorCallback])\n\n const cancelOutgoingCall = useCallback(() => {\n CometChat.rejectCall(call?.getSessionId()!, CometChatUIKitConstants.calls.cancelled).then(\n () => {\n setCall(undefined);\n setShowOutgoingCallScreen(false);\n CometChatMessageEvents.ccMessageSent.next({\n message: call!,\n status: MessageStatus.success,\n });\n })\n .catch((error: CometChat.CometChatException) => {\n setShowOutgoingCallScreen(false);\n onErrorCallback(error);\n });\n }, [call, setCall, setShowOutgoingCallScreen, onErrorCallback])\n const initiateCall = useCallback((type: string, uid: string) => {\n\n const receiverType: string = CometChatUIKitConstants.MessageReceiverType.user;\n const receiverId: string = uid;\n let callType: string = \"\";\n if (type === CometChat.CALL_TYPE.AUDIO) {\n callType = CometChat.CALL_TYPE.AUDIO;\n } else {\n callType = CometChat.CALL_TYPE.VIDEO;\n }\n const callTmp: CometChat.Call = new CometChat.Call(receiverId, callType, receiverType);\n CometChat.initiateCall(callTmp).then(\n (outgoingCall: CometChat.Call) => {\n setCallInitiated(outgoingCall)\n setCall(outgoingCall);\n setShowOutgoingCallScreen(true);\n CometChatMessageEvents.ccMessageSent.next({\n message: outgoingCall,\n status: MessageStatus.inprogress,\n });\n })\n .catch((error: CometChat.CometChatException) => {\n\n onErrorCallback(error);\n });\n }, [setCall, setShowOutgoingCallScreen, onErrorCallback, setCallInitiated])\n\n const handleItemClick = useCallback((call: any) => {\n try {\n if (onItemClick) {\n onItemClick(call);\n } else {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity.uid) {\n initiateCall(call?.type, entity.uid);\n }\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onItemClick, loggedInUser, initiateCall, onErrorCallback])\n\n const handleInfoClick = useCallback((call: any) => {\n try {\n if (onInfoClick) onInfoClick(call);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onInfoClick, onErrorCallback])\n\n const getActiveCall = useCallback((call: any) => {\n try {\n if (activeCall) {\n if (activeCall.getSessionID() === call.getSessionID()) {\n return true;\n }\n }\n return false;\n } catch (e) {\n onErrorCallback(e);\n return false;\n }\n }, [activeCall, onErrorCallback])\n\n const getCallDirectionIcon = useCallback((call: any) => {\n try {\n const missedCall = isMissedCall(call, loggedInUser!);\n let callType = call.getType();\n if (call.getType() === CometChat.CALL_TYPE.AUDIO) {\n callType = CometChat.CALL_TYPE.AUDIO;\n } else {\n callType = CometChat.CALL_TYPE.VIDEO;\n }\n let icon;\n\n if (missedCall) {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? missedAudioCallIconUrl : missedVideoCallIconUrl;\n } else if (isSentByMe(call, loggedInUser!)) {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? outgoingAudioCallIconUrl : outgoingVideoCallIconUrl;\n } else {\n icon = callType === CometChat.CALL_TYPE.AUDIO ? incomingAudioCallIconUrl : incomingVideoCallIconUrl;\n }\n\n return icon;\n } catch (e) {\n onErrorCallback(e);\n }\n }, [loggedInUser, missedAudioCallIconUrl, missedVideoCallIconUrl, outgoingAudioCallIconUrl, outgoingVideoCallIconUrl, incomingAudioCallIconUrl, incomingVideoCallIconUrl, onErrorCallback])\n\n const isDateDifferent = useCallback((firstDate: number, secondDate: number) => {\n try {\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate * 1000);\n secondDateObj = new Date(secondDate * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback])\n\n const getMessageBubbleDate = useCallback((item: any, i: number) => {\n try {\n if (i === 0) {\n return (\n
    \n \n
    \n );\n } else {\n if (\n isDateDifferent(callList[i - 1]?.getInitiatedAt(), item.getInitiatedAt())\n ) {\n return (\n
    \n \n
    \n );\n } else {\n return null;\n }\n }\n } catch (e) {\n onErrorCallback(e);\n return null;\n }\n }, [dateSeparatorPattern, callLogsStyle, isDateDifferent, callList, theme, onErrorCallback])\n\n const getOutGoingCallStyle = useCallback(() => {\n return new OutgoingCallStyle({\n background: outgoingCallConfiguration?.outgoingCallStyle?.background || theme.palette.getBackground(),\n border: outgoingCallConfiguration?.outgoingCallStyle?.border || \"none\",\n borderRadius: outgoingCallConfiguration?.outgoingCallStyle?.borderRadius || \"8px\",\n declineButtonIconBackground: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonIconBackground || theme.palette.getError(),\n declineButtonIconTint: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonIconTint || theme.palette.getBackground(),\n declineButtonTextColor: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonTextColor || theme.palette.getAccent600(),\n declineButtonTextFont: outgoingCallConfiguration?.outgoingCallStyle?.declineButtonTextFont || fontHelper(theme.typography.caption2),\n height: outgoingCallConfiguration?.outgoingCallStyle?.height || \"580px\",\n width: outgoingCallConfiguration?.outgoingCallStyle?.width || \"320px\",\n subtitleTextColor: outgoingCallConfiguration?.outgoingCallStyle?.subtitleTextColor || theme.palette.getAccent600(),\n subtitleTextFont: outgoingCallConfiguration?.outgoingCallStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle1),\n titleTextColor: outgoingCallConfiguration?.outgoingCallStyle?.titleTextColor || theme.palette.getAccent(),\n titleTextFont: outgoingCallConfiguration?.outgoingCallStyle?.titleTextFont || fontHelper(theme.typography.heading),\n });\n }, [outgoingCallConfiguration, theme])\n\n const getOngoingCallStyle = useCallback(()=>{\n return new CallscreenStyle({\n maxHeight: \"100%\",\n maxWidth: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"#1c2226\",\n minHeight: \"400px\",\n minWidth: \"400px\",\n minimizeIconTint: theme.palette.getAccent900(),\n maximizeIconTint: theme.palette.getAccent900(),\n });\n },[theme])\n\n const openOngoingCallScreen = useCallback((callObj: any) => {\n setShowOutgoingCallScreen(false);\n setCall(callObj);\n setSessionId(callObj?.getSessionId());\n setShowOngoingCall(true);\n }, [setShowOutgoingCallScreen, setCall, setSessionId, setShowOngoingCall])\n\n\n\n const attachListeners = useCallback(() => {\n try {\n CometChat.addCallListener(\n listenerId,\n new CometChat.CallListener({\n onOutgoingCallRejected: (callObj: CometChat.Call) => {\n if (initiatedCallRef.current && callObj.getSessionId() == initiatedCallRef.current.getSessionId()) {\n setCall(undefined);\n setShowOutgoingCallScreen(false);\n setShowOngoingCall(false);\n setCallInitiated(undefined)\n }\n },\n onOutgoingCallAccepted: (callObj: CometChat.Call) => {\n if (initiatedCallRef.current && callObj.getSessionId() == initiatedCallRef.current.getSessionId()) {\n setCall(undefined);\n openOngoingCallScreen(callObj);\n setShowOutgoingCallScreen(false);\n setCallInitiated(undefined);\n }\n },\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [listenerId, openOngoingCallScreen, onErrorCallback]);\n const closeCallScreen = useCallback(() => {\n setShowOngoingCall(false);\n setSessionId(null);\n setCall(undefined);\n }, [setShowOngoingCall, setSessionId, setCall])\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n () => {\n closeCallScreen();\n }\n );\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [closeCallScreen, onErrorCallback])\n\n const detachListeners = useCallback(() => {\n try {\n CometChat.removeCallListener(listenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [listenerId, onErrorCallback])\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView !== null) {\n return (\n <>\n {subtitleView(item)}\n \n );\n }\n return (\n <>\n
    \n \n {getCallStatusWithType(item, loggedInUser!)}\n
    \n \n );\n }, [subtitleView, callLogsStyle, loggedInUser, theme, getCallDirectionIcon])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if (tailView !== null) {\n return (\n <>\n {tailView(item)}\n \n );\n }\n return (\n <>\n
    \n \n { onInfoClick ?\n handleInfoClick(item)}\n /> :\n null\n }\n\n
    \n \n );\n }, [tailView, theme, callLogsStyle, datePattern, onInfoClick, infoIconUrl, handleInfoClick])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if (listItemView) {\n return listItemView(item);\n } else {\n return (\n <>\n {getMessageBubbleDate(item, index) ? getMessageBubbleDate(item, index) : null}\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n };\n }, [listItemView, getMessageBubbleDate, loggedInUser, theme, listItemStyle, avatarStyle, hideSeparator, loadingIconURL, getActiveCall, getListItemSubtitleView, getListItemTailView, handleItemClick]);\n\n\n Hooks(loggedInUser, setLoggedInUser, requestBuilder, setCallLogRequestBuilder, getCallList, attachListeners, subscribeToEvents, detachListeners, onErrorCallback);\n\n return (\n
    \n {\n showOutgoingCallScreen ?\n \n \n :\n null\n }\n\n {\n showOngoingCall && !activeCall ?\n :\n null\n }\n\n \n
    \n );\n}\n\nCometChatCallLogs.defaultProps = defaultProps;\nexport { CometChatCallLogs };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34856%209.89458C4.64141%2010.1873%205.03856%2010.3518%205.45265%2010.3518C5.86675%2010.3518%206.2639%2010.1873%206.55675%209.89458L7.38496%209.06639C7.45752%208.99388%207.51508%208.90778%207.55435%208.81301C7.59362%208.71825%207.61383%208.61667%207.61383%208.51409C7.61383%208.41151%207.59362%208.30993%207.55435%208.21517C7.51508%208.1204%207.45752%208.0343%207.38496%207.96179L5.77488%206.35123C5.69603%206.27169%205.601%206.21005%205.49623%206.17048C5.39146%206.13091%205.27941%206.11434%205.16767%206.1219C5.05593%206.12945%204.94713%206.16095%204.84864%206.21426C4.75015%206.26757%204.66428%206.34145%204.59686%206.43087C2.90974%208.72127%203.93211%2011.1335%206.00548%2013.2073C8.07886%2015.2812%2010.4927%2016.3025%2012.7847%2014.6154C12.8739%2014.5477%2012.9475%2014.4617%2013.0005%2014.3631C13.0536%2014.2645%2013.0848%2014.1556%2013.092%2014.0439C13.0993%2013.9322%2013.0824%2013.8202%2013.0426%2013.7155C13.0028%2013.6109%2012.9409%2013.516%2012.8612%2013.4374L11.2506%2011.8268C11.1781%2011.7543%2011.092%2011.6967%2010.9972%2011.6574C10.9025%2011.6182%2010.8009%2011.598%2010.6983%2011.598C10.5957%2011.598%2010.4941%2011.6182%2010.3994%2011.6574C10.3046%2011.6967%2010.2185%2011.7543%2010.146%2011.8268L9.31778%2012.655C9.17274%2012.8%209.05768%2012.9722%208.97918%2013.1617C8.90068%2013.3512%208.86028%2013.5543%208.86028%2013.7594C8.86028%2013.9645%208.90068%2014.1676%208.97918%2014.357C9.05768%2014.5465%209.17274%2014.7187%209.31778%2014.8637L9.89039%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3872%208.82531L15.4626%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.5105%208.82517H10.3872V5.7019%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.41384%2012.5186H5.1875V9.29224%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.3776%207.31396L5.28149%2012.41%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4623%203.75L10.387%208.82531%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12.3391%203.75H15.4624V6.87327%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.43018%2015.8583C2.56723%2015.8583%201.86768%2015.1588%201.86768%2014.2958V5.70435C1.86768%204.8414%202.56723%204.14185%203.43018%204.14185H12.1884C13.0513%204.14185%2013.7509%204.8414%2013.7509%205.70435V14.2958C13.7509%2015.1588%2013.0513%2015.8583%2012.1884%2015.8583H3.43018Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M14.1571%2011.9541C13.9068%2011.817%2013.7512%2011.5543%2013.7512%2011.2689V8.73246C13.7512%208.44707%2013.9068%208.18437%2014.1571%208.04726L16.9754%206.50343C17.4961%206.21822%2018.132%206.59497%2018.132%207.18861V12.8128C18.132%2013.4064%2017.4961%2013.7832%2016.9754%2013.4979L14.1571%2011.9541Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M7.15111%207.31395H10.3774V10.5403%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M5.18738%2012.5186L10.2834%207.42248%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.78531%209.33083L4.34854%209.89458C4.64139%2010.1873%205.03853%2010.3518%205.45262%2010.3518C5.86671%2010.3518%206.26385%2010.1873%206.5567%209.89458L7.38488%209.06639C7.45744%208.99388%207.515%208.90778%207.55427%208.81301C7.59354%208.71825%207.61376%208.61667%207.61376%208.51409C7.61376%208.41151%207.59354%208.30993%207.55427%208.21517C7.515%208.1204%207.45744%208.0343%207.38488%207.96179L5.77484%206.35123C5.69599%206.27169%205.60096%206.21005%205.4962%206.17048C5.39143%206.13091%205.27938%206.11434%205.16764%206.1219C5.05591%206.12945%204.9471%206.16095%204.84862%206.21426C4.75013%206.26757%204.66426%206.34145%204.59684%206.43087C2.90976%208.72127%203.93211%2011.1335%206.00544%2013.2073C8.07877%2015.2812%2010.4925%2016.3025%2012.7845%2014.6154C12.8737%2014.5477%2012.9473%2014.4617%2013.0003%2014.3631C13.0534%2014.2645%2013.0846%2014.1556%2013.0918%2014.0439C13.0991%2013.9322%2013.0822%2013.8202%2013.0424%2013.7155C13.0026%2013.6109%2012.9407%2013.516%2012.861%2013.4374L11.2504%2011.8268C11.1779%2011.7543%2011.0918%2011.6967%2010.9971%2011.6574C10.9023%2011.6182%2010.8007%2011.598%2010.6982%2011.598C10.5956%2011.598%2010.494%2011.6182%2010.3992%2011.6574C10.3045%2011.6967%2010.2184%2011.7543%2010.1459%2011.8268L9.31767%2012.655C9.17263%2012.8%209.05757%2012.9722%208.97908%2013.1617C8.90058%2013.3512%208.86018%2013.5543%208.86018%2013.7594C8.86018%2013.9645%208.90058%2014.1676%208.97908%2014.357C9.05757%2014.5465%209.17263%2014.7187%209.31767%2014.8637L9.89027%2015.4332%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M15.4622%204.53082L12.3389%207.65409L8.43481%203.75%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.43481%206.09245V3.75H10.7773%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M14.1573%2011.9539C13.907%2011.8167%2013.7515%2011.5541%2013.7515%2011.2687V8.73221C13.7515%208.44682%2013.907%208.18413%2014.1573%208.04701L16.9757%206.50318C17.4963%206.21798%2018.1322%206.59473%2018.1322%207.18836V12.8125C18.1322%2013.4061%2017.4963%2013.7829%2016.9757%2013.4977L14.1573%2011.9539Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M11.3834%209.1351L8.17601%2012.3425L4.16675%208.33325%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.16675%2010.7388V8.33325H6.5723%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.22925%2015.883C2.3663%2015.883%201.66675%2015.1834%201.66675%2014.3205V5.729C1.66675%204.86606%202.3663%204.1665%203.22925%204.1665H11.9874C12.8503%204.1665%2013.5499%204.86606%2013.5499%205.729V14.3205C13.5499%2015.1834%2012.8503%2015.883%2011.9874%2015.883H3.22925Z%22%20stroke%3D%22black%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n requestBuilder: any,\n setCallBuilder: Function,\n getCallList: Function,\n attachListeners: Function,\n subscribeToEvents: Function,\n detachListeners: Function,\n onErrorCallback: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents?.();\n requestBuilder.current = setCallBuilder();\n getCallList?.();\n attachListeners?.();\n subscribeToEvents?.();\n }\n return () => {\n detachListeners?.()\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser]);\n}\n\nexport { Hooks };","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CallLogDetailsStyle } from \"@cometchat/uikit-shared\";\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\n\nexport function getProfileContainerStyle(): React.CSSProperties {\n return {\n height: \"auto\",\n width: \"100%\",\n minHeight: \"150px\",\n padding: \"16px\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n boxSizing: \"border-box\",\n gap: \"8px\",\n }\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n position: \"absolute\",\n top: \"15px\",\n left: \"15px\",\n display: \"flex\",\n gap: \"8px\",\n justifyContent: \"center\",\n };\n}\n\nexport function getBackButtonStyle(theme: CometChatTheme, style: CallLogDetailsStyle) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getContainerStyle(theme: CometChatTheme, style: CallLogDetailsStyle): React.CSSProperties {\n return {\n height: style?.height || \"100%\",\n width: style?.width || \"100%\",\n background: style?.background || theme.palette.getBackground(),\n borderRadius: style?.borderRadius || \"0\",\n border: style?.border || \"none\",\n position: \"relative\",\n };\n}\n\nexport function getTitleStyle(theme: CometChatTheme, style: CallLogDetailsStyle) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n\nexport function getListItemStyle(theme: CometChatTheme, style: any){\n const { backgroundColor, titleColor, titleFont } = style;\n return new ListItemStyle({\n background: backgroundColor || \"transparent\",\n activeBackground: backgroundColor || \"transparent\",\n border: \"none\",\n hoverBackground: backgroundColor || \"transparent\",\n titleColor: titleColor || theme.palette.getAccent(),\n borderRadius: \"0\",\n titleFont: titleFont || fontHelper(theme.typography.text1),\n separatorColor: theme.palette.getAccent200()\n })\n}","import { CometChatCallDetailsOption, CometChatCallDetailsTemplate, CometChatTheme, DatePatterns, fontHelper, localize } from \"@cometchat/uikit-resources\";\nimport { DateStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { convertMinutesToHoursMinutesSeconds, getCallStatusWithType } from \"./utils\";\n\nimport { CallButtonsStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatCallButtons } from \"../CometChatCallButtons\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport RightArrowIcon from \"../assets/side-arrow.svg\";\n\nexport class CallingDetailsUtils {\n\n public static getDefaultCallTemplate(callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme): Array {\n return [\n this.getPrimaryDetailsTemplate(callLog, loggedInUser, theme),\n this.getSecondaryDetailsTemplate(callLog, loggedInUser, theme),\n ]\n }\n\n private static getCallButtons(user?: CometChat.User, group?: CometChat.Group) {\n let style: CallButtonsStyle = {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonPadding: \"8px 32px\",\n buttonBackground: \"RGBA(20, 20, 20, 0.04)\",\n buttonBorder: \"0 4px\",\n buttonBorderRadius: \"10px\"\n }\n return (\n \n )\n }\n\n public static getPrimaryDetailsTemplate(callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme): CometChatCallDetailsTemplate {\n let template: CometChatCallDetailsTemplate = new CometChatCallDetailsTemplate({\n id: \"callControls\",\n hideSectionSeparator: true,\n options: (user: CometChat.User | null, group: CometChat.Group | null) => {\n return this.getPrimaryOptions(user ?? undefined, group ?? undefined, callLog ?? undefined, loggedInUser ?? undefined, theme ?? undefined);\n }\n });\n return template;\n }\n\n public static getSecondaryDetailsTemplate(\n callLog: any,\n loggedInUser: CometChat.User,\n theme: CometChatTheme\n ): CometChatCallDetailsTemplate {\n const template: CometChatCallDetailsTemplate =\n new CometChatCallDetailsTemplate({\n id: \"callOptions\",\n hideSectionSeparator: true,\n options: () => {\n return this.getSecondaryOptions(\n callLog ?? undefined,\n theme ?? undefined\n );\n },\n });\n return template;\n }\n\n private static getPrimaryOptions(user?: CometChat.User, group?: CometChat.Group, callLog?: any, loggedInUser?: CometChat.User, theme?: CometChatTheme): CometChatCallDetailsOption[] {\n let options: CometChatCallDetailsOption[] = [];\n if (user) {\n options.push(\n new CometChatCallDetailsOption({\n id: 'callControls',\n customView: this.getCallButtons(user, group),\n })\n )\n }\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"callStatus\",\n customView: this.generateCallDetailsHTML(callLog, callLog?.getInitiatedAt(), loggedInUser, theme!)\n })\n );\n\n return options;\n }\n\n private static getSecondaryOptions(\n callLog?: any,\n theme?: CometChatTheme\n ): CometChatCallDetailsOption[] {\n const options: CometChatCallDetailsOption[] = [];\n\n const localizedParticipants = \"Participants\";\n const localizedRecording = \"Recordings\";\n const localizedHistory = \"History\";\n\n if (callLog?.participants && callLog?.participants.length > 0) {\n const count = (callLog?.participants || [])?.length;\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"participants\",\n customView: this.generateCallOptionsHTML(localizedParticipants, count, theme!),\n })\n );\n }\n\n\n if (callLog?.hasRecording) {\n const count = (callLog?.getRecordings() || [])?.length;\n options.push(\n new CometChatCallDetailsOption({\n id: \"recordings\",\n customView: this.generateCallOptionsHTML(localizedRecording, count, theme!),\n })\n );\n }\n\n options.push(\n new CometChatCallDetailsOption({\n id: \"callHistory\",\n customView: this.generateCallOptionsHTML(localizedHistory, 0, theme!),\n })\n );\n\n return options;\n }\n\n private static generateCallDetailsHTML(callLog: any, initiatedAt: number, loggedInUser: any, theme: CometChatTheme): JSX.Element {\n const listItemStyle = new ListItemStyle({\n height: \"auto\",\n width: \"100%\",\n background: theme?.palette?.getAccent100(),\n hoverBackground: theme?.palette?.getAccent100(),\n borderRadius: \"8px\",\n border: \"none\",\n padding: \"10px\",\n });\n\n const headingDateStyle = new DateStyle({\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.text3),\n padding: \"0px\",\n background: \"transparent\",\n });\n\n const dateStyle = new DateStyle({\n textColor: theme?.palette?.getAccent600(),\n textFont: fontHelper(theme?.typography?.subtitle2),\n padding: \"0px\",\n background: \"transparent\",\n });\n\n const status = getCallStatusWithType(callLog, loggedInUser, true);\n\n const subtitleView =
    \n \n
    \n \n\n
    \n {status}\n
    \n
    \n
    ;\n\n const tailView =
    {convertMinutesToHoursMinutesSeconds(callLog?.getTotalDurationInMinutes())}
    ;\n\n return (\n
    \n \n
    \n );\n }\n\n private static generateCallOptionsHTML(\n title: string,\n count: number,\n theme: CometChatTheme\n ): JSX.Element {\n const buttonStyle = {\n iconHeight: \"18px\",\n iconWidth: \"18px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getAccent600(),\n };\n\n const containerStyle = {\n margin: \"10px\",\n marginBottom: \"5px\",\n padding: \"10px\",\n boxSizing: \"border-box\",\n background: theme?.palette?.getAccent100(),\n borderRadius: \"8px\", display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n cursor: \"pointer\",\n width: '100%'\n } as React.CSSProperties;\n\n const titleStyle = {\n font: fontHelper(theme?.typography?.text2),\n color: theme?.palette?.getAccent()\n };\n\n const buttonContainerStyle = {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n font: fontHelper(theme?.typography?.text3),\n color: theme?.palette?.getAccent600()\n };\n\n return (\n
    \n {title}\n \n {count > 0 ? count : \"\"}\n \n \n
    \n )\n }\n}","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20height%3D%2224px%22%20width%3D%2224px%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%28-1%200%200%20-1%2024%2024%29%22%3E%3Cg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20transform%3D%22matrix%280%201%20-1%200%2024%20-0%29%22%3E%3Ctitle%3EIcons%2F24%2FClose%20Chat%3C%2Ftitle%3E%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cg%20id%3D%22Icons%2F24%2FClose-Chat%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.700000%2C%208.000000%29%22%3E%3Cpath%20d%3D%22M20.625%2C0%20L10.7983333%2C9.82575%20C10.669546%2C9.9547209%2010.4947627%2C10.0271915%2010.3125%2C10.0271915%20C10.1302373%2C10.0271915%209.95545401%2C9.9547209%209.82666667%2C9.82575%20L0%2C0%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n DateStyle,\n ListItemStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CallLogHistoryStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n): DateStyle {\n return {\n background: \"transparent\",\n textColor: style?.dateTextColor || theme.palette.getAccent600(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.subtitle2),\n };\n}\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getCallStatusStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.callStatusTextFont || fontHelper(theme.typography.text2),\n color: style?.callStatusTextColor || theme.palette.getAccent(),\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogHistoryStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogHistoryStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n emptyStateTextColor:\n callLogsStyle?.emptyStateTextColor || theme.palette.getAccent600(),\n emptyStateTextFont:\n callLogsStyle?.emptyStateTextFont || fontHelper(theme.typography.caption1),\n errorStateTextColor:\n callLogsStyle?.errorStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont:\n callLogsStyle?.errorStateTextFont || fontHelper(theme.typography.caption1),\n loadingIconTint:\n callLogsStyle?.loadingIconTint || theme.palette.getAccent600(),\n });\n}\n\nexport function getCallDurationStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.callDurationTextColor || fontHelper(theme.typography.caption1),\n color: style?.callDurationTextColor || theme.palette.getAccent500(),\n };\n}\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDateSeparator(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n textFont:\n style?.dateSeparatorTextFont || fontHelper(theme.typography.text3),\n textColor: style?.dateSeparatorTextColor || theme.palette.getAccent700(),\n background: \"transparent\",\n };\n}\n\nexport function getDividerStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n height: \"1px\",\n width: \"100%\",\n background: style?.dividerColor || theme.palette.getAccent200(),\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogHistoryStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { CallLogHistoryStyle, CometChatUIKitCalls } from \"@cometchat/uikit-shared\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport { convertMinutesToHoursMinutesSeconds, getCallStatusWithType } from \"../Utils/utils\";\nimport { getBackButtonStyle, getButtonContainerStyle, getCallDurationStyle, getCallStatusStyle, getContainerStyle, getDateSeparator, getDividerStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport {CometChat} from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport LoadingIcon from \"./assets/LoadingIcon.svg\";\nimport backIcon from \"./assets/backbutton.svg\";\n\ninterface ICallLogHistoryProps {\n title?: string;\n emptyStateText?: string;\n errorStateText?: string;\n backIconUrl?: string;\n loadingIconURL?: string;\n emptyStateView?: any;\n loadingStateView?: any;\n errorStateView?: any;\n subtitleView?: any;\n tailView?: any;\n callLogRequestBuilder?: any;\n callUser?: any;\n callGroup?: any;\n onItemClick?: Function;\n onBackClick?: Function;\n onError?: Function;\n datePattern?: DatePatterns;\n dateSeparatorPattern?: DatePatterns;\n listItemStyle?: ListItemStyle;\n callLogHistoryStyle?: CallLogHistoryStyle;\n}\n\nconst defaultProps: ICallLogHistoryProps = {\n title: localize(\"CALL_HISTORY\"),\n emptyStateText: localize(\"NO_CALLS_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n backIconUrl: backIcon,\n loadingIconURL: LoadingIcon,\n emptyStateView: null,\n loadingStateView: null,\n errorStateView: null,\n subtitleView: null,\n tailView: null,\n callLogRequestBuilder: undefined,\n callUser: undefined,\n callGroup: undefined,\n onItemClick: undefined,\n onBackClick: undefined,\n onError: () => { },\n datePattern: DatePatterns.time,\n dateSeparatorPattern: DatePatterns.DayDate,\n listItemStyle: {} as ListItemStyle,\n callLogHistoryStyle: {} as CallLogHistoryStyle,\n}\n\nconst CometChatCallLogHistory = (props: ICallLogHistoryProps) => {\n const {\n title,\n emptyStateText,\n errorStateText,\n backIconUrl,\n loadingIconURL,\n emptyStateView,\n errorStateView,\n loadingStateView,\n subtitleView,\n tailView,\n callLogRequestBuilder,\n callUser,\n callGroup,\n onItemClick,\n onBackClick,\n onError,\n datePattern,\n dateSeparatorPattern,\n listItemStyle,\n callLogHistoryStyle\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [callList, setCallList] = useState([]);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [callListState, setCallListState] = useState(States.loading);\n const requestBuilder = useRef(null);\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError?.(errorObj);\n } else {\n onError?.(error);\n }\n },\n [onError]\n );\n\n const setCallLogRequestBuilder = useCallback((): any => {\n try {\n let builder;\n if (callLogRequestBuilder) {\n builder = callLogRequestBuilder;\n } else {\n const authToken = loggedInUser!.getAuthToken() || \"\";\n builder = new CometChatUIKitCalls.CallLogRequestBuilder()\n .setLimit(30)\n .setCallCategory(\"call\")\n .setAuthToken(authToken);\n }\n\n if(callGroup) {\n builder = builder.setGuid(callGroup?.getGuid());\n } else if(callUser) {\n builder = builder.setUid(callUser?.getUid());\n }\n\n return builder.build();\n } catch (e) {\n onErrorCallback(e);\n }\n }, [callLogRequestBuilder, callGroup, callUser, loggedInUser, onErrorCallback]);\n\n const fetchNextCallList = useCallback(async (): Promise => {\n try {\n const calls = await requestBuilder?.current?.fetchNext();\n return calls;\n } catch (e) {\n onErrorCallback(e);\n throw new Error(\"Error while fetching call list\");\n }\n }, [requestBuilder, onErrorCallback]);\n\n const getCallList = useCallback(async () => {\n try {\n const calls = await fetchNextCallList();\n if (calls && calls.length > 0) {\n setCallList((prevCallList) => {\n return [...prevCallList, ...calls]\n })\n setCallListState(States.loaded);\n } else if (callList.length === 0) {\n setCallListState(States.empty);\n }\n } catch (e) {\n if (callList.length === 0) {\n setCallListState(States.error);\n }\n onErrorCallback(e);\n }\n }, [fetchNextCallList, setCallList, setCallListState, callList, onErrorCallback])\n\n const handleItemClick = useCallback((call: any) => {\n try {\n if (onItemClick) onItemClick(call);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onItemClick, onErrorCallback])\n\n const isDateDifferent = useCallback((firstDate: number, secondDate: number) => {\n try{\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate * 1000);\n secondDateObj = new Date(secondDate * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (e) {\n onErrorCallback(e);\n return false\n }\n }, [onErrorCallback])\n\n const getMessageBubbleDate = useCallback((item: any, i: number) => {\n try {\n if (i === 0) {\n return (\n
    \n \n
    \n );\n } else {\n if (\n isDateDifferent(callList[i - 1]?.getInitiatedAt(), item.getInitiatedAt())\n ) {\n return (\n <>\n \n
    \n \n
    \n \n );\n } else {\n return null;\n }\n }\n } catch (e) {\n onErrorCallback(e);\n return null;\n }\n }, [dateSeparatorPattern, theme, callLogHistoryStyle, isDateDifferent, callList, onErrorCallback])\n\n const getCallDuration = useCallback((item: any) => {\n try{\n if (item?.getTotalDurationInMinutes()) {\n return convertMinutesToHoursMinutesSeconds(item?.getTotalDurationInMinutes());\n } else {\n return false;\n }\n }catch(e){\n onErrorCallback(e);\n return false;\n }\n }, [onErrorCallback]);\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView) {\n return subtitleView(item);\n } else {\n return (\n <>\n
    \n \n
    {getCallStatusWithType(item, loggedInUser!, true)}
    \n
    \n \n );\n }\n }, [subtitleView, theme, callLogHistoryStyle, datePattern, loggedInUser])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if(tailView){\n return tailView(item);\n }else{\n return (\n <>\n
    \n { getCallDuration(item) ? getCallDuration(item) : '00:00' }\n
    \n \n );\n }\n }, [tailView, theme, callLogHistoryStyle, getCallDuration])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n return (\n <>\n {getMessageBubbleDate(item, index) ?
    {getMessageBubbleDate(item, index)}
    : null}\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n hideSeparator={true}\n />\n \n )\n };\n }, [getMessageBubbleDate, loadingIconURL, theme, listItemStyle, getListItemSubtitleView, getListItemTailView, handleItemClick]);\n\n Hooks(loggedInUser, setLoggedInUser, requestBuilder, setCallLogRequestBuilder, getCallList, onErrorCallback);\n\n return(\n <>\n
    \n
    \n {\n onBackClick ?\n
    \n \n
    :\n null\n }\n
    \n { title }\n
    \n
    \n\n \n
    \n \n )\n}\n\nCometChatCallLogHistory.defaultProps = defaultProps;\nexport { CometChatCallLogHistory };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22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8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n requestBuilder: any,\n setRequestBuilder: Function,\n getCallList: Function,\n onErrorCallback: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n \n useEffect(()=>{\n if(loggedInUser){\n requestBuilder.current = setRequestBuilder();\n getCallList?.();\n }\n }, [loggedInUser]);\n}\n\nexport { Hooks };","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogParticipantsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogParticipantsStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n titleTextFont:\n callLogsStyle?.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle?.titleColor || theme.palette.getAccent(),\n });\n}\n\n\nexport function getAvatarStyle(\n theme: CometChatTheme,\n avatarStyle?: AvatarStyle\n) {\n return new AvatarStyle({\n borderRadius: avatarStyle?.borderRadius || \"24px\",\n width: avatarStyle?.width || \"36px\",\n height: avatarStyle?.height || \"36px\",\n border: avatarStyle?.border || \"none\",\n backgroundColor:\n avatarStyle?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyle?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyle?.backgroundSize || \"cover\",\n nameTextFont:\n avatarStyle?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyle?.outerViewBorderWidth || \"\",\n outerViewBorderSpacing: avatarStyle?.outerViewBorderSpacing || \"\",\n outerViewBorderColor: avatarStyle?.outerViewBorderColor || \"\",\n outerViewBorderRadius: avatarStyle?.outerViewBorderRadius || \"\",\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.callStatusColor || theme.palette.getAccent600(),\n font: style?.callStatusFont || fontHelper(theme.typography.caption1),\n };\n}\n\nexport function getCallDateStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n font: style?.dateTextFont || fontHelper(theme.typography.caption1),\n color: style?.dateTextColor || theme.palette.getAccent500(),\n background: \"transparent\",\n padding: \"3px 10px\",\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogParticipantsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogParticipantsStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { CallLogParticipantsStyle } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { useCallback, useContext, useMemo } from \"react\";\nimport { convertMinutesToHoursMinutesSeconds } from \"../Utils/utils\";\nimport { getAvatarStyle, getBackButtonStyle, getButtonContainerStyle, getCallDateStyle, getContainerStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\n\ninterface ICallLogParticipantsProps {\n title?: string;\n backIconUrl?: string;\n call: any;\n datePattern?: DatePatterns;\n avatarStyle?: AvatarStyle;\n listItemStyle?: ListItemStyle;\n callLogParticipantsStyle?: CallLogParticipantsStyle;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n onBackClick?: Function;\n onItemClick?: Function;\n}\n\nconst defaultProps: ICallLogParticipantsProps = {\n title: localize(\"PARTICIPANTS\"),\n backIconUrl: backIcon,\n call: undefined,\n datePattern: DatePatterns.time,\n avatarStyle: {} as AvatarStyle,\n listItemStyle: {} as ListItemStyle,\n callLogParticipantsStyle: {} as CallLogParticipantsStyle,\n listItemView: null,\n subtitleView: null,\n tailView: null,\n onBackClick: undefined,\n onItemClick: undefined\n\n}\n\nconst CometChatCallLogParticipants = (props: ICallLogParticipantsProps) => {\n const {\n title,\n backIconUrl,\n call,\n datePattern,\n avatarStyle,\n listItemStyle,\n callLogParticipantsStyle,\n listItemView,\n subtitleView,\n tailView,\n onBackClick,\n onItemClick\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const handleItemClick = useCallback((item: any) => {\n if (onItemClick) {\n onItemClick(item);\n }\n }, [onItemClick])\n\n const getCallParticipants = useCallback(() => {\n return call?.getParticipants();\n }, [call])\n\n const getCallInitiatedAt = useCallback(() => {\n return call?.getInitiatedAt();\n }, [call])\n\n const getDurationOfCall = (item: any) => {\n if (item?.getHasJoined() || item?.getJoinedAt()) {\n return convertMinutesToHoursMinutesSeconds(item?.getTotalDurationInMinutes());\n } else {\n return convertMinutesToHoursMinutesSeconds(0);\n }\n }\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if(subtitleView){\n return subtitleView(item);\n }else{\n return (\n <>\n
    \n { getDurationOfCall(item) }\n
    \n \n );\n }\n }, [subtitleView, theme, callLogParticipantsStyle])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if(tailView){\n return tailView(item);\n }else{\n return (\n <>\n {\n
    \n \n
    \n }\n \n );\n }\n }, [tailView, theme, callLogParticipantsStyle, datePattern, getCallInitiatedAt])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if(listItemView){\n return listItemView(item);\n }else{\n return (\n <>\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n }\n }, [listItemView, theme, listItemStyle, avatarStyle, getListItemSubtitleView, getListItemTailView, handleItemClick])\n\n return (\n <>\n
    \n
    \n { onBackClick ?\n
    \n \n
    :\n null \n }\n
    \n {title}\n
    \n
    \n \n
    \n \n )\n\n}\n\nCometChatCallLogParticipants.defaultProps = defaultProps;\nexport { CometChatCallLogParticipants };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CallLogRecordingsStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nexport function getButtonContainerStyle(): React.CSSProperties {\n return {\n marginRight: \"15px\",\n };\n}\n\nexport function getListStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogRecordingsStyle\n): ListStyle {\n return new ListStyle({\n height: \"90%\",\n titleTextFont:\n callLogsStyle?.titleFont || fontHelper(theme.typography.title1),\n titleTextColor: callLogsStyle?.titleColor || theme.palette.getAccent(),\n });\n}\n\nexport function getListItemStyle(\n theme: CometChatTheme,\n listItemStyle?: ListItemStyle\n) {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || theme.palette.getBackground(),\n activeBackground:\n listItemStyle?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor:\n listItemStyle?.separatorColor || theme.palette.getAccent200(),\n hoverBackground:\n listItemStyle?.hoverBackground || theme.palette.getAccent50(),\n padding: listItemStyle?.padding || \"0\",\n });\n}\n\nexport function getSubtitleStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n): React.CSSProperties {\n return {\n display: \"flex\",\n color: style?.recordingDurationColor || theme.palette.getAccent600(),\n font: style?.recordingDurationFont || fontHelper(theme.typography.caption1),\n };\n}\n\nexport function getCallDateStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n textColor: style?.dateTextColor || theme.palette.getAccent500(),\n textFont: style?.dateTextFont || fontHelper(theme.typography.caption1),\n background: \"transparent\",\n };\n}\n\nexport function getBackButtonStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.backIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getDownloadButtonStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: style?.downloadIconTint || theme.palette.getPrimary(),\n };\n}\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n callLogsStyle: CallLogRecordingsStyle\n): React.CSSProperties {\n return {\n height: callLogsStyle?.height || \"100%\",\n width: callLogsStyle?.width || \"100%\",\n background: callLogsStyle?.background || theme.palette.getBackground(),\n borderRadius: callLogsStyle?.borderRadius || \"0\",\n border: callLogsStyle?.border || \"none\",\n };\n}\n\nexport function getTitleStyle(\n theme: CometChatTheme,\n style: CallLogRecordingsStyle\n) {\n return {\n font: style?.titleFont || fontHelper(theme.typography.text1),\n color: style?.titleColor || theme.palette.getAccent(),\n background: \"transparent\",\n };\n}\n","import { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { DatePatterns, States, localize } from \"@cometchat/uikit-resources\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { useCallback, useContext, useMemo } from \"react\";\nimport { convertSecondsToHoursMinutesSeconds, downloadRecordingFromURL } from \"../Utils/utils\";\nimport { CallLogRecordingsStyle } from \"@cometchat/uikit-shared\";\nimport { getBackButtonStyle, getButtonContainerStyle, getCallDateStyle, getContainerStyle, getDownloadButtonStyle, getListItemStyle, getListStyle, getSubtitleStyle, getTitleStyle } from \"./style\";\nimport { CometChatList } from \"../../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport downloadIcon from \"./assets/download.svg\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\n\ninterface ICallLogRecordingsProps {\n title?: string;\n backIconUrl?: string;\n downloadIconUrl?: string;\n hideDownloadButton?: boolean;\n call: any;\n datePattern?: DatePatterns;\n listItemStyle?: ListItemStyle;\n callLogRecordingsStyle?: CallLogRecordingsStyle;\n onBackClick?: Function;\n onItemClick?: Function;\n onDownloadClick?: Function;\n listItemView?: any;\n subtitleView?: any;\n tailView?: any;\n}\n\nconst defaultProps: ICallLogRecordingsProps = {\n title: localize(\"RECORDING\"),\n backIconUrl: backIcon,\n downloadIconUrl: downloadIcon,\n hideDownloadButton: false,\n call: undefined,\n datePattern: DatePatterns.time,\n listItemStyle: {} as ListItemStyle,\n callLogRecordingsStyle: {} as CallLogRecordingsStyle,\n onBackClick: undefined,\n onItemClick: undefined,\n onDownloadClick: undefined,\n listItemView: null,\n subtitleView: null,\n tailView: null\n}\n\nconst CometChatCallLogRecordings = (props: ICallLogRecordingsProps) => {\n const {\n title,\n backIconUrl,\n downloadIconUrl,\n hideDownloadButton,\n call,\n datePattern,\n listItemStyle,\n callLogRecordingsStyle,\n onBackClick,\n onItemClick,\n onDownloadClick,\n listItemView,\n subtitleView,\n tailView\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const handleItemClick = useCallback((item: any) => {\n if (onItemClick) {\n onItemClick(item);\n }\n }, [onItemClick])\n\n const handleDownloadClick = useCallback((item: any) => {\n if (onDownloadClick) {\n onDownloadClick(item);\n } else {\n downloadRecordingFromURL(item?.getRecordingURL())\n }\n }, [onDownloadClick])\n\n const getRecordings = useCallback(() => {\n try {\n return call?.getRecordings();\n } catch (e) {\n console.log(e);\n }\n }, [call])\n\n const getRecordingStartTime = (item: any) => {\n try {\n return item?.getStartTime();\n } catch (e) {\n console.log(e);\n }\n }\n\n const getRecordingDuration = (item: any) => {\n try {\n return convertSecondsToHoursMinutesSeconds(item?.getDuration());\n } catch (e) {\n console.log(e);\n }\n }\n\n const getListItemSubtitleView = useCallback((item: any): JSX.Element => {\n if (subtitleView) {\n return subtitleView(item);\n } else {\n return (\n <>\n
    \n {getRecordingDuration(item)}\n
    \n \n );\n }\n }, [subtitleView, theme, callLogRecordingsStyle])\n\n const getListItemTailView = useCallback((item: any): JSX.Element => {\n if (tailView) {\n return tailView(item);\n } else {\n return (\n <>\n
    \n \n {\n !hideDownloadButton ?\n handleDownloadClick(item)}\n /> :\n null\n }\n
    \n \n );\n }\n }, [tailView, theme, callLogRecordingsStyle, datePattern, hideDownloadButton, downloadIconUrl, handleDownloadClick])\n\n const getListItem = useMemo(() => {\n return function (item: any, index: number): any {\n if (listItemView) {\n return listItemView(item);\n } else {\n return (\n <>\n handleItemClick?.(item)}\n subtitleView={getListItemSubtitleView(item)}\n tailView={getListItemTailView(item)}\n />\n \n )\n }\n }\n }, [listItemView, theme, listItemStyle, getListItemSubtitleView, getListItemTailView, handleItemClick])\n\n return (\n <>\n
    \n
    \n { onBackClick ?\n
    \n \n
    :\n null\n }\n
    \n {title}\n
    \n
    \n \n
    \n \n )\n}\n\nCometChatCallLogRecordings.defaultProps = defaultProps;\nexport { CometChatCallLogRecordings };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FDownload%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FDownload%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%281.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%227.33333333%2013.2%2011%2016.8666667%2014.6666667%2013.2%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2211%22%20y1%3D%225.86666667%22%20x2%3D%2211%22%20y2%3D%2216.8666667%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C11%20C0%2C17.0751322%204.92486775%2C22%2011%2C22%20C17.0751322%2C22%2022%2C17.0751322%2022%2C11%20C22%2C4.92486775%2017.0751322%2C0%2011%2C0%20C4.92486775%2C0%200%2C4.92486775%200%2C11%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CallLogDetailsStyle, CallLogHistoryConfiguration, CallLogParticipantsConfiguration, CallLogRecordingsConfiguration, } from \"@cometchat/uikit-shared\";\nimport { CometChatCallDetailsOption, CometChatDetailsTemplate, CometChatTheme, fontHelper, localize, } from \"@cometchat/uikit-resources\";\nimport { getBackButtonStyle, getButtonContainerStyle, getContainerStyle, getListItemStyle, getProfileContainerStyle, getTitleStyle } from \"./style\";\n/* eslint-disable react-hooks/exhaustive-deps */\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { AvatarStyle } from \"@cometchat/uikit-elements\";\nimport { CallingDetailsUtils } from \"../Utils/CallDetailsUtils\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../../Shared/Views/CometChatButton\";\nimport { CometChatCallLogHistory } from \"../CometChatCallLogHistory\";\nimport { CometChatCallLogParticipants } from \"../CometChatCallLogParticipants\";\nimport { CometChatCallLogRecordings } from \"../CometChatCallLogRecordings\";\nimport { CometChatListItem } from \"../../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport backIcon from \"./assets/backbutton.svg\";\nimport { verifyCallUser } from \"../Utils/utils\";\n\ninterface ICallLogDetailsProps {\n title?: string;\n backIconUrl?: string;\n call: CometChat.Call;\n onBackClick?: Function;\n avatarStyle?: AvatarStyle;\n data?: (callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme) => CometChatDetailsTemplate[];\n callLogHistoryConfiguration?: CallLogHistoryConfiguration;\n callLogParticipantsConfiguration?: CallLogParticipantsConfiguration;\n callLogRecordingsConfiguration?: CallLogRecordingsConfiguration;\n callLogDetailsStyle?: CallLogDetailsStyle;\n}\n\nconst defaultProps = {\n title: localize(\"CALL_DETAIL\"),\n backIconUrl: backIcon,\n onBackClick: undefined,\n avatarStyle: {} as AvatarStyle,\n data: (callLog: any, loggedInUser: CometChat.User, theme: CometChatTheme) => [] as CometChatDetailsTemplate[],\n callLogHistoryConfiguration: {} as CallLogHistoryConfiguration,\n callLogParticipantsConfiguration: {} as CallLogParticipantsConfiguration,\n callLogRecordingsConfiguration: {} as CallLogRecordingsConfiguration,\n callLogDetailsStyle: {} as CallLogDetailsStyle,\n};\n\nconst CometChatCallLogDetails = (props: ICallLogDetailsProps) => {\n const {\n title,\n backIconUrl,\n call,\n onBackClick,\n avatarStyle,\n data,\n callLogHistoryConfiguration,\n callLogParticipantsConfiguration,\n callLogRecordingsConfiguration,\n callLogDetailsStyle\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [detailsTemplates, setDetailsTemplates] = useState([]);\n const [showParticipants, setShowParticipants] = useState(false);\n const [showRecordings, setShowRecordings] = useState(false);\n const [showCallHistory, setShowCallHistory] = useState(false);\n\n\n const getAvatarStyle = useCallback(() => {\n return { ...new AvatarStyle(defaultAvatarStyle(theme)), ...avatarStyle };\n }, [avatarStyle, theme]);\n\n\n const defaultAvatarStyle = (theme: CometChatTheme) => {\n return{\n borderRadius: \"24px\",\n width: \"50px\",\n height: \"50px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorder: \"\",\n outerViewBorderSpacing: \"\"\n };\n }\n\n const getAvatarTitleStyle = (theme: CometChatTheme, style: CallLogDetailsStyle) => {\n return {\n color: style?.nameTextColor || theme.palette.getAccent(),\n font: style?.nameTextFont || fontHelper(theme.typography.title1),\n };\n }\n\n const setTemplates = useCallback(() => {\n let templatesArray = data?.(call!, loggedInUser!, theme);\n if (!templatesArray || !templatesArray.length) {\n templatesArray = CallingDetailsUtils.getDefaultCallTemplate(call, loggedInUser!, theme);\n }\n\n setDetailsTemplates([...templatesArray]);\n }, [setDetailsTemplates, call, loggedInUser, theme]);\n\n const getOptionsForTemplate = useCallback((template: CometChatDetailsTemplate): CometChatCallDetailsOption[] => {\n const { options, id } = template;\n let curOptions: CometChatCallDetailsOption[] = [];\n if (options && id !== undefined) {\n const callEntity = verifyCallUser(call, loggedInUser!);\n if (callEntity?.getUid) {\n curOptions = options(callEntity, null, id);\n } else {\n curOptions = options(null, callEntity, id);\n }\n }\n return curOptions;\n }, [call, loggedInUser])\n\n const handleOptionClick = useCallback((option: CometChatCallDetailsOption) => {\n if (option?.onClick) {\n option.onClick(call);\n } else {\n switch (option.id) {\n case \"participants\":\n setShowParticipants(true);\n break;\n case \"recordings\":\n setShowRecordings(true);\n break;\n case \"callHistory\":\n setShowCallHistory(true);\n break;\n default:\n break;\n }\n }\n }, [call, setShowParticipants, setShowRecordings, setShowCallHistory])\n\n const showDetailsPage = useCallback(() => {\n return (\n loggedInUser && (\n !showParticipants &&\n !showRecordings &&\n !showCallHistory)\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showParticipantsPage = useCallback(() => {\n return (\n loggedInUser &&\n showParticipants &&\n !showRecordings &&\n !showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showRecordingsPage = useCallback(() => {\n return (\n loggedInUser &&\n !showParticipants &&\n showRecordings &&\n !showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const showCallHistoryPage = useCallback(() => {\n return (\n loggedInUser &&\n !showParticipants &&\n !showRecordings &&\n showCallHistory\n );\n }, [loggedInUser, showParticipants, showRecordings, showCallHistory])\n\n const handlePageOnBackClick = useCallback(() => {\n setShowParticipants(false);\n setShowRecordings(false);\n setShowCallHistory(false);\n }, [setShowParticipants, setShowRecordings, setShowCallHistory])\n\n const getCallUser = useCallback(() => {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity?.getUid) {\n return entity;\n } else {\n return undefined;\n }\n }, [call, loggedInUser])\n\n const getCallGroup = useCallback(() => {\n const entity = verifyCallUser(call, loggedInUser!);\n if (entity?.getGuid) {\n return entity;\n } else {\n return undefined;\n }\n }, [call, loggedInUser])\n\n const getTemplatesUI = useCallback(() => {\n return (\n <>\n {\n detailsTemplates.map((template) => {\n return (\n
    \n {getOptionsForTemplate(template).map((option) => {\n\n const listItemStyle = {\n backgroundColor: option.backgroundColor,\n titleColor: option.titleColor,\n titleFont: option.titleFont\n }\n\n return (\n
    \n
    \n {\n option.customView ?\n
    handleOptionClick(option)}>\n {option.customView}\n
    :\n handleOptionClick(option)}\n listItemStyle={getListItemStyle(theme, listItemStyle)}\n hideSeparator={template.hideItemSeparator}\n avatarStyle={new AvatarStyle({\n backgroundColor: option.iconTint,\n })}\n id={option.id}\n key={option.id}\n tailView={option.tail}\n />\n }\n
    \n
    \n )\n })}\n {template.title}\n
    \n )\n })\n }\n \n )\n }, [detailsTemplates, getOptionsForTemplate, handleOptionClick])\n\n Hooks(loggedInUser, setLoggedInUser, call, setTemplates);\n\n return (\n <>\n
    \n {\n showDetailsPage() ?\n
    \n {\n onBackClick ?\n
    \n \n
    \n {title}\n
    \n
    :\n null\n }\n {/*
    */}\n
    \n \n {verifyCallUser(call, loggedInUser!).name}\n
    \n {getTemplatesUI()}\n
    :\n null\n }\n {\n showParticipantsPage() ?\n { return callLogParticipantsConfiguration?.onBackClick || handlePageOnBackClick }}\n onItemClick={callLogParticipantsConfiguration?.onItemClick || undefined}\n datePattern={callLogParticipantsConfiguration?.datePattern || undefined}\n listItemStyle={callLogParticipantsConfiguration?.listItemStyle || undefined}\n callLogParticipantsStyle={callLogParticipantsConfiguration?.callLogParticipantsStyle || undefined}\n listItemView={callLogParticipantsConfiguration?.listItemView || null}\n subtitleView={callLogParticipantsConfiguration?.subtitleView || null}\n tailView={callLogParticipantsConfiguration?.tailView || null}\n /> :\n null\n }\n\n {\n showRecordingsPage() ?\n { return callLogRecordingsConfiguration?.onBackClick || handlePageOnBackClick }}\n onItemClick={callLogRecordingsConfiguration?.onItemClick || undefined}\n datePattern={callLogRecordingsConfiguration?.datePattern || undefined}\n listItemStyle={callLogRecordingsConfiguration?.listItemStyle || undefined}\n callLogRecordingsStyle={callLogRecordingsConfiguration?.callLogRecordingsStyle || undefined}\n downloadIconUrl={callLogRecordingsConfiguration?.downloadIconUrl || undefined}\n hideDownloadButton={callLogRecordingsConfiguration?.hideDownloadButton || undefined}\n onDownloadClick={callLogRecordingsConfiguration?.onDownloadClick || undefined}\n listItemView={callLogRecordingsConfiguration?.listItemView || null}\n subtitleView={callLogRecordingsConfiguration?.subtitleView || null}\n tailView={callLogRecordingsConfiguration?.tailView || null}\n /> :\n null\n }\n\n {\n showCallHistoryPage() ?\n { return callLogHistoryConfiguration?.onBackClick || handlePageOnBackClick }}\n datePattern={callLogHistoryConfiguration?.datePattern || undefined}\n dateSeparatorPattern={callLogHistoryConfiguration?.dateSeparatorPattern || undefined}\n callLogHistoryStyle={callLogHistoryConfiguration?.callLogHistoryStyle || undefined}\n onError={callLogHistoryConfiguration?.onError || undefined}\n /> :\n null\n }\n
    \n \n )\n\n}\n\nCometChatCallLogDetails.defaultProps = defaultProps;\nexport { CometChatCallLogDetails };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect } from \"react\";\nimport { CometChatUIKit } from \"../../Shared/CometChatUIKit/CometChatUIKit\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n call: any,\n setTemplates: Function\n) {\n useEffect(\n () => {\n CometChatUIKit.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n }\n );\n },\n [setLoggedInUser]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n setTemplates?.()\n }\n }, [loggedInUser, call]);\n}\n\nexport { Hooks };","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { LabelStyle } from \"@cometchat/uikit-elements\";\nimport { WithDetailsStyle } from \"@cometchat/uikit-shared\";\n\nexport function getContainerStyle(\n theme: CometChatTheme,\n style: WithDetailsStyle\n): React.CSSProperties {\n return {\n height: style?.height || \"100%\",\n width: style?.width || \"100%\",\n border: style?.border || `none`,\n borderRadius: style?.borderRadius || \"0px\",\n background: style?.background || theme.palette.getBackground(),\n display: \"flex\",\n boxSizing: \"border-box\",\n position: \"relative\",\n };\n}\n\nexport function getLabelStyle(theme: CometChatTheme, style: WithDetailsStyle) {\n return new LabelStyle({\n background: \"transparent\",\n textFont: style?.messageTextFont || fontHelper(theme.typography.heading),\n textColor: style?.messageTextColor || theme.palette.getAccent700(),\n });\n}\n\nexport function getEmptyContainerStyle() {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: \"100%\",\n width: \"100%\",\n };\n}\n","import { CallLogDetailsConfiguration, CallLogsConfiguration, WithDetailsStyle } from '@cometchat/uikit-shared';\nimport { getContainerStyle, getEmptyContainerStyle, getLabelStyle } from \"./style\";\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { CometChatCallLogDetails } from \"../CometChatCallLogDetails\";\nimport { CometChatCallLogs } from \"../CometChatCallLogs\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { localize } from \"@cometchat/uikit-resources\";\n\ninterface ICallLogWithDetailsProps {\n isMobileView?: boolean;\n messageText?: string;\n withDetailsStyle?: WithDetailsStyle;\n callLogDetailsConfiguration?: CallLogDetailsConfiguration;\n callLogsConfiguration?: CallLogsConfiguration\n}\n\nconst defaultProps: ICallLogWithDetailsProps = {\n isMobileView: false,\n messageText: localize(\"NO_CALLS_SELECTED\"),\n withDetailsStyle: {} as WithDetailsStyle,\n callLogDetailsConfiguration: {} as CallLogDetailsConfiguration,\n callLogsConfiguration: {} as CallLogsConfiguration\n};\n\nconst CometChatCallLogsWithDetails = (props: ICallLogWithDetailsProps) => {\n const {\n isMobileView,\n messageText,\n withDetailsStyle,\n callLogDetailsConfiguration,\n callLogsConfiguration\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n const [activeCall, setActiveCall] = useState(null);\n\n const handleInfoClick = useCallback((call: any) => {\n setActiveCall(call);\n }, [setActiveCall])\n\n const getCallLogStyle = useCallback(() => {\n if (isMobileView) {\n return {\n width: \"100%\",\n display: !activeCall ? \"block\" : \"none\",\n }\n } else {\n return {\n width: \"280px\",\n minWidth: \"max(25%, 280px)\",\n }\n }\n }, [isMobileView, activeCall])\n\n const getCallDetailStyle = useCallback(() => {\n if (isMobileView) {\n return {\n width: \"100%\",\n display: activeCall ? \"block\" : \"none\"\n }\n } else {\n return {\n width: \"calc(100% - 280px)\",\n }\n }\n }, [isMobileView, activeCall])\n\n const getBackClick = useCallback(() => {\n setActiveCall(null);\n }, [setActiveCall])\n\n Hooks(callLogDetailsConfiguration!, callLogsConfiguration!, setActiveCall, isMobileView!, theme);\n\n return (\n
    \n
    \n \n
    \n
    \n {\n activeCall ?\n { return callLogDetailsConfiguration?.onBackClick || getBackClick }}\n backIconUrl={callLogDetailsConfiguration?.backIconUrl}\n avatarStyle={callLogDetailsConfiguration?.avatarStyle}\n data={callLogDetailsConfiguration?.data || undefined}\n callLogHistoryConfiguration={callLogDetailsConfiguration?.callLogHistoryConfiguration}\n callLogParticipantsConfiguration={callLogDetailsConfiguration?.callLogParticipantsConfiguration}\n callLogRecordingsConfiguration={callLogDetailsConfiguration?.callLogRecordingsConfiguration}\n callLogDetailsStyle={callLogDetailsConfiguration?.callLogDetailsStyle}\n /> :\n
    \n \n
    \n }\n
    \n
    \n )\n}\n\n\nCometChatCallLogsWithDetails.defaultProps = defaultProps;\nexport { CometChatCallLogsWithDetails };\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\nimport { CallLogDetailsConfiguration, CallLogsConfiguration } from \"@cometchat/uikit-shared\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n callLogDetailsConfiguration: CallLogDetailsConfiguration,\n callLogsConfiguration: CallLogsConfiguration,\n setActiveCall: Function,\n isMobileView: boolean,\n theme: CometChatTheme\n) {\n useEffect(\n () => {\n callLogDetailsConfiguration.callLogDetailsStyle = { ...callLogDetailsConfiguration.callLogDetailsStyle, border: `1px solid ${theme?.palette?.getAccent100()}` };\n\n if (isMobileView) {\n const overrideOnBackClick = () => {\n setActiveCall(null);\n };\n callLogDetailsConfiguration.onBackClick = overrideOnBackClick;\n }\n },\n [callLogDetailsConfiguration, isMobileView, setActiveCall]\n );\n\n useEffect(\n () => {\n callLogsConfiguration.callLogsStyle = { ...callLogsConfiguration.callLogsStyle, border: `1px solid ${theme?.palette?.getAccent100()}` };\n },\n [callLogsConfiguration]\n );\n}\n\nexport { Hooks };\n","import { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { AddMembersStyle, UsersStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string};\n\nexport function addMembersStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n width: addMembersStyleObject?.width || \"100%\",\n height: addMembersStyleObject?.height || \"100%\",\n background: addMembersStyleObject?.background || theme.palette.getBackground(),\n border: addMembersStyleObject?.border || \"none\",\n borderRadius: addMembersStyleObject?.borderRadius || \"0\",\n boxShadow: addMembersStyleObject?.boxShadow,\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n padding: addMembersStyleObject?.padding || '0',\n overflow: \"hidden\"\n };\n}\n\nexport function usersStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : UsersStyle {\n return new UsersStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"inherit\",\n titleTextFont: addMembersStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: addMembersStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: addMembersStyleObject?.emptyStateTextFont || fontHelper(theme.typography.title1),\n emptyStateTextColor: addMembersStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: addMembersStyleObject?.errorStateTextFont || fontHelper(theme.typography.title1),\n errorStateTextColor: addMembersStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n loadingIconTint: addMembersStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n onlineStatusColor: addMembersStyleObject?.onlineStatusColor || theme.palette.getSuccess(),\n separatorColor: addMembersStyleObject?.separatorColor || theme.palette.getAccent50(),\n searchIconTint: addMembersStyleObject?.searchIconTint || theme.palette.getAccent400(),\n searchBorder: addMembersStyleObject?.searchBorder || `1px solid ${theme.palette.getAccent50()}`,\n searchBorderRadius: addMembersStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: addMembersStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchPlaceholderTextFont: addMembersStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: addMembersStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent400(),\n searchTextFont: addMembersStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: addMembersStyleObject?.searchTextColor || theme.palette.getAccent(),\n sectionHeaderTextFont: addMembersStyleObject?.sectionHeaderTextFont,\n sectionHeaderTextColor: addMembersStyleObject?.sectionHeaderTextColor\n });\n}\n\nexport function addMembersButtonStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : any {\n return { \n background: addMembersStyleObject?.addMembersButtonBackground || theme.palette.getPrimary(),\n buttonTextColor: addMembersStyleObject?.addMembersButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: addMembersStyleObject?.addMembersButtonTextFont || fontHelper(theme.typography.title2),\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px\",\n padding: \"16px 0\",\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\"\n };\n}\n\nexport function defaultBackBtnStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: addMembersStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n left: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function closeBtnStyle(addMembersStyleObject : AddMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: addMembersStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n top: \"19px\",\n right: \"19px\"\n }; \n}\n\nexport function getAddMembersBtnStyle() {\n return {\n padding: '16px',\n boxSizing: 'border-box'\n } as CSSProperties;\n}\n\n/*\nexport function contentWrapperStyle(addMembersStyleObject : AddMembersStyle | null) : CSSProperties {\n return { \n height: \"100%\",\n width: \"100%\",\n boxSizing: \"border-box\",\n display: \"flex\", \n flexDirection: \"column\", \n rowGap: \"8px\",\n padding: addMembersStyleObject?.padding,\n };\n}\n*/\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AddMembersStyle, CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useRef } from \"react\";\nimport { CometChatGroupEvents, CometChatOption, CometChatUIKitConstants, SelectionMode, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { addMembersButtonStyle, addMembersStyle, closeBtnStyle, defaultBackBtnStyle, getAddMembersBtnStyle, usersStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport closeButton from \"./assets/close2x.svg\";\n\ninterface IAddMembersProps {\n /**\n * Image URL for the back button\n *\n * @remarks\n * This prop will also be used if `backButton` prop is not provided\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string,\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean,\n /**\n * Function to call when the back button is clicked\n */\n onBack?: () => void,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"ADD_MEMBERS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Show alphabetical header\n *\n * @defaultValue `false`\n */\n showSectionHeader?: boolean,\n /**\n * Property on the user object\n *\n * @remarks\n * This property will be used to extract the section header character from the user object\n *\n * @defaultValue `getName`\n */\n sectionHeaderField?: keyof CometChat.User,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (user: CometChat.User) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.multiple`\n */\n selectionMode?: SelectionMode,\n /**\n * Function to call when a user from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (user: CometChat.User, selected: boolean) => void,\n /**\n * Request builder to fetch users\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n usersRequestBuilder?: CometChat.UsersRequestBuilder,\n /**\n * Request builder with search parameters to fetch users\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.UsersRequestBuilder,\n /**\n * Custom list item view to be rendered for each user in the fetched list\n */\n listItemView?: (user: CometChat.User) => JSX.Element,\n /**\n * Custom subtitle view to be rendered for each user in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (user: CometChat.User) => JSX.Element,\n /**\n * Group to add members to\n */\n group: CometChat.Group,\n /**\n * Function to call when add button of the component is clicked\n *\n * @remarks\n * This function won't be call if no users are selected\n */\n onAddMembersButtonClick?: (guid: string, membersToAdd: CometChat.GroupMember[]) => void,\n /**\n * Text to display for the default add button\n *\n * @defaultValue `localize(\"ADD_MEMBERS\")`\n */\n buttonText?: string,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n addMembersStyle?: AddMembersStyle\n};\n\n/**\n * Renders a scrollable list of users to add to a group of a CometChat App\n */\nexport function CometChatAddMembers(props: IAddMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n title = localize(\"ADD_MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n hideSearch = false,\n searchIconURL = SearchIcon,\n searchPlaceholder = localize(\"SEARCH\"),\n showSectionHeader = false,\n sectionHeaderField = \"getName\",\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n disableUsersPresence = false,\n hideSeparator = false,\n onError,\n menus,\n options,\n selectionMode = SelectionMode.multiple,\n onSelect,\n usersRequestBuilder,\n searchRequestBuilder,\n listItemView,\n subtitleView,\n group,\n onAddMembersButtonClick = null,\n buttonText = localize(\"ADD_MEMBERS\"),\n closeButtonIconURL = closeButton,\n onClose,\n statusIndicatorStyle,\n avatarStyle,\n listItemStyle,\n addMembersStyle: addMembersStyleObject = null\n } = props;\n\n const membersToAddRef = useRef([]);\n const selectionModeRef = useRef(selectionMode);\n const loggedInUserRef = useRef(null);\n const onSelectPropRef = useRefSync(onSelect);\n const groupPropRef = useRefSync(group);\n const onBackPropRef = useRefSync(onBack);\n const onAddMembersButtonClickPropRef = useRefSync(onAddMembersButtonClick);\n const errorHandler = useCometChatErrorHandler(onError!);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Creates a `CometChat.GroupMember` instance from the provided `user`\n */\n const createGroupMemberFromUser = useCallback((user: CometChat.User): CometChat.GroupMember => {\n const groupMember = new CometChat.GroupMember(user.getUid(), CometChatUIKitConstants.groupMemberScope.participant);\n groupMember.setName(user.getName());\n groupMember.setGuid(groupPropRef.current.getGuid());\n return groupMember;\n }, [groupPropRef]);\n\n /**\n * Updates `membersToAddRef`\n *\n * @remarks\n * This function makes sure `membersToAddRef` is in sync with the UI\n */\n const onSelectWrapper = useCallback((user: CometChat.User, selected: boolean): void => {\n if (onSelectPropRef.current) {\n return onSelectPropRef.current(user, selected);\n }\n if (selectionModeRef.current === SelectionMode.single) {\n membersToAddRef.current = [createGroupMemberFromUser(user)];\n }\n else if (selectionModeRef.current === SelectionMode.multiple) {\n const targetUid = user.getUid();\n const tmpMembersToAddList: CometChat.GroupMember[] = [];\n let updated = false;\n for (let i = 0; i < membersToAddRef.current.length; i++) {\n const curMember = membersToAddRef.current[i];\n if (targetUid === curMember.getUid()) {\n updated = true;\n }\n else {\n tmpMembersToAddList.push(curMember);\n }\n }\n if (!updated) {\n tmpMembersToAddList.push(createGroupMemberFromUser(user));\n }\n membersToAddRef.current = tmpMembersToAddList;\n }\n }, [createGroupMemberFromUser, onSelectPropRef]);\n\n /**\n * Creates a `CometChat.Action` instance\n */\n const createActionMessage = useCallback((actionOn: CometChat.GroupMember, loggedInUser: CometChat.User, group: CometChat.Group): CometChat.Action => {\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory.action as CometChat.MessageCategory\n );\n actionMessage.setAction(CometChatUIKitConstants.groupMemberAction.ADDED);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(actionOn));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setMessage(`${loggedInUser.getName()} added ${actionOn.getUid()}`);\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n return actionMessage;\n }, []);\n\n /**\n * Provides a default behaviour to the `onAddMembersButtonClick` prop\n */\n const onAddBtnClickWrapper = useCallback(async (): Promise => {\n if (membersToAddRef.current.length === 0) {\n return;\n }\n try {\n const group = groupPropRef.current;\n const onAddBtnClick = onAddMembersButtonClickPropRef.current;\n if (onAddBtnClick) {\n onAddBtnClick(group.getGuid(), membersToAddRef.current);\n membersToAddRef.current = [];\n return;\n }\n const UIDsToRemove: Set = new Set();\n const response = await CometChat.addMembersToGroup(group.getGuid(), membersToAddRef.current, []);\n if (response) {\n for (const key in response) {\n if ((response as any)[key] === \"success\") {\n UIDsToRemove.add(key);\n }\n }\n }\n const addedMembers: CometChat.GroupMember[] = [];\n for (let i = 0; i < membersToAddRef.current.length; i++) {\n const curMember = membersToAddRef.current[i];\n if (UIDsToRemove.has(curMember.getUid())) {\n addedMembers.push(curMember);\n }\n }\n const loggedInUser = loggedInUserRef.current;\n if (loggedInUser) {\n const groupClone = CometChatUIKitUtility.clone(group);\n groupClone.setMembersCount(group.getMembersCount() + addedMembers.length);\n CometChatGroupEvents.ccGroupMemberAdded.next({\n messages: addedMembers.map(addedMember => createActionMessage(addedMember, loggedInUser, groupClone)),\n usersAdded: addedMembers,\n userAddedIn: groupClone,\n userAddedBy: CometChatUIKitUtility.clone(loggedInUser)\n });\n }\n membersToAddRef.current = [];\n onBackPropRef.current?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }, [errorHandler, createActionMessage, groupPropRef, onAddMembersButtonClickPropRef, onBackPropRef]);\n\n /**\n * Creates back button view\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates add members button view\n */\n function getAddMembersBtnView() {\n return (\n
    \n \n
    \n );\n }\n\n /**\n * Creates close button view\n */\n function getCloseBtnView() {\n return (\n \n );\n }\n\n Hooks({\n loggedInUserRef,\n errorHandler,\n selectionMode,\n selectionModeRef,\n membersToAddRef\n });\n\n return (\n \n \n {getAddMembersBtnView()}\n {getBackBtnView()}\n {getCloseBtnView()}\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { SelectionMode } from \"@cometchat/uikit-resources\";\n\ntype Args = {\n loggedInUserRef : React.MutableRefObject,\n errorHandler : (error : unknown) => void,\n selectionMode : SelectionMode,\n selectionModeRef : React.MutableRefObject,\n membersToAddRef : React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n loggedInUserRef,\n errorHandler,\n selectionMode,\n selectionModeRef,\n membersToAddRef\n } = args;\n\n useEffect(() => {\n if (selectionModeRef.current !== selectionMode) {\n selectionModeRef.current = selectionMode;\n membersToAddRef.current = [];\n }\n }, [selectionMode, membersToAddRef, selectionModeRef]);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n loggedInUserRef.current = await CometChat.getLoggedinUser();\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, loggedInUserRef]);\n}\n","import { AvatarStyle, ListItemStyle, MenuListStyle } from \"@cometchat/uikit-elements\";\nimport { BannedMembersStyle, ListStyle } from \"@cometchat/uikit-shared\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint: string};\n\nexport function bannedMembersWrapperStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n height: bannedMemberStyleObject?.height || \"100%\",\n width: bannedMemberStyleObject?.width || \"100%\",\n background: bannedMemberStyleObject?.background || theme.palette.getBackground(),\n border: bannedMemberStyleObject?.border || \"none\",\n borderRadius: bannedMemberStyleObject?.borderRadius || \"0\",\n boxShadow: bannedMemberStyleObject?.boxShadow || \"\",\n padding: bannedMemberStyleObject?.padding || \"0\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function listStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ListStyle {\n return new ListStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: bannedMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: bannedMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: bannedMemberStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: bannedMemberStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: bannedMemberStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: bannedMemberStyleObject?.errorStateTextColor || theme.palette.getAccent600(),\n loadingIconTint: bannedMemberStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n searchIconTint: bannedMemberStyleObject?.searchIconTint || theme.palette.getAccent500(),\n searchBorder: bannedMemberStyleObject?.searchBorder || \"none\",\n searchBorderRadius: bannedMemberStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: bannedMemberStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchPlaceholderTextFont: bannedMemberStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: bannedMemberStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: bannedMemberStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: bannedMemberStyleObject?.searchTextColor || theme.palette.getAccent(),\n separatorColor: bannedMemberStyleObject?.separatorColor || theme.palette.getAccent400()\n });\n}\n\nexport function menusContainerStyle() : CSSProperties {\n return {\n position: \"absolute\",\n right: \"12px\",\n top: \"8px\",\n cursor: \"pointer\"\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject ? statusIndicatorStyleObject : {};\n\n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || \"none\",\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || 'inherit',\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || bannedMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent()\n });\n}\n\nexport function defaultBackBtnStyle(bannedMemberStyleObject : BannedMembersStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n left: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function closeBtnStyle(bannedMemberStyleObject : BannedMembersStyle| null, theme : CometChatTheme) : ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary() || \"\",\n background: \"transparent\",\n position: \"absolute\",\n right: \"19px\",\n top: \"19px\"\n };\n}\n\nexport function unbanBtnStyle(bannedMemberStyleObject : BannedMembersStyle| null, theme : CometChatTheme) : ButtonStyle {\n return {\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: bannedMemberStyleObject?.unbanIconTint || theme.palette.getPrimary()!,\n background: \"transparent\"\n };\n}\n\nexport function menuListStyle(theme : CometChatTheme) : MenuListStyle {\n return new MenuListStyle({\n border: \"none\",\n borderRadius: \"8px\",\n background: theme.palette.getBackground(),\n moreIconTint: theme.palette.getPrimary(),\n submenuWidth: \"100%\",\n submenuHeight: \"100%\",\n submenuBorder: `1px solid ${theme.palette.getAccent200()}`,\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground()\n });\n}\n\nexport function listWrapperStyle() : CSSProperties {\n return {\n position: \"relative\",\n height: \"100%\"\n };\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { Action } from \".\";\nimport React from \"react\";\n\ntype Args = {\n bannedMembersRequestBuilder: CometChat.BannedMembersRequestBuilder | null,\n searchRequestBuilder: CometChat.BannedMembersRequestBuilder | null,\n searchText: string,\n groupGuid: string,\n bannedMembersSearchText:React.MutableRefObject\n};\n\nexport class BannedMembersManager {\n private bannedMembersRequest: CometChat.BannedMembersRequest;\n\n /**\n * Set `bannedMembersRequest` of the instance\n */\n constructor(args: Args) {\n const {\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n searchText,\n groupGuid,\n bannedMembersSearchText\n } = args;\n let finalBannedMembersRequestBuilder = bannedMembersRequestBuilder || new CometChat.BannedMembersRequestBuilder(groupGuid).setLimit(30);\n if(searchText && searchRequestBuilder) {\n finalBannedMembersRequestBuilder = searchRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && bannedMembersRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }else if(!searchText && bannedMembersRequestBuilder && searchRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else if(!searchText && bannedMembersRequestBuilder && !searchRequestBuilder){\n finalBannedMembersRequestBuilder = bannedMembersRequestBuilder;\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else if(!searchText && !bannedMembersRequestBuilder && searchRequestBuilder){\n finalBannedMembersRequestBuilder.setSearchKeyword(bannedMembersSearchText.current)\n }else{\n finalBannedMembersRequestBuilder.setSearchKeyword(searchText)\n }\n this.bannedMembersRequest = finalBannedMembersRequestBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `bannedMembersRequest`\n */\n fetchNext(): Promise {\n return this.bannedMembersRequest.fetchNext();\n }\n\n /**\n * Creates `CometChat.GroupMember` instance\n */\n static createGroupMemberFromUser(user: CometChat.User, group: CometChat.Group): CometChat.GroupMember {\n const groupMember = new CometChat.GroupMember(user.getUid());\n groupMember.setName(user.getName());\n groupMember.setAvatar(user.getAvatar());\n groupMember.setGuid(group.getGuid());\n return groupMember;\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n static attachSDKGroupListener(groupRef: React.MutableRefObject, dispatch: React.Dispatch): () => void {\n const listenerId = \"BannedMembers_GroupListener_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberBanned: (\n message: CometChat.Action,\n bannedUser: CometChat.User,\n bannedBy: CometChat.User,\n bannedFrom: CometChat.Group\n ) => {\n if (groupRef.current.getGuid() !== bannedFrom.getGuid()) {\n return;\n }\n dispatch({ type: \"addMember\", member: BannedMembersManager.createGroupMemberFromUser(bannedUser, groupRef.current) });\n },\n onGroupMemberUnbanned: (\n message: CometChat.Action,\n unbannedUser: CometChat.User,\n unbannedBy: CometChat.User,\n unbannedFrom: CometChat.Group\n ) => {\n if (groupRef.current.getGuid() !== unbannedFrom.getGuid()) {\n return;\n }\n dispatch({ type: \"removeBannedMemberIfPresent\", bannedMemberUid: unbannedUser.getUid() });\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n static attachSDKUserListener(dispatch: React.Dispatch): () => void {\n const listenerId = \"BannedMembers_UserListener_\" + String(Date.now());\n const cb = (user: CometChat.User) => dispatch({ type: \"updateMemberStatusIfPresent\", member: user });\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: cb,\n onUserOffline: cb\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useReducer, useRef } from \"react\";\nimport { CometChatOption, CometChatUIKitConstants, SelectionMode, States, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, bannedMembersWrapperStyle, closeBtnStyle, defaultBackBtnStyle, listItemStyle, listStyle, listWrapperStyle, menuListStyle, menusContainerStyle, statusIndicatorStyle, unbanBtnStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { BannedMembersManager } from \"./controller\";\nimport { BannedMembersStyle } from \"@cometchat/uikit-shared\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport backbutton from \"./assets/backbutton.svg\";\nimport closeButton from \"./assets/close2x.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\n\ninterface IBannedMembersProps {\n /**\n * Image URL for the back button\n *\n * @defaultValue `./assets/backbutton.svg`\n */\n backButtonIconURL?: string,\n /**\n * Show back button\n *\n * @defaultValue `true`\n */\n showBackButton?: boolean,\n /**\n * Function to call when the back button is clicked\n */\n onBack?: () => void,\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"BANNED_MEMBERS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `true`\n */\n hideSearch?: boolean,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Group to ban members from\n */\n group: CometChat.Group,\n /**\n * Request builder to fetch banned members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n bannedMembersRequestBuilder?: CometChat.BannedMembersRequestBuilder,\n /**\n * Request builder with search parameters to fetch banned members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.BannedMembersRequestBuilder,\n /**\n * Custom list item view to be rendered for each banned member in the fetched list\n */\n listItemView?: (bannedMember: CometChat.GroupMember) => JSX.Element,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `true`\n */\n disableUsersPresence?: boolean,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Custom subtitle view to be rendered for each banned member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (bannedMember: CometChat.GroupMember) => JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (bannedMember: CometChat.GroupMember) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode,\n /**\n *\n */\n unbanIconURL?: string,\n /**\n * Function to call on click of the default list item view of a banned member\n */\n onItemClick?: (bannedMember: CometChat.GroupMember) => void,\n /**\n * Function to call when a banned member from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (bannedMember: CometChat.GroupMember, selected: boolean) => void,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n bannedMemberStyle?: BannedMembersStyle\n};\n\ntype State = {\n searchText: string,\n bannedMembers: CometChat.GroupMember[],\n fetchState: States\n};\n\nexport type Action = { type: \"setSearchText\", searchText: string } |\n{ type: \"setFetchState\", fetchState: States } |\n{ type: \"appendBannedMembers\", bannedMembers: CometChat.GroupMember[] } |\n{ type: \"setBannedMembers\", bannedMembers: [] } |\n{ type: \"removeBannedMemberIfPresent\", bannedMemberUid: string } |\n{ type: \"addMember\", member: CometChat.GroupMember } |\n{ type: \"updateMemberStatusIfPresent\", member: CometChat.User };\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"appendBannedMembers\": {\n const { bannedMembers } = action;\n if (bannedMembers.length !== 0) {\n newState = { ...state, bannedMembers: [...state.bannedMembers, ...bannedMembers] };\n }\n break;\n }\n case \"setBannedMembers\": {\n newState = { ...state, bannedMembers: action.bannedMembers };\n break;\n }\n case \"removeBannedMemberIfPresent\": {\n const { bannedMembers } = state;\n const targetUid = action.bannedMemberUid;\n const targetIdx = bannedMembers.findIndex(bannedMember => bannedMember.getUid() === targetUid);\n if (targetIdx > -1) {\n newState = { ...state, bannedMembers: bannedMembers.filter((bannedMember, i) => i !== targetIdx) };\n }\n break;\n }\n case \"addMember\": {\n newState = { ...state, bannedMembers: [...state.bannedMembers, action.member] };\n break;\n }\n case \"updateMemberStatusIfPresent\": {\n const { member } = action;\n const { bannedMembers } = state;\n const targetUid = member.getUid();\n const targetIdx = bannedMembers.findIndex(bannedMember => bannedMember.getUid() === targetUid);\n if (targetIdx > -1) {\n newState = {\n ...state, bannedMembers: bannedMembers.map((bannedMember, i) => {\n if (i === targetIdx) {\n bannedMember.setStatus(member.getStatus());\n }\n return bannedMember;\n })\n }\n }\n break;\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of banned members related to a group of a CometChat App\n */\nexport function CometChatBannedMembers(props: IBannedMembersProps) {\n const {\n backButtonIconURL = backbutton,\n showBackButton = false,\n onBack,\n menus = null,\n title = localize(\"BANNED_MEMBERS\"),\n titleAlignment = TitleAlignment.center,\n searchPlaceholder = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = true,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_BANNED_MEMBERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n onError,\n group,\n bannedMembersRequestBuilder = null,\n searchRequestBuilder = null,\n listItemView = null,\n hideSeparator = false,\n disableUsersPresence = true,\n closeButtonIconURL = closeButton,\n onClose,\n subtitleView = null,\n options = null,\n selectionMode = SelectionMode.none,\n unbanIconURL = Close2xIcon,\n onItemClick = null,\n onSelect = null,\n hideError = false,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n bannedMemberStyle: bannedMemberStyleObject = null,\n listItemStyle: listItemStyleObject = null\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n bannedMembers: [],\n fetchState: States.loading\n });\n const bannedMembersManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError!);\n const groupPropRef = useRefSync(group);\n const { theme } = useContext(CometChatThemeContext);\n const bannedMembersSearchText = useRef(\"\");\n\n /**\n * Updates the `searchText` state\n */\n const onSearchTextChange = useCallback((searchText: string): void => {\n const trimmedText = searchText.trim();\n if (searchText.length === 0 || (trimmedText.length === searchText.length && trimmedText.length > 0)) {\n bannedMembersSearchText.current = \"\";\n dispatch({ type: \"setSearchText\", searchText });\n }\n }, [dispatch]);\n\n /**\n * Initiates a fetch request and appends the fetched banned members to the `bannedMembers` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `bannedMembers` state\n */\n const fetchNextAndAppendBannedMembers = useCallback(async (fetchId: string): Promise => {\n if (!bannedMembersManagerRef.current) {\n return;\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loading });\n try {\n const bannedMembers = await bannedMembersManagerRef.current.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n if (bannedMembers.length !== 0) {\n dispatch({ type: \"appendBannedMembers\", bannedMembers });\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n }\n catch (error) {\n if (fetchId === fetchNextIdRef.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n errorHandler(error);\n }\n }\n }, [errorHandler, dispatch]);\n\n /**\n * Calls `unbanGroupMember` SDK function & updates the `bannedMembers` state\n */\n const unbanMember = useCallback(async (bannedMember: CometChat.GroupMember): Promise => {\n try {\n await CometChat.unbanGroupMember(groupPropRef.current.getGuid(), bannedMember.getUid());\n dispatch({ type: \"removeBannedMemberIfPresent\", bannedMemberUid: bannedMember.getUid() });\n }\n catch (error) {\n errorHandler(error);\n }\n }, [dispatch, errorHandler, groupPropRef]);\n\n /**\n * Creates back button view\n */\n function getBackBtnView(): JSX.Element | null {\n if (!showBackButton) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates menus view\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n \n {menus}\n \n );\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(bannedMember: CometChat.GroupMember): string | null {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(bannedMember);\n if (disableUsersPresence || userBlockedFlag) {\n return null;\n }\n return bannedMemberStyleObject?.onlineStatusColor || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n }\n\n /**\n * Creates menu view for the default list item view\n */\n function getDefaultListItemMenuView(bannedMember: CometChat.GroupMember): JSX.Element | null {\n const bannedMemberOptions = options?.(bannedMember);\n if (!bannedMemberOptions?.length) {\n return null;\n }\n return (\n {\n const { onClick } = e.detail.data;\n onClick?.();\n }}\n />\n );\n }\n\n /**\n * Creates tail view for the default list item view\n */\n function getDefaultListTailView(bannedMember: CometChat.GroupMember): JSX.Element | null {\n switch (selectionMode) {\n case SelectionMode.none:\n return (\n unbanMember(bannedMember)}\n hoverText={localize('UNBAN')}\n buttonStyle={unbanBtnStyle(bannedMemberStyleObject, theme)}\n />\n );\n case SelectionMode.single:\n return (\n onSelect?.(bannedMember, e.detail.checked)}\n />\n );\n case SelectionMode.multiple:\n return (\n onSelect?.(bannedMember, e.detail.checked)}\n />\n );\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x = selectionMode;\n return null;\n }\n }\n }\n\n /**\n * Creates default list item view\n */\n function getDefaultListItemView(): (bannedMember: CometChat.GroupMember) => JSX.Element {\n return function (bannedMember: CometChat.GroupMember) {\n return (\n onItemClick?.(bannedMember)}\n />\n );\n };\n }\n\n /**\n * Creates close button view\n */\n function getCloseBtnView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates `listItem` prop for the `CometChatList` component\n */\n function getListItem(): (bannedMember: CometChat.GroupMember) => JSX.Element {\n return listItemView || getDefaultListItemView();\n }\n\n Hooks({\n groupGuid: group.getGuid(), // This is important\n searchText: state.searchText,\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n bannedMembersManagerRef,\n dispatch,\n fetchNextAndAppendBannedMembers,\n fetchNextIdRef,\n groupPropRef,\n bannedMembersSearchText\n });\n\n return (\n \n \n {getMenusView()}\n fetchNextAndAppendBannedMembers(fetchNextIdRef.current = \"onScrolledToBottom_\" + String(Date.now()))}\n state={state.fetchState === States.loaded && state.bannedMembers.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n emptyStateText={emptyStateText}\n errorStateText={errorStateText}\n loadingView={loadingStateView}\n emptyStateView={emptyStateView}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={listStyle(bannedMemberStyleObject, theme)}\n />\n \n {getBackBtnView()}\n {getCloseBtnView()}\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatGroupEvents } from \"@cometchat/uikit-resources\";\nimport { Action } from \".\";\nimport { BannedMembersManager } from \"./controller\";\n\ntype Args = {\n bannedMembersManagerRef : React.MutableRefObject,\n groupGuid : string,\n searchText : string,\n bannedMembersRequestBuilder : CometChat.BannedMembersRequestBuilder | null,\n searchRequestBuilder : CometChat.BannedMembersRequestBuilder | null,\n dispatch : React.Dispatch,\n fetchNextAndAppendBannedMembers : (fetchId : string) => Promise,\n fetchNextIdRef : React.MutableRefObject,\n groupPropRef : React.MutableRefObject,\n bannedMembersSearchText:React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n bannedMembersManagerRef,\n groupGuid,\n searchText,\n bannedMembersRequestBuilder,\n searchRequestBuilder,\n dispatch,\n fetchNextAndAppendBannedMembers,\n fetchNextIdRef,\n groupPropRef,\n bannedMembersSearchText\n } = args;\n\n useEffect(() => {\n if(bannedMembersRequestBuilder?.searchKeyword){\n bannedMembersSearchText.current = bannedMembersRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n bannedMembersSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n }, []);\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `bannedMembers` state -> initiates a new fetch\n */\n () => {\n bannedMembersManagerRef.current = new BannedMembersManager({groupGuid, bannedMembersRequestBuilder, searchRequestBuilder, searchText,bannedMembersSearchText});\n dispatch({type: \"setBannedMembers\", bannedMembers: []});\n fetchNextAndAppendBannedMembers(fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()));\n }, [groupGuid, bannedMembersRequestBuilder, searchRequestBuilder, searchText, fetchNextAndAppendBannedMembers, dispatch, bannedMembersManagerRef, fetchNextIdRef]);\n\n useEffect(\n /**\n * Subscribes to some Group UI events\n */\n () => {\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe(item => {\n const { kickedFrom, kickedUser } = item;\n if (kickedFrom.getGuid() === groupPropRef.current.getGuid()) {\n dispatch({type: \"addMember\", member: BannedMembersManager.createGroupMemberFromUser(kickedUser, kickedFrom)});\n } \n });\n const groupMemberUnbannedSub = CometChatGroupEvents.ccGroupMemberUnbanned.subscribe(item => {\n const { unbannedFrom, unbannedUser } = item;\n if (unbannedFrom.getGuid() === groupPropRef.current.getGuid()) {\n dispatch({type: \"removeBannedMemberIfPresent\", bannedMemberUid: unbannedUser.getUid()});\n }\n });\n return () => {\n groupMemberBannedSub.unsubscribe();\n groupMemberUnbannedSub.unsubscribe();\n };\n }, [dispatch, groupPropRef]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n * \n * @returns - Function to remove the added SDK group listener\n */\n () => BannedMembersManager.attachSDKGroupListener(groupPropRef, dispatch), \n [dispatch, groupPropRef]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n * \n * @returns - Function to remove the added SDK user listener\n */\n () => BannedMembersManager.attachSDKUserListener(dispatch),\n [dispatch]);\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { AvatarStyle, BackdropStyle, BadgeStyle, BaseStyle, ConfirmDialogStyle, DateStyle, IconStyle, LabelStyle, ListItemStyle, MenuListStyle, ReceiptStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { ConversationsStyle, ListStyle } from \"@cometchat/uikit-shared\";\n\nexport function conversationsWrapperStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): CSSProperties {\n return {\n width: conversationsStyleObject?.width || \"100%\",\n height: conversationsStyleObject?.height || \"100%\",\n border: conversationsStyleObject?.border || `1px solid ${theme.palette.getAccent400()}`,\n borderRadius: conversationsStyleObject?.borderRadius || \"0\",\n background: conversationsStyleObject?.background || theme.palette.getBackground(),\n boxShadow: conversationsStyleObject?.boxShadow || \"\",\n position: \"relative\",\n boxSizing: \"border-box\"\n };\n}\n\nexport function menusStyle(): CSSProperties {\n return {\n position: \"absolute\",\n top: \"19px\",\n right: \"12px\",\n cursor: \"pointer\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n width: \"24px\"\n };\n}\n\nexport function confirmDialogStyle(deleteConversationDialogStyle: ConfirmDialogStyle | null, theme: CometChatTheme): ConfirmDialogStyle {\n return new ConfirmDialogStyle({\n confirmButtonBackground: deleteConversationDialogStyle?.confirmButtonBackground || theme.palette.getError(),\n cancelButtonBackground: deleteConversationDialogStyle?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: deleteConversationDialogStyle?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: deleteConversationDialogStyle?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: deleteConversationDialogStyle?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: deleteConversationDialogStyle?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: deleteConversationDialogStyle?.titleFont || fontHelper(theme.typography.title1),\n titleColor: deleteConversationDialogStyle?.titleColor || theme.palette.getAccent(),\n messageTextFont: deleteConversationDialogStyle?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: deleteConversationDialogStyle?.messageTextColor || theme.palette.getAccent600(),\n background: deleteConversationDialogStyle?.background || theme.palette.getBackground(),\n height: deleteConversationDialogStyle?.height || \"auto\",\n width: deleteConversationDialogStyle?.width || \"auto\",\n border: deleteConversationDialogStyle?.border || \"none\",\n borderRadius: deleteConversationDialogStyle?.borderRadius || \"12px\",\n boxShadow: deleteConversationDialogStyle?.boxShadow || `0 0 1px 1px ${theme.palette.getAccent50()}`\n });\n}\n\nexport function listStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListStyle {\n return new ListStyle({\n background: \"inherit\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: conversationsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: conversationsStyleObject?.titleTextColor || theme.palette.getAccent(),\n separatorColor: conversationsStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: conversationsStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: conversationsStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: conversationsStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: conversationsStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: conversationsStyleObject?.errorStateTextColor || theme.palette.getAccent600()\n });\n}\n\nexport function avatarStyle(avatarStyleObject: AvatarStyle | null, theme: CometChatTheme): AvatarStyle {\n return new AvatarStyle({\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject: CSSProperties | null): CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n\n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject: ListItemStyle | null, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"auto\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n separatorColor: listItemStyleObject?.separatorColor || conversationsStyleObject?.separatorColor || theme.palette.getAccent200(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function badgeStyle(badgeStyleObject: BadgeStyle | null, theme: CometChatTheme): BadgeStyle {\n return new BadgeStyle({\n textFont: badgeStyleObject?.textFont || fontHelper(theme.typography.subtitle2),\n textColor: badgeStyleObject?.textColor || theme.palette.getAccent(\"dark\"),\n background: badgeStyleObject?.background || theme.palette.getPrimary(),\n borderRadius: badgeStyleObject?.borderRadius || \"16px\",\n width: badgeStyleObject?.width || \"24px\",\n height: badgeStyleObject?.height || \"16px\",\n border: badgeStyleObject?.border || \"none\"\n });\n}\n\nexport function itemThreadIndicatorStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): LabelStyle {\n return new LabelStyle({\n background: \"transparent\",\n textFont: conversationsStyleObject?.threadIndicatorTextFont || fontHelper(theme.typography.caption2),\n textColor: conversationsStyleObject?.threadIndicatorTextColor || theme.palette.getAccent400()\n });\n}\n\nexport function iconStyle(theme: CometChatTheme): IconStyle {\n return new IconStyle({\n width: \"24px\",\n height: \"24px\",\n iconTint: theme.palette.getAccent400()\n });\n}\n// export function mentionIconStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): IconStyle{\n// return new IconStyle({\n// height: \"16px\",\n// width: \"16px\",\n// iconTint: conversationsStyleObject?.mentionIconTint ?? theme.palette.getPrimary(),\n// })\n// }\n\nexport function receiptStyle(receiptStyleObject: ReceiptStyle | null, theme: CometChatTheme): ReceiptStyle { \n return new ReceiptStyle({\n waitIconTint: receiptStyleObject?.waitIconTint || theme.palette.getAccent700(),\n sentIconTint: receiptStyleObject?.sentIconTint || theme.palette.getAccent600(),\n deliveredIconTint: receiptStyleObject?.deliveredIconTint || theme.palette.getAccent600(),\n readIconTint: receiptStyleObject?.readIconTint || theme.palette.getPrimary(),\n errorIconTint: receiptStyleObject?.errorIconTint || theme.palette.getError(),\n height: receiptStyleObject?.height || '20px',\n width: receiptStyleObject?.width || '20px',\n border:receiptStyleObject?.border || \"none\",\n borderRadius:receiptStyleObject?.borderRadius || \"inherit\",\n background:receiptStyleObject?.background || \"inherit\",\n });\n}\n\nexport function subtitleTextStyle(conversation: CometChat.Conversation, typingIndicatorMap: Map, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): { font: string, color: string, width?: string, overflow?: string, textOverflow?: string } {\n const convWith = conversation.getConversationWith();\n const id = convWith instanceof CometChat.User ? convWith.getUid() : convWith.getGuid();\n if (typingIndicatorMap.get(id) !== undefined) {\n return {\n font: conversationsStyleObject?.typingIndictorTextFont || fontHelper(theme.typography.subtitle2),\n color: conversationsStyleObject?.typingIndictorTextColor || theme.palette.getSuccess() || \"\",\n width: \"100%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n }\n\n return {\n font: conversationsStyleObject?.lastMessageTextFont || fontHelper(theme.typography.subtitle2),\n color: conversationsStyleObject?.lastMessageTextColor || theme.palette.getAccent600() || \"\",\n width: \"100%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n };\n}\n\nexport function menuListStyle(theme: CometChatTheme): MenuListStyle {\n return new MenuListStyle({\n width: \"\",\n height: \"\",\n border: \"none\",\n borderRadius: \"8px\",\n background: \"transparent\",\n moreIconTint: \"grey\",\n submenuWidth: \"70px\",\n submenuHeight: \"20px\",\n submenuBorder: \"1px solid #e8e8e8\",\n submenuBorderRadius: \"8px\",\n submenuBackground: theme.palette.getBackground()\n });\n}\n\nexport function dateStyle(dateStyleObject: DateStyle | null, theme: CometChatTheme): DateStyle {\n const obj = dateStyleObject !== null ? dateStyleObject : {};\n\n return {\n ...new DateStyle({\n textFont: dateStyleObject?.textFont || fontHelper(theme.typography.caption2),\n textColor: dateStyleObject?.textColor || theme.palette.getAccent600(),\n background: \"transparent\"\n }), ...obj\n };\n}\n\nexport function subtitleReceiptAndTextContainerStyle(): CSSProperties {\n return {\n display: \"flex\",\n columnGap: \"4px\",\n alignItems: \"center\"\n };\n}\n\nexport function getBackdropStyle(backdropStyleObject: BaseStyle | null, conversationsStyle: ConversationsStyle | null): BackdropStyle {\n\n return {\n width: backdropStyleObject?.width || conversationsStyle?.width,\n height: backdropStyleObject?.height || conversationsStyle?.height,\n background: backdropStyleObject?.background || \"rgba(0, 0, 0, 0.5)\",\n border: backdropStyleObject?.border,\n borderRadius: backdropStyleObject?.borderRadius,\n position: \"absolute\"\n };\n}\n\nexport function defaultSelectionModeNoneTailViewContainerStyle(): CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-end\"\n };\n}\nexport function getUnreadBadgeStyle(): CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }\n}\n\nexport function threadViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n columnGap: \"4px\"\n };\n}\n","import { CardMessage, CometChatMessageEvents, CometChatUIKitConstants, CustomInteractiveMessage, FormMessage, SchedulerMessage } from \"@cometchat/uikit-resources\"\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKit } from \"../Shared/CometChatUIKit/CometChatUIKit\";\n\ntype Args = {\n conversationsRequestBuilder : CometChat.ConversationsRequestBuilder | null\n};\n\nexport class ConversationsManager {\n private static limit = 30;\n private conversationsRequest : CometChat.ConversationsRequest;\n private static conversationType: string | undefined = undefined;\n /**\n * Set `conversationsRequest` of the instance\n */\n constructor(args : Args) {\n const {\n conversationsRequestBuilder\n } = args;\n const convRequestBuilder = conversationsRequestBuilder || new CometChat.ConversationsRequestBuilder().setLimit(ConversationsManager.limit);\n this.conversationsRequest = convRequestBuilder.build();\n if (conversationsRequestBuilder) {\n ConversationsManager.conversationType = conversationsRequestBuilder\n .build()\n .getConversationType();\n }\n }\n\n /**\n * Calls `fetchNext` method of the set `conversationsRequest`\n */\n fetchNext() {\n return this.conversationsRequest.fetchNext();\n }\n\n /**\n * Attaches an SDK user listener\n *\n * @returns Function to call to remove the attached SDK user listener\n */\n static attachUserListener(callback : (user : CometChat.User) => void) {\n const listenerId = \"ConversationList_User_\" + String(Date.now());\n CometChat.addUserListener(\n listenerId,\n new CometChat.UserListener({\n onUserOnline: callback,\n onUserOffline: callback\n })\n );\n return () => CometChat.removeUserListener(listenerId);\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns Function to call to remove the attached SDK group listener\n */\n static attachGroupListener(callback : (message : CometChat.BaseMessage, remove? : boolean) => Promise, loggedInUser : CometChat.User | null) {\n const listenerId = \"ConversationList_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberJoined: (message : CometChat.Action) => {\n callback(message);\n },\n onGroupMemberLeft: (message : CometChat.Action, leavingUser : CometChat.User) => {\n if (loggedInUser?.getUid() === leavingUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberKicked: (message : CometChat.Action, kickedUser : CometChat.User) => {\n if (loggedInUser?.getUid() === kickedUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberBanned: (message : CometChat.Action, bannedUser : CometChat.User) => {\n if (loggedInUser?.getUid() === bannedUser.getUid()) {\n callback(message, true);\n }\n else {\n callback(message);\n }\n },\n onGroupMemberUnbanned: (message : CometChat.Action) => {\n callback(message);\n },\n onMemberAddedToGroup: (message : CometChat.Action) => {\n callback(message);\n },\n onGroupMemberScopeChanged: (message : CometChat.Action) => {\n callback(message);\n }\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n /**\n * Attaches an SDK message received listener\n *\n * @returns - Function to remove the added SDK message received listener\n */\n static attachMessageReceivedListener(callback : (message : CometChat.BaseMessage) => Promise) {\n\n const onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage : CometChat.TextMessage) => {\n callback(textMessage);\n });\n\n const onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage : CometChat.MediaMessage) => {\n callback(mediaMessage);\n });\n\n const onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage : CometChat.CustomMessage) => {\n callback(customMessage);\n });\n\n const onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage: FormMessage) => {\n callback(formMessage);\n });\n\n const onSchedulerMessageReceived = CometChatMessageEvents.onSchedulerMessageReceived.subscribe((schedulerMessage: SchedulerMessage) => {\n callback(schedulerMessage);\n });\n\n const onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage: CardMessage) => {\n callback(cardMessage);\n });\n\n const onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customMessage : CustomInteractiveMessage) => {\n callback(customMessage);\n });\n\n return () => {\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message receipt listener\n *\n * @returns - Function to remove the added SDK message receipt listener\n */\n static attachMessageReceiptListener(callback : (receipt : CometChat.MessageReceipt, updateReadAt : boolean) => void) {\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt : CometChat.MessageReceipt) => {\n callback(messageReceipt, true);\n });\n const onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt : CometChat.MessageReceipt) => {\n callback(messageReceipt, false);\n });\n\n return () => {\n onMessagesRead?.unsubscribe();\n onMessagesDelivered?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message typing listener\n *\n * @returns - Function to remove the added SDK message typing listener\n */\n static attachMessageTypingListener(callback : (typingIndicator : CometChat.TypingIndicator, typingStarted : boolean) => void) {\n const onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator : CometChat.TypingIndicator) => {\n callback(typingIndicator, true);\n });\n const onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator : CometChat.TypingIndicator) => {\n callback(typingIndicator, false);\n });\n return () => {\n onTypingStarted?.unsubscribe();\n onTypingEnded?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK message modified listener\n *\n * @returns - Function to remove the added SDK message modified listener\n */\n static attachMessageModifiedListener(callback : (message : CometChat.BaseMessage) => void) {\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((message : CometChat.BaseMessage) => {\n callback(message);\n });\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((message : CometChat.BaseMessage) => {\n callback(message);\n });\n\n return () => {\n onMessageEdited?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n };\n }\n\n /**\n * Attaches an SDK call listener\n *\n * @returns - Function to remove the added SDK call listener\n */\n static attachCallListener(callback : (message : CometChat.BaseMessage) => void) {\n const listenerId = \"ConversationList_Call_\" + String(Date.now());\n CometChat.addCallListener(\n listenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: callback,\n onOutgoingCallAccepted: callback,\n onOutgoingCallRejected: callback,\n onIncomingCallCancelled: callback\n })\n );\n return () => CometChat.removeCallListener(listenerId);\n }\n /**\n * Attaches an SDK websocket listener\n *\n * @returns - Function to remove the added SDK websocket listener\n */\n static attachConnestionListener(callback : () => void) {\n const listenerId = \"ConversationList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if(callback){\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n\n /**\n * Determines if the last message should trigger an update based on its category and type.\n *\n * @param message - The last message sent or received in the conversation.\n * @returns {boolean} - Returns true if the message should trigger an update, false otherwise.\n */\n\n static shouldLastMessageAndUnreadCountBeUpdated = (message : CometChat.BaseMessage) => {\n\n // check if the provided conversation type(passed from request builder via props) is equal to message receiverType\n if (\n this.conversationType &&\n this.conversationType != message?.getReceiverType()\n ) {\n return false;\n }\n // Checking if the message is a custom message\n let isCustomMessage = message?.getCategory() === CometChatUIKitConstants.MessageCategory.custom\n // Check if the message is a reply to another message\n if (message?.getParentMessageId() && !CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnMessageReplies()) {\n return false;\n }\n if (isCustomMessage) {\n if (message?.getParentMessageId() && CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnMessageReplies() && this.shouldIncrementForCustomMessage(message as CometChat.CustomMessage)) {\n return true\n }\n return this.shouldIncrementForCustomMessage(message as CometChat.CustomMessage);\n }\n // Check if the message is an action message\n if (message?.getCategory() === CometChatUIKitConstants.MessageCategory.action) {\n // Check if the message is a group member action\n if (message?.getType() === CometChatUIKitConstants.MessageTypes.groupMember) {\n return CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnGroupActions();\n }\n // By default, action messages should trigger an update\n return true\n }\n // Check if the message is a call (either audio or video)\n if (message?.getCategory() === CometChatUIKitConstants.MessageCategory.call &&\n (message?.getType() === CometChatUIKitConstants.MessageTypes.audio ||\n message?.getType() === CometChatUIKitConstants.MessageTypes.video)) {\n return CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnCallActivities();\n }\n // By default, messages should trigger an update\n return true;\n }\n\n static shouldIncrementForCustomMessage(message: CometChat.CustomMessage) {\n const metadata: any = message?.getMetadata();\n // Checking if the custom message should increment the unread message counter\n return message?.willUpdateConversation()\n || (metadata && metadata.hasOwnProperty(\"incrementUnreadCount\") && metadata.incrementUnreadCount) || CometChatUIKit.conversationUpdateSettings?.shouldUpdateOnCustomMessages();\n }\n\n\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M17.6377%207L9.87922%2016.3095L6%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","import {\n AvatarStyle,\n BadgeStyle,\n BaseStyle,\n ConfirmDialogStyle,\n DateStyle,\n IconStyle,\n ListItemStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CSSProperties,\n JSX,\n useCallback,\n useContext,\n useReducer,\n useRef,\n} from \"react\";\nimport {\n CometChatMentionsFormatter,\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n ConversationUtils,\n ConversationsStyle,\n MessageReceiptUtils,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatOption,\n CometChatTheme,\n CometChatUIKitConstants,\n DatePatterns,\n MentionsTargetElement,\n SelectionMode,\n States,\n TitleAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n avatarStyle,\n badgeStyle,\n confirmDialogStyle,\n conversationsWrapperStyle,\n dateStyle,\n defaultSelectionModeNoneTailViewContainerStyle,\n getBackdropStyle,\n getUnreadBadgeStyle,\n iconStyle,\n itemThreadIndicatorStyle,\n listItemStyle,\n listStyle,\n menuListStyle,\n menusStyle,\n receiptStyle,\n statusIndicatorStyle,\n subtitleReceiptAndTextContainerStyle,\n subtitleTextStyle,\n threadViewStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { ConversationsManager } from \"./controller\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport MentionIcon from \"./assets/mention-icon.svg\";\nimport MessageDeliveredIcon from \"./assets/message-delivered.svg\";\nimport MessageReadIcon from \"./assets/message-read.svg\";\nimport MessageSentIcon from \"./assets/message-sent.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport ThreadIcon from \"./assets/thread-arrow.svg\";\nimport WaitIcon from \"./assets/wait.svg\";\nimport WarningSmallIcon from \"./assets/warning-small.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\n\ntype Message =\n | CometChat.TextMessage\n | CometChat.MediaMessage\n | CometChat.CustomMessage\n | CometChat.Action\n | CometChat.Call;\n\ninterface IConversationsProps {\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element;\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"CHATS\")`\n */\n title?: string;\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment;\n /**\n * Request builder to fetch conversations\n * @defaultValue Default request builder having the limit set to 30\n */\n conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: (error: CometChat.CometChatException) => void;\n /**\n * Custom list item view to be rendered for each conversation in the fetched list\n */\n listItemView?: (conversation: CometChat.Conversation) => JSX.Element;\n /**\n * Custom subtitle view to be rendered for each conversation in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (conversation: CometChat.Conversation) => JSX.Element;\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed for conversation objects related to users\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean;\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean;\n /**\n * Conversation to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeConversation?: CometChat.Conversation;\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode;\n /**\n * Disable receipt status\n *\n * @remarks\n * If set to true, the receipt status of the sent message won't be displayed, and received messages won't be marked as delivered\n *\n * @defaultValue `false`\n */\n disableReceipt?: boolean;\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?:\n | ((conversation: CometChat.Conversation) => CometChatOption[])\n | null;\n /**\n * Date format for the date component\n *\n * @remarks\n * The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n datePattern?: DatePatterns;\n\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n\n protectedGroupIcon?: string;\n\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group\n *\n * @defaultValue {undefined}\n */\n\n passwordGroupIcon?: string;\n /**\n * Image URL for the status indicator icon in the default list item view of a conversation related to a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string;\n /**\n * Image URL for the read status of the sent message\n *\n * @defaultValue `./assets/message-read.svg`\n */\n readIcon?: string;\n /**\n * Image URL for the delivered status of the sent message\n *\n * @defaultValue `./assets/message-delivered.svg`\n */\n deliveredIcon?: string;\n /**\n * Image URL for the wait status of the sent message\n *\n * @defaultValue `./assets/wait.svg`\n */\n waitIcon?: string;\n /**\n * Image URL for the error status of the sent message\n *\n * @defaultValue `./assets/warning-small.svg`\n */\n errorIcon?: string;\n /**\n * Image URL for the sent status of the sent message\n *\n * @defaultValue `./assets/message-sent.svg`\n */\n sentIcon?: string;\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string;\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element;\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_CHATS_FOUND\")`\n */\n emptyStateText?: string;\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element;\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string;\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element;\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean;\n /**\n * Function to call on click of the default list item view of a conversation\n */\n onItemClick?: (conversation: CometChat.Conversation) => void;\n /**\n * Function to call when a conversation from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (conversation: CometChat.Conversation, selected: boolean) => void;\n /**\n * Disable sound for incoming messages\n *\n * @defaulValue `false`\n */\n disableSoundForMessages?: boolean;\n /**\n * Disable typing indicator display\n *\n * @defaultValue `false`\n */\n disableTyping?: boolean;\n /**\n * Custom audio sound for incoming messages\n */\n customSoundForMessages?: string;\n /**\n * Styles to apply to this component\n */\n conversationsStyle?: ConversationsStyle;\n /**\n * Styles to apply to the delete conversation dialog component\n */\n deleteConversationDialogStyle?: ConfirmDialogStyle;\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle;\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties;\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle;\n /**\n * Styles to apply to the badge component\n *\n * @remarks\n * The badge component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n badgeStyle?: BadgeStyle;\n /**\n * Styles to apply to the receipt component\n *\n * @remarks\n * The receipt component is rendered conditionally inside the subtitle view of the default list item view\n */\n receiptStyle?: ReceiptStyle;\n /**\n * Styles to apply to the date component\n *\n * @remarks\n * The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`\n */\n dateStyle?: DateStyle;\n /**\n * Styles to apply to the backdrop component\n */\n backdropStyle?: BaseStyle;\n confirmDialogTitle?: string;\n confirmDialogMessage?: string;\n cancelButtonText?: string;\n confirmButtonText?: string;\n disableMentions?: boolean;\n textFormatters?: CometChatTextFormatter[];\n}\n\ntype State = {\n conversationList: CometChat.Conversation[];\n fetchState: States;\n typingIndicatorMap: Map;\n conversationToBeDeleted: CometChat.Conversation | null;\n loggedInUser: CometChat.User | null;\n isFirstReload: boolean;\n unreadMentions: boolean;\n};\n\nexport type Action =\n | {\n type: \"appendConversations\";\n conversations: CometChat.Conversation[];\n removeOldConversation?: boolean;\n }\n | { type: \"setConversationList\"; conversationList: CometChat.Conversation[] }\n | { type: \"setFetchState\"; fetchState: States }\n | {\n type: \"setConversationToBeDeleted\";\n conversation: CometChat.Conversation | null;\n }\n | { type: \"removeConversation\"; conversation: CometChat.Conversation }\n | { type: \"updateConversationWithUser\"; user: CometChat.User }\n | {\n type: \"fromUpdateConversationListFn\";\n conversation: CometChat.Conversation;\n }\n | { type: \"addTypingIndicator\"; typingIndicator: CometChat.TypingIndicator }\n | {\n type: \"removeTypingIndicator\";\n typingIndicator: CometChat.TypingIndicator;\n }\n | { type: \"updateConversationLastMessage\"; message: CometChat.BaseMessage }\n | {\n type: \"updateConversationLastMessageAndPlaceAtTheTop\";\n message: CometChat.BaseMessage;\n }\n | {\n type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\";\n group: CometChat.Group;\n message: CometChat.Action;\n }\n | { type: \"removeConversationOfTheGroup\"; group: CometChat.Group }\n | { type: \"removeConversationOfTheUser\"; user: CometChat.User }\n | {\n type: \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\";\n message: CometChat.BaseMessage;\n conversation: CometChat.Conversation;\n }\n | {\n type: \"resetUnreadCountAndSetReadAtIfLastMessage\";\n message: CometChat.BaseMessage;\n }\n | {\n type: \"setLastMessageReadOrDeliveredAt\";\n updateReadAt: boolean;\n messageReceipt: CometChat.MessageReceipt;\n }\n | { type: \"setLoggedInUser\"; loggedInUser: CometChat.User | null }\n | { type: \"setIsFirstReload\"; isFirstReload: boolean };\n\n/**\n * Checks if `message` is a base message\n *\n * @remarks\n * `CometChat.BaseMessage` is private hence, can't use it with `instanceOf`.\n * This function is identical to `message instanceOf CometChat.BaseMessage` if `CometChat.BaseMessage` wasn't private\n *\n * @param message - A pontential Base message object\n * @returns Is `message` a base message\n */\nfunction isAMessage(message: unknown): message is Message {\n return (\n message instanceof CometChat.TextMessage ||\n message instanceof CometChat.MediaMessage ||\n message instanceof CometChat.CustomMessage ||\n message instanceof CometChat.InteractiveMessage ||\n message instanceof CometChat.Action ||\n message instanceof CometChat.Call\n );\n}\n\nfunction stateReducer(state: State, action: Action): State {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendConversations\":\n if (action.conversations.length > 0) {\n let conversations: CometChat.Conversation[] = [];\n if (action.removeOldConversation) {\n state.conversationList = [];\n conversations = action.conversations;\n } else {\n conversations = [...state.conversationList, ...action.conversations];\n }\n newState = { ...state, conversationList: conversations };\n }\n break;\n case \"setConversationList\": {\n const { typingIndicatorMap } = state;\n const { conversationList } = action;\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >();\n for (let i = 0; i < conversationList.length; i++) {\n const convWith = conversationList[i].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap.set(\n convWithId,\n typingIndicatorMap.get(convWithId)!\n );\n }\n }\n newState = {\n ...state,\n conversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n break;\n }\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"setConversationToBeDeleted\":\n newState = { ...state, conversationToBeDeleted: action.conversation };\n break;\n case \"removeConversation\": {\n const { typingIndicatorMap, conversationList } = state;\n const targetConvId = action.conversation.getConversationId();\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConvId\n );\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = state.conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"updateConversationWithUser\": {\n const { user } = action;\n const { conversationList } = state;\n const targetUid = user.getUid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.User && convWith?.getUid() === targetUid\n );\n });\n if (targetIdx > -1) {\n const newConversationList = conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setConversationWith(user);\n return newConv;\n }\n return conv;\n });\n newState = { ...state, conversationList: newConversationList };\n }\n break;\n }\n case \"fromUpdateConversationListFn\": {\n const { conversation } = action;\n const targetId = conversation.getConversationId();\n const conversations = state.conversationList.filter((conv) => {\n if (conv.getConversationId() !== targetId) {\n return true;\n }\n // conversation.setUnreadMessageCount(conversation.getUnreadMessageCount() + conv.getUnreadMessageCount());\n return false;\n });\n newState = {\n ...state,\n conversationList: [conversation, ...conversations],\n };\n break;\n }\n case \"setLastMessageReadOrDeliveredAt\": {\n const { conversationList } = state;\n const { messageReceipt, updateReadAt } = action;\n const targetMessageId = messageReceipt.getMessageId();\n const targetIdx = conversationList.findIndex((conv) => {\n if (conv.getConversationWith() instanceof CometChat.User) {\n const lastMessage = conv.getLastMessage();\n if (\n isAMessage(lastMessage) &&\n String(lastMessage.getId()) === targetMessageId\n ) {\n return updateReadAt\n ? !lastMessage.getReadAt()\n : !lastMessage.getDeliveredAt();\n }\n }\n return false;\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n const lastMessage = newConv.getLastMessage();\n if (isAMessage(lastMessage)) {\n if (updateReadAt) {\n lastMessage.setReadAt(messageReceipt.getReadAt());\n newConv.setUnreadMessageCount(0);\n } else {\n lastMessage.setDeliveredAt(messageReceipt.getDeliveredAt());\n }\n }\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"addTypingIndicator\": {\n // Make sure sender is not the logged-in user before executing this block\n const { typingIndicator } = action;\n const senderId = typingIndicator.getSender()?.getUid();\n const isReceiverTypeGroup =\n typingIndicator.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group;\n const receiverId = typingIndicator.getReceiverId();\n let id: string | undefined;\n const { conversationList, typingIndicatorMap } = state;\n for (let i = 0; i < conversationList.length; i++) {\n const convWith = conversationList[i].getConversationWith();\n if (isReceiverTypeGroup) {\n if (\n convWith instanceof CometChat.Group &&\n convWith.getGuid() === receiverId\n ) {\n id = convWith.getGuid();\n break;\n }\n } else if (\n convWith instanceof CometChat.User &&\n convWith?.getUid() === senderId\n ) {\n id = convWith?.getUid();\n break;\n }\n }\n if (id !== undefined) {\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >(typingIndicatorMap);\n newTypingIndicatorMap.set(id, typingIndicator);\n newState = { ...state, typingIndicatorMap: newTypingIndicatorMap };\n }\n break;\n }\n case \"removeTypingIndicator\": {\n const { typingIndicatorMap } = state;\n const { typingIndicator } = action;\n const senderId = typingIndicator.getSender()?.getUid();\n const receiverId = typingIndicator.getReceiverId();\n let id: string | undefined;\n if (\n typingIndicator.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n if (typingIndicatorMap.has(senderId)) {\n id = senderId;\n }\n } else if (\n typingIndicatorMap.get(receiverId)?.getSender()?.getUid() === senderId\n ) {\n id = receiverId;\n }\n if (id !== undefined) {\n const newTypingIndicatorMap = new Map<\n string,\n CometChat.TypingIndicator\n >(typingIndicatorMap);\n newTypingIndicatorMap.delete(id);\n newState = { ...state, typingIndicatorMap: newTypingIndicatorMap };\n }\n break;\n }\n case \"updateConversationLastMessage\": {\n const { message } = action;\n const targetMessageId = message?.getId();\n const { conversationList } = state;\n const targetIdx = conversationList.findIndex((conv) => {\n const lastMessage = conv.getLastMessage();\n return (\n isAMessage(lastMessage) && lastMessage.getId() === targetMessageId\n );\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setLastMessage(message);\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\": {\n const { conversationList } = state;\n const { group, message } = action;\n const targetConversationId = message.getConversationId();\n if (!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)) {\n return state;\n }\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConversationId\n );\n if (targetIdx > -1) {\n const newConv = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n newConv.setConversationWith(group);\n newConv.setLastMessage(message);\n newState = {\n ...state,\n conversationList: [\n newConv,\n ...conversationList.filter((conv, i) => i !== targetIdx),\n ],\n };\n }\n break;\n }\n case \"removeConversationOfTheGroup\": {\n const { conversationList, typingIndicatorMap } = state;\n const targetGuidId = action.group.getGuid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.Group &&\n convWith.getGuid() === targetGuidId\n );\n });\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"removeConversationOfTheUser\": {\n const { conversationList, typingIndicatorMap } = state;\n const targetUid = action.user.getUid();\n const targetIdx = conversationList.findIndex((conv) => {\n const convWith = conv.getConversationWith();\n return (\n convWith instanceof CometChat.User && convWith?.getUid() === targetUid\n );\n });\n if (targetIdx > -1) {\n const convWith = conversationList[targetIdx].getConversationWith();\n const convWithId =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n let newTypingIndicatorMap: Map;\n if (typingIndicatorMap.has(convWithId)) {\n newTypingIndicatorMap = new Map(typingIndicatorMap);\n newTypingIndicatorMap.delete(convWithId);\n } else {\n newTypingIndicatorMap = typingIndicatorMap;\n }\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: newConversationList,\n typingIndicatorMap: newTypingIndicatorMap,\n };\n }\n break;\n }\n case \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\": {\n const { conversationList } = state;\n const { message, conversation } = action;\n const targetConvId = message.getConversationId();\n if (!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)) {\n return state;\n }\n const targetIdx = conversationList.findIndex(\n (conv) => conv.getConversationId() === targetConvId\n );\n if (targetIdx > -1) {\n const targetConversation = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n targetConversation.setLastMessage(message);\n targetConversation.setUnreadMessageCount(0);\n // targetConversation.setUnreadMentionInMessageCount(0);\n const newConversationList = conversationList.filter(\n (conv, i) => i !== targetIdx\n );\n newState = {\n ...state,\n conversationList: [targetConversation, ...newConversationList],\n };\n } else {\n conversation.setUnreadMessageCount(0);\n // conversation.setUnreadMentionInMessageCount(0);\n const newConversationList = [conversation, ...conversationList];\n newState = { ...state, conversationList: newConversationList };\n }\n break;\n }\n case \"resetUnreadCountAndSetReadAtIfLastMessage\": {\n const { conversationList } = state;\n const { message } = action;\n const messageReadAt = message.getReadAt() || Date.now();\n const targetIdx = conversationList.findIndex((conv) => {\n return conv.getConversationId() === message.getConversationId();\n });\n if (targetIdx > -1) {\n newState = {\n ...state,\n conversationList: conversationList.map((conv, i) => {\n if (i === targetIdx) {\n const newConv = CometChatUIKitUtility.clone(conv);\n newConv.setUnreadMessageCount(0);\n // newConv.setUnreadMentionInMessageCount(0);\n if (newConv.getLastMessage()) {\n newConv.getLastMessage().setReadAt(messageReadAt);\n }\n\n return newConv;\n }\n return conv;\n }),\n };\n }\n break;\n }\n case \"updateConversationLastMessageAndPlaceAtTheTop\": {\n const { message } = action;\n const targetMessageId = message?.getId();\n const { conversationList } = state;\n\n if (!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)) {\n return state;\n }\n const targetIdx = conversationList.findIndex((conv) => {\n const lastMessage = conv.getLastMessage();\n return (\n isAMessage(lastMessage) && lastMessage.getId() === targetMessageId\n );\n });\n if (targetIdx > -1) {\n const newConv = CometChatUIKitUtility.clone(\n conversationList[targetIdx]\n );\n newConv.setLastMessage(message);\n newState = {\n ...state,\n conversationList: [\n newConv,\n ...conversationList.filter((conv, i) => i !== targetIdx),\n ],\n };\n }\n break;\n }\n case \"setLoggedInUser\":\n newState = { ...state, loggedInUser: action.loggedInUser };\n break;\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of conversations that has been created in a CometChat app\n */\nexport function CometChatConversations(props: IConversationsProps) {\n const {\n menus = null,\n title = localize(\"CHATS\"),\n titleAlignment = TitleAlignment.left,\n conversationsRequestBuilder = null,\n onError,\n listItemView = null,\n subtitleView = null,\n disableUsersPresence = false,\n hideSeparator = false,\n activeConversation = null,\n selectionMode = SelectionMode.none,\n disableReceipt = false,\n options = null,\n datePattern = DatePatterns.DayDateTime,\n protectedGroupIcon = LockedIcon,\n passwordGroupIcon = undefined,\n privateGroupIcon = PrivateIcon,\n readIcon = MessageReadIcon,\n deliveredIcon = MessageDeliveredIcon,\n waitIcon = WaitIcon,\n errorIcon = WarningSmallIcon,\n sentIcon = MessageSentIcon,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_CHATS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n onItemClick = null,\n onSelect = null,\n disableSoundForMessages = false,\n disableTyping = false,\n customSoundForMessages = null,\n confirmDialogTitle = localize(\"DELETE_CONVERSATION\"),\n confirmDialogMessage = localize(\n \"WOULD__YOU_LIKE_TO_DELETE_THIS_CONVERSATION\"\n ),\n cancelButtonText = localize(\"CANCEL\"),\n confirmButtonText = localize(\"DELETE\"),\n conversationsStyle = null,\n deleteConversationDialogStyle = null,\n avatarStyle: avatarStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n badgeStyle: badgeStyleObject = null,\n receiptStyle: receiptStyleObject = null,\n dateStyle: dateStyleObject = null,\n backdropStyle: backDropStyleObject = null,\n disableMentions = false,\n textFormatters = [],\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n conversationList: [],\n fetchState: States.loading,\n typingIndicatorMap: new Map(),\n conversationToBeDeleted: null,\n loggedInUser: null,\n isFirstReload: false,\n unreadMentions: false,\n });\n const [confirmDialogElement, setConfirmDialogRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null\n >(null);\n const conversationsManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError);\n const customSoundForMessagesRef = useRefSync(customSoundForMessages);\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n\n (() => {\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Initiates a fetch request and appends the fetched conversations to the `conversationList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `conversationList` state\n */\n const fetchNextAndAppendConversations = useCallback(\n async (fetchId: string): Promise => {\n const conversationManager = conversationsManagerRef.current;\n if (!conversationManager) {\n return;\n }\n let initialState = isConnectionReestablished.current\n ? States.loaded\n : States.loading;\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const conversations = await conversationManager.fetchNext();\n\n if (conversations.length !== 0 && fetchNextIdRef.current === fetchId) {\n let removeOldConversation = isConnectionReestablished.current\n ? true\n : false;\n dispatch({\n type: \"appendConversations\",\n conversations,\n removeOldConversation,\n });\n }\n if (attachListenerOnFetch.current) {\n ConversationsManager.attachConnestionListener(() => {\n conversationsManagerRef.current = new ConversationsManager({\n conversationsRequestBuilder,\n });\n isConnectionReestablished.current = true;\n fetchNextAndAppendConversations(\n (fetchNextIdRef.current =\n \"initialFetchNext_\" + String(Date.now()))\n );\n });\n attachListenerOnFetch.current = false;\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n } else {\n isConnectionReestablished.current = false;\n }\n } catch (error) {\n if (state.conversationList.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n },\n [errorHandler, dispatch]\n );\n\n const getIncrementUnreadCountBoolFromMetaData = useCallback(\n (message: CometChat.BaseMessage) => {\n const metaDataGetterName = \"getMetadata\";\n const incrementUnreadCountFieldName = \"incrementUnreadCount\";\n let metaData: any;\n\n return (\n metaDataGetterName in message &&\n typeof message![metaDataGetterName] === \"function\" &&\n (metaData = message![metaDataGetterName]!()) &&\n typeof metaData === \"object\" &&\n incrementUnreadCountFieldName in metaData &&\n Boolean(metaData[\"incrementUnreadCount\"])\n ) || (message instanceof CometChat.CustomMessage && message.willUpdateConversation());\n },\n []\n );\n\n /**\n * Updates the unreadCount of `conversation` & moves it to the top of the `conversationList`\n */\n const updateConversationList = useCallback(\n (\n conversation: CometChat.Conversation,\n newMessage: CometChat.BaseMessage\n ): void => {\n const message = newMessage || conversation.getLastMessage();\n if (!isAMessage(message)) {\n return;\n }\n if (!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(message)) {\n return;\n }\n const incrementUnreadCount =\n (message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.message ||\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.call ||\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive ||\n getIncrementUnreadCountBoolFromMetaData(message)) &&\n message.getSender().getUid() !== state.loggedInUser?.getUid();\n conversation.setUnreadMessageCount(\n (conversation.getUnreadMessageCount() ?? 0) +\n Number(incrementUnreadCount)\n );\n if (message instanceof CometChat.Action &&\n message.getReceiverType() === CometChatUIKitConstants.MessageReceiverType.group &&\n conversation.getConversationType() === CometChatUIKitConstants.MessageReceiverType.group) {\n\n const isSameGroup = (message.getReceiver() as CometChat.Group).getGuid() ===\n (message.getActionFor() as CometChat.Group).getGuid();\n\n if (isSameGroup) {\n let updatedGroup = conversation.getConversationWith() as CometChat.Group;\n updatedGroup.setMembersCount((message.getActionFor() as CometChat.Group).getMembersCount());\n conversation.setConversationWith(updatedGroup);\n }\n }\n conversation.setLastMessage(message);\n // conversation.setUnreadMentionInMessageCount(\n // newMessage.getMentionedUsers()\n // ? (conversation.getUnreadMentionInMessageCount() + newMessage.getMentionedUsers().length)\n // : 0\n // );\n dispatch({ type: \"fromUpdateConversationListFn\", conversation });\n },\n [dispatch, state.loggedInUser, getIncrementUnreadCountBoolFromMetaData]\n );\n\n /**\n * Removes or updates the conversation in the `conversationList` state\n */\n const refreshSingleConversation = useCallback(\n async (message: CometChat.BaseMessage, removeConversation: boolean = false): Promise => {\n\n try {\n const targetIdx = state.conversationList.findIndex((conv) => {\n return conv.getConversationId() === message.getConversationId();\n });\n if (targetIdx >= 0) {\n const conversation = state.conversationList[targetIdx];\n if (removeConversation) {\n dispatch({ type: \"removeConversation\", conversation: conversation });\n }\n else {\n updateConversationList(conversation, message);\n }\n } else {\n CometChat.CometChatHelper.getConversationFromMessage(message).then(\n (conversation) => {\n updateConversationList(conversation, message);\n }\n );\n\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [errorHandler, updateConversationList, state.conversationList]\n );\n\n /**\n * Handles new received messages\n */\n const onMessageReceived = useCallback(\n async (message: CometChat.BaseMessage): Promise => {\n if (\n message.getSender().getUid() !== state.loggedInUser?.getUid() &&\n !disableReceipt &&\n !message.getDeliveredAt()\n ) {\n try {\n CometChat.markAsDelivered(message);\n } catch (error) {\n errorHandler(error);\n }\n }\n if (\n !disableSoundForMessages &&\n !(\n (message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.custom &&\n !getIncrementUnreadCountBoolFromMetaData(message)) ||\n (activeConversation &&\n activeConversation.getConversationId() ===\n message.getConversationId())\n )\n ) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage,\n customSoundForMessagesRef.current\n );\n }\n refreshSingleConversation(message);\n },\n [\n disableReceipt,\n disableSoundForMessages,\n refreshSingleConversation,\n errorHandler,\n state.loggedInUser,\n activeConversation,\n getIncrementUnreadCountBoolFromMetaData,\n customSoundForMessagesRef,\n ]\n );\n\n /**\n * Updates `readAt` or `deliveredAt` of a conversation's last message\n */\n const setReceipts = useCallback(\n (messageReceipt: CometChat.MessageReceipt, updateReadAt: boolean): void => {\n dispatch({\n type: \"setLastMessageReadOrDeliveredAt\",\n updateReadAt,\n messageReceipt,\n });\n },\n [dispatch]\n );\n\n /**\n * Handles new typing indicators\n */\n const setTypingIndicator = useCallback(\n (\n typingIndicator: CometChat.TypingIndicator,\n typingStarted: boolean\n ): void => {\n if (\n state.loggedInUser?.getUid() === typingIndicator.getSender()?.getUid()\n ) {\n return;\n }\n if (typingStarted) {\n dispatch({ type: \"addTypingIndicator\", typingIndicator });\n } else {\n dispatch({ type: \"removeTypingIndicator\", typingIndicator });\n }\n },\n [state.loggedInUser]\n );\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenusView(): JSX.Element | null {\n if (menus === null) {\n return null;\n }\n return (\n
    \n {menus}\n
    \n );\n }\n\n /**\n * Get avatar URL for the default list item view\n */\n function getListItemAvatarURL(conversation: CometChat.Conversation): string {\n const convWith = conversation.getConversationWith();\n return convWith instanceof CometChat.User\n ? convWith.getAvatar()\n : convWith.getIcon();\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getListItemStatusIndicatorColor(\n conversation: CometChat.Conversation\n ): string | null {\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.User) {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(convWith);\n if (!disableUsersPresence && !userBlockedFlag) {\n return (\n conversationsStyle?.onlineStatusColor ||\n theme.palette.getSuccess() ||\n \"rgb(0, 200, 111)\"\n );\n }\n return null;\n } else {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n return (\n conversationsStyle?.passwordGroupIconBackground ||\n \"rgb(247, 165, 0)\"\n );\n case CometChatUIKitConstants.GroupTypes.private:\n return (\n conversationsStyle?.privateGroupIconBackground ||\n theme.palette.getSuccess() ||\n \"rgb(0, 200, 111)\"\n );\n default:\n return null;\n }\n }\n }\n\n /**\n * Get the status indicator icon for the default list item view\n */\n function getListItemStatusIndicatorIcon(\n conversation: CometChat.Conversation\n ): string {\n let statusIndicatorIcon: string | undefined = \"\";\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.Group) {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n statusIndicatorIcon = passwordGroupIcon || protectedGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n statusIndicatorIcon = privateGroupIcon;\n break;\n default:\n break;\n }\n }\n return statusIndicatorIcon;\n }\n\n /**\n * Creates subtitle thread view\n */\n function getSubtitleThreadView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n const lastMessage = conversation.getLastMessage();\n if (!isAMessage(lastMessage) || !lastMessage.getParentMessageId()) {\n // parentMessageId is falsy, it is not a valid parent message id\n return null;\n }\n return (\n
    \n \n \n
    \n );\n }\n\n function shouldDisplaySubtitleReceipt(\n conversation: CometChat.Conversation\n ): boolean {\n const lastMessage = conversation.getLastMessage();\n const convWith = conversation.getConversationWith();\n const id =\n convWith instanceof CometChat.User\n ? convWith?.getUid()\n : convWith.getGuid();\n return (\n !disableReceipt &&\n isAMessage(lastMessage) &&\n !lastMessage.getDeletedAt() &&\n lastMessage.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n lastMessage.getSender()?.getUid() === state.loggedInUser?.getUid() &&\n state.typingIndicatorMap.get(id) === undefined\n );\n }\n\n /**\n * Creates subtitle receipt view\n */\n function getSubtitleReadReceiptView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n if (!shouldDisplaySubtitleReceipt(conversation)) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates subtitle text\n */\n function getSubtitleText(\n conversation: CometChat.Conversation\n ): string | JSX.Element {\n const convWith = conversation.getConversationWith();\n const id =\n convWith instanceof CometChat.Group\n ? convWith.getGuid()\n : convWith?.getUid();\n const typingIndicator = state.typingIndicatorMap.get(id);\n if (typingIndicator !== undefined) {\n if (convWith instanceof CometChat.Group) {\n return `${typingIndicator.getSender().getName()} ${localize(\n \"IS_TYPING\"\n )}`;\n } else {\n return localize(\"IS_TYPING\");\n }\n }\n if (state.loggedInUser) {\n let icon = \"\";\n const lastMessage = conversation.getLastMessage();\n if (\n lastMessage &&\n lastMessage.getCategory() ===\n CometChatUIKitConstants.MessageCategory.call\n ) {\n icon = `${lastMessage.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? \"📞\"\n : \"📹\"\n } `;\n }\n let messageObject = conversation.getLastMessage();\n let subtitle =\n ChatConfigurator.getDataSource().getLastConversationMessage(\n conversation,\n state.loggedInUser!,\n {\n disableMentions,\n theme,\n mentionsTargetElement: MentionsTargetElement.conversation,\n textFormattersList: textFormatters\n }\n );\n if (\n messageObject &&\n conversation?.getConversationType() !== CometChat.RECEIVER_TYPE.USER\n ) {\n if (\n messageObject?.getSender().getUid() ===\n (state.loggedInUser as CometChat.User)?.getUid()\n ) {\n subtitle = `${subtitle}`;\n } else {\n subtitle = `${subtitle}`;\n }\n }\n return (\n \n );\n }\n return \"\";\n }\n\n /**\n * Creates subtitle text view\n */\n function getSubtitleTextView(\n conversation: CometChat.Conversation\n ): JSX.Element {\n return (\n \n {getSubtitleText(conversation)}\n \n );\n }\n\n /**\n * Creates subtitle view for the default list item view\n */\n function getListItemSubtitleView(\n conversation: CometChat.Conversation\n ): JSX.Element {\n if (subtitleView !== null) {\n return <>{subtitleView(conversation)};\n }\n return (\n <>\n {getSubtitleThreadView(conversation)}\n \n {getSubtitleReadReceiptView(conversation)}\n {getSubtitleTextView(conversation)}\n \n \n );\n }\n\n /**\n * Sets the `conversationToBeDeleted` state to the given `conversation`\n */\n function deleteOptionCallback(conversation: CometChat.Conversation): void {\n dispatch({ type: \"setConversationToBeDeleted\", conversation });\n }\n\n /**\n * Creates menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of view is handled by the default list item view\n */\n function getListItemMenuView(\n conversation: CometChat.Conversation,\n theme: CometChatTheme\n ) {\n if (selectionMode !== SelectionMode.none) {\n return null;\n }\n let curOptions;\n if (!options) {\n const defaultOptions = ConversationUtils.getDefaultOptions();\n for (let i = 0; i < defaultOptions.length; i++) {\n if (\n defaultOptions[i].id ===\n CometChatUIKitConstants.ConversationOptions.delete\n ) {\n defaultOptions[i].onClick = () => deleteOptionCallback(conversation);\n defaultOptions[i].iconTint = theme.palette.getAccent600();\n }\n }\n curOptions = defaultOptions;\n } else {\n curOptions = options?.(conversation);\n }\n if (curOptions?.length === 0) {\n return null;\n }\n return (\n {\n const { onClick } = e.detail.data;\n onClick?.();\n }}\n />\n );\n }\n\n /**\n * Creates tail content view for the default list item view\n */\n function getListItemTailContentView(\n conversation: CometChat.Conversation\n ): JSX.Element | null {\n switch (selectionMode) {\n case SelectionMode.none: {\n const lastMessage = conversation.getLastMessage();\n if (!lastMessage) {\n return null;\n }\n // const isUnreadMentions = conversation.getUnreadMentionInMessageCount() > 0;\n return (\n \n \n
    \n {/* {isUnreadMentions && (\n
    \n \n
    \n )} */}\n \n
    \n \n );\n }\n case SelectionMode.single:\n return (\n
    \n onSelect?.(conversation, e.detail.checked)}\n />\n
    \n );\n case SelectionMode.multiple:\n return (\n
    \n onSelect?.(conversation, e.detail.checked)}\n />\n
    \n );\n default:\n return null;\n }\n }\n\n const setStatusIndicatorStyle = (conversation: CometChat.Conversation) => {\n\n const convWith = conversation.getConversationWith();\n if (convWith instanceof CometChat.User) {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(convWith);\n if (!disableUsersPresence && !userBlockedFlag) {\n return (\n statusIndicatorStyle(\n statusIndicatorStyleObject\n )\n );\n }\n return null;\n } else {\n switch (convWith.getType()) {\n case CometChatUIKitConstants.GroupTypes.private:\n case CometChatUIKitConstants.GroupTypes.password:\n return (\n statusIndicatorStyle(\n statusIndicatorStyleObject\n )\n );\n default:\n return null;\n }\n }\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (\n conversation: CometChat.Conversation\n ) => JSX.Element {\n if (listItemView !== null) {\n return listItemView;\n }\n return function (conversation: CometChat.Conversation) {\n return (\n onItemClick?.(conversation)}\n subtitleView={getListItemSubtitleView(conversation)}\n subtitleViewClassName='cc-conversations__subtitle-view'\n menuView={getListItemMenuView(conversation, theme)}\n menuViewClassName='cc-conversations__options-view'\n tailView={getListItemTailContentView(conversation)}\n tailViewClassName='cc-conversations__tail-view'\n />\n );\n };\n }\n\n /**\n * Creates conversation delete view\n */\n function getConversationDeleteView(): JSX.Element | null {\n if (state.conversationToBeDeleted === null) {\n return null;\n }\n return (\n \n \n \n );\n }\n\n Hooks({\n conversationsRequestBuilder,\n conversationsManagerRef,\n fetchNextAndAppendConversations,\n fetchNextIdRef,\n dispatch,\n confirmDialogElement,\n conversationToBeDeleted: state.conversationToBeDeleted,\n errorHandler,\n refreshSingleConversation,\n onMessageReceived,\n setReceipts,\n setTypingIndicator,\n disableTyping,\n loggedInUser: state.loggedInUser,\n isFirstReload: false,\n });\n\n return (\n \n {getMenusView()}\n \n fetchNextAndAppendConversations(\n (fetchNextIdRef.current =\n \"onScrolledToBottom_\" + String(Date.now()))\n )\n }\n showSectionHeader={false}\n state={\n state.fetchState === States.loaded &&\n state.conversationList.length === 0\n ? States.empty\n : state.fetchState\n }\n loadingIconURL={loadingIconURL}\n loadingView={loadingStateView}\n emptyStateText={emptyStateText}\n emptyStateView={emptyStateView}\n errorStateText={errorStateText}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={listStyle(conversationsStyle, theme)}\n />\n {getConversationDeleteView()}\n \n );\n}\n","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22feather%20feather-corner-right-down%22%3E%3Cpolyline%20points%3D%2210%2015%2015%2020%2020%2015%22%3E%3C%2Fpolyline%3E%3Cpath%20d%3D%22M4%204h7a4%204%200%200%201%204%204v12%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\"","import { CometChatCallEvents, CometChatConversationEvents, CometChatGroupEvents, CometChatMessageEvents, CometChatUserEvents, MessageStatus } from \"@cometchat/uikit-resources\";\nimport React, { JSX, useEffect } from \"react\";\n\nimport { Action } from \".\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { ConversationsManager } from \"./controller\";\n\ntype Args = {\n conversationsRequestBuilder : CometChat.ConversationsRequestBuilder | null,\n conversationsManagerRef : React.MutableRefObject,\n fetchNextAndAppendConversations : (fetchId : string) => Promise,\n fetchNextIdRef : React.MutableRefObject,\n dispatch : React.Dispatch,\n confirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n conversationToBeDeleted : CometChat.Conversation | null,\n errorHandler : (error: unknown) => void,\n refreshSingleConversation : (message : CometChat.BaseMessage, remove? : boolean) => Promise,\n onMessageReceived : (message : CometChat.BaseMessage) => Promise,\n setReceipts : (messageReceipt : CometChat.MessageReceipt, updateReadAt : boolean) => void,\n setTypingIndicator : (typingIndicator : CometChat.TypingIndicator, typingStarted : boolean) => void,\n disableTyping : boolean,\n loggedInUser : CometChat.User | null,\n isFirstReload: boolean\n};\n\nexport function Hooks(args : Args) {\n const {\n conversationsRequestBuilder,\n conversationsManagerRef,\n fetchNextAndAppendConversations,\n fetchNextIdRef,\n dispatch,\n confirmDialogElement,\n conversationToBeDeleted,\n errorHandler,\n refreshSingleConversation,\n onMessageReceived,\n setReceipts,\n setTypingIndicator,\n disableTyping,\n loggedInUser,\n isFirstReload\n } = args;\n\n\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `conversationList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n conversationsManagerRef.current = new ConversationsManager({conversationsRequestBuilder});\n dispatch({type: \"setConversationList\", conversationList: []});\n fetchNextAndAppendConversations(fetchNextIdRef.current = \"initialFetchNext_\" + String(Date.now()));\n\n\n\n }, [conversationsRequestBuilder, fetchNextAndAppendConversations, dispatch, conversationsManagerRef, fetchNextIdRef]);\n\n useEffect(\n /**\n * Sets `loggedInUserRef` to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n dispatch({type: \"setLoggedInUser\", loggedInUser: await CometChat.getLoggedinUser()});\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, dispatch]);\n\n useEffect(\n /**\n * Attaches event listeners to elements related to the conversation delete view\n */\n () => {\n if (confirmDialogElement === null) {\n return;\n }\n const confirmClickEventName = \"cc-confirm-clicked\";\n const cancelClickEventName = \"cc-cancel-clicked\";\n async function handleConfirmClick() {\n if (conversationToBeDeleted) {\n const convWith = conversationToBeDeleted.getConversationWith();\n const id = convWith instanceof CometChat.Group ? convWith.getGuid() : convWith.getUid();\n\n try {\n await CometChat.deleteConversation(id, conversationToBeDeleted.getConversationType());\n CometChatConversationEvents.ccConversationDeleted.next(CometChatUIKitUtility.clone(conversationToBeDeleted));\n dispatch({type: \"removeConversation\", conversation: conversationToBeDeleted});\n dispatch({type: \"setConversationToBeDeleted\", conversation: null});\n }\n catch(error) {\n errorHandler(error);\n }\n }\n }\n function handleCancelClick() {\n dispatch({type: \"setConversationToBeDeleted\", conversation: null});\n }\n confirmDialogElement.addEventListener(confirmClickEventName, handleConfirmClick);\n confirmDialogElement.addEventListener(cancelClickEventName, handleCancelClick);\n return () => {\n confirmDialogElement.removeEventListener(confirmClickEventName, handleConfirmClick);\n confirmDialogElement.removeEventListener(cancelClickEventName, handleCancelClick);\n };\n }, [conversationToBeDeleted, confirmDialogElement, errorHandler, dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK user listener\n *\n * @returns - Function to remove the added SDK user listener\n */\n () => {\n return ConversationsManager.attachUserListener((user : CometChat.User) => dispatch({type: \"updateConversationWithUser\", user}));\n }, [dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return ConversationsManager.attachGroupListener(refreshSingleConversation, loggedInUser);\n }, [refreshSingleConversation, loggedInUser]);\n\n useEffect(\n /**\n * Attaches an SDK message received listener\n *\n * @returns - Function to remove the added SDK message received listener\n */\n () => {\n return ConversationsManager.attachMessageReceivedListener(onMessageReceived);\n }, [onMessageReceived]);\n\n useEffect(\n /**\n * Attaches an SDK message modified listener\n *\n * @returns - Function to remove the added SDK message modified listener\n */\n () => {\n return ConversationsManager.attachMessageModifiedListener((message : CometChat.BaseMessage) => {\n dispatch({type: \"updateConversationLastMessage\", message});\n })\n }, [dispatch]);\n\n useEffect(\n /**\n * Attaches an SDK message receipt listener\n *\n * @returns - Function to remove the added SDK message receipt listener\n */\n () => {\n return ConversationsManager.attachMessageReceiptListener(setReceipts);\n }, [setReceipts]);\n\n useEffect(\n /**\n * Attaches an SDK message typing listener\n *\n * @returns - Function to remove the added SDK message typing listener\n */\n () => {\n if (disableTyping) {\n return;\n }\n return ConversationsManager.attachMessageTypingListener(setTypingIndicator);\n }, [disableTyping, setTypingIndicator]);\n\n useEffect(\n /**\n * Attaches an SDK call listener\n *\n * @returns - Function to remove the added SDK call listener\n */\n () => {\n return ConversationsManager.attachCallListener(refreshSingleConversation);\n }, [refreshSingleConversation]);\n\n useEffect(\n /**\n * Subscribes to User, Group, Message & Call UI events\n */\n () => {\n const groupMemberScopeChangedSub = CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe(item => { \n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message: item.message});\n });\n const groupMemberAddedSub = CometChatGroupEvents.ccGroupMemberAdded.subscribe(item => {\n const message = item.messages[item.messages.length - 1];\n if (message) {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.userAddedIn, message});\n }\n });\n const groupMemberKickedSub = CometChatGroupEvents.ccGroupMemberKicked.subscribe(item => {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.kickedFrom, message: item.message});\n });\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe(item => {\n dispatch({type: \"updateConversationLastMessageAndGroupAndPlaceAtTheTop\", group: item.kickedFrom, message: item.message});\n });\n const groupDeletedSub = CometChatGroupEvents.ccGroupDeleted.subscribe(group => {\n dispatch({type: \"removeConversationOfTheGroup\", group});\n });\n const groupLeftSub = CometChatGroupEvents.ccGroupLeft.subscribe(item => {\n if(!ConversationsManager.shouldLastMessageAndUnreadCountBeUpdated(item.message)){\n return ;\n }\n dispatch({type: \"removeConversationOfTheGroup\", group: item.leftGroup});\n });\n const userBlockedSub = CometChatUserEvents.ccUserBlocked.subscribe(user => {\n dispatch({type: \"removeConversationOfTheUser\", user});\n });\n const messageEditedSub = CometChatMessageEvents.ccMessageEdited.subscribe(item => {\n if (item.status === MessageStatus.success) {\n dispatch({type: \"updateConversationLastMessage\", message: item.message});\n }\n });\n const messageSentSub = CometChatMessageEvents.ccMessageSent.subscribe(item => {\n if (item.status === MessageStatus.success) {\n CometChat.CometChatHelper.getConversationFromMessage(item.message).then(conversation => {\n dispatch({type: \"updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop\", message: item.message , conversation: conversation});\n });\n }\n });\n const messageDeletedSub = CometChatMessageEvents.ccMessageDeleted.subscribe(message => {\n dispatch({type: \"updateConversationLastMessage\", message: CometChatUIKitUtility.clone(message)}); // Cloning message since I don't know if the developer is passing a cloned copy\n });\n const messageReadSub = CometChatMessageEvents.ccMessageRead.subscribe(message => {\n dispatch({type: \"resetUnreadCountAndSetReadAtIfLastMessage\", message});\n });\n const callAcceptedSub = CometChatCallEvents.ccCallAccepted.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const outgoingCallSub = CometChatCallEvents.ccOutgoingCall.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const callRejectedSub = CometChatCallEvents.ccCallRejected.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n const callEndedSub = CometChatCallEvents.ccCallEnded.subscribe(message => {\n dispatch({type: \"updateConversationLastMessageAndPlaceAtTheTop\", message});\n });\n return () => {\n groupMemberScopeChangedSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n groupMemberKickedSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupDeletedSub.unsubscribe();\n groupLeftSub.unsubscribe();\n userBlockedSub.unsubscribe();\n messageEditedSub.unsubscribe();\n messageSentSub.unsubscribe();\n messageDeletedSub.unsubscribe();\n messageReadSub.unsubscribe();\n callAcceptedSub.unsubscribe();\n outgoingCallSub.unsubscribe();\n callRejectedSub.unsubscribe();\n callEndedSub.unsubscribe();\n };\n }, [dispatch]);\n}\n","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport {\n ConversationsConfiguration,\n MessageHeaderStyle,\n MessagesConfiguration,\n MessagesStyle,\n WithMessagesStyle,\n} from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { LabelStyle } from \"@cometchat/uikit-elements\";\n\nconst labelStyle: LabelStyle = {\n height: \"100%\",\n width: \"100%\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: \"flex\",\n height: \"100%\",\n width: \"100%\",\n boxSizing: \"border-box\",\n position: \"relative\",\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: \"calc(100% - 280px)\",\n height: \"100%\",\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: \"100%\",\n height: \"100%\",\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n background: \"inherit\",\n border: \"none\",\n borderRadius: \"inherit\",\n width: \"100%\",\n height: \"auto\",\n} as CSSProperties;\n\nconst WithMessagesSidebarStyle = {\n width: \"280px\",\n height: \"100%\",\n position: \"relative\",\n} as CSSProperties;\n\nexport const getConversationsWrapperStyles = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n ...WithMessagesWrapperStyle,\n width: \"100%\",\n height: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"0\",\n background: theme.palette.getBackground(),\n ...conversationsWithMessagesStyle,\n } as CSSProperties;\n};\n\nexport const getWithMessagesSidebarStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme,\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeUser, activeGroup);\n } else {\n return getDesktopViewSidebarStyle(conversationsWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n const visibility =\n activeUser || activeGroup\n ? { visibility: \"hidden\" }\n : { visibility: \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nconst getDesktopViewSidebarStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight:\n conversationsWithMessagesStyle?.border ||\n `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`,\n } as CSSProperties;\n};\n\nexport const getWithMessagesMainStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeUser, activeGroup);\n } else {\n return getDesktopViewMainStyle(conversationsWithMessagesStyle);\n }\n};\n\nconst getMobileViewMainStyle = (\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n const visibility =\n activeUser || activeGroup\n ? { visibility: \"visible\" }\n : { visibility: \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nconst getDesktopViewMainStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`,\n };\n};\n\nexport const getLabelStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n ...labelStyle,\n textFont:\n conversationsWithMessagesStyle?.messageTextFont ||\n fontHelper(theme.typography.title1),\n textColor:\n conversationsWithMessagesStyle?.messageTextColor ||\n theme.palette.getAccent600(),\n } as LabelStyle;\n};\n\nexport const getConversationsStyle = (\n conversationsConfiguration: ConversationsConfiguration | undefined\n) => {\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...conversationsConfiguration?.conversationsStyle,\n };\n};\n\nexport const getMessageHeaderStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n messagesConfiguration: MessagesConfiguration | undefined,\n isMobileView: boolean | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView\n ? `${borderRadius} ${borderRadius} 0 0`\n : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle,\n } as MessageHeaderStyle;\n};\n\nexport const getMessageComposerStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n messagesConfiguration: MessagesConfiguration | undefined,\n isMobileView: boolean | undefined\n) => {\n const borderRadius = conversationsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView\n ? `0 0 ${borderRadius} ${borderRadius}`\n : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration\n ?.messageComposerStyle,\n };\n};\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n conversationsWithMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: conversationsWithMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (\n isMobileView: boolean | undefined,\n activeUser: CometChat.User | null,\n activeGroup: CometChat.Group | null\n) => {\n let visibility = { visibility: \"hidden\" };\n if (!activeUser && !activeGroup && !isMobileView) {\n visibility = { visibility: \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`,\n } as CSSProperties;\n};\n\nexport const getBackdropStyle = (\n conversationsWithMessagesStyle: WithMessagesStyle | undefined,\n conversationsConfiguration: ConversationsConfiguration | undefined\n) => {\n return {\n height:\n conversationsConfiguration?.backdropStyle?.height ||\n conversationsWithMessagesStyle?.height,\n width:\n conversationsConfiguration?.backdropStyle?.width ||\n conversationsWithMessagesStyle?.width,\n background:\n conversationsConfiguration?.backdropStyle?.background ||\n \"rgba(0, 0, 0, 0.5)\",\n border: conversationsConfiguration?.backdropStyle?.border || \"0 none\",\n borderRadius:\n conversationsConfiguration?.backdropStyle?.borderRadius || \"0\",\n };\n};\n\nexport const getButtonStyle = (\n showCometChatContacts: boolean,\n theme: CometChatTheme\n) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: showCometChatContacts\n ? theme.palette.getAccent600()\n : theme.palette.getPrimary(),\n };\n};\n","import {\n CometChatTheme,\n fontHelper,\n TabsVisibility,\n} from \"@cometchat/uikit-resources\";\nimport { ContactsStyle, TabItemStyle } from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { TabsStyle } from \"../Shared/Views/CometChatTabs/TabsStyle\";\n\ntype ButtonStyle = CSSProperties & { buttonIconTint?: string };\ntype HeaderStyle = CSSProperties;\ntype WrapperStyle = CSSProperties;\ntype ContentStyle = CSSProperties;\n\nexport function closeBtnStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: contactsStyle?.closeIconTint || theme.palette.getPrimary(),\n background: \"transparent\",\n position: \"absolute\",\n top: \"8px\",\n right: \"12px\",\n };\n}\n\nexport function submitBtnWrapperStyle() {\n return {\n boxSizing: 'border-box',\n } as CSSProperties;\n}\n\n\nexport function submitBtnStyle(contactsStyle : ContactsStyle | null, theme : CometChatTheme) : any {\n return { \n background: contactsStyle?.submitButtonBackground || theme.palette.getPrimary(),\n buttonTextColor: contactsStyle?.submitButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: contactsStyle?.submitButtonTextFont || fontHelper(theme.typography.title2),\n height:\"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"8px\",\n padding: \"8px\",\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\"\n };\n}\n\nexport function contactsHeaderStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): HeaderStyle {\n return {\n height: \"30px\",\n textAlign: \"center\",\n font: contactsStyle?.titleTextFont || fontHelper(theme.typography.title1),\n padding: \"10px 0px\",\n color: contactsStyle?.titleTextColor || theme.palette.getAccent(),\n };\n}\n\nexport function contactsWrapperStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): WrapperStyle {\n return {\n height: contactsStyle?.height || \"94%\",\n width: contactsStyle?.width || \"100%\",\n background: contactsStyle?.background || theme.palette.getBackground(),\n border: contactsStyle?.border || \"none\",\n borderRadius: contactsStyle?.borderRadius || \"none\",\n boxShadow: contactsStyle?.boxShadow || \"0\",\n padding: contactsStyle?.padding || \"0\",\n display: \"flex\",\n zIndex:1\n };\n}\n\nexport function getContactsStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n): CSSProperties {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n //margin: \"0 auto\",\n //height:\"100%\"\n };\n}\n\nexport function contactsContentStyle(): ContentStyle {\n return {\n height: \"calc(100% - 50px)\",\n };\n}\n\nexport function getTabsStyle(\n contactsStyle: ContactsStyle,\n theme: CometChatTheme\n) {\n return {\n height: \"100%\",\n width: \"100%\",\n tabListHeight: \"30px\",\n tabListBackground: \"#ececec\",\n tabListPadding: \"2px 2px\",\n tabListBorderRadius: \"8px\",\n tabPaneWidth: \"100%\",\n tabPaneHeight: \"calc(100% - 30px)\",\n } as TabsStyle;\n}\n\nexport const getTabItemStyling = (\n contactsStyle: ContactsStyle,\n theme: CometChatTheme,\n tabVisibility: TabsVisibility | undefined,\n isActive: boolean\n) => {\n return {\n width: tabVisibility === TabsVisibility.usersAndGroups ? \"50%\" : \"100%\",\n height: contactsStyle.tabHeight ||\"100%\",\n borderRadius: contactsStyle.tabBorderRadius || \"0\",\n border:contactsStyle.tabBorder||\"none\",\n titleTextFont: contactsStyle.tabTitleTextFont || fontHelper(theme.typography.text2),\n titleTextColor: contactsStyle.tabTitleTextColor || theme.palette.getAccent(),\n activeTitleTextFont: contactsStyle.activeTabTitleTextFont || fontHelper(theme.typography.text2),\n activeTitleTextColor: contactsStyle.activeTabTitleTextColor || theme.palette.getAccent(),\n activeBackground: contactsStyle.activeTabBackground || theme.palette.getBackground(),\n activeBorderRadius: \"8px\",\n activeBorder: \"2px solid red\" || contactsStyle.activeTabBorder || \"\",\n background:contactsStyle.tabBackground || \"#ececec\",\n boxShadow:\n \"0px 3px 8px rgba(20, 20, 20, 0.12), 0 3px 1px rgba(20, 20, 20, 0.04)\",\n } as TabItemStyle;\n};\n","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { GroupsStyle } from \"@cometchat/uikit-shared\";\n\nexport function groupsWrapperStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : CSSProperties {\n return {\n position: \"relative\",\n boxSizing: \"border-box\",\n background: groupsStyleObject?.background || theme.palette.getBackground(),\n width: groupsStyleObject?.width || \"100%\",\n height: groupsStyleObject?.height || \"100%\",\n border: groupsStyleObject?.border || `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: groupsStyleObject?.borderRadius || \"0\",\n overflow: \"hidden\"\n };\n}\n\nexport function menusStyle() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"16px\",\n right: \"16px\",\n cursor: \"pointer\",\n display: \"flex\",\n flexDirection: \"row-reverse\",\n width: \"24px\"\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | undefined) : CSSProperties {\n const obj = statusIndicatorStyleObject !== undefined ? statusIndicatorStyleObject : {}; \n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | undefined, theme : CometChatTheme) : AvatarStyle {\n\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"28px\",\n height: avatarStyleObject?.height || \"28px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.caption1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | undefined, groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : ListItemStyle {\n \n return new ListItemStyle({\n height: listItemStyleObject?.height || \"auto\",\n width: listItemStyleObject?.width || \"100%\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || theme.palette.getAccent100(),\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent(),\n border: listItemStyleObject?.border || \"none\",\n padding: listItemStyleObject?.padding || \"0\",\n separatorColor: listItemStyleObject?.separatorColor || groupsStyleObject?.separatorColor || theme.palette.getAccent100(),\n hoverBackground: listItemStyleObject?.hoverBackground || theme.palette.getAccent50()\n });\n}\n\nexport function groupsStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : GroupsStyle {\n return new GroupsStyle({\n background: \"inherit\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\",\n titleTextFont: groupsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupsStyleObject?.titleTextColor || theme.palette.getAccent(),\n searchPlaceholderTextFont: groupsStyleObject?.searchPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n searchPlaceholderTextColor: groupsStyleObject?.searchPlaceholderTextColor || theme.palette.getAccent500(),\n searchTextFont: groupsStyleObject?.searchTextFont || fontHelper(theme.typography.subtitle1),\n searchTextColor: groupsStyleObject?.searchTextColor || theme.palette.getAccent(),\n searchBorder: groupsStyleObject?.searchBorder || \"none\",\n searchBorderRadius: groupsStyleObject?.searchBorderRadius || \"8px\",\n searchBackground: groupsStyleObject?.searchBackground || theme.palette.getAccent50(),\n searchIconTint: groupsStyleObject?.searchIconTint || theme.palette.getAccent500(),\n separatorColor: groupsStyleObject?.separatorColor || theme.palette.getAccent400(),\n loadingIconTint: groupsStyleObject?.loadingIconTint || theme.palette.getAccent600(),\n emptyStateTextFont: groupsStyleObject?.emptyStateTextFont || fontHelper(theme.typography.heading),\n emptyStateTextColor: groupsStyleObject?.emptyStateTextColor || theme.palette.getAccent600(),\n errorStateTextFont: groupsStyleObject?.errorStateTextFont || fontHelper(theme.typography.heading),\n errorStateTextColor: groupsStyleObject?.errorStateTextColor || theme.palette.getAccent600()\n });\n}\n\nexport function subtitleStyle(groupsStyleObject : GroupsStyle | undefined, theme : CometChatTheme) : CSSProperties {\n return {\n font: groupsStyleObject?.subTitleTextFont || fontHelper(theme.typography.subtitle2),\n color: groupsStyleObject?.subTitleTextColor || theme.palette.getAccent600(),\n };\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React from \"react\";\nimport { Action } from \".\";\n\ntype Args = {\n searchText: string,\n groupsRequestBuilder: CometChat.GroupsRequestBuilder | null,\n searchRequestBuilder: CometChat.GroupsRequestBuilder | null,\n groupsSearchText:React.MutableRefObject\n};\n\nexport class GroupsManager {\n private groupsRequest: CometChat.GroupsRequest;\n private static loggedInUser: CometChat.User | null | undefined;\n private static defaultLimit = 30;\n\n /**\n * Set `groupsRequest` of the instance\n */\n constructor(args: Args) {\n const {\n searchText,\n groupsRequestBuilder,\n searchRequestBuilder,\n groupsSearchText\n } = args;\n let tmpGrpReqBuilder = groupsRequestBuilder || this.getDefaultRequestBuilder();\n if(searchText && searchRequestBuilder) {\n tmpGrpReqBuilder = searchRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }else if(searchText && !searchRequestBuilder && groupsRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }else if(!searchText && groupsRequestBuilder && searchRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else if(!searchText && groupsRequestBuilder && !searchRequestBuilder){\n tmpGrpReqBuilder = groupsRequestBuilder;\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else if(!searchText && !groupsRequestBuilder && searchRequestBuilder){\n tmpGrpReqBuilder = this.getDefaultRequestBuilder();\n tmpGrpReqBuilder.setSearchKeyword(groupsSearchText.current)\n }else{\n tmpGrpReqBuilder.setSearchKeyword(searchText)\n }\n this.groupsRequest = tmpGrpReqBuilder.build();\n }\n\n /**\n * Calls `fetchNext` method of the set `groupsRequest`\n */\n fetchNext() {\n return this.groupsRequest.fetchNext();\n }\n\n\n private getDefaultRequestBuilder() {\n return new CometChat.GroupsRequestBuilder().setLimit(GroupsManager.defaultLimit);\n }\n\n /**\n * Sets `loggedInUser` of the instance\n * @returns The logged-in user\n */\n private static async getLoggedInUser() {\n if (this.loggedInUser === undefined) {\n this.loggedInUser = await CometChat.getLoggedinUser();\n }\n return this.loggedInUser;\n }\n\n /**\n * Creates an SDK group listener\n */\n private static createGroupListener(dispatch: React.Dispatch) {\n return new CometChat.GroupListener({\n onGroupMemberJoined: async (message: CometChat.Action, joinedUser: CometChat.User, joinedGroup: CometChat.Group) => {\n if (joinedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n joinedGroup.setHasJoined(true);\n }\n dispatch({ type: \"updateGroup\", group: joinedGroup });\n },\n onGroupMemberLeft: async (message: CometChat.Action, leavingUser: CometChat.User, groupLeft: CometChat.Group) => {\n if (leavingUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n groupLeft.setHasJoined(false);\n }\n dispatch({ type: \"updateGroup\", group: groupLeft });\n },\n onMemberAddedToGroup: async (message: CometChat.Action, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group) => {\n if (userAdded.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n userAddedIn.setHasJoined(true);\n }\n dispatch({ type: \"updateGroup\", group: userAddedIn });\n },\n onGroupMemberKicked: async (message: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group) => {\n if (kickedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n kickedFrom.setHasJoined(false);\n }\n dispatch({ type: \"updateGroup\", group: kickedFrom });\n },\n onGroupMemberBanned: async (message: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group) => {\n if (bannedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n dispatch({ type: \"removeGroup\", guid: bannedFrom.getGuid() });\n }\n else {\n dispatch({ type: \"updateGroup\", group: bannedFrom });\n }\n },\n onGroupMemberUnbanned: async (message: CometChat.Action, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group) => {\n if (unbannedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n unbannedFrom.setHasJoined(false);\n dispatch({ type: \"prependGroup\", group: unbannedFrom });\n }\n },\n onGroupMemberScopeChanged: async (message: CometChat.Action, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group) => {\n if (changedUser.getUid() === (await GroupsManager.getLoggedInUser())?.getUid()) {\n changedGroup.setScope(newScope);\n }\n dispatch({ type: \"updateGroup\", group: changedGroup });\n }\n });\n }\n\n /**\n * Attaches an SDK group listener\n *\n * @returns Function to call to remove the attached SDK group listener\n */\n static attachListeners(dispatch: React.Dispatch) {\n const listenerId = \"GroupsList_\" + String(Date.now());\n CometChat.addGroupListener(listenerId, GroupsManager.createGroupListener(dispatch));\n return () => CometChat.removeGroupListener(listenerId);\n }\n /**\n* Attaches an SDK websocket listener\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnestionListener(callback: () => void) {\n const listenerId = \"GroupsList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: () => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n return () => CometChat.removeConnectionListener(listenerId);\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useEffect, useReducer, useRef } from \"react\";\nimport { CometChatOption, CometChatUIKitConstants, SelectionMode, States, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, groupsStyle, groupsWrapperStyle, listItemStyle, menusStyle, statusIndicatorStyle, subtitleStyle } from \"./style\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatCheckbox } from \"../Shared/Views/CometChatCheckbox\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatMenuList } from \"../Shared/Views/CometChatMenuList\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { GroupsManager } from \"./controller\";\nimport { GroupsStyle } from \"@cometchat/uikit-shared\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\n\ninterface IGroupsProps {\n /**\n * Custom view to render on the top-right of the component\n */\n menus?: JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"GROUPS\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.left`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholderText?: string,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Request builder to fetch groups\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupsRequestBuilder?: CometChat.GroupsRequestBuilder,\n /**\n * Request builder with search parameters to fetch groups\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupsRequestBuilder,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Custom list item view to be rendered for each group in the fetched list\n */\n listItemView?: (group: CometChat.Group) => JSX.Element,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Custom subtitle view to be rendered for each group in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (group: CometChat.Group) => JSX.Element,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (group: CometChat.Group) => CometChatOption[],\n /**\n * Selection mode to use for the default tail view\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided.\n *\n * @defaultValue `SelectionMode.none`\n */\n selectionMode?: SelectionMode,\n /**\n * Function to call when a group from the fetched list is selected\n *\n * @remarks\n * This prop is used if `selectionMode` prop is not `SelectionMode.none`\n */\n onSelect?: (group: CometChat.Group, selected: boolean) => void,\n /**\n * Function to call on click of the default list item view of a group\n */\n onItemClick?: (group: CometChat.Group) => void,\n /**\n * Group to highlight\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n activeGroup?: CometChat.Group,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_GROUPS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Hide error view\n *\n * @remarks\n * If set to true, hides the default and the custom error view\n *\n * @defaultValue `false`\n */\n hideError?: boolean,\n /**\n * Image URL for the status indicator icon in the default list item view of a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n passwordGroupIcon?: string,\n /**\n * Image URL for the status indicator icon in the default list item view of a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string,\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to this component\n */\n groupsStyle?: GroupsStyle\n};\n\ntype State = {\n searchText: string,\n groupList: CometChat.Group[],\n fetchState: States,\n isFirstReload: boolean\n};\n\nexport type Action = { type: \"appendGroups\", groups: CometChat.Group[], removeOldGroups?: boolean } |\n{ type: \"setGroupList\", groupList: CometChat.Group[] } |\n{ type: \"setFetchState\", fetchState: States } |\n{ type: \"updateGroup\", group: CometChat.Group } |\n{ type: \"removeGroup\", guid: string } |\n{ type: \"prependGroup\", group: CometChat.Group } |\n{ type: \"setSearchText\", searchText: string } |\n{ type: \"setIsFirstReload\", isFirstReload: boolean };\n\nvar stateReducer = (state: State, action: Action): State => {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"appendGroups\":\n if (action.groups.length > 0) {\n let groups: CometChat.Group[] = []\n if (action.removeOldGroups) {\n state.groupList = [];\n groups = action.groups;\n }\n else {\n groups = [...state.groupList, ...action.groups]\n }\n\n newState = { ...state, groupList: groups };\n }\n newState = { ...state, groupList: [...state.groupList, ...action.groups] };\n break;\n case \"setGroupList\":\n newState = { ...state, groupList: action.groupList };\n break;\n case \"setFetchState\":\n newState = { ...state, fetchState: action.fetchState };\n break;\n case \"updateGroup\": {\n const { groupList } = state;\n const { group: targetGroup } = action;\n const targetGuid = targetGroup.getGuid();\n const targetIdx = groupList.findIndex(group => group.getGuid() === targetGuid);\n if (targetIdx > -1) {\n newState = {\n ...state, groupList: groupList.map((group, i) => {\n return i === targetIdx ? targetGroup : group;\n })\n };\n }\n break;\n }\n case \"removeGroup\": {\n const { groupList } = state;\n const targetGuid = action.guid;\n const targetIdx = groupList.findIndex(group => group.getGuid() === targetGuid);\n if (targetIdx > -1) {\n newState = { ...state, groupList: groupList.filter((group, i) => i !== targetIdx) };\n }\n break;\n }\n case \"prependGroup\":\n newState = { ...state, groupList: [action.group, ...state.groupList] };\n break;\n case \"setSearchText\":\n newState = { ...state, searchText: action.searchText };\n break;\n case \"setIsFirstReload\":\n newState = { ...state, isFirstReload: action.isFirstReload };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a scrollable list of groups that has been created in a CometChat app\n */\nexport function CometChatGroups(props: IGroupsProps) {\n const {\n menus = null,\n title = localize(\"GROUPS\"),\n titleAlignment = TitleAlignment.left,\n searchPlaceholderText = localize(\"SEARCH\"),\n searchIconURL = SearchIcon,\n hideSearch = false,\n groupsRequestBuilder = null,\n searchRequestBuilder = null,\n onError,\n listItemView = null,\n hideSeparator = false,\n subtitleView = null,\n options = null,\n selectionMode = SelectionMode.none,\n onSelect,\n onItemClick,\n activeGroup = null,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_GROUPS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n hideError = false,\n passwordGroupIcon = LockedIcon,\n privateGroupIcon = PrivateIcon,\n statusIndicatorStyle: statusIndicatorStyleObject,\n avatarStyle: avatarStyleObject,\n listItemStyle: listItemStyleObject,\n groupsStyle: groupsStyleObject\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n searchText: \"\",\n groupList: [],\n fetchState: States.loading,\n isFirstReload: false\n });\n const groupsManagerRef = useRef(null);\n const fetchNextIdRef = useRef(\"\");\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n const attachListenerOnFetch = useRef(false);\n const isConnectionReestablished = useRef(false);\n const groupsSearchText = useRef(\"\");\n\n \n\n (() => {\n if (state.searchText !== groupsSearchText.current && state.searchText.trim().length > 0 && state.searchText.trim().length == state.searchText.length) {\n groupsSearchText.current = state.searchText;\n }\n if (state.isFirstReload) {\n attachListenerOnFetch.current = true;\n state.isFirstReload = false;\n }\n })();\n\n /**\n * Updates the `searchText` state\n */\n const onSearch = useCallback((searchText: string): void => {\n const trimmedText = searchText.trim();\n if (searchText.length === 0 || (trimmedText.length === searchText.length && trimmedText.length > 0)) {\n groupsSearchText.current = \"\" \n dispatch({ type: \"setSearchText\", searchText }); \n }\n }, [dispatch]);\n\n /**\n * Initiates a fetch request and appends the fetched groups to the `groupList` state\n *\n * @remarks\n * This function also updates the `fetchState` state\n *\n * @param fetchId - Fetch Id to decide if the fetched data should be appended to the `groupList` state\n */\n const fetchNextAndAppendGroups = useCallback(async (fetchId: string): Promise => {\n const groupsManager = groupsManagerRef.current;\n if (!groupsManager) {\n return;\n }\n let initialState = isConnectionReestablished.current ? States.loaded : States.loading\n dispatch({ type: \"setFetchState\", fetchState: initialState });\n try {\n const groups = await groupsManager.fetchNext();\n if (fetchId !== fetchNextIdRef.current) {\n return;\n }\n if (groups.length !== 0) {\n let removeOldGroups = isConnectionReestablished.current ? true : false;\n dispatch({ type: \"appendGroups\", groups, removeOldGroups });\n }\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n if (attachListenerOnFetch.current) {\n GroupsManager.attachConnestionListener(() => {\n const requestBuilder = groupsRequestBuilder === null ? new CometChat.GroupsRequestBuilder().setLimit(30) : groupsRequestBuilder;\n groupsManagerRef.current = new GroupsManager({ searchText: groupsSearchText.current, groupsRequestBuilder: requestBuilder, searchRequestBuilder,groupsSearchText });\n isConnectionReestablished.current = true;\n });\n attachListenerOnFetch.current = false;\n\n }\n if (!isConnectionReestablished.current) {\n dispatch({ type: \"setFetchState\", fetchState: States.loaded });\n }\n else {\n isConnectionReestablished.current = false;\n }\n }\n catch (error: unknown) {\n if (fetchId === fetchNextIdRef.current && state.groupList?.length <= 0) {\n dispatch({ type: \"setFetchState\", fetchState: States.error });\n }\n errorHandler(error);\n }\n }, [errorHandler, dispatch]);\n\n /**\n * Creates menus to display at the top-right of this component\n */\n function getMenus(): JSX.Element | null {\n if (menus === null) {\n return menus;\n }\n return (\n \n {menus}\n \n );\n }\n\n /**\n * Get a status icon based on the `group` passed to it\n */\n function getGroupStatusIcon(group: CometChat.Group): string {\n let statusIconURL: string = \"\";\n switch (group.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n statusIconURL = passwordGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n statusIconURL = privateGroupIcon;\n break;\n }\n return statusIconURL;\n }\n\n /**\n * Creates a subtitle view for the default list item view\n */\n function getSubtitleView(group: CometChat.Group): JSX.Element {\n if (subtitleView !== null) {\n return subtitleView(group);\n }\n const membersCount = group.getMembersCount();\n return (\n \n {`${membersCount} ${membersCount > 1 ? localize(\"MEMBERS\") : localize(\"MEMBER\")}`}\n \n );\n }\n\n /**\n * Creates a menu view for the default list item view\n *\n * @remarks\n * This menu view is shown on mouse over the default list item view.\n * The visibility of view is handled by the default list item view\n */\n function getMenuView(group: CometChat.Group): JSX.Element | null {\n let curOptions: CometChatOption[] | undefined;\n if (!(curOptions = options?.(group))?.length) {\n return null;\n }\n return (\n e.detail.data.onClick?.()}\n />\n );\n }\n\n /**\n * Creates a tail view for the default list item view\n */\n function getTailView(group: CometChat.Group): JSX.Element | null | undefined {\n switch (selectionMode) {\n case SelectionMode.none:\n return null;\n case SelectionMode.single: {\n return (\n onSelect?.(group, e.detail.checked)}\n />\n );\n }\n case SelectionMode.multiple: {\n return (\n onSelect?.(group, e.detail.checked)}\n />\n );\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = selectionMode;\n }\n }\n }\n\n /**\n * Get the status indicator color to use for the default list item view\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(group: CometChat.Group): string | null {\n switch (group.getType()) {\n case CometChatUIKitConstants.GroupTypes.private:\n return groupsStyleObject?.privateGroupIconBackground || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n case CometChatUIKitConstants.GroupTypes.password:\n return groupsStyleObject?.passwordGroupIconBackground || \"rgb(247, 165, 0)\";\n default:\n return null;\n }\n }\n\n /**\n * Creates `listItem` prop of the `CometChatList` component\n */\n function getListItem(): (group: CometChat.Group) => JSX.Element {\n if (listItemView !== null) {\n return listItemView;\n }\n return function (group: CometChat.Group) {\n return (\n onItemClick?.(group)}\n />\n );\n };\n }\n\n Hooks({\n searchText: state.searchText,\n groupsRequestBuilder,\n searchRequestBuilder,\n fetchNextIdRef,\n groupsManagerRef,\n dispatch,\n fetchNextAndAppendGroups,\n groupsSearchText\n });\n\n return (\n \n {getMenus()}\n fetchNextAndAppendGroups(fetchNextIdRef.current = \"onScrolledToBottom_\" + String(Date.now()))}\n listItemKey=\"getGuid\"\n showSectionHeader={false}\n state={state.fetchState === States.loaded && state.groupList.length === 0 ? States.empty : state.fetchState}\n loadingIconURL={loadingIconURL}\n loadingView={loadingStateView}\n emptyStateText={emptyStateText}\n emptyStateView={emptyStateView}\n errorStateText={errorStateText}\n errorStateView={errorStateView}\n hideError={hideError}\n listStyle={groupsStyle(groupsStyleObject, theme)}\n />\n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\nimport { CometChatGroupEvents, CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility } from \"@cometchat/uikit-shared\";\nimport { Action } from \".\";\nimport { GroupsManager } from \"./controller\";\n\ntype Args = {\n groupsRequestBuilder : CometChat.GroupsRequestBuilder | null,\n searchRequestBuilder : CometChat.GroupsRequestBuilder | null,\n searchText: string,\n fetchNextIdRef : React.MutableRefObject,\n groupsManagerRef : React.MutableRefObject,\n dispatch : React.Dispatch,\n fetchNextAndAppendGroups : (fetchId : string) => Promise,\n groupsSearchText:React.MutableRefObject\n};\n\nexport function Hooks(args : Args) {\n const {\n groupsRequestBuilder,\n searchRequestBuilder,\n searchText,\n fetchNextIdRef,\n groupsManagerRef,\n dispatch,\n fetchNextAndAppendGroups,\n groupsSearchText\n } = args;\n\n useEffect(() => {\n if(groupsRequestBuilder?.searchKeyword){\n groupsSearchText.current = groupsRequestBuilder?.searchKeyword;\n }else if(searchRequestBuilder?.searchKeyword){\n groupsSearchText.current = searchRequestBuilder?.searchKeyword;\n }\n }, []);\n\n useEffect(\n /**\n * Creates a new request builder -> empties the `groupList` state -> initiates a new fetch\n */\n () => {\n dispatch({ type: \"setIsFirstReload\", isFirstReload: true });\n dispatch({type: \"setGroupList\", groupList: []});\n groupsManagerRef.current = new GroupsManager({searchText, groupsRequestBuilder, searchRequestBuilder,groupsSearchText});\n fetchNextAndAppendGroups(fetchNextIdRef.current = \"initialFetch_\" + String(Date.now()));\n }, [fetchNextAndAppendGroups, groupsRequestBuilder, searchRequestBuilder, searchText, dispatch, fetchNextIdRef, groupsManagerRef,groupsSearchText]);\n\n useEffect(\n /**\n * Attaches an SDK group listener\n *\n * @returns - Function to remove the added SDK group listener\n */\n () => {\n return GroupsManager.attachListeners(dispatch);\n }, [dispatch]);\n\n useEffect(\n /**\n * Subscribes to Group UI events\n */\n () => {\n const groupCreatedSub = CometChatGroupEvents.ccGroupCreated.subscribe((group : CometChat.Group) => {\n dispatch({type: \"prependGroup\", group: CometChatUIKitUtility.clone(group)});\n });\n const groupDeletedSub = CometChatGroupEvents.ccGroupDeleted.subscribe((group : CometChat.Group) => {\n dispatch({type: \"removeGroup\", guid: group.getGuid()});\n });\n const groupMemberJoinedSub = CometChatGroupEvents.ccGroupMemberJoined.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: CometChatUIKitUtility.clone(item.joinedGroup)});\n });\n const groupMemberKickedSub = CometChatGroupEvents.ccGroupMemberKicked.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: CometChatUIKitUtility.clone(item.kickedFrom)});\n });\n const groupMemberLeftSub = CometChatGroupEvents.ccGroupLeft.subscribe((item) => {\n if (item.leftGroup.getType() === CometChatUIKitConstants.GroupTypes.private) {\n dispatch({type: \"removeGroup\", guid: item.leftGroup.getGuid()});\n }\n else {\n dispatch({type: \"updateGroup\", group: item.leftGroup});\n }\n });\n const groupMemberBannedSub = CometChatGroupEvents.ccGroupMemberBanned.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.kickedFrom});\n });\n const groupMemberAddedSub = CometChatGroupEvents.ccGroupMemberAdded.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.userAddedIn});\n });\n const groupOwnershipChangedSub = CometChatGroupEvents.ccOwnershipChanged.subscribe((item) => {\n dispatch({type: \"updateGroup\", group: item.group});\n });\n return () => {\n groupCreatedSub.unsubscribe();\n groupDeletedSub.unsubscribe();\n groupMemberJoinedSub.unsubscribe();\n groupMemberKickedSub.unsubscribe();\n groupMemberLeftSub.unsubscribe();\n groupMemberBannedSub.unsubscribe();\n groupMemberAddedSub.unsubscribe();\n groupOwnershipChangedSub.unsubscribe();\n };\n }, [dispatch]);\n}\n","import {\n BaseStyle,\n ContactsStyle,\n GroupsConfiguration,\n TabItemStyle,\n UsersConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatTabItem,\n CometChatTheme,\n SelectionMode,\n TabAlignment,\n TabsVisibility,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n closeBtnStyle,\n contactsContentStyle,\n contactsHeaderStyle,\n getContactsStyle,\n contactsWrapperStyle,\n getTabsStyle,\n getTabItemStyling,\n submitBtnStyle,\n submitBtnWrapperStyle,\n} from \"./style\";\n\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroups } from \"../CometChatGroups\";\nimport { CometChatTabs } from \"../Shared/Views/CometChatTabs/index\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { useContext, useRef } from \"react\";\nimport React from \"react\";\n\ninterface ContactsProps {\n title?: string;\n usersTabTitle?: string;\n groupsTabTitle?: string;\n usersConfiguration?: UsersConfiguration;\n groupsConfiguration?: GroupsConfiguration;\n onSubmitButtonClick?: (users? : CometChat.User[],groups?:CometChat.Group[]) => void,\n closeIconURL?: string;\n onClose?: () => void;\n onItemClick?: (user?: CometChat.User, group?: CometChat.Group) => void;\n onError: ((error: CometChat.CometChatException) => void) | null;\n submitButtonText?: string,\n hideSubmitButton?: boolean,\n selectionLimit?: number,\n tabVisibility?: TabsVisibility;\n contactsStyle: ContactsStyle;\n selectionMode?:SelectionMode;\n}\n\nconst defaultProps: ContactsProps = {\n title: localize(\"NEW_CHAT\"),\n usersTabTitle: localize(\"USERS\"),\n groupsTabTitle: localize(\"GROUPS\"),\n groupsConfiguration: new GroupsConfiguration({}),\n usersConfiguration: new UsersConfiguration({}),\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n tabVisibility: TabsVisibility.usersAndGroups,\n contactsStyle: {},\n selectionLimit : 5,\n hideSubmitButton : true,\n submitButtonText : \"Submit\",\n selectionMode : SelectionMode.none\n};\n\nconst CometChatContacts = (props: ContactsProps) => {\n const [tabs, setTabs] = React.useState([]);\n const groupsListRef = useRef([]);\n const usersListRef = useRef([]);\n const [isActiveUsersTab, setIsActiveUsersTab] = React.useState(true);\n const [isLimitReached, setIsLimitReached] = React.useState(true);\n const [isActiveGroupsTab, setIsActiveGroupsTab] = React.useState(false);\n const usersTabRef = React.useRef();\n const groupsTabRef = React.useRef();\n const { theme } = useContext(CometChatThemeContext);\n const {\n title,\n usersTabTitle,\n groupsTabTitle,\n closeIconURL,\n onClose,\n usersConfiguration,\n groupsConfiguration,\n onItemClick,\n tabVisibility,\n contactsStyle,\n selectionLimit,\n hideSubmitButton,\n submitButtonText,\n selectionMode,\n onSubmitButtonClick\n } = props;\n\n React.useEffect(() => {\n\n const usersRequestBuilder = new CometChat.UsersRequestBuilder()\n .setLimit(30)\n .hideBlockedUsers(true);\n const usersSearchRequestBuilder = new CometChat.UsersRequestBuilder()\n .setLimit(30)\n .hideBlockedUsers(true);\n \n const groupsRequestBuilder = new CometChat.GroupsRequestBuilder()\n .setLimit(30)\n .joinedOnly(true);\n const groupsSearchRequestBuilder = new CometChat.GroupsRequestBuilder()\n .setLimit(30)\n .joinedOnly(true);\n\n usersTabRef.current = new CometChatTabItem({\n id: \"users\",\n title: usersTabTitle,\n style: getTabItemStyling(contactsStyle,theme, tabVisibility, isActiveUsersTab),\n childView: (\n //
    \n \n //
    \n ),\n isActive: isActiveUsersTab,\n });\n\n groupsTabRef.current = new CometChatTabItem({\n id: \"groups\",\n title: groupsTabTitle,\n style: getTabItemStyling(contactsStyle,theme, tabVisibility, isActiveGroupsTab),\n childView: (\n \n ),\n isActive: isActiveGroupsTab,\n });\n\n setTabs([usersTabRef.current, groupsTabRef.current]);\n\n }, []);\n\n React.useEffect(() => {\n\n if (tabVisibility === TabsVisibility.groups) {\n setIsActiveGroupsTab(true);\n setIsActiveUsersTab(false);\n setTabs([groupsTabRef.current!]);\n } else if (tabVisibility === TabsVisibility.users) {\n setIsActiveGroupsTab(false);\n setIsActiveUsersTab(true);\n setTabs([usersTabRef.current!]);\n } else if (tabVisibility === TabsVisibility.usersAndGroups) {\n setIsActiveGroupsTab(false);\n setIsActiveUsersTab(true);\n setTabs([usersTabRef.current!, groupsTabRef.current!]);\n }\n\n }, [tabVisibility])\n\n const onUserClicked = (user: CometChat.User) => {\n if (onItemClick) {\n onItemClick(user, undefined);\n }\n };\n\n const onGroupClicked = (group: CometChat.Group) => {\n if (onItemClick) {\n onItemClick(undefined, group);\n }\n };\n\n const submitClicked = () => {\n if (onSubmitButtonClick) {\n onSubmitButtonClick(usersListRef.current, groupsListRef.current);\n }\n };\n\n\n const onGroupSelected = (group: CometChat.Group) => {\n var key = groupsListRef.current.findIndex((m: any) => m?.getGuid() === group.getGuid());\n if (key >= 0) {\n groupsListRef.current.splice(key, 1);\n } else {\n groupsListRef.current.push(group);\n }\n setIsLimitReached((usersListRef.current.length + groupsListRef.current.length) > selectionLimit!)\n\n };\n const onUserSelected = (user: CometChat.User) => {\n var key = usersListRef.current.findIndex((m: any) => m?.getUid() === user.getUid());\n if (key >= 0) {\n usersListRef.current.splice(key, 1);\n } else {\n usersListRef.current.push(user);\n }\n\n setIsLimitReached((usersListRef.current.length + groupsListRef.current.length) > selectionLimit!)\n };\n\n\n function getCloseBtnView() {\n if (closeIconURL === \"\") return <>;\n return (\n \n );\n }\n function submitBtnView() {\n if ((selectionMode === SelectionMode.none && hideSubmitButton)) return <>;\n return (\n
    \n \n
    \n );\n }\n\n return tabs.length ? (\n
    \n
    \n
    {title}
    \n
    \n \n {getCloseBtnView()}\n
    \n {submitBtnView()}\n
    \n
    \n ) : <>;\n};\n\nCometChatContacts.defaultProps = defaultProps;\nexport { CometChatContacts };\n","import {\n DetailsConfiguration,\n DetailsStyle,\n MessageComposerConfiguration,\n MessageComposerStyle,\n MessageHeaderConfiguration,\n MessageHeaderStyle,\n MessageListConfiguration,\n MessageListStyle,\n MessagesStyle,\n} from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\nimport { CometChatTheme } from \"@cometchat/uikit-resources\";\n\nexport const MessagesWrapperStyle = (\n messagesStyle: MessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n display: \"flex\",\n position: \"relative\",\n width: messagesStyle?.width || \"100%\",\n height: messagesStyle?.height || \"100%\",\n border: messagesStyle?.border || \"0 none\",\n borderRadius: messagesStyle?.borderRadius || \"inherit\",\n background: messagesStyle?.background || theme.palette.getBackground(),\n } as CSSProperties;\n};\n\nexport const MessagesDivStyle = () => {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n position: \"relative\",\n boxSizing: \"border-box\",\n justifyContent: \"space-between\",\n borderRadius: \"inherit\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesDivStyle = {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n height: \"100%\",\n width: \"100%\",\n maxHeight: \"100%\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n maxWidth: \"100%\",\n zIndex: \"1\",\n} as CSSProperties;\n\nexport const MessagesDetailsDivStyle = {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n height: \"100%\",\n width: \"100%\",\n maxHeight: \"100%\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n maxWidth: \"100%\",\n zIndex: \"1\",\n borderRadius: \"inherit\",\n} as CSSProperties;\n\nexport const MessagesHeaderDivStyle = {\n // height: \"60px\",\n width: \"100%\",\n borderRadius: \"inherit\",\n} as CSSProperties;\n\nexport const MessagesListDivStyle = {\n // height: \"calc(100% - 160px\",\n height: \"100%\",\n width: \"100%\",\n overflow: \"hidden\",\n} as CSSProperties;\n\nexport const CometChatThreadedMessagesDivStyle = {\n height: \"100%\",\n display: \"flex\",\n} as CSSProperties;\n\nexport const MessagesComposerDivStyle = (theme: CometChatTheme) => {\n return {\n // height: \"96px\",\n width: \"100%\",\n display: \"flex\",\n } as CSSProperties;\n};\n\nexport const liveReactionStyle = () => {\n return {\n position: \"absolute\",\n bottom: \"50px\",\n right: \"20px\",\n width: \"50%\",\n height: \"100%\",\n } as CSSProperties;\n};\n\nexport const getMessageHeaderStyle = (\n messageHeaderConfiguration: MessageHeaderConfiguration | undefined\n) => {\n return {\n border: \"0 none\",\n background: \"inherit\",\n borderRadius: \"inherit\",\n ...messageHeaderConfiguration?.messageHeaderStyle,\n } as MessageHeaderStyle;\n};\n\nexport const getMessageListStyle = (\n messageListConfiguration: MessageListConfiguration | undefined\n) => {\n return {\n ...{\n border: \"0 none\",\n background: \"inherit\",\n borderRadius: \"inherit\",\n }, ...messageListConfiguration?.messageListStyle\n } as MessageListStyle;\n};\n\nexport const getMessageComposerStyle = (\n messageComposerConfiguration: MessageComposerConfiguration | undefined\n) => {\n return {\n ...messageComposerConfiguration?.messageComposerStyle,\n } as MessageComposerStyle;\n};\n\nexport const getDetailsStyle = (\n detailsConfiguration: DetailsConfiguration | undefined,\n messagesStyle: MessagesStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n // border: \"0 none\",\n // background: theme.palette.getBackground(),\n // borderRadius: \"inherit\",\n ...detailsConfiguration?.detailsStyle,\n } as DetailsStyle;\n};\n\nexport function detailsButtonStyle(theme: CometChatTheme) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getPrimary(),\n padding: 0,\n };\n}\n\n\nexport const panelDivStyle = {\n position: \"absolute\",\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n width: \"100%\",\n justifyContent: \"center\",\n zIndex: 1000,\n overflow: \"hidden\",\n} as React.CSSProperties;\n","import { AvatarStyle, BackdropStyle, BaseStyle, ConfirmDialogStyle, LabelStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties } from \"react\";\nimport { CometChatDetailsOption, CometChatDetailsTemplate, CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { AddMembersConfiguration, AddMembersStyle, BannedMembersConfiguration, BannedMembersStyle, DetailsStyle, GroupMembersConfiguration, GroupMembersStyle, TransferOwnershipConfiguration, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string, buttonTextFont? : string, buttonTextColor? : string};\n\nexport function detailsStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : CSSProperties {\n \n return {\n boxSizing: \"border-box\",\n width: detailsStyleObject?.width || \"100%\",\n height: detailsStyleObject?.height || \"100%\",\n border: detailsStyleObject?.border || \"none\",\n borderRadius: detailsStyleObject?.borderRadius || \"0\",\n background: detailsStyleObject?.background || theme.palette.getBackground(),\n position: \"relative\",\n padding: \"19px\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowY: \"auto\",\n overflowX: \"hidden\"\n };\n}\n\nexport function detailsContentWrapperStyle(detailsStyleObject : DetailsStyle | null) : CSSProperties {\n return {\n // padding: detailsStyleObject?.padding || \"0\",\n flexGrow: \"1\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowY: \"auto\"\n };\n}\n\nexport function headerStyle() : CSSProperties {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n width: '100%',\n paddingBottom: \"19px\"\n };\n}\n\nexport function profileStyle() : CSSProperties {\n return {\n overflowX: \"auto\"\n };\n}\n\nexport function titleStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : LabelStyle {\n return {\n background: \"inherit\",\n textFont: detailsStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n textColor: detailsStyleObject?.titleTextColor || theme.palette.getAccent()\n } as LabelStyle\n}\n\nexport function closeBtnStyle(detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n width: \"24px\",\n height: \"24px\",\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: detailsStyleObject?.closeButtonIconTint || theme.palette.getPrimary(),\n position: \"absolute\",\n right: \"12px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, theme : CometChatTheme) : ListItemStyle {\n return {\n width: listItemStyleObject?.width || \"100%\",\n height: listItemStyleObject?.height || \"fit-content\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || \"inherit\",\n activeBackground: listItemStyleObject?.activeBackground || \"transparent\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"transparent\",\n separatorColor: listItemStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent()\n };\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null, theme : CometChatTheme) : CSSProperties {\n const obj = statusIndicatorStyleObject ?? {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return {\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || \"none\",\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n };\n}\n\nexport function subtitleStyle(isUserOnline : boolean, detailsStyleObject : DetailsStyle | null, theme : CometChatTheme) : LabelStyle {\n return {\n background: \"inherit\",\n textFont: detailsStyleObject?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n textColor: isUserOnline ? theme.palette.getPrimary() : detailsStyleObject?.subtitleTextColor\n };\n}\n\nexport function sectionListStyle() : CSSProperties {\n return {\n flexGrow: \"1\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n padding: \"28px 0\"\n // rowGap: \"32px\"\n };\n}\n\nexport function sectionHeaderWrapperStyle() : CSSProperties {\n return {\n textAlign: 'left'\n };\n}\n\nexport function sectionHeaderStyle(template : CometChatDetailsTemplate) : LabelStyle {\n\n return {\n background: \"inherit\",\n textFont: template.titleFont,\n textColor: template.titleColor,\n };\n}\n\nexport function optionsStyle() : CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n // rowGap: \"8px\"\n };\n}\n\nexport function optionBtnStyle(option : CometChatDetailsOption) : ButtonStyle {\n\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n buttonTextFont: option.titleFont,\n buttonTextColor: option.titleColor,\n backgroundColor: option.backgroundColor || \"inherit\",\n buttonIconTint: option.iconTint,\n padding: '18px 0 16px 0'\n };\n}\n\nexport function defaultOptionContentStyle() : CSSProperties {\n return {\n position: \"relative\"\n };\n}\n\nexport function tailWrapperStyle() : CSSProperties {\n return {\n position: \"absolute\", \n right: \"8px\", \n top: \"50%\", \n transform: \"translateY(-50%)\"\n };\n}\n\nexport function defaultOptionStyle() : CSSProperties {\n return {\n display: \"flex\", \n flexDirection: \"column\", \n // rowGap: \"4px\"\n };\n}\n\nexport function pageWrapperStyle() : CSSProperties {\n return {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n boxSizing: \"border-box\",\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"inherit\"\n };\n}\n\nexport function backdropStyle(backdropStyleObject : BaseStyle | null, detailsStyle: DetailsStyle | null) : BackdropStyle {\n return {\n background: 'rgba(0, 0, 0, 0.5)',\n position: 'absolute',\n width: detailsStyle?.width,\n height: detailsStyle?.height,\n ...backdropStyleObject,\n };\n}\n\nexport function leaveDialogStyle(confirmDialogStyleObject : ConfirmDialogStyle | null, detailsStyle: DetailsStyle | null, theme : CometChatTheme) : ConfirmDialogStyle {\n return {\n confirmButtonBackground: confirmDialogStyleObject?.confirmButtonBackground || theme.palette.getPrimary(),\n cancelButtonBackground: confirmDialogStyleObject?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: confirmDialogStyleObject?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: confirmDialogStyleObject?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: confirmDialogStyleObject?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: confirmDialogStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: confirmDialogStyleObject?.titleFont || fontHelper(theme.typography.title1),\n titleColor: confirmDialogStyleObject?.titleColor || theme.palette.getAccent(),\n messageTextFont: confirmDialogStyleObject?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: confirmDialogStyleObject?.messageTextColor || theme.palette.getAccent600(),\n background: confirmDialogStyleObject?.background || detailsStyle?.background || theme.palette.getBackground(),\n width: confirmDialogStyleObject?.width || \"320px\",\n height: confirmDialogStyleObject?.height || \"100%\",\n border: confirmDialogStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: confirmDialogStyleObject?.borderRadius || \"8px\",\n boxShadow: confirmDialogStyleObject?.boxShadow\n }\n}\n\nexport function deleteDialogStyle(confirmDialogStyleObject : ConfirmDialogStyle | null, theme : CometChatTheme) : ConfirmDialogStyle {\n return {\n confirmButtonBackground: confirmDialogStyleObject?.confirmButtonBackground || theme.palette.getError(),\n cancelButtonBackground: confirmDialogStyleObject?.cancelButtonBackground || theme.palette.getSecondary(),\n confirmButtonTextColor: confirmDialogStyleObject?.confirmButtonTextColor || theme.palette.getAccent900(\"light\"),\n confirmButtonTextFont: confirmDialogStyleObject?.confirmButtonTextFont || fontHelper(theme.typography.text2),\n cancelButtonTextColor: confirmDialogStyleObject?.cancelButtonTextColor || theme.palette.getAccent900(\"dark\"),\n cancelButtonTextFont: confirmDialogStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.text2),\n titleFont: confirmDialogStyleObject?.titleFont || fontHelper(theme.typography.title1),\n titleColor: confirmDialogStyleObject?.titleColor || theme.palette.getAccent(),\n messageTextFont: confirmDialogStyleObject?.messageTextFont || fontHelper(theme.typography.subtitle2),\n messageTextColor: confirmDialogStyleObject?.messageTextColor || theme.palette.getAccent600(),\n background: confirmDialogStyleObject?.background || theme.palette.getBackground(),\n width: confirmDialogStyleObject?.width || \"320px\",\n height: confirmDialogStyleObject?.height || \"100%\",\n border: confirmDialogStyleObject?.border || `1px solid ${theme.palette.getAccent200()}`,\n borderRadius: confirmDialogStyleObject?.borderRadius || \"8px\",\n boxShadow: confirmDialogStyleObject?.boxShadow\n }\n}\n\nexport function dividerStyle(separatorColor : string | undefined, isSectionSeparatorStyle : boolean, theme : CometChatTheme) : BaseStyle {\n return {\n width: \"100%\",\n height: (isSectionSeparatorStyle ? \"2\" : \"1\") + \"px\",\n background: separatorColor || theme.palette.getAccent200()\n };\n}\n\nexport const getSectionStyle = () => {\n return {\n padding: '16px 0'\n }\n}\n\nexport const getGroupMembersStyle = (groupMembersConfiguration: GroupMembersConfiguration | null, detailsStyle: DetailsStyle | null) : GroupMembersStyle => {\n\n const groupMembersStyle = groupMembersConfiguration?.groupMembersStyle;\n\n return {\n background: groupMembersStyle?.background || detailsStyle?.background,\n ...groupMembersStyle\n };\n}\n\nexport const getAddMembersStyle = (addMembersConfiguration: AddMembersConfiguration | null, detailsStyle: DetailsStyle | null) : AddMembersStyle => {\n\n const addMembersStyle = addMembersConfiguration?.addMembersStyle;\n return {\n background: addMembersStyle?.background || detailsStyle?.background,\n ...addMembersStyle\n }\n}\n\nexport const getBannedMembersStyle = (bannedMembersConfiguration: BannedMembersConfiguration | null, detailsStyle: DetailsStyle | null) : BannedMembersStyle => {\n\n const bannedMembersStyle = bannedMembersConfiguration?.bannedMembersStyle;\n return {\n background: bannedMembersStyle?.background || detailsStyle?.background,\n ...bannedMembersStyle\n }\n}\n\nexport const getTransferOwnershipStyle = (transferOwnershipConfiguration: TransferOwnershipConfiguration | null, detailsStyle: DetailsStyle | null) : TransferOwnershipStyle => {\n const transferOwnershipStyle = transferOwnershipConfiguration?.transferOwnershipStyle;\n return {\n background: transferOwnershipStyle?.background || detailsStyle?.background,\n ...transferOwnershipStyle\n }\n}","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, LabelStyle, ListItemStyle, RadioButtonStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { GroupMembersStyle, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\n\nimport { CSSProperties } from \"react\";\n\ntype ButtonStyle = CSSProperties & {buttonIconTint? : string};\n\nexport function transferOwnershipStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : CSSProperties {\n return {\n boxSizing: \"border-box\",\n width: transferOwnershipStyleObject?.width || \"max(100%, 360px)\",\n height: transferOwnershipStyleObject?.height || \"100%\",\n border: transferOwnershipStyleObject?.border || \"none\",\n borderRadius: transferOwnershipStyleObject?.borderRadius || \"8px\",\n background: transferOwnershipStyleObject?.background || theme.palette.getBackground(),\n display: \"flex\",\n flexDirection: \"column\",\n };\n}\n\nexport function scopeLabelStyle(\n transferOwnershipStyleObject: TransferOwnershipStyle | null,\n theme: CometChatTheme,\n isRadioButton: boolean\n): LabelStyle {\n const style: RadioButtonStyle | LabelStyle = {\n height: \"14px\",\n width: \"14px\",\n border: \"none\",\n borderRadius: \"4px\",\n background: \"inherit\",\n };\n\n if (isRadioButton) {\n return new RadioButtonStyle({\n ...style,\n labelTextColor:\n transferOwnershipStyleObject?.MemberScopeTextColor ||\n theme.palette.getAccent600(),\n labelTextFont:\n transferOwnershipStyleObject?.MemberScopeTextFont ||\n fontHelper(theme.typography.text2),\n });\n } else {\n return new LabelStyle({\n ...style,\n textColor:\n transferOwnershipStyleObject?.MemberScopeTextColor ||\n theme.palette.getAccent600(),\n textFont:\n transferOwnershipStyleObject?.MemberScopeTextFont ||\n fontHelper(theme.typography.text2),\n });\n }\n}\n\nexport function transferBtnStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : ButtonStyle {\n \n return {\n width: \"100%\",\n background: theme.palette.getPrimary(),\n padding: \"16px\",\n buttonTextColor: transferOwnershipStyleObject?.transferButtonTextColor || theme.palette.getAccent900(),\n buttonTextFont: transferOwnershipStyleObject?.transferButtonTextFont || fontHelper(theme.typography.title2),\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n border: \"none\",\n borderRadius: \"8px\"\n } as ButtonStyle ;\n}\n\nexport function btnsWrapperStyle() : CSSProperties {\n return {\n flexShrink: \"0\",\n display: \"flex\",\n flexDirection: \"column\",\n rowGap: \"8px\",\n padding: '4px 28px 20px 28px',\n boxSizing: 'border-box'\n };\n}\n\nexport function cancelBtnStyle(transferOwnershipStyleObject : TransferOwnershipStyle | null, theme : CometChatTheme) : ButtonStyle {\n return {\n width: \"100%\",\n background: '#f1f1f1',\n padding: \"16px\",\n color: transferOwnershipStyleObject?.cancelButtonTextColor || theme.palette.getAccent(),\n font: transferOwnershipStyleObject?.cancelButtonTextFont || fontHelper(theme.typography.title2),\n display: \"flex\",\n justifyContent: \"center\",\n textAlign: \"center\",\n border: \"0 none\",\n borderRadius: \"8px\"\n };\n} \n\nexport function avatarStyle(avatarStyleObject : AvatarStyle | null, theme : CometChatTheme) : AvatarStyle {\n return new AvatarStyle({\n borderRadius: avatarStyleObject?.borderRadius || \"24px\",\n width: avatarStyleObject?.width || \"36px\",\n height: avatarStyleObject?.height || \"36px\",\n border: avatarStyleObject?.border || `1px solid ${theme.palette.getAccent100()}`,\n backgroundColor: avatarStyleObject?.backgroundColor || theme.palette.getAccent700(),\n nameTextColor: avatarStyleObject?.nameTextColor || theme.palette.getAccent900(),\n backgroundSize: avatarStyleObject?.backgroundSize || \"cover\",\n nameTextFont: avatarStyleObject?.nameTextFont || fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: avatarStyleObject?.outerViewBorderWidth || \"0\",\n outerViewBorderRadius: avatarStyleObject?.outerViewBorderRadius || \"0\",\n outerViewBorderColor: avatarStyleObject?.outerViewBorderColor || \"\",\n outerViewBorderSpacing: avatarStyleObject?.outerViewBorderSpacing || \"0\"\n });\n}\n\nexport function statusIndicatorStyle(statusIndicatorStyleObject : CSSProperties | null) : CSSProperties {\n const obj = statusIndicatorStyleObject !== null ? statusIndicatorStyleObject : {};\n \n return {\n ...obj,\n width: statusIndicatorStyleObject?.width || \"12px\",\n height: statusIndicatorStyleObject?.height || \"12px\",\n border: statusIndicatorStyleObject?.border || \"none\",\n borderRadius: statusIndicatorStyleObject?.borderRadius || \"24px\"\n };\n}\n\nexport function listItemStyle(listItemStyleObject : ListItemStyle | null, groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : ListItemStyle {\n return new ListItemStyle({\n height: listItemStyleObject?.height || \"45px\",\n width: listItemStyleObject?.width || \"100%\",\n border: listItemStyleObject?.border || \"none\",\n borderRadius: listItemStyleObject?.borderRadius || \"0\",\n background: listItemStyleObject?.background || theme.palette.getBackground(),\n activeBackground: listItemStyleObject?.activeBackground || \"\",\n hoverBackground: listItemStyleObject?.hoverBackground || \"\",\n separatorColor: listItemStyleObject?.separatorColor || groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n titleFont: listItemStyleObject?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyleObject?.titleColor || theme.palette.getAccent() \n });\n}\n\nexport function groupMembersStyle(groupMemberStyleObject : GroupMembersStyle | null, theme : CometChatTheme) : GroupMembersStyle {\n return new GroupMembersStyle({\n height: groupMemberStyleObject?.height || \"100%\",\n width: groupMemberStyleObject?.width || \"100%\",\n border: groupMemberStyleObject?.border || \"none\",\n borderRadius: groupMemberStyleObject?.borderRadius || \"inherit\",\n background: groupMemberStyleObject?.background || 'inherit',\n titleTextFont: groupMemberStyleObject?.titleTextFont || fontHelper(theme.typography.title1),\n titleTextColor: groupMemberStyleObject?.titleTextColor || theme.palette.getAccent(),\n emptyStateTextFont: groupMemberStyleObject?.emptyStateTextFont || \"\",\n emptyStateTextColor: groupMemberStyleObject?.emptyStateTextColor || \"\",\n errorStateTextFont: groupMemberStyleObject?.errorStateTextFont || \"\", \n errorStateTextColor: groupMemberStyleObject?.errorStateTextColor || \"\", \n loadingIconTint: groupMemberStyleObject?.loadingIconTint || \"\", \n searchIconTint: groupMemberStyleObject?.searchIconTint || \"\", \n searchBorder: groupMemberStyleObject?.searchBorder || \"\", \n searchBorderRadius: groupMemberStyleObject?.searchBorderRadius || \"\", \n searchBackground: groupMemberStyleObject?.searchBackground || \"\", \n searchPlaceholderTextFont: groupMemberStyleObject?.searchPlaceholderTextFont || \"\", \n searchPlaceholderTextColor: groupMemberStyleObject?.searchPlaceholderTextColor || \"\", \n searchTextFont: groupMemberStyleObject?.searchTextFont || \"\", \n searchTextColor: groupMemberStyleObject?.searchTextColor || \"\",\n onlineStatusColor: groupMemberStyleObject?.onlineStatusColor || theme.palette.getSuccess(),\n backButtonIconTint: groupMemberStyleObject?.backButtonIconTint || theme.palette.getPrimary(),\n closeButtonIconTint: groupMemberStyleObject?.closeButtonIconTint || theme.palette.getPrimary(),\n padding: groupMemberStyleObject?.padding || \"0\",\n separatorColor: groupMemberStyleObject?.separatorColor || theme.palette.getAccent200(),\n boxShadow: groupMemberStyleObject?.boxShadow\n });\n}\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.9598%2011.531C5.47958%2012.7541%206.4639%2013.7205%207.69625%2014.2178C8.92859%2014.7151%2010.308%2014.7024%2011.531%2014.1826C12.754%2013.6629%2013.7205%2012.6785%2014.2178%2011.4462C14.715%2010.2139%2014.7024%208.83445%2014.1826%207.61142C13.6629%206.3884%2012.6785%205.42195%2011.4462%204.92467C10.2138%204.4274%208.83444%204.44004%207.61141%204.95981C6.38839%205.47959%205.42194%206.46391%204.92467%207.69626C4.42739%208.9286%204.44003%2010.308%204.9598%2011.531V11.531Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M13.114%2013.1139L17.0001%2017.0005%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACH0lEQVRIDY2SyU0FQQxE57PDlThIAIkDSARARqRAJITACQ5ciYMr%2B1av6TfyDAPCUn27vVS5%2B89qGIaLYK1gvcd4sTGL5%2Bc6Ixe5FY0fQbVVDuBzAUt99kusJ7%2F2l0AdRKxarTWiFCWe%2BP8IcENvgwiEWBWZkKbmk41PVAnadP%2BBBAFFrP2HvIlyg%2FeAg%2BZzQGJNAWt1Yz%2BE6q23G0DCICQ0SZKwGc3kqWNuXwmJWRYvOX4iwCDkFPAKkVeAHGdFIa0wb88owHYmaeIMFCEHkX3EmwWcvRG9cDVQ4IlMSEATeYUSNoKdeGqQbwXbPf7xNMmPAm%2F9EDcKUYSImkskHHYDyPc6EHFzl6x%2BMpzeZjRgtRGxx5YdhoP4%2FQAhyO1L2GI81njYji2r%2Be54wVO9BnfBeXAZHAY%2BYZ1JerRPr18bKikELAD5Q3AfsP1ZP7%2FEXwVHAb3Ojny%2BsyQQAQbBUwfkgFr9D%2FhPTnuO%2FE2PWZzn20CAr0VUIUWeUwec2ZIZyPyK%2BJKIyZ0E1LnRdbDuE3k9PJgLIkyOGn8ecxD6FP7RLnyb2jH1JQHJ8RALl4AMovYE8YokbEtQd5GJAEkhuWLmIXFbBMwrQo0Ze0YBGmimuOTJ0SMRNxAImU%2FYTIEPnsgt9G6tmPlKIoEi%2BLrAt0xusiQgYfV1GHJsLlJ7rC%2FeQGIGiOeDDiPA5vT8doP2uUlY%2FRI5uWr1Bi4x7xm%2BABSc5FGl1EGyAAAAAElFTkSuQmCC%22%3E%3C%2Fimage%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, useCallback, useContext, useRef, useState } from \"react\";\nimport { CometChatGroupEvents, CometChatOption, CometChatUIKitConstants, SelectionMode, TitleAlignment, localize } from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitUtility, GroupMembersStyle, TransferOwnershipStyle } from \"@cometchat/uikit-shared\";\nimport { avatarStyle, btnsWrapperStyle, cancelBtnStyle, groupMembersStyle, listItemStyle, scopeLabelStyle, transferBtnStyle, transferOwnershipStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroupMembers } from \"../CometChatGroupMembers\";\nimport { CometChatRadioButton } from \"../Shared/Views/CometChatRadioButton\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport SearchIcon from \"./assets/search.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\n\ninterface ITransferOwnershipProps {\n /**\n * Group to transfer ownership of\n */\n group: CometChat.Group,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"TRANSFER_OWNERSHIP\")`\n */\n title?: string,\n /**\n * Alignment of the `title` text\n *\n * @defaultValue `TitleAlignment.center`\n */\n titleAlignment?: TitleAlignment,\n /**\n * Image URL for the search icon to use in the search bar\n *\n * @defaultValue `./assets/search.svg`\n */\n searchIconURL?: string,\n /**\n * Text to be displayed when the search input has no value\n *\n * @defaultValue `localize(\"SEARCH\")`\n */\n searchPlaceholder?: string,\n /**\n * Hide the search bar\n *\n * @defaulValue `false`\n */\n hideSearch?: boolean,\n /**\n * Request builder to fetch group members\n *\n * @remarks\n * If the search input is not empty and the `searchRequestBuilder` prop is not provided,\n * the search keyword of this request builder is set to the text in the search input\n *\n * @defaultValue Default request builder having the limit set to 30\n */\n groupMembersRequestBuilder?: CometChat.GroupMembersRequestBuilder,\n /**\n * Request builder with search parameters to fetch group members\n *\n * @remarks\n * If the search input is not empty,\n * the search keyword of this request builder is set to the text in the search input\n */\n searchRequestBuilder?: CometChat.GroupMembersRequestBuilder,\n /**\n * Image URL for the default loading view\n *\n * @defaultValue `./assets/spinner.svg`\n */\n loadingIconURL?: string,\n /**\n * Custom view for the loading state of the component\n */\n loadingStateView?: JSX.Element,\n /**\n * Text to display in the default empty view\n *\n * @defaultValue `localize(\"NO_USERS_FOUND\")`\n */\n emptyStateText?: string,\n /**\n * Custom view for the empty state of the component\n */\n emptyStateView?: JSX.Element,\n /**\n * Text to display in the default error view\n *\n * @defaultValue `localize(\"SOMETHING_WRONG\")`\n */\n errorStateText?: string,\n /**\n * Custom view for the error state of the component\n */\n errorStateView?: JSX.Element,\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null,\n /**\n * Hide the separator at the bottom of the default list item view\n *\n * @defaultValue `false`\n */\n hideSeparator?: boolean,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default list item view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Custom list item view to be rendered for each group member in the fetched list\n */\n listItemView?: (groupMember: CometChat.GroupMember) => JSX.Element,\n /**\n * Custom subtitle view to be rendered for each group member in the fetched list\n *\n * @remarks\n * This prop is used if `listItemView` prop is not provided\n */\n subtitleView?: (groupMember: CometChat.GroupMember) => JSX.Element,\n // Later\n transferButtonText?: string,\n // Later\n onTransferOwnership?: (groupMember: CometChat.GroupMember) => void,\n /**\n * Text to display for the cancel button\n */\n cancelButtonText?: string,\n /**\n * List of actions available on mouse over on the default list item component\n */\n options?: (group: CometChat.Group, groupMember: CometChat.GroupMember) => CometChatOption[],\n /**\n * Styles to apply to the status indicator component of the default list item view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default list item view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the default list item view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to the `CometChatGroupMembers` component\n */\n groupMemberStyle?: GroupMembersStyle,\n /**\n * Styles to apply to this component\n */\n transferOwnershipStyle?: TransferOwnershipStyle\n};\n\n/**\n * Renders transfer ownership view related to a group of a CometChat App\n */\nexport function CometChatTransferOwnership(props: ITransferOwnershipProps) {\n const {\n group,\n title = localize(\"TRANSFER_OWNERSHIP\"),\n titleAlignment = TitleAlignment.center,\n searchIconURL = SearchIcon,\n searchPlaceholder = localize(\"SEARCH\"),\n hideSearch = false,\n groupMembersRequestBuilder,\n searchRequestBuilder,\n loadingIconURL = SpinnerIcon,\n loadingStateView,\n emptyStateText = localize(\"NO_USERS_FOUND\"),\n emptyStateView,\n errorStateText = localize(\"SOMETHING_WRONG\"),\n errorStateView,\n onError,\n hideSeparator = false,\n disableUsersPresence = false,\n closeButtonIconURL,\n onClose,\n listItemView,\n subtitleView,\n transferButtonText = localize(\"TRANSFER_OWNERSHIP\"),\n onTransferOwnership,\n cancelButtonText = localize(\"CANCEL\"),\n options,\n statusIndicatorStyle,\n avatarStyle: avatarStyleObject = null,\n listItemStyle: listItemStyleObject = null,\n groupMemberStyle: groupMembersStyleObject = null,\n transferOwnershipStyle: transferOwnershipStyleObject = null\n } = props;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [isDisabled, setIsDisabled] = useState(true);\n const selectedMemberRef = useRef(null);\n const errorHandler = useCometChatErrorHandler(onError);\n const onTransferOwnershipPropRef = useRefSync(onTransferOwnership);\n const groupPropRef = useRefSync(group);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Changes `selectedMemberRef` reference\n */\n function onSelect(groupMember: CometChat.GroupMember): void {\n if (isDisabled) {\n setIsDisabled(false);\n }\n selectedMemberRef.current = groupMember;\n }\n\n /**\n * Creates tail view\n */\n function tailView(groupMember: CometChat.GroupMember): JSX.Element {\n const scope = group.getOwner() === groupMember.getUid() ? CometChatUIKitConstants.groupMemberScope.owner : groupMember.getScope();\n if (group.getOwner() === groupMember.getUid()) {\n return (\n \n );\n } else {\n return (\n onSelect(groupMember)}\n />\n );\n }\n }\n\n /**\n * Provides a default behavior to the `onTransferOwnership` prop\n */\n const onTransferOwnershipWrapper = useCallback(async (): Promise => {\n const selectedMember = selectedMemberRef.current;\n if (!selectedMember) {\n return;\n }\n try {\n const onTransferOwnershipProp = onTransferOwnershipPropRef.current;\n if (onTransferOwnershipProp) {\n onTransferOwnershipProp(selectedMember);\n }\n else {\n const currentGroup = groupPropRef.current;\n await CometChat.transferGroupOwnership(currentGroup.getGuid(), selectedMember.getUid());\n if (loggedInUser) {\n const groupClone = CometChatUIKitUtility.clone(currentGroup);\n groupClone.setOwner(selectedMember.getUid());\n CometChatGroupEvents.ccOwnershipChanged.next({\n group: groupClone,\n newOwner: CometChatUIKitUtility.clone(selectedMember)\n });\n if (onClose) {\n onClose()\n }\n }\n }\n selectedMemberRef.current = null;\n }\n catch (error) {\n errorHandler(error);\n }\n }, [errorHandler, loggedInUser, groupPropRef, onTransferOwnershipPropRef]);\n\n /**\n * Creates confirm button view\n */\n function getConfirmButtonView(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates cancel button view\n */\n function getCancelButtonView(): JSX.Element {\n return (\n \n );\n }\n\n Hooks({\n errorHandler,\n setLoggedInUser\n });\n\n return (\n \n \n
    \n {getConfirmButtonView()}\n {getCancelButtonView()}\n
    \n \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect } from \"react\";\n\ntype Args = {\n errorHandler : (error : unknown) => void,\n setLoggedInUser : React.Dispatch>\n};\n\nexport function Hooks(args : Args) {\n const {\n errorHandler,\n setLoggedInUser\n } = args;\n\n useEffect(\n /**\n * Sets `loggedInUser` state to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n setLoggedInUser(await CometChat.getLoggedinUser());\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, setLoggedInUser]);\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AddMembersConfiguration, BannedMembersConfiguration, CometChatUIKitUtility, DetailsStyle, DetailsUtils, GroupMembersConfiguration, TransferOwnershipConfiguration } from \"@cometchat/uikit-shared\";\nimport { AvatarStyle, BaseStyle, ConfirmDialogStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CSSProperties, JSX, useCallback, useContext, useState } from \"react\";\nimport { CometChatDetailsOption, CometChatDetailsTemplate, CometChatGroupEvents, CometChatUIKitConstants, CometChatUserEvents, SelectionMode, localize } from \"@cometchat/uikit-resources\";\nimport { avatarStyle, backdropStyle, closeBtnStyle, defaultOptionContentStyle, defaultOptionStyle, deleteDialogStyle, detailsContentWrapperStyle, detailsStyle, dividerStyle, getAddMembersStyle, getBannedMembersStyle, getGroupMembersStyle, getSectionStyle, getTransferOwnershipStyle, headerStyle, leaveDialogStyle, listItemStyle, optionBtnStyle, optionsStyle, pageWrapperStyle, profileStyle, sectionHeaderStyle, sectionHeaderWrapperStyle, sectionListStyle, statusIndicatorStyle, subtitleStyle, tailWrapperStyle, titleStyle } from \"./style\";\nimport { useCometChatErrorHandler, useRefSync, useStateRef } from \"../CometChatCustomHooks\";\n\nimport BackButtonIcon from \"./assets/backbutton.svg\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatAddMembers } from \"../CometChatAddMembers\";\nimport { CometChatBannedMembers } from \"../CometChatBannedMembers\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatGroupMembers } from \"../CometChatGroupMembers\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatTransferOwnership } from \"../CometChatTransferOwnership\";\nimport { Hooks } from \"./hooks\";\nimport LockedIcon from \"./assets/locked.svg\";\nimport PrivateIcon from \"./assets/private.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\n\ninterface IDetailsProps {\n /**\n * User to display details of\n */\n user?: CometChat.User,\n /**\n * Group to display details of\n *\n * @remarks\n * This prop is used if `user` prop is not provided\n */\n group?: CometChat.Group,\n /**\n * Custom profile view\n *\n * @remarks\n * This prop is used only if `hideProfile` is set to `false`\n */\n customProfileView?: (user?: CometChat.User, group?: CometChat.Group) => JSX.Element,\n /**\n * Custom subtitle view for the `user` or `group` prop\n *\n * @remarks\n * This prop is used only if `hideProfile` is set `false` & `customProfileView` prop is not provided\n */\n subtitleView?: (user?: CometChat.User, group?: CometChat.Group) => JSX.Element,\n /**\n * Title of the component\n *\n * @defaultValue `localize(\"DETAILS\")`\n */\n title?: string,\n /**\n * Image URL for the close button\n *\n * @defaultValue `./assets/close2x.svg`\n */\n closeButtonIconURL?: string,\n /**\n * Text to display for the cancel button\n */\n cancelButtonText?: string,\n /**\n * Function to call when the close button is clicked\n */\n onClose?: () => void,\n /**\n * Hide user presence\n *\n * @remarks\n * If set to true, the status indicator of the default profile view is not displayed\n *\n * @defaultValue `false`\n */\n disableUsersPresence?: boolean,\n /**\n * Hide profile\n *\n * @defaultValue `false`\n */\n hideProfile?: boolean,\n /**\n * Image URL for the status indicator icon of a private group\n *\n * @defaultValue `./assets/private.svg`\n */\n privateGroupIcon?: string,\n /**\n * @deprecated\n * \n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n /**\n * Image URL for the status indicator icon of a password-protected group\n *\n * @defaultValue `./assets/locked.svg`\n */\n protectedGroupIcon?: string,\n /**\n * Image URL for the status indicator icon of a password-protected group\n *\n * @defaultValue {undefined}\n */\n passwordGroupIcon?: string,\n /**\n * Function to create a list of `CometChatTemplate` instances from the `user` or `group` prop\n */\n data?: CometChatDetailsTemplate[],\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: (error: CometChat.CometChatException) => void,\n /**\n * Text to display for the confirm button of the leave confirm modal\n *\n * @defaultValue `localize(\"LEAVE_GROUP\")`\n */\n leaveButtonText?: string,\n /**\n * Message to display for the leave confirm modal\n *\n * @defaultValue `localize(\"LEAVE_CONFIRM\")`\n */\n leaveConfirmDialogMessage?: string,\n /**\n * Text to display for the confirm button of the transfer ownership confirm modal\n *\n * @defaultValue `localize(\"TRANSFER_OWNERSHIP\")`\n */\n transferButtonText?: string,\n /**\n * Message to display for the transfer onwership confirm modal\n *\n * @defaultValue `localize(\"LEAVE_CONFIRM\")`\n */\n transferConfirmDialogMessage?: string,\n /**\n * Text to display for the confirm button of the delete confirm modal\n *\n * @defaultValue `localize(\"DELETE\")`\n */\n deleteButtonText?: string,\n /**\n * Message to display for the delete confirm modal\n *\n * @defaultValue `localize(\"DELETE_CONFIRM\")`\n */\n deleteConfirmDialogMessage?: string,\n /**\n * `CometChatAddMembers` configuration\n */\n addMembersConfiguration?: AddMembersConfiguration,\n /**\n * `CometChatBannedMembers` configuration\n */\n bannedMembersConfiguration?: BannedMembersConfiguration,\n /**\n * `CometChatGroupMembers` configuration\n */\n groupMembersConfiguration?: GroupMembersConfiguration,\n /**\n * `CometChatTransferOwnership` configuration\n */\n transferOwnershipConfiguration?: TransferOwnershipConfiguration,\n /**\n * Styles to apply to the default profile view\n */\n listItemStyle?: ListItemStyle,\n /**\n * Styles to apply to the status indicator component of the default profile view\n */\n statusIndicatorStyle?: CSSProperties,\n /**\n * Styles to apply to the avatar component of the default profile view\n */\n avatarStyle?: AvatarStyle,\n /**\n * Styles to apply to the leave group confirm dialog component\n */\n leaveDialogStyle?: ConfirmDialogStyle,\n deleteDialogStyle?: ConfirmDialogStyle,\n /**\n * Styles to apply to the backdrop component\n */\n backdropStyle?: BaseStyle,\n /**\n * Styles to apply to this component\n */\n detailsStyle?: DetailsStyle\n};\n\ntype PageToShow = \"none\" | \"addMembers\" | \"bannedMembers\" | \"groupMembers\";\nexport type ModalInfo = { type: \"leaveOrTransferConfirm\" | \"deleteConfirm\", buttonText: string, confirmDialogMessage: string } |\n{ type: \"transferOwnership\" } |\n null;\n\n/**\n * Renders details view of a user or group of a CometChat App\n */\nexport function CometChatDetails(props: IDetailsProps) {\n const {\n user,\n group,\n title = localize(\"DETAILS\"),\n closeButtonIconURL = Close2xIcon,\n cancelButtonText = localize(\"CANCEL\"),\n onClose,\n disableUsersPresence = false,\n customProfileView = null,\n hideProfile = false,\n privateGroupIcon = PrivateIcon,\n protectedGroupIcon = LockedIcon,\n passwordGroupIcon = undefined,\n subtitleView = null,\n data = undefined,\n onError,\n leaveButtonText = localize(\"LEAVE_GROUP\"),\n leaveConfirmDialogMessage = localize(\"LEAVE_CONFIRM\"),\n transferButtonText = localize(\"TRANSFER_OWNERSHIP\"),\n transferConfirmDialogMessage = localize(\"TRANSFER_CONFIRM\"),\n deleteButtonText = localize(\"DELETE\"),\n deleteConfirmDialogMessage = localize(\"DELETE_CONFIRM\"),\n addMembersConfiguration = null,\n bannedMembersConfiguration = null,\n groupMembersConfiguration = null,\n transferOwnershipConfiguration = null,\n listItemStyle: listItmeStyleObject = null,\n statusIndicatorStyle: statusIndicatorStyleObject = null,\n avatarStyle: avatarStyleObject = null,\n leaveDialogStyle: leaveDialogStyleObject = null,\n deleteDialogStyle: deleteDialogStyleObject = null,\n backdropStyle: backdropStyleObject = null,\n detailsStyle: detailsStyleObject = null\n } = props;\n\n const [pageToShow, setPageToShow] = useState(\"none\");\n const [modalInfo, setModalInfo] = useState(null);\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [userOrGroup, setUserOrGroup] = useState(undefined);\n //const userOrGroup = user ?? group;\n const [leaveOrTransferConfirmDialogElement, setLeaveOrTransferConfirmDialog] = useStateRef(null);\n const [deleteConfirmDialogElement, setDeleteConfirmDialog] = useStateRef(null);\n const onClosePropRef = useRefSync(onClose);\n const errorHandler = useCometChatErrorHandler(onError);\n const { theme } = useContext(CometChatThemeContext);\n\n /**\n * Creates group member left action message\n */\n const createGroupMemberLeftActionMessage = useCallback((group: CometChat.Group, loggedInUser: CometChat.User): CometChat.Action => {\n const action = CometChatUIKitConstants.groupMemberAction.LEFT;\n const actionMessage = new CometChat.Action(\n group.getGuid(),\n CometChatUIKitConstants.MessageTypes.groupMember,\n CometChatUIKitConstants.MessageReceiverType.group,\n CometChatUIKitConstants.MessageCategory.action as CometChat.MessageCategory\n );\n actionMessage.setAction(action);\n actionMessage.setActionBy(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setActionFor(CometChatUIKitUtility.clone(group));\n actionMessage.setActionOn(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setReceiver(CometChatUIKitUtility.clone(group));\n actionMessage.setSender(CometChatUIKitUtility.clone(loggedInUser));\n actionMessage.setConversationId(\"group_\" + group.getGuid());\n actionMessage.setMuid(CometChatUIKitUtility.ID());\n actionMessage.setMessage(`${loggedInUser.getName()} ${action} ${loggedInUser.getUid()}`);\n actionMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n return actionMessage;\n }, []);\n\n /**\n * Handles leave or transfer ownership confirm click\n */\n const handleLeaveOrTransferConfirmClick = useCallback(async (userOrGroup: CometChat.User | CometChat.Group): Promise => {\n if (userOrGroup instanceof CometChat.User) {\n return;\n }\n if (userOrGroup.getOwner() === loggedInUser?.getUid()) {\n setModalInfo({ type: \"transferOwnership\" });\n }\n else {\n setModalInfo(null);\n try {\n if (loggedInUser) {\n await CometChat.leaveGroup(userOrGroup.getGuid());\n const groupClone = CometChatUIKitUtility.clone(userOrGroup);\n groupClone.setHasJoined(false);\n CometChatGroupEvents.ccGroupLeft.next({\n userLeft: CometChatUIKitUtility.clone(loggedInUser),\n leftGroup: groupClone,\n message: createGroupMemberLeftActionMessage(groupClone, loggedInUser)\n });\n onClosePropRef.current?.();\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }, [loggedInUser, setModalInfo, errorHandler, createGroupMemberLeftActionMessage, onClosePropRef]);\n\n /**\n * Handles delete confirm click\n */\n const handleDeleteConfirmClick = useCallback(async (userOrGroup: CometChat.User | CometChat.Group): Promise => {\n if (userOrGroup instanceof CometChat.User) {\n return;\n }\n setModalInfo(null);\n try {\n await CometChat.deleteGroup(userOrGroup.getGuid());\n CometChatGroupEvents.ccGroupDeleted.next(CometChatUIKitUtility.clone(userOrGroup));\n onClosePropRef.current?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }, [setModalInfo, errorHandler, onClosePropRef]);\n\n\n /**\n * Blocks the provided `user`\n */\n async function blockUser(user: CometChat.User): Promise {\n if (!user.getBlockedByMe()) {\n try {\n await CometChat.blockUsers([user.getUid()]);\n const userClone = CometChatUIKitUtility.clone(user);\n userClone.setBlockedByMe(true);\n CometChatUserEvents.ccUserBlocked.next(userClone);\n setUserOrGroup(userClone);\n //onClose?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }\n\n /**\n * Unblocks the provided `user`\n */\n async function unblockUser(user: CometChat.User): Promise {\n if (user.getBlockedByMe()) {\n try {\n await CometChat.unblockUsers([user.getUid()]);\n const userClone = CometChatUIKitUtility.clone(user);\n userClone.setBlockedByMe(false);\n CometChatUserEvents.ccUserUnblocked.next(userClone);\n setUserOrGroup(userClone);\n //onClose?.();\n }\n catch (error) {\n errorHandler(error);\n }\n }\n }\n\n /**\n * Creates templates\n */\n function getTemplates(userOrGroup: CometChat.User | CometChat.Group): CometChatDetailsTemplate[] {\n let res!: CometChatDetailsTemplate[];\n if (data) {\n res = data;\n }\n if (!res) {\n res = DetailsUtils.getDefaultDetailsTemplate(loggedInUser, props?.user, props?.group, theme);\n }\n return res;\n }\n\n /**\n * Gets the status indicator color\n *\n * @remarks\n * If the intention is not to show the status indicator, `null` should be returned\n */\n function getStatusIndicatorColor(userOrGroup: CometChat.User | CometChat.Group): string | null {\n if (userOrGroup instanceof CometChat.User) {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(userOrGroup);\n if (!disableUsersPresence && !userBlockedFlag) {\n return detailsStyleObject?.onlineStatusColor || theme.palette.getSuccess() || \"rgb(0, 200, 111)\";\n }\n }\n else {\n const groupType = userOrGroup.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n return detailsStyleObject?.privateGroupIconBackground || \"#F7A500\";\n }\n if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n return detailsStyleObject?.passwordGroupIconBackground || \"#F7A500\";\n }\n }\n return null;\n }\n\n /**\n * Gets the status indicator icon\n */\n function getStatusIndicatorIcon(userOrGroup: CometChat.User | CometChat.Group): string {\n let res = \"\";\n if (userOrGroup instanceof CometChat.Group) {\n const groupType = userOrGroup.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n res = privateGroupIcon;\n }\n else if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n res = passwordGroupIcon || protectedGroupIcon;\n }\n }\n return res;\n }\n\n /**\n * Creates header view\n */\n function getHeaderView(): JSX.Element {\n return (\n
    \n \n \n
    \n );\n }\n\n /**\n * Creates subtitle text for the default profile view\n */\n function getDefaultProfileSubtitleText(userOrGroup: CometChat.User | CometChat.Group): string {\n if (userOrGroup instanceof CometChat.User) {\n return disableUsersPresence ? \"\" : localize(userOrGroup.getStatus().toUpperCase());\n }\n const numGroupMembers = userOrGroup.getMembersCount();\n return `${numGroupMembers} ${localize(numGroupMembers > 1 ? \"MEMBERS\" : \"MEMBER\")}`;\n }\n\n /**\n * Creates subtitle view for the default profile view\n */\n function getDefaultProfileSubtitleView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (subtitleView) {\n if (userOrGroup instanceof CometChat.User) {\n return subtitleView(userOrGroup);\n }\n return subtitleView(undefined, userOrGroup);\n }\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(userOrGroup);\n const isUserOnline = userOrGroup instanceof CometChat.User &&\n userOrGroup.getStatus() === CometChatUIKitConstants.userStatusType.online;\n return !userBlockedFlag ? (\n \n ) : null;\n }\n\n /**\n * Creates default profile view\n */\n function getDefaultProfileView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Creates profile view\n */\n function getProfileView(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (hideProfile) {\n return null;\n }\n let profileViewJSX: JSX.Element;\n if (customProfileView) {\n if (userOrGroup instanceof CometChat.User) {\n profileViewJSX = customProfileView(userOrGroup);\n }\n else {\n profileViewJSX = customProfileView(undefined, userOrGroup);\n }\n }\n else {\n profileViewJSX = getDefaultProfileView(userOrGroup);\n }\n return (\n
    \n {profileViewJSX}\n
    \n );\n }\n\n /**\n * Creates details options\n */\n function getTemplateOptions(template: CometChatDetailsTemplate, userOrGroup: CometChat.User | CometChat.Group): CometChatDetailsOption[] | undefined {\n const { id } = template;\n if (id !== undefined) {\n return userOrGroup instanceof CometChat.User ? template.options?.(userOrGroup, null, id) : template.options?.(null, userOrGroup, id);\n }\n }\n\n /**\n * Handles details option click\n */\n function onOptionClick(option: CometChatDetailsOption, userOrGroup: CometChat.User | CometChat.Group): void {\n const { id, onClick } = option;\n if (onClick) {\n onClick(userOrGroup);\n }\n else {\n switch (id) {\n case CometChatUIKitConstants.UserOptions.viewProfile:\n if (userOrGroup instanceof CometChat.User && userOrGroup.getLink()) {\n window.open(userOrGroup.getLink(), '_blank')\n }\n break;\n case CometChatUIKitConstants.UserOptions.block:\n if (userOrGroup instanceof CometChat.User) {\n blockUser(userOrGroup);\n }\n break;\n case CometChatUIKitConstants.UserOptions.unblock:\n if (userOrGroup instanceof CometChat.User) {\n unblockUser(userOrGroup);\n }\n break;\n case CometChatUIKitConstants.GroupOptions.viewMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"groupMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.addMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"addMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.bannedMembers:\n if (userOrGroup instanceof CometChat.Group) {\n setPageToShow(\"bannedMembers\");\n }\n break;\n case CometChatUIKitConstants.GroupOptions.leave:\n if (userOrGroup instanceof CometChat.Group) {\n const isLoggedInUserGroupOwner = userOrGroup.getOwner() === loggedInUser?.getUid();\n setModalInfo({\n type: \"leaveOrTransferConfirm\",\n buttonText: isLoggedInUserGroupOwner ? transferButtonText : leaveButtonText,\n confirmDialogMessage: isLoggedInUserGroupOwner ? transferConfirmDialogMessage : leaveConfirmDialogMessage\n });\n }\n break;\n case CometChatUIKitConstants.GroupOptions.delete:\n if (userOrGroup instanceof CometChat.Group) {\n setModalInfo({\n type: \"deleteConfirm\",\n buttonText: deleteButtonText,\n confirmDialogMessage: deleteConfirmDialogMessage\n });\n }\n break;\n }\n }\n }\n\n /**\n * Creates option view with root element's key set to the provided `key`\n */\n function getOptionJSXWithKeyAdded(option: CometChatDetailsOption, userOrGroup: CometChat.User | CometChat.Group, hideSeparator: boolean, separatorColor: string | undefined): JSX.Element {\n const { id, customView } = option;\n if (customView) {\n return (\n
    {customView}
    \n );\n }\n const { title, tail, iconURL } = option;\n const buttonJSX = (\n onOptionClick(option, userOrGroup)}\n />\n );\n let contentJSX: JSX.Element = buttonJSX;\n if (tail) {\n contentJSX = (\n \n {buttonJSX}\n \n {tail}\n \n \n );\n }\n return (\n \n {contentJSX}\n {getSeparator(hideSeparator, separatorColor, false)}\n \n );\n }\n\n /**\n * Creates a separator that can be used inside an option view or a section view of the component\n */\n function getSeparator(hideSeparator: boolean, separatorColor: string | undefined, isTemplateSeparator: boolean): JSX.Element | null {\n if (!separatorColor) {\n return null;\n }\n return (\n \n );\n }\n\n /**\n * Creates section view with root element's key set to the provided `key`\n */\n function getSectionJSXWithKeyAdded(template: CometChatDetailsTemplate, userOrGroup: CometChat.User | CometChat.Group): JSX.Element {\n const { title, id, hideSectionSeparator = true, sectionSeparatorColor, hideItemSeparator = false, itemSeparatorColor } = template;\n let titleJSX: JSX.Element | null = null;\n if (!!title) {\n titleJSX = (\n
    \n \n
    \n );\n }\n let optionsJSX: JSX.Element | null = null;\n const templateOptions = getTemplateOptions(template, userOrGroup);\n if (templateOptions?.length) {\n optionsJSX = (\n
    \n {templateOptions.map((templateOption, i) => getOptionJSXWithKeyAdded(templateOption, userOrGroup, hideItemSeparator, itemSeparatorColor))}\n
    \n );\n }\n return (\n
    \n {titleJSX}\n {optionsJSX}\n {getSeparator(hideSectionSeparator, sectionSeparatorColor, true)}\n
    \n );\n }\n\n /**\n * Creates section view container\n */\n function getSectionList(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n const templateJSXList: JSX.Element[] = getTemplates(userOrGroup).map((template, i) => getSectionJSXWithKeyAdded(template, userOrGroup));\n if (templateJSXList.length === 0) {\n return null;\n }\n return (\n
    \n {templateJSXList}\n
    \n );\n }\n\n /**\n * Sets `pageToShow` state to `\"none\"`\n */\n function setPageToShowToNone(): void {\n setPageToShow(\"none\");\n }\n\n /**\n * Checks provided `key` is a key of `CometChat.User` instance\n */\n function isUserKey(key: string | undefined): key is keyof CometChat.User {\n return key !== undefined && key in new CometChat.User(\"anyString\");\n }\n\n /**\n * Creates AddMembers view\n */\n function getCometChatAddMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const sectionHeaderField = addMembersConfiguration?.sectionHeaderField;\n const options = addMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n buttonText? : string\n */\n return (\n \n );\n }\n\n /**\n * Create BannedMembers view\n */\n function getCometChatBannedMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const options = bannedMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n unbanIconURL? : string,\n onItemClick? : (bannedMember : CometChat.GroupMember) => void,\n theme? : CometChatTheme\n */\n return (\n \n );\n }\n\n /**\n * Creates GroupMembers view\n */\n function getCometChatGroupMembers(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n\n const options = groupMembersConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n backButton? : JSX.Element,\n title? : string,\n searchPlaceholder? : string,\n group : CometChat.Group,\n emptyStateText? : string,\n errorStateText? : string,\n tailView? : (groupMember : CometChat.GroupMember) => JSX.Element,\n onItemClick? : (groupMember : CometChat.GroupMember) => void,\n theme? : CometChatTheme\n\n The below properties were present in the configuration but not the component\n backdropStyle: BaseStyle\n */\n return (\n options(groupMember)}\n backButtonIconURL={groupMembersConfiguration?.backButtonIconURL || BackButtonIcon}\n closeButtonIconURL={groupMembersConfiguration?.closeButtonIconURL || Close2xIcon}\n showBackButton={groupMembersConfiguration?.showBackButton || true}\n hideSeparator={groupMembersConfiguration?.hideSeparator}\n selectionMode={groupMembersConfiguration?.selectionMode}\n hideError={groupMembersConfiguration?.hideError}\n searchIconURL={groupMembersConfiguration?.searchIconURL}\n dropDownIconURL={groupMembersConfiguration?.dropdownIconURL}\n hideSearch={groupMembersConfiguration?.hideSearch}\n onError={groupMembersConfiguration?.onError ?? undefined}\n onSelect={groupMembersConfiguration?.onSelect}\n emptyStateView={groupMembersConfiguration?.emptyStateView}\n errorStateView={groupMembersConfiguration?.errorStateView}\n loadingIconURL={groupMembersConfiguration?.loadingIconURL}\n loadingStateView={groupMembersConfiguration?.loadingStateView}\n titleAlignment={groupMembersConfiguration?.titleAlignment}\n statusIndicatorStyle={groupMembersConfiguration?.statusIndicatorStyle}\n avatarStyle={groupMembersConfiguration?.avatarStyle}\n groupMembersStyle={getGroupMembersStyle(groupMembersConfiguration, detailsStyleObject)}\n groupScopeStyle={groupMembersConfiguration?.groupScopeStyle}\n listItemStyle={groupMembersConfiguration?.listItemStyle}\n />\n );\n }\n\n /**\n * Creates view of the page to show\n */\n function getSelectedPage(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | undefined {\n try {\n let resJSX: JSX.Element | null = null;\n switch (pageToShow) {\n case \"addMembers\":\n resJSX = getCometChatAddMembers(userOrGroup);\n break;\n case \"bannedMembers\":\n resJSX = getCometChatBannedMembers(userOrGroup);\n break;\n case \"groupMembers\":\n resJSX = getCometChatGroupMembers(userOrGroup);\n break;\n case \"none\":\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = pageToShow;\n }\n }\n if (resJSX !== null) {\n return (\n \n {resJSX}\n \n );\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n\n /**\n * Set `modalInfo` state to `null`\n */\n function closeModal(): void {\n setModalInfo(null);\n }\n\n /**\n * Creates TransferOwnership view\n */\n function getCometChatTransferOwnership(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null {\n if (userOrGroup instanceof CometChat.User) {\n return null;\n }\n const options = transferOwnershipConfiguration?.options;\n /*\n These values are not present in the configuration, so will use the default values assigned internally by the component used\n backButton? : JSX.Element,\n showBackButton? : boolean,\n onBack? : () => void,\n title? : string,\n searchPlaceholder? : string,\n emptyStateText? : string,\n errorStateText? : string,\n backButtonIconURL? : string,\n transferButtonText? : string,\n cancelButtonText? : string\n */\n return (\n options(groupMember)}\n statusIndicatorStyle={transferOwnershipConfiguration?.statusIndicatorStyle}\n avatarStyle={transferOwnershipConfiguration?.avatarStyle}\n listItemStyle={transferOwnershipConfiguration?.listItemStyle}\n groupMemberStyle={transferOwnershipConfiguration?.groupMemberStyle}\n transferOwnershipStyle={getTransferOwnershipStyle(transferOwnershipConfiguration, detailsStyleObject)}\n />\n );\n }\n\n /**\n * Creates modal view\n */\n function getModal(userOrGroup: CometChat.User | CometChat.Group): JSX.Element | null | undefined {\n if (!modalInfo) {\n return null;\n }\n const { type } = modalInfo;\n try {\n switch (type) {\n case \"leaveOrTransferConfirm\":\n return (\n \n \n \n );\n case \"transferOwnership\":\n return (\n \n {getCometChatTransferOwnership(userOrGroup)}\n \n );\n case \"deleteConfirm\":\n return (\n \n \n \n );\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n }\n catch (error) {\n errorHandler(error);\n }\n }\n\n Hooks({\n setLoggedInUser,\n errorHandler,\n leaveOrTransferConfirmDialogElement,\n setModalInfo,\n handleLeaveOrTransferConfirmClick,\n deleteConfirmDialogElement,\n handleDeleteConfirmClick,\n userOrGroup,\n user,\n group,\n setUserOrGroup,\n });\n\n if (!userOrGroup) {\n return null;\n }\n\n return (\n
    \n {getHeaderView()}\n
    \n {getProfileView(userOrGroup)}\n {getSectionList(userOrGroup)}\n
    \n {getSelectedPage(userOrGroup)}\n {getModal(userOrGroup)}\n
    \n );\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport React, { useEffect, JSX } from \"react\";\nimport { ModalInfo } from \".\";\n\ntype Args = {\n setLoggedInUser : React.Dispatch>,\n errorHandler : (error : unknown) => void,\n leaveOrTransferConfirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n setModalInfo : React.Dispatch>,\n handleLeaveOrTransferConfirmClick : (userOrGroup : CometChat.User | CometChat.Group) => Promise,\n deleteConfirmDialogElement : JSX.IntrinsicElements[\"cometchat-confirm-dialog\"] | null,\n handleDeleteConfirmClick : (userOrGroup : CometChat.User | CometChat.Group) => Promise,\n userOrGroup : CometChat.User | CometChat.Group | undefined,\n user: CometChat.User | undefined,\n group: CometChat.Group | undefined,\n setUserOrGroup: React.Dispatch>,\n};\n\nexport function Hooks(args : Args) {\n const {\n setLoggedInUser,\n errorHandler,\n leaveOrTransferConfirmDialogElement,\n setModalInfo,\n handleLeaveOrTransferConfirmClick,\n deleteConfirmDialogElement,\n handleDeleteConfirmClick,\n userOrGroup,\n user,\n group,\n setUserOrGroup,\n } = args;\n\n useEffect(() => {\n\n if (user instanceof CometChat.User) {\n\n if(!user.getStatus?.()) {\n CometChat.getUser(user.getUid()).then((user: CometChat.User) => {\n setUserOrGroup(user);\n }).catch(error => errorHandler(error))\n } else {\n setUserOrGroup(user);\n }\n }\n if (group instanceof CometChat.Group) {\n if(!group.getOwner?.()) {\n CometChat.getGroup(group.getGuid()).then((group: CometChat.Group) => {\n setUserOrGroup(group);\n }).catch(error => errorHandler(error))\n } else {\n setUserOrGroup(group);\n }\n } \n }, [user, group, setUserOrGroup, errorHandler])\n\n useEffect(\n /**\n * Adds `cc-confirm-clicked` to the leave or transfer confirm dialog element\n */\n () => {\n if (!leaveOrTransferConfirmDialogElement) {\n return;\n }\n const confirmClickEventName = \"cc-confirm-clicked\";\n const handleEvent = () => {\n if (userOrGroup) {\n handleLeaveOrTransferConfirmClick(userOrGroup);\n }\n };\n leaveOrTransferConfirmDialogElement.addEventListener(confirmClickEventName, handleEvent);\n return () => {\n leaveOrTransferConfirmDialogElement.removeEventListener(confirmClickEventName, handleEvent);\n };\n }, [leaveOrTransferConfirmDialogElement, handleLeaveOrTransferConfirmClick, userOrGroup]);\n\n useEffect(\n /**\n * Adds `cc-cancel-clicked` event handler to the leave or transfer confirm dialog element\n */\n () => {\n if (!leaveOrTransferConfirmDialogElement) {\n return;\n }\n const cancelClickEventName = \"cc-cancel-clicked\";\n const handleCancelClick = () => setModalInfo(null);\n leaveOrTransferConfirmDialogElement.addEventListener(cancelClickEventName, handleCancelClick);\n return () => {\n leaveOrTransferConfirmDialogElement.removeEventListener(cancelClickEventName, handleCancelClick);\n };\n }, [leaveOrTransferConfirmDialogElement, setModalInfo]);\n\n useEffect(\n /**\n * Adds `cc-confirm-clicked` to the delete confirm dialog element\n */\n () => {\n if (!deleteConfirmDialogElement) {\n return;\n }\n const eventName = \"cc-confirm-clicked\";\n const handleEvent = () => {\n if (userOrGroup) {\n handleDeleteConfirmClick(userOrGroup);\n }\n };\n deleteConfirmDialogElement.addEventListener(eventName, handleEvent);\n return () => {\n deleteConfirmDialogElement.removeEventListener(eventName, handleEvent);\n };\n }, [deleteConfirmDialogElement, handleDeleteConfirmClick, userOrGroup]);\n\n useEffect(\n /**\n * Adds `cc-cancel-clicked` event handler to the delete confirm dialog element\n */\n () => {\n if (!deleteConfirmDialogElement) {\n return;\n }\n const eventName = \"cc-cancel-clicked\";\n const handleEvent = function() {\n setModalInfo(null);\n };\n deleteConfirmDialogElement.addEventListener(eventName, handleEvent);\n return () => {\n deleteConfirmDialogElement.removeEventListener(eventName, handleEvent);\n };\n }, [deleteConfirmDialogElement, setModalInfo]);\n\n useEffect(\n /**\n * Sets the `loggedInUser` state to the currently logged-in user\n */\n () => {\n (async () => {\n try {\n setLoggedInUser(await CometChat.getLoggedinUser());\n }\n catch(error) {\n errorHandler(error);\n }\n })();\n }, [errorHandler, setLoggedInUser]);\n}\n","import {\n AIOptionsStyle,\n CreatePollStyle,\n MessageComposerStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n EmojiKeyboardStyle,\n MediaRecorderStyle,\n PopoverStyle,\n PreviewStyle,\n TextInputStyle,\n} from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const LIVE_REACTION_ICON_TINT = \"red\";\nconst RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN = \"10px\";\n\nexport type mentionIconStyleType = CSSProperties | { buttonTextFont: string, buttonTextColor: string, buttonIconTint: string, iconBackground: string, iconHeight: string, iconWidth: string, };\n\n\n\nexport function getMessageComposerStyle(messageComposerStyle: MessageComposerStyle | undefined, theme: CometChatTheme): CSSProperties {\n return {\n width: messageComposerStyle?.width || \"100%\",\n height: messageComposerStyle?.height || \"100%\",\n boxSizing: \"border-box\",\n padding: \"14px 16px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n };\n}\nexport function previewStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): PreviewStyle {\n return new PreviewStyle({\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent200()}`,\n background: theme.palette.getBackground(),\n previewTitleFont:\n messageComposerStyle?.previewTitleFont ||\n fontHelper(theme.typography.caption1),\n previewTitleColor:\n messageComposerStyle?.previewTitleColor || theme.palette.getAccent600(),\n previewSubtitleFont:\n messageComposerStyle?.previewSubtitleFont ||\n fontHelper(theme.typography.subtitle2),\n previewSubtitleColor:\n messageComposerStyle?.previewSubtitleColor ||\n theme.palette.getAccent400(),\n closeButtonIconTint:\n messageComposerStyle?.closePreviewTint || theme.palette.getAccent600(),\n borderRadius: '12px'\n });\n}\n\n\n\nexport function getMentionsViewStyle(): CSSProperties {\n return {\n maxHeight: '196px',\n overflowY: 'hidden',\n display: \"flex !important\",\n flexDirection: 'column',\n justifyContent: 'flex-end !important',\n zIndex: 2,\n height: \"auto\",\n minHeight: '45px',\n padding: '0px 0px 1px 0px',\n width: '100%',\n };\n}\n\nexport function getMentionInfoIconStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n mentionsWarningStyle: React.CSSProperties\n): mentionIconStyleType {\n return {\n height: \"fit-content\",\n width: \"fit-content\",\n buttonTextFont: fontHelper(theme.typography.subtitle2),\n buttonTextColor: theme.palette.getAccent600(),\n borderRadius: \"8px\",\n border: \"none\",\n buttonIconTint: theme.palette.getAccent600(),\n padding: \"8px\",\n iconHeight: \"20px\",\n iconWidth: \"20px\",\n iconBackground: \"transparent\",\n gap: \"5px\",\n ...mentionsWarningStyle,\n };\n}\n\nexport function textInputStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): TextInputStyle {\n return new TextInputStyle({\n height: \"100%\",\n width: \"100%\",\n maxHeight: messageComposerStyle?.maxInputHeight || \"150px\",\n border:\n messageComposerStyle?.border ||\n `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: messageComposerStyle?.borderRadius || \"12px\",\n background:\n messageComposerStyle?.background || `${theme.palette.getAccent50()}`,\n textFont:\n messageComposerStyle?.textFont || fontHelper(theme.typography.text2),\n textColor: messageComposerStyle?.textColor || theme.palette.getAccent(),\n dividerColor:\n messageComposerStyle?.dividerTint || theme.palette.getAccent100(),\n inputBorder: messageComposerStyle?.inputBorder || \"none\",\n inputBorderRadius: messageComposerStyle?.inputBorderRadius || \"0px\",\n inputBackground: messageComposerStyle?.inputBackground || \"transparent\",\n placeholderTextColor: theme.palette.getAccent500(),\n placeholderTextFont: fontHelper(theme.typography.subtitle2)\n });\n}\n\nexport function liveReactionButtonStyle(theme: CometChatTheme, style?: MessageComposerStyle) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: style?.liveReactionIconTint || \"red\",\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nexport function sendButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isDisabled: boolean = false\n) {\n\n const buttonTint = isDisabled ? theme.palette.getAccent200() : (messageComposerStyle?.sendIconTint || theme.palette.getPrimary())\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: buttonTint,\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nfunction getEmojiButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean\n): string | undefined {\n if (isAuxiliaryContentDisplayed) {\n return messageComposerStyle?.emojiIconTint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.emojiIconTint || theme.palette.getAccent500();\n}\n\nfunction getVoiceButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean\n): string | undefined {\n if (isAuxiliaryContentDisplayed) {\n return messageComposerStyle?.voiceRecordingIconTint || theme.palette.getAccent();\n }\n return messageComposerStyle?.voiceRecordingIconTint || theme.palette.getAccent500();\n}\n\nfunction getAttachButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n): string | undefined {\n if (isSecondaryContentDisplayed) {\n return messageComposerStyle?.attachIcontint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.attachIcontint || theme.palette.getAccent500();\n}\n\nfunction getAIButtonIconTint(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n): string | undefined {\n if (isSecondaryContentDisplayed) {\n return messageComposerStyle?.AIIconTint || theme.palette.getAccent();\n }\n\n return messageComposerStyle?.AIIconTint || theme.palette.getAccent500();\n}\n\nexport function liveReactionButtonDivStyle(): CSSProperties {\n return {\n //margin: `0px ${RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN}`\n };\n}\n\nexport function fileMediaPickerStyle(): CSSProperties {\n return {\n display: \"none\",\n };\n}\n\nexport function secondaryViewStyle(): CSSProperties {\n return {\n flex: \"1\",\n };\n}\n\nexport function primaryViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n gap: \"6px\",\n };\n}\n\nexport function auxiliaryViewStyle(): CSSProperties {\n return {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n width: \"fit-content\",\n gap: \"8px\",\n padding: \"0\",\n marginRight: \"8px\",\n };\n}\n\nexport function createPollStyle(theme: CometChatTheme): CreatePollStyle {\n return new CreatePollStyle({\n placeholderTextFont: fontHelper(theme.typography.subtitle1),\n placeholderTextColor: theme.palette.getAccent600(),\n deleteIconTint: theme.palette.getAccent600(),\n titleFont: fontHelper(theme.typography.title1),\n titleColor: theme.palette.getAccent(),\n closeIconTint: theme.palette.getPrimary(),\n questionInputBackground: theme.palette.getAccent100(),\n optionInputBackground: theme.palette.getAccent100(),\n answerHelpTextFont: fontHelper(theme.typography.caption1),\n answerHelpTextColor: theme.palette.getAccent400(),\n addAnswerIconTint: theme.palette.getPrimary(),\n createPollButtonTextFont: fontHelper(theme.typography.text2),\n createPollButtonTextColor: theme.palette.getAccent(\"dark\"),\n createPollButtonBackground: theme.palette.getPrimary(),\n addAnswerTextFont: fontHelper(theme.typography.text2),\n addAnswerTextColor: theme.palette.getPrimary(),\n errorTextFont: fontHelper(theme.typography.subtitle1),\n errorTextColor: theme.palette.getError(),\n optionPlaceholderTextFont: fontHelper(theme.typography.subtitle1),\n optionPlaceholderTextColor: theme.palette.getAccent600(),\n questionInputTextFont: fontHelper(theme.typography.subtitle2),\n questionInputTextColor: theme.palette.getAccent600(),\n optionInputTextFont: fontHelper(theme.typography.subtitle2),\n optionInputTextColor: theme.palette.getAccent600(),\n width: \"360px\",\n height: \"440px\",\n border: \"\",\n borderRadius: \"8px\",\n background: theme.palette.getAccent900(),\n });\n}\n\n// Default secondary view related styles\n\nconst ACTION_SHEET_HEIGHT = \"244px\";\nconst ACTION_SHEET_WIDTH = \"275px\";\nconst ACTION_SHEET_BORDER_RADIUS = \"12px\";\n\nexport function attachmentPopoverStyle(actionSheetStyle: ActionSheetStyle | undefined, theme: CometChatTheme): PopoverStyle {\n let height = actionSheetStyle?.height;\n let width = actionSheetStyle?.width;\n let applyActionsheetStyle = height == \"100%\" || width == \"100%\";\n return new PopoverStyle({\n width: width && !applyActionsheetStyle ? actionSheetStyle?.width : ACTION_SHEET_WIDTH,\n height: height && !applyActionsheetStyle ? actionSheetStyle?.height : ACTION_SHEET_HEIGHT,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n boxShadow: \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\"\n });\n}\n\nexport function AIPopoverStyle(\n aiOptionsStyle: AIOptionsStyle | undefined,\n theme: CometChatTheme\n): PopoverStyle {\n return new PopoverStyle({\n width: aiOptionsStyle?.width || ACTION_SHEET_WIDTH,\n height: aiOptionsStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius: aiOptionsStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function actionSheetContainerStyle(\n actionSheetStyle: ActionSheetStyle = {},\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: actionSheetStyle?.width || ACTION_SHEET_WIDTH,\n height: actionSheetStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n overflow: \"auto\",\n };\n}\n\nexport function AIActionSheetContainerStyle(\n aiActionSheetStyle: AIOptionsStyle | undefined,\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: aiActionSheetStyle?.width || ACTION_SHEET_WIDTH,\n height: aiActionSheetStyle?.height || ACTION_SHEET_HEIGHT,\n borderRadius:\n aiActionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n overflowY: \"auto\",\n overflowX: \"hidden\",\n };\n}\nexport function getActionSheetStyle(actionSheetStyle: ActionSheetStyle | undefined, theme: CometChatTheme): ActionSheetStyle {\n return new ActionSheetStyle({\n width: actionSheetStyle?.width || \"100%\",\n height: actionSheetStyle?.height || \"100%\",\n border: actionSheetStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: actionSheetStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n background: actionSheetStyle?.background || theme.palette.getBackground(),\n layoutModeIconTint: actionSheetStyle?.layoutModeIconTint || theme.palette.getPrimary(),\n titleFont: actionSheetStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: actionSheetStyle?.titleColor || theme.palette.getAccent(),\n listItemBackground: actionSheetStyle?.listItemBackground || 'transparent',\n listItemIconTint: actionSheetStyle?.listItemIconTint || theme.palette.getAccent700(),\n listItemIconBackground: actionSheetStyle?.listItemIconBackground || 'transparent',\n listItemIconBorderRadius: actionSheetStyle?.listItemIconBorderRadius || '0',\n ActionSheetSeparatorTint: actionSheetStyle?.ActionSheetSeparatorTint || `${theme.palette.getAccent400()}`\n });\n}\n\nexport function getAIActionSheetStyle(\n aiOptionsStyle: AIOptionsStyle,\n theme: CometChatTheme\n): ActionSheetStyle {\n return new ActionSheetStyle({\n width: aiOptionsStyle?.width || \"100%\",\n height: aiOptionsStyle?.height || \"100%\",\n border: aiOptionsStyle?.border || \"none\",\n borderRadius: aiOptionsStyle?.borderRadius || ACTION_SHEET_BORDER_RADIUS,\n background: aiOptionsStyle?.background || theme.palette.getBackground(),\n listItemBackground: aiOptionsStyle?.listItemBackground || \"transparent\",\n ActionSheetSeparatorTint:\n aiOptionsStyle?.optionsSeparatorTint || `${theme.palette.getAccent600()}`,\n });\n}\n\nexport function attachmentButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n padding: \"0\",\n buttonIconTint: getAttachButtonIconTint(\n messageComposerStyle,\n theme,\n isSecondaryContentDisplayed\n ),\n background: \"transparent\",\n };\n}\n\nexport function aiButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isSecondaryContentDisplayed: boolean\n) {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n padding: \"0\",\n buttonIconTint: getAIButtonIconTint(\n messageComposerStyle,\n theme,\n isSecondaryContentDisplayed\n ),\n background: \"transparent\",\n };\n}\n\n// Default auxiliary view related styles\n\nconst EMOJI_KEYBOARD_HEIGHT = \"400px\";\nconst EMOJI_KEYBOARD_WIDTH = \"320px\";\nconst EMOJI_KEYBOARD_BORDER_RADIUS = \"12px\";\n\nexport function emojiKeyboardPopoverStyle(): PopoverStyle {\n return new PopoverStyle({\n width: EMOJI_KEYBOARD_WIDTH,\n height: EMOJI_KEYBOARD_HEIGHT,\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function emojiKeyboardContainerStyle(\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: EMOJI_KEYBOARD_WIDTH,\n height: EMOJI_KEYBOARD_HEIGHT,\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n border: `1px solid ${theme.palette.getAccent100()}`,\n boxSizing: \"border-box\",\n };\n}\n\nexport function emojiKeyboardStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme\n): EmojiKeyboardStyle {\n return new EmojiKeyboardStyle({\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: EMOJI_KEYBOARD_BORDER_RADIUS,\n background: theme.palette.getBackground(),\n textFont:\n messageComposerStyle?.emojiKeyboardTextFont ||\n fontHelper(theme.typography.caption1),\n textColor:\n messageComposerStyle?.emojiKeyboardTextColor || theme.palette.getAccent(),\n });\n}\n\nexport function emojiButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean,\n applyHorizontalMargin: boolean = false\n) {\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: getEmojiButtonIconTint(\n messageComposerStyle,\n theme,\n isAuxiliaryContentDisplayed\n ),\n background: \"transparent\",\n padding: \"0\",\n };\n}\n\nconst VOICE_RECORDING_HEIGHT = \"100px\";\nconst VOICE_RECORDING_WIDTH = \"250px\";\nconst VOICE_RECORDING_BORDER_RADIUS = \"8px\";\n\nexport function voiceRecordingPopoverStyle(): PopoverStyle {\n return new PopoverStyle({\n width: VOICE_RECORDING_WIDTH,\n height: VOICE_RECORDING_HEIGHT,\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n border: \"1px solid rgba(20, 20, 20, 0.08)\",\n boxShadow:\n \"0px 0px 0px 1px rgba(20, 20, 20, 0.04), 0px 16px 32px 0px rgba(20, 20, 20, 0.2)\",\n });\n}\n\nexport function voiceRecordingContainerStyle(\n theme: CometChatTheme\n): CSSProperties {\n return {\n width: VOICE_RECORDING_WIDTH,\n height: VOICE_RECORDING_HEIGHT,\n // maxWidth: \"80vw\",\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n boxSizing: \"border-box\",\n };\n}\n\nexport function voiceRecordingStyle(\n mediaRecorderStyle: MediaRecorderStyle | undefined,\n theme: CometChatTheme\n): EmojiKeyboardStyle {\n return new MediaRecorderStyle({\n ...mediaRecorderStyle,\n background: mediaRecorderStyle?.background || theme.palette.getBackground(),\n border: \"1px solid rgba(20, 20, 20, 0.08)\",\n borderRadius: VOICE_RECORDING_BORDER_RADIUS,\n closeIconTint:\n mediaRecorderStyle?.closeIconTint || theme.palette.getAccent600(),\n submitIconTint:\n mediaRecorderStyle?.submitIconTint || theme.palette.getAccent600(),\n startIconTint:\n mediaRecorderStyle?.startIconTint || theme.palette.getError(),\n stopIconTint: mediaRecorderStyle?.stopIconTint || theme.palette.getError(),\n timerTextColor: mediaRecorderStyle?.timerTextColor || theme.palette.getAccent400(),\n timerTextFont: mediaRecorderStyle?.timerTextFont || fontHelper(theme.typography.text3),\n });\n}\n\nexport function voiceButtonStyle(\n messageComposerStyle: MessageComposerStyle | undefined,\n theme: CometChatTheme,\n isAuxiliaryContentDisplayed: boolean,\n applyHorizontalMargin: boolean = false\n) {\n const marginStyle: { margin?: string } = {};\n\n if (applyHorizontalMargin) {\n marginStyle.margin = `0px ${RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN}`;\n }\n\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: getVoiceButtonIconTint(\n messageComposerStyle,\n theme,\n isAuxiliaryContentDisplayed\n ),\n background: \"transparent\",\n ...marginStyle,\n };\n}\n\nexport function defaultAuxiliaryViewContainer(): CSSProperties {\n return {\n display: \"flex\",\n flex: \"1\",\n };\n}\n\nexport function messageComposerHeaderStyle(): CSSProperties {\n return {\n height: \"fit-content\",\n position: \"relative\",\n width: \"100%\",\n boxSizing: \"border-box\",\n left: \"50%\",\n transform: \"translate(-50%)\",\n zIndex: 1,\n padding: '0px 0px 1px 0px'\n };\n}\n","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%22%20height%3D%22100%22%20xml%3Aspace%3D%22preserve%22%20version%3D%221.1%22%20viewBox%3D%220%200%20100%20100%22%3E%20%20%20%20%3Cimage%20width%3D%22100%22%20height%3D%22100%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAABeZJREFUeF7tnOGx5TQMhbUdQAdQAUsFQAVABSwVLFQAVABUAFTAUgFQAXSwuxVABzAfc81kM7ElJ7KjeyPPvHk%2FrpPI5%2BRIsuz4iWQLhcCTUNakMZKEBHsJkpAkJBgCwcxJhSQhwRAIZk4qJAkJhkAwc1IhSUgwBIKZkwpJQoIhEMycVIiNkLdE5Omt62%2B2S%2Fb1SkJ03N4RkV9FhP%2B0VyLy0e2%2FfnVnjyREBwwyPlx1QyWQ4t6SEB3SfypdhmA35Kb6GO%2BmB7Hjr4q1b4vI394jSULaiD4TkR8qXXBZ7gE%2BCWkT8nIRzNc9%2FxSR91Mh3gjU74cyUEir%2FSgin3ualAp5E80y3%2Fh2Me%2FQ8CYN%2FkZEXnjElGiEMPkCDNJMXAJvH%2F9HNuYXqGGd2u59JnEFuyGqu0UiBGD%2BEBHe0tLIYt71ePMayLTiRDegtwsgg%2FjSnYVFIuSLmzrWIHwpIt%2FtRUa5DlUw8bO0otRSQtGu2ZWFRSLkaxH5amOU%2BGd%2BG9GSkAaqqOD5xu%2FfiwjqGdFwj7jJUqfyegYuC1fb3SIphCzl440RuKeWq2dABs%2F4oBu97Qt%2Bv6XLdx%2FUt4p4DHnIBKwCPor55OY6rarBPuIc%2F7uD%2BNqOSAqhZrTMsIqtDJK60eyGaj5THvqTYfLYZXcUQshc8OW1titj6UJiuzM21b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yJ8rVPj2YOffIE%2BUWEbT2Ne4vt%2FNHRtU%2B8kS5CrJnHM%2BEKXmiXIWQPMDspPJ7zfXkEX%2FBCNnajDe61J4nyimRebkZb9YmtjxRblS65HDfPFHOAcRRt7AcivOwJ8qNAvXofbXv5HedPNoy6uwVw6OAjb7%2BsifKjQZ27%2F0vW37fC9iM6y65QDUD2L3PuNSJcntBmnnd5TY5zAT3yLMe%2FkS5I%2BA87LWZ9gajNglJQoIhEMycVEgSEgyBYOakQpKQYAgEMycVkoQEQyCYOamQJCQYAsHMSYUEI%2BRfzec9dI8XxxgAAAAASUVORK5CYII%3D%22%2F%3E%20%20%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FHeart%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FHeart%22%20fill%3D%22%23000000%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.375%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.3134395%2C18.0459049%20L1.52443954%2C8.87923824%20C-0.0597509272%2C7.29629358%20-0.452349335%2C4.87680895%200.550022872%2C2.87415491%20L0.550022872%2C2.87415491%20C1.29768241%2C1.3792661%202.71831477%2C0.334867269%204.36817344%2C0.0671851901%20C6.01803212%2C-0.200496889%207.69599623%2C0.341168737%208.87793954%2C1.52298824%20L10.3134395%2C2.95757158%20L11.7489395%2C1.52298824%20C12.9308829%2C0.341168737%2014.608847%2C-0.200496889%2016.2587056%2C0.0671851901%20C17.9085643%2C0.334867269%2019.3291967%2C1.3792661%2020.0768562%2C2.87415491%20L20.0768562%2C2.87415491%20C21.0778256%2C4.87595612%2020.6857045%2C7.29366739%2019.1033562%2C8.87648824%20L10.3134395%2C18.0459049%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M30.0001%200.666626C46.2004%200.666626%2059.3334%2013.7996%2059.3334%2030C59.3334%2046.2003%2046.2004%2059.3333%2030.0001%2059.3333C13.7997%2059.3333%200.666748%2046.2003%200.666748%2030C0.666748%2013.7996%2013.7997%200.666626%2030.0001%200.666626ZM30.0001%205.99996C16.7452%205.99996%206.00008%2016.7451%206.00008%2030C6.00008%2043.2548%2016.7452%2054%2030.0001%2054C43.2549%2054%2054.0001%2043.2548%2054.0001%2030C54.0001%2016.7451%2043.2549%205.99996%2030.0001%205.99996ZM31.6667%2027.3333C32.219%2027.3333%2032.6667%2027.781%2032.6667%2028.3333V42.3333C32.6667%2042.8856%2032.219%2043.3333%2031.6667%2043.3333H28.3334C27.7811%2043.3333%2027.3334%2042.8856%2027.3334%2042.3333V28.3333C27.3334%2027.781%2027.7811%2027.3333%2028.3334%2027.3333H31.6667ZM30.0001%2019.3333C31.4728%2019.3333%2032.6667%2020.5272%2032.6667%2022C32.6667%2023.4727%2031.4728%2024.6666%2030.0001%2024.6666C28.5273%2024.6666%2027.3334%2023.4727%2027.3334%2022C27.3334%2020.5272%2028.5273%2019.3333%2030.0001%2019.3333Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FMic%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FMic%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%284%2C%201%29%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%228%22%20y1%3D%2218.3333333%22%20x2%3D%228%22%20y2%3D%2222%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20x%3D%223.5%22%20y%3D%220%22%20width%3D%229%22%20height%3D%2214.9111111%22%20rx%3D%223.91111111%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C8.8%20L0%2C11%20C0%2C15.0500882%203.35786438%2C18.3333333%207.5%2C18.3333333%20L8.5%2C18.3333333%20C12.6421356%2C18.3333333%2016%2C15.0500882%2016%2C11%20L16%2C8.8%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%20Rotated%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus-Rotated%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%2812.000000%2C%2012.000000%29%20rotate%2845.000000%29%20translate%28-12.000000%2C%20-12.000000%29%20translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2210%22%20y1%3D%226%22%20x2%3D%2210%22%20y2%3D%2214%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%226%22%20y1%3D%2210%22%20x2%3D%2214%22%20y2%3D%2210%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSend%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSend%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.158865921%2C1.85985859%20C-0.108182698%2C1.38202197%20-0.0332622567%2C0.786017075%200.343741637%2C0.389140701%20C0.72074553%2C-0.00773567366%201.31211969%2C-0.113146836%201.80303259%2C0.129025252%20L17.6480326%2C8.17819192%20C17.857662%2C8.28481329%2017.9896898%2C8.50008892%2017.9896898%2C8.73527525%20C17.9896898%2C8.97046158%2017.857662%2C9.18573721%2017.6480326%2C9.29235859%20L1.80303259%2C17.3523586%20C1.31211969%2C17.5945307%200.72074553%2C17.4891195%200.343741637%2C17.0922431%20C-0.0332622567%2C16.6953668%20-0.108182698%2C16.0993619%200.158865921%2C15.6215253%20L4.37386592%2C8.73485859%20L0.158865921%2C1.85985859%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2217.9896993%22%20y1%3D%228.73485859%22%20x2%3D%224.36969925%22%20y2%3D%228.73485859%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%20Extensions%2FStipop%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24-Extensions%2FStipop%22%20fill%3D%22%23000000%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12.5%2C1%20C18.2989899%2C1%2023%2C5.70101013%2023%2C11.5%20C23%2C17.2039245%2018.451858%2C21.8455734%2012.7842951%2C21.9962258%20L12.5%2C22%20L6%2C23%20L6.47908443%2C20.1033393%20C3.77065445%2C18.2043706%202%2C15.0589646%202%2C11.5%20C2%2C5.70101013%206.70101013%2C1%2012.5%2C1%20Z%20M12.5%2C2.5%20C7.52943725%2C2.5%203.5%2C6.52943725%203.5%2C11.5%20C3.5%2C14.3705191%204.85206397%2C17.0112175%207.09635804%2C18.6980916%20L7.34021132%2C18.8751453%20L8.11298335%2C19.416961%20L7.817%2C21.202%20L12.3852902%2C20.5%20L12.5%2C20.5%20C17.4705627%2C20.5%2021.5%2C16.4705627%2021.5%2C11.5%20C21.5%2C6.52943725%2017.4705627%2C2.5%2012.5%2C2.5%20Z%20M13.5%2C12.3%20C13.1666667%2C13.9666667%2012.3333333%2C14.8%2011%2C14.8%20C9.66666667%2C14.8%208.83333333%2C13.9666667%208.5%2C12.3%20L13.5%2C12.3%20Z%20M15.0030662%2C6.67300699%20C15.1656001%2C6.92305919%2015.1180007%2C7.24908483%2014.9043132%2C7.44344192%20L14.826993%2C7.50306617%20L13.632%2C8.279%20L14.8086975%2C8.98550424%20C15.0644308%2C9.13894425%2015.1646368%2C9.45281874%2015.0578342%2C9.72120324%20L15.0144958%2C9.80869745%20C14.8610557%2C10.0644308%2014.5471813%2C10.1646368%2014.2787968%2C10.0578342%20L14.1913025%2C10.0144958%20L12.1913025%2C8.81449576%20C11.8402552%2C8.60386734%2011.8048611%2C8.12100565%2012.0939654%2C7.85785853%20L12.173007%2C7.79693383%20L14.173007%2C6.49693383%20C14.4508428%2C6.31634058%2014.8224729%2C6.39517122%2015.0030662%2C6.67300699%20Z%20M8.1%2C6.7%20C8.92842712%2C6.7%209.6%2C7.37157288%209.6%2C8.2%20C9.6%2C9.02842712%208.92842712%2C9.7%208.1%2C9.7%20C7.27157288%2C9.7%206.6%2C9.02842712%206.6%2C8.2%20C6.6%2C7.37157288%207.27157288%2C6.7%208.1%2C6.7%20Z%22%20id%3D%22Oval%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20height%3D%2224px%22%3E%3Cpath%20d%3D%22M%2012%202%20C%206.477%202%202%206.477%202%2012%20C%202%2017.523%206.477%2022%2012%2022%20C%2017.523%2022%2022%2017.523%2022%2012%20C%2022%206.477%2017.523%202%2012%202%20z%20M%2012%204%20C%2016.411%204%2020%207.589%2020%2012%20C%2020%2016.411%2016.411%2020%2012%2020%20C%207.589%2020%204%2016.411%204%2012%20C%204%207.589%207.589%204%2012%204%20z%20M%208%208%20L%208%2016%20L%2016%2016%20L%2016%208%20L%208%208%20z%22%2F%3E%3C%2Fsvg%3E\"","import {\n AIActionSheetContainerStyle,\n AIPopoverStyle,\n actionSheetContainerStyle,\n aiButtonStyle,\n attachmentButtonStyle,\n attachmentPopoverStyle,\n auxiliaryViewStyle,\n defaultAuxiliaryViewContainer,\n emojiButtonStyle,\n emojiKeyboardContainerStyle,\n emojiKeyboardPopoverStyle,\n emojiKeyboardStyle,\n fileMediaPickerStyle,\n getAIActionSheetStyle,\n getActionSheetStyle,\n getMentionInfoIconStyle,\n getMentionsViewStyle,\n getMessageComposerStyle,\n liveReactionButtonDivStyle,\n liveReactionButtonStyle,\n messageComposerHeaderStyle,\n previewStyle,\n primaryViewStyle,\n secondaryViewStyle,\n sendButtonStyle,\n textInputStyle,\n voiceButtonStyle,\n voiceRecordingContainerStyle,\n voiceRecordingPopoverStyle,\n voiceRecordingStyle,\n} from \"./style\";\nimport {\n AIOptionsStyle,\n CometChatMentionsFormatter,\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitLoginListener,\n CometChatUIKitUtility,\n MessageComposerStyle,\n UserMemberWrapperConfiguration,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n ActionSheetStyle,\n CometChatActionSheet,\n CometChatTextInput,\n MediaRecorderStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n AuxiliaryButtonAlignment,\n CometChatActionsView,\n CometChatMessageComposerAction,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatUIKitConstants,\n MessageStatus,\n Placement,\n PreviewMessageMode,\n RecordingType,\n UserMemberListType,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport React, {\n JSX,\n useCallback,\n useContext,\n useReducer,\n useRef,\n useState,\n} from \"react\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n useStateRef,\n} from \"../CometChatCustomHooks\";\n\nimport AIIcon from \"./assets/ai-bot.svg\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport CloseIcon from \"./assets/close.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport CometChatUserMemberWrapper from \"../CometChatUserMemberWrapper\";\nimport HeartIcon from \"./assets/heart.svg\";\nimport { Hooks } from \"./hooks\";\nimport MentionWarningIcon from \"./assets/InfoSimpleIcon.svg\";\nimport MicIcon from \"./assets/mic.svg\";\nimport PlusIcon from \"./assets/plus.svg\";\nimport PlusRotatedIcon from \"./assets/plus-rotated.svg\";\nimport { PollsConfiguration } from \"../Extensions/Polls/PollsConfiguration\";\nimport { PollsExtensionDecorator } from \"../Extensions/Polls/PollsExtensionDecorator\";\nimport SendIcon from \"./assets/send.svg\";\nimport SmileysIcon from \"./assets/stipop.svg\";\nimport StopIcon from \"./assets/stop.svg\";\nimport { createComponent } from \"@lit-labs/react\";\nimport { flushSync } from \"react-dom\";\n\nconst ActionSheetView = createComponent({\n tagName: \"cometchat-action-sheet\",\n elementClass: CometChatActionSheet,\n react: React,\n events: {\n onClick: \"cc-actionsheet-clicked\",\n },\n});\n\nconst ActionSheet = createComponent({\n tagName: \"cometchat-action-sheet\",\n elementClass: CometChatActionSheet,\n react: React,\n});\n\nconst TextInput = createComponent({\n tagName: \"cometchat-text-input\",\n elementClass: CometChatTextInput,\n react: React,\n});\n\ntype ComposerId = {\n parentMessageId: number | null;\n user: string | null;\n group: string | null;\n};\nexport type ContentToDisplay =\n | \"attachments\"\n | \"emojiKeyboard\"\n | \"voiceRecording\"\n | \"ai\"\n | \"none\";\ntype MediaMessageFileType =\n | typeof CometChatUIKitConstants.MessageTypes.image\n | typeof CometChatUIKitConstants.MessageTypes.video\n | typeof CometChatUIKitConstants.MessageTypes.audio\n | typeof CometChatUIKitConstants.MessageTypes.file;\nexport type ActionOnClickType = (() => void) | null;\n\ninterface IMessageComposerProps {\n /**\n * User to send messages to\n */\n user?: CometChat.User;\n /**\n * Group to send messages to\n *\n * @remarks\n * This prop is used if `user` prop is not provided\n */\n group?: CometChat.Group;\n /**\n * Text to fill the message input with\n *\n * @remarks\n * This prop is used only when this component mounts\n *\n * @defaultValue `\"\"`\n */\n text?: string;\n /**\n * Function to call when the message input's text value changes\n */\n onTextChange?: (text: string) => void;\n /**\n * Text shown in the message input when it is empty\n */\n placeHolderText?: string;\n /**\n * Image URL for the send button\n *\n * @remarks\n * This prop is used if `sendButtonView` prop is not provided\n *\n * @defaultValue `SendIcon`\n */\n sendButtonIconURL?: string;\n /**\n * Custom send button view\n */\n sendButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Function to call whenever a new text message is sent\n */\n onSendButtonClick?: (message: CometChat.BaseMessage, previewMessageMode?: PreviewMessageMode) => void;\n /**\n * Custom secondary button view\n */\n secondaryButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Image URL for the default secondary button\n *\n * @remarks\n * This prop is used if `secondaryButtonView` prop is not provided\n *\n * @defaultValue `./assets/plus.svg`\n */\n attachmentIconURL?: string;\n /**\n * Image URL for the emoji button\n *\n * @defaultValue `SmileysIcon`\n */\n emojiIconURL?: string;\n /**\n * Image URL for the AI button\n *\n * @defaultValue `AIIcon`\n */\n AIIconURL?: string;\n /**\n * Custom auxiliary button view\n */\n auxiliaryButtonView?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => JSX.Element;\n /**\n * Alignment of the auxiliary button\n *\n * @defaultValue `AuxiliaryButtonAlignment.right`\n */\n auxiliaryButtonAlignment?: AuxiliaryButtonAlignment;\n /**\n * Options for the default secondary view\n */\n attachmentOptions?: (\n userOrGroup: CometChat.User | CometChat.Group,\n composerId: ComposerId\n ) => CometChatMessageComposerAction[];\n /**\n * Hide layout button\n *\n * @defaultValue `false`\n */\n hideLayoutMode?: boolean;\n /**\n * Id of the parent message\n */\n parentMessageId?: number;\n /**\n * Image URL for the live reaction button\n *\n * @defaultValue `./assets/heart.svg`\n */\n LiveReactionIconURL?: string;\n /**\n * Hide live reaction button\n *\n * @defaultValue `false`\n */\n hideLiveReaction?: boolean;\n /**\n * Preview section at the top of the message input\n */\n headerView?: JSX.Element;\n /**\n * Function to call whenever the component encounters an error\n */\n onError?: ((error: CometChat.CometChatException) => void) | null;\n /**\n * Disable sound for outgoing messages\n *\n * @defaulValue `false`\n */\n disableSoundForMessages?: boolean;\n /**\n * Custom audio sound for outgoing messages\n */\n customSoundForMessage?: string;\n /**\n * Disable sending typing events\n *\n * @defaultValue `false`\n */\n disableTypingEvents?: boolean;\n /**\n * Styles to apply to this component\n */\n messageComposerStyle?: MessageComposerStyle;\n /**\n * Styles to apply to action sheet component\n */\n actionSheetStyle?: ActionSheetStyle;\n /**\n * Styles to apply to AI action sheet component\n */\n AIOptionsStyle?: AIOptionsStyle;\n /**\n * Hide voice recording button\n */\n hideVoiceRecording?: boolean;\n /**\n * Styles to apply voice recording view\n */\n mediaRecorderStyle?: MediaRecorderStyle;\n /**\n * Icon for voice recording start\n */\n voiceRecordingStartIconURL?: string;\n /**\n * Icon for voice recording close\n */\n voiceRecordingCloseIconURL?: string;\n /**\n * Icon for voice recording stop\n */\n voiceRecordingStopIconURL?: string;\n /**\n * Icon for voice recording submit\n */\n voiceRecordingSubmitIconURL?: string;\n\n InfoSimpleIcon?: string;\n\n userMemberWrapperConfiguration?: UserMemberWrapperConfiguration;\n\n textFormatters?: Array;\n\n disableMentions?: boolean;\n\n mentionsWarningText?: string;\n mentionsWarningStyle?: React.CSSProperties;\n}\n\ntype State = {\n text: string;\n addToMsgInputText: string;\n textMessageToEdit: CometChat.TextMessage | null;\n contentToDisplay: ContentToDisplay;\n loggedInUser: CometChat.User | null;\n showPoll: boolean;\n showMentionsCountWarning: boolean;\n};\n\nexport type Action =\n | { type: \"setText\"; text: State[\"text\"] }\n | {\n type: \"setAddToMsgInputText\";\n addToMsgInputText: State[\"addToMsgInputText\"];\n }\n | {\n type: \"setTextMessageToEdit\";\n textMessageToEdit: State[\"textMessageToEdit\"];\n }\n | { type: \"setContentToDisplay\"; contentToDisplay: ContentToDisplay }\n | { type: \"setLoggedInUser\"; loggedInUser: CometChat.User }\n | { type: \"setShowPoll\"; showPoll: boolean }\n | { type: \"setShowMentionsCountWarning\"; showMentionsCountWarning: boolean };\n\n// Not sure\nfunction processFile(file: File): Promise {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n if (reader.result !== null) {\n resolve(new File([reader.result], file.name, file));\n }\n };\n reader.onerror = () =>\n reject(\n new Error(`Converting the file named \"${file.name}\" to binary failed`)\n );\n reader.readAsArrayBuffer(file);\n });\n}\n\nconst USER_GROUP_NOT_PROVIDED_ERROR_STR =\n \"No user or group object provided. Should at least provide one.\";\nconst END_TYPING_AFTER_START_IN_MS = 500;\n\nfunction stateReducer(state: State, action: Action) {\n let newState = state;\n const { type } = action;\n switch (type) {\n case \"setText\":\n newState = { ...state, text: action.text };\n break;\n case \"setAddToMsgInputText\":\n newState = { ...state, addToMsgInputText: action.addToMsgInputText };\n break;\n case \"setTextMessageToEdit\":\n newState = { ...state, textMessageToEdit: action.textMessageToEdit };\n break;\n case \"setContentToDisplay\":\n newState = { ...state, contentToDisplay: action.contentToDisplay };\n break;\n case \"setLoggedInUser\":\n newState = { ...state, loggedInUser: action.loggedInUser };\n break;\n case \"setShowPoll\":\n newState = { ...state, showPoll: action.showPoll };\n break;\n case \"setShowMentionsCountWarning\":\n newState = {\n ...state,\n showMentionsCountWarning: action.showMentionsCountWarning,\n };\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = type;\n }\n }\n return newState;\n}\n\n/**\n * Renders a message composer to send messages to a user or group of a CometChat App\n */\nexport function CometChatMessageComposer(props: IMessageComposerProps) {\n const {\n user,\n group,\n text: initialText = \"\",\n onTextChange,\n placeHolderText = localize(\"ENTER_YOUR_MESSAGE_HERE\"),\n sendButtonIconURL = SendIcon,\n sendButtonView,\n onSendButtonClick,\n secondaryButtonView,\n attachmentIconURL = PlusIcon,\n emojiIconURL = SmileysIcon,\n AIIconURL = AIIcon,\n auxiliaryButtonView,\n auxiliaryButtonAlignment = AuxiliaryButtonAlignment.right,\n attachmentOptions,\n hideLayoutMode = false,\n parentMessageId = null,\n LiveReactionIconURL = HeartIcon,\n hideLiveReaction = true,\n headerView = null,\n onError,\n disableSoundForMessages = false,\n customSoundForMessage,\n disableTypingEvents = false,\n messageComposerStyle: messageComposerStyleObject,\n hideVoiceRecording = false,\n actionSheetStyle,\n AIOptionsStyle = {},\n mediaRecorderStyle,\n voiceRecordingStartIconURL = MicIcon,\n voiceRecordingCloseIconURL = CloseIcon,\n voiceRecordingStopIconURL = StopIcon,\n voiceRecordingSubmitIconURL = SendIcon,\n userMemberWrapperConfiguration,\n textFormatters = [],\n disableMentions = false,\n InfoSimpleIcon = MentionWarningIcon,\n mentionsWarningText,\n mentionsWarningStyle = {},\n } = props;\n\n const [state, dispatch] = useReducer(stateReducer, {\n text: initialText,\n addToMsgInputText: initialText,\n textMessageToEdit: null,\n contentToDisplay: \"none\",\n loggedInUser: null,\n showPoll: false,\n showMentionsCountWarning: false,\n });\n const textInputRef = useRef<\n JSX.IntrinsicElements[\"cometchat-text-input\"] | null\n >(null);\n const mediaFilePickerRef = useRef(null);\n const [emojiKeyboardElement, setEmojiKeyboardRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"] | null\n >(null);\n const [voiceRecordingElement, setVoiceRecordingRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-media-recorder\"] | null\n >(null);\n const [primaryBtnElement, setPrimaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [secondaryBtnElement, setSecondaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [aiBtnElement, setAIBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [voiceRecordingBtnElement, setVoiceRecordingBtnElement] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [auxiliaryBtnElement, setAuxiliaryBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [auxiliaryPopoverElement, setAuxiliaryPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [attachmentPopoverElement, setAttachmentPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [aiPopoverElement, setAIPopoverRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const [textMessageEditPreviewElement, setTextMessageEditPreviewRef] =\n useStateRef(null);\n const [actionSheetElement, setActionSheetRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null\n >(null);\n const [aiActionSheetElement, setAIActionSheetRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null\n >(null);\n const [liveReactionBtnElement, setLiveReactionBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n // const [createPollElement, setCreatePollRef] = useStateRef(null);\n const actionIdToActionOnClick = useRef(new Map());\n const endTypingTimeoutId = useRef(null);\n const createPollViewRef = useRef(null);\n const errorHandler = useCometChatErrorHandler(onError);\n const userPropRef = useRefSync(user);\n const groupPropRef = useRefSync(group);\n const parentMessageIdPropRef = useRefSync(parentMessageId);\n const disableSoundForMessagesPropRef = useRefSync(disableSoundForMessages);\n const customSoundForMessagePropRef = useRefSync(customSoundForMessage);\n const onSendButtonClickPropRef = useRefSync(onSendButtonClick);\n const { theme } = useContext(CometChatThemeContext);\n const [smartRepliesView, setSmartRepliesView] = React.useState(null);\n const [textFormatterArray, setTextFormatters] = useState(textFormatters);\n const [mentionsSearchTerm, setMentionsSearchTerm] = useState(\"\");\n const mentionsSearchTermTemp = React.useRef(\"\");\n const lastEmptySearchTerm = React.useRef(\"\");\n const [showListForMentions, setShowListForMentions] = useState(false);\n const mentionsTextFormatterInstanceRef =\n useRef(\n ChatConfigurator.getDataSource().getMentionsTextFormatter({ theme })\n );\n const [mentionsSearchCount, setMentionsSearchCount] = useState(0);\n const [userMemberWrapperConfig, setUserMemberWrapperConfig] = useState(\n userMemberWrapperConfiguration ?? new UserMemberWrapperConfiguration({})\n );\n const [userMemberListType, setUserMemberListType] = useState<\n UserMemberListType | undefined\n >();\n const [usersRequestBuilder, setUsersRequestBuilder] = useState<\n CometChat.UsersRequestBuilder | undefined\n >(undefined);\n const [groupMembersRequestBuilder, setGroupMembersRequestBuilder] = useState<\n CometChat.GroupMembersRequestBuilder | undefined\n >(undefined);\n const userMemberWrapperRef = useRef(null);\n\n let mentionedUsers = [];\n\n const mentionsFormatterInstanceId = \"composer_\" + Date.now();\n\n /**\n * Called when clicking a user from the mentions list.\n * Add the user to mentions text formatter instance and then call rerender to style the mention\n * within message input.\n *\n * @param {CometChat.User} user\n */\n\n const defaultMentionsItemClickHandler = (\n user: CometChat.User | CometChat.GroupMember\n ) => {\n let cometChatUsers = [user];\n mentionsTextFormatterInstanceRef.current.setCometChatUserGroupMembers(\n cometChatUsers\n );\n mentionedUsers = [\n ...mentionsTextFormatterInstanceRef.current.getCometChatUserGroupMembers(),\n ];\n mentionsTextFormatterInstanceRef.current.reRender();\n setShowListForMentions(false);\n setMentionsSearchCount(1);\n setMentionsSearchTerm(\"\");\n };\n\n const defaultOnEmptyForMentions = useCallback(() => {\n lastEmptySearchTerm.current = mentionsSearchTermTemp.current;\n setShowListForMentions(false);\n setMentionsSearchTerm(\"\");\n mentionsSearchTermTemp.current = \"\";\n }, [setShowListForMentions, setMentionsSearchTerm]);\n\n const searchMentions = useCallback(\n (searchTerm: any) => {\n if (!searchTerm || !searchTerm.length) {\n setMentionsSearchTerm(\"\");\n mentionsSearchTermTemp.current = \"\";\n setShowListForMentions(false);\n setMentionsSearchCount(1);\n return;\n }\n let currentSearchTerm = searchTerm.split(\"@\")[1].toLowerCase()\n ? searchTerm.split(\"@\")[1].toLowerCase()\n : undefined;\n\n if (\n (!currentSearchTerm ||\n !(\n lastEmptySearchTerm.current &&\n currentSearchTerm.startsWith(\n lastEmptySearchTerm.current.toLowerCase()\n )\n )) &&\n currentSearchTerm !== mentionsSearchTerm\n ) {\n setMentionsSearchTerm(currentSearchTerm);\n mentionsSearchTermTemp.current = currentSearchTerm;\n setShowListForMentions(true);\n lastEmptySearchTerm.current = \"\";\n setMentionsSearchCount(mentionsSearchCount + 1);\n }\n },\n [setMentionsSearchTerm, setShowListForMentions, setMentionsSearchCount]\n );\n\n /**\n * Creates receiver details object\n *\n * @throws `Error`\n * Thrown if `user` or 'group' both props are missing\n */\n const getReceiverDetails = useCallback((): {\n receiverId: string;\n receiverType: string;\n isBlocked?: boolean;\n } => {\n const user = userPropRef.current;\n const group = groupPropRef.current;\n if (user) {\n const isBlocked = user.getBlockedByMe() || user.getHasBlockedMe();\n return {\n receiverId: user?.getUid(),\n receiverType: CometChatUIKitConstants.MessageReceiverType.user,\n isBlocked: isBlocked\n };\n }\n if (group) {\n return {\n receiverId: group?.getGuid(),\n receiverType: CometChatUIKitConstants.MessageReceiverType.group,\n };\n }\n throw new Error(USER_GROUP_NOT_PROVIDED_ERROR_STR);\n }, [groupPropRef, userPropRef]);\n\n /**\n * Creates a `CometChat.TypingIndicator` instance\n */\n const getTypingNotification = useCallback((): CometChat.TypingIndicator | null => {\n const { receiverId, receiverType, isBlocked } = getReceiverDetails();\n if (isBlocked) {\n return null;\n }\n return new CometChat.TypingIndicator(receiverId, receiverType);\n }, [getReceiverDetails]);\n\n /**\n * Calls `startTyping` SDK function after creating a `CometChat.TypingIndicator` instance\n */\n const startTyping = useCallback((): void => {\n try {\n const typingNotification = getTypingNotification();\n if (!typingNotification) {\n return;\n }\n CometChat.startTyping(typingNotification);\n } catch (error) {\n errorHandler(error);\n }\n }, [getTypingNotification, errorHandler]);\n\n /**\n * Calls `endTyping` SDK function after creating a `CometChat.TypingIndicator` instance\n */\n const endTyping = useCallback((): void => {\n try {\n CometChat.endTyping(getTypingNotification());\n endTypingTimeoutId.current = null;\n } catch (error) {\n errorHandler(error);\n }\n }, [getTypingNotification, errorHandler]);\n\n /**\n * Handles emitting typing events\n */\n const handleTyping = useCallback((): void => {\n if (disableTypingEvents) {\n return;\n }\n if (endTypingTimeoutId.current !== null) {\n window.clearTimeout(endTypingTimeoutId.current);\n endTypingTimeoutId.current = null;\n } else {\n startTyping();\n }\n endTypingTimeoutId.current = window.setTimeout(\n () => endTyping(),\n END_TYPING_AFTER_START_IN_MS\n );\n }, [startTyping, endTyping, disableTypingEvents]);\n\n /**\n * Creates a composerId object\n */\n function getComposerId(): ComposerId {\n const user = userPropRef.current;\n if (user != undefined) {\n return { user: user?.getUid(), group: null, parentMessageId };\n }\n const group = groupPropRef.current;\n if (group != undefined) {\n return { user: null, group: group?.getGuid(), parentMessageId };\n }\n\n return { user: null, group: null, parentMessageId };\n }\n\n /**\n * Sets the `setAddToMsgInputText` state\n *\n * @remarks\n * Setting `addToMsgInputText` is a two-step process.\n * This is a workaround for an issue faced when setting the cometchat-message-input's text state\n */\n const mySetAddToMsgInputText = useCallback(\n function (text: string): void {\n flushSync(() => {\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: \"\" });\n });\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: text });\n setTimeout(() => {\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: \"\" });\n }, 0)\n },\n [dispatch]\n );\n\n /**\n * Handles SDK errors\n */\n const handleSDKError = useCallback(\n (\n error: unknown,\n message: CometChat.TextMessage | CometChat.MediaMessage,\n wasEditMethodCall: boolean\n ): void => {\n message.setMetadata({ error });\n if (wasEditMethodCall) {\n CometChatMessageEvents.ccMessageEdited.next({\n message,\n status: MessageStatus.error,\n });\n } else {\n CometChatMessageEvents.ccMessageSent.next({\n message: message,\n status: MessageStatus.error,\n });\n }\n throw error;\n },\n []\n );\n\n /**\n * Manages playing audio\n */\n const playAudioIfSoundNotDisabled = useCallback((): void => {\n const disableSoundForMessages = disableSoundForMessagesPropRef.current;\n if (!disableSoundForMessages) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.outgoingMessage,\n customSoundForMessagePropRef.current\n );\n }\n }, [customSoundForMessagePropRef, disableSoundForMessagesPropRef]);\n\n /**\n * Creates a `CometChat.TextMessage` instance\n */\n const getTextMessage = useCallback(\n (text: string): CometChat.TextMessage => {\n const { receiverId, receiverType } = getReceiverDetails();\n const textMessage = new CometChat.TextMessage(\n receiverId,\n text,\n receiverType\n );\n textMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n textMessage.setMuid(CometChatUIKitUtility.ID());\n const parentMessageId = parentMessageIdPropRef.current;\n if (parentMessageId !== null) {\n textMessage.setParentMessageId(parentMessageId);\n }\n return textMessage;\n },\n [getReceiverDetails, parentMessageIdPropRef]\n );\n\n /**\n * Calls `sendMessage` SDK function\n */\n const sendTextMessage = useCallback(\n async (\n textMessage: T\n ): Promise => {\n try {\n for (let i = 0; i < textFormatterArray.length; i++) {\n textMessage = textFormatterArray[i].formatMessageForSending(\n textMessage\n ) as T;\n }\n const sentTextMessage = await CometChat.sendMessage(textMessage);\n mentionsTextFormatterInstanceRef.current.resetCometChatUserGroupMembers();\n return sentTextMessage as T;\n } catch (error) {\n console.log(error);\n handleSDKError(error, textMessage, false);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending text message\n */\n const handleTextMessageSend = useCallback(\n async (text: string): Promise => {\n try {\n const textMessage = getTextMessage(text);\n let mentionedUsers =\n mentionsTextFormatterInstanceRef.current.getCometChatUserGroupMembers();\n if (mentionedUsers) {\n let userObj = [];\n for (let i = 0; i < mentionedUsers.length; i++) {\n userObj.push(\n new CometChat.User({\n uid: mentionedUsers[i].getUid(),\n name: mentionedUsers[i].getName(),\n })\n );\n }\n textMessage.setMentionedUsers(userObj);\n mentionedUsers = [];\n }\n CometChatMessageEvents.ccMessageSent.next({\n message: textMessage,\n status: MessageStatus.inprogress,\n });\n\n const sentTextMessage = await sendTextMessage(textMessage);\n if (sentTextMessage) {\n CometChatMessageEvents.ccMessageSent.next({\n message: sentTextMessage,\n status: MessageStatus.success,\n });\n playAudioIfSoundNotDisabled();\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [getTextMessage, playAudioIfSoundNotDisabled, sendTextMessage, errorHandler]\n );\n\n /**\n * Creates a `CometChat.TextMessage` instance with the `id` of the instance set to `textMessageId`\n */\n const getEditedTextMessage = useCallback(\n (newText: string, textMessageId: number): CometChat.TextMessage => {\n const { receiverId, receiverType } = getReceiverDetails();\n const newTextMessage = new CometChat.TextMessage(\n receiverId,\n newText,\n receiverType\n );\n newTextMessage.setId(textMessageId);\n return newTextMessage;\n },\n [getReceiverDetails]\n );\n\n /**\n * Calls `editMessage` SDK function\n */\n const sendEditedTextMessage = useCallback(\n async (\n editedTextMessage: T\n ): Promise => {\n try {\n for (let i = 0; i < textFormatterArray.length; i++) {\n editedTextMessage = textFormatterArray[i].formatMessageForSending(\n editedTextMessage\n ) as T;\n }\n const editedMessage = await CometChat.editMessage(editedTextMessage);\n mentionsTextFormatterInstanceRef.current.resetCometChatUserGroupMembers();\n return editedMessage as T;\n } catch (error) {\n handleSDKError(error, editedTextMessage, true);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending edited messages\n */\n const handleEditTextMessageSend = useCallback(\n async (\n newText: string,\n textMessage: CometChat.TextMessage\n ): Promise => {\n try {\n if (onSendButtonClickPropRef.current) {\n onSendButtonClickPropRef.current(getEditedTextMessage(newText, textMessage.getId()), PreviewMessageMode.edit)\n mySetAddToMsgInputText(\"\");\n }\n else {\n const editedMessage = await sendEditedTextMessage(\n getEditedTextMessage(newText, textMessage.getId())\n );\n mySetAddToMsgInputText(\"\");\n if (editedMessage) {\n CometChatMessageEvents.ccMessageEdited.next({\n message: editedMessage,\n status: MessageStatus.success,\n });\n }\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [sendEditedTextMessage, getEditedTextMessage, errorHandler]\n );\n\n /**\n * Handles sending a new text message or an edited message\n *\n * @remarks\n * The function closes the emojiKeyboard if it is visible before sending or editing a message\n */\n const handleSendButtonClick = useCallback(\n async (text: string): Promise => {\n if (\n (text = text?.trim())?.length === 0 ||\n (state.textMessageToEdit !== null &&\n state.textMessageToEdit.getText() === text)\n ) {\n return;\n }\n if (state.contentToDisplay === \"emojiKeyboard\") {\n auxiliaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n if (state.contentToDisplay === \"voiceRecording\") {\n voiceRecordingBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n let onSendButtonClick:\n | ((message: CometChat.BaseMessage, previewMessageMode?: PreviewMessageMode) => void)\n | undefined;\n if (state.textMessageToEdit !== null) {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n await handleEditTextMessageSend(text, state.textMessageToEdit);\n } else if ((onSendButtonClick = onSendButtonClickPropRef.current)) {\n try {\n await Promise.all([onSendButtonClick(getTextMessage(text), PreviewMessageMode.none)]);\n } catch (error) {\n errorHandler(error);\n }\n } else {\n await handleTextMessageSend(text);\n }\n },\n [\n state.textMessageToEdit,\n state.contentToDisplay,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n dispatch,\n handleEditTextMessageSend,\n handleTextMessageSend,\n errorHandler,\n getTextMessage,\n onSendButtonClickPropRef,\n userPropRef,\n ]\n );\n\n /**\n * Creates a `CometChat.MediaMessage` instance\n */\n const getMediaMessage = useCallback(\n async (\n file: File,\n fileType: MediaMessageFileType\n ): Promise => {\n const processedFile = await processFile(file);\n const { receiverId, receiverType } = getReceiverDetails();\n const mediaMessage = new CometChat.MediaMessage(\n receiverId,\n processedFile,\n fileType,\n receiverType\n );\n mediaMessage.setSentAt(CometChatUIKitUtility.getUnixTimestamp());\n mediaMessage.setMuid(CometChatUIKitUtility.ID());\n mediaMessage.setMetadata({ file: processedFile });\n const parentMessageId = parentMessageIdPropRef.current;\n if (parentMessageId !== null) {\n mediaMessage.setParentMessageId(parentMessageId);\n }\n return mediaMessage;\n },\n [getReceiverDetails, parentMessageIdPropRef]\n );\n\n /**\n * Calls `sendMediaMessage` SDK function\n */\n const sendMediaMessage = useCallback(\n async (\n mediaMessage: T\n ): Promise => {\n try {\n const sentMediaMessage = await CometChat.sendMediaMessage(mediaMessage);\n return sentMediaMessage as T;\n } catch (error) {\n handleSDKError(error, mediaMessage, false);\n }\n },\n [handleSDKError]\n );\n\n /**\n * Handles sending media message\n */\n const handleMediaMessageSend = useCallback(\n async (file: File, fileType: MediaMessageFileType): Promise => {\n try {\n const mediaMessage = await getMediaMessage(file, fileType);\n CometChatMessageEvents.ccMessageSent.next({\n message: mediaMessage,\n status: MessageStatus.inprogress,\n });\n\n const sentMediaMessage = await sendMediaMessage(mediaMessage);\n if (sentMediaMessage) {\n CometChatMessageEvents.ccMessageSent.next({\n message: sentMediaMessage,\n status: MessageStatus.success,\n });\n playAudioIfSoundNotDisabled();\n }\n } catch (error) {\n errorHandler(error);\n }\n },\n [\n getMediaMessage,\n playAudioIfSoundNotDisabled,\n sendMediaMessage,\n errorHandler,\n ]\n );\n\n /**\n * Handles sending recorded voice message\n */\n const handleSendVoiceMessage = useCallback(\n async (blob: Blob): Promise => {\n try {\n const audioFile = new File(\n [blob],\n `${audioRecordingSimpleDateFormat()}.wav`,\n { type: blob.type }\n );\n handleMediaMessageSend(\n audioFile,\n CometChatUIKitConstants.MessageTypes.audio\n );\n } catch (error) {\n errorHandler(error);\n }\n },\n [handleMediaMessageSend, errorHandler]\n );\n\n /**\n * @returns A string in the format `audio-recording-yyyyMMddHHmmss`\n */\n function audioRecordingSimpleDateFormat() {\n const now = new Date();\n const string = \"audio-recording-yyyyMMddHHmmss\";\n const year = now.getFullYear().toString();\n const month = (now.getMonth() + 1).toString().padStart(2, \"0\");\n const date = now.getDate().toString().padStart(2, \"0\");\n const hours = now.getHours().toString().padStart(2, \"0\");\n const minutes = now.getMinutes().toString().padStart(2, \"0\");\n const seconds = now.getSeconds().toString().padStart(2, \"0\");\n return string\n .replace(\"yyyyMMdd\", `${year}${month}${date}`)\n .replace(\"HHmmss\", `${hours}${minutes}${seconds}`);\n }\n\n /**\n * Wrapper around `handleMediaMessageSend`\n */\n const handleMediaMessageSendWrapper = useCallback(async (): Promise => {\n const mediaFilePickerElement = mediaFilePickerRef.current;\n if (\n !mediaFilePickerElement?.files?.length ||\n userPropRef.current?.getBlockedByMe()\n ) {\n return;\n }\n const file = mediaFilePickerElement.files[0];\n const fileType = mediaFilePickerElement.accept.slice(0, -2);\n const onSendButtonClick = onSendButtonClickPropRef.current;\n if (onSendButtonClick) {\n try {\n await Promise.all([\n onSendButtonClick(await getMediaMessage(file, fileType), PreviewMessageMode.none),\n ]);\n } catch (error) {\n errorHandler(error);\n }\n } else {\n await handleMediaMessageSend(file, fileType);\n }\n\n mediaFilePickerElement.value = \"\";\n }, [\n handleMediaMessageSend,\n errorHandler,\n getMediaMessage,\n onSendButtonClickPropRef,\n userPropRef,\n ]);\n\n /**\n * @returns Should the component show the send button view\n */\n\n function hideSendButton(): boolean {\n return (\n !state.text || state?.text?.trim() === \"\" ||\n (state.textMessageToEdit !== null &&\n state.textMessageToEdit.getText() === state.text)\n );\n }\n\n /**\n * Creates primary view\n */\n function getPrimaryView(): JSX.Element | null {\n return (\n <>\n {getVoiceRecordingView()}\n {\n hideSendButton() ? getLiveReactionButton() : <>\n }\n {\n hideLiveReaction ? getSendButton() : (hideSendButton() ? <> : getSendButton())\n }\n \n );\n }\n\n function getLiveReactionButton(): JSX.Element {\n return (hideLiveReaction ? <> : (\n \n \n \n ))\n }\n\n function getSendButton(): JSX.Element {\n if (sendButtonView) {\n return sendButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n return (\n \n \n \n );\n }\n\n /**\n * Creates secondary view\n */\n function getSecondaryView(): JSX.Element {\n if (secondaryButtonView && (user !== undefined || group !== undefined)) {\n return secondaryButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n const defaultSecondaryBtn = (\n \n );\n // Use default secondary content\n let actions: CometChatMessageComposerAction[];\n if (\n attachmentOptions &&\n attachmentOptions.length > 0 &&\n (user !== undefined || group !== undefined)\n ) {\n const userToPass = user || group!;\n actions = attachmentOptions(\n userToPass,\n getComposerId()\n );\n } else {\n actions = ChatConfigurator.getDataSource().getAttachmentOptions(\n theme,\n getComposerId()\n );\n }\n\n for (let i = 0; i < actions.length; i++) {\n const curAction = actions[i];\n const { id } = curAction;\n if (typeof id === \"string\") {\n let overrideOnClick = curAction.onClick;\n if (id === \"extension_poll\") {\n overrideOnClick = () => {\n (curAction.onClick as Function)?.call(\n new PollsExtensionDecorator(\n ChatConfigurator.getDataSource(),\n new PollsConfiguration({})\n ),\n [user, group]\n );\n };\n }\n actionIdToActionOnClick.current.set(\n id,\n overrideOnClick ? overrideOnClick : null\n );\n }\n }\n const defaultSecondaryContent = (\n \n );\n return (\n \n \n {defaultSecondaryBtn}\n \n \n {defaultSecondaryContent}\n \n \n );\n }\n\n /**\n * Creates header view\n */\n function getHeaderView(): JSX.Element {\n return (\n \n {headerView ?? getTextMessageEditPreview()}\n \n );\n }\n\n /**\n * Creates voice recording view\n */\n function getVoiceRecordingView(): JSX.Element | null {\n const defaultSecondaryContent = (\n \n );\n\n const defaultSecondaryBtn = (\n \n );\n\n return hideVoiceRecording ? null : (\n \n \n {defaultSecondaryBtn}\n \n \n {state.contentToDisplay === \"voiceRecording\"\n ? defaultSecondaryContent\n : null}\n \n \n );\n }\n\n /**\n * Creates AI view\n */\n function getAIButtonView(): JSX.Element {\n const defaultAIBtn = (\n \n );\n\n let actions: (CometChatMessageComposerAction | CometChatActionsView)[];\n\n actions = ChatConfigurator.getDataSource().getAIOptions(\n userPropRef?.current || null,\n groupPropRef?.current || null,\n theme,\n getComposerId() as unknown as Map,\n AIOptionsStyle\n );\n\n const closePopover = () => {\n aiBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n };\n\n const backAction = () => {\n setSmartRepliesView(null);\n };\n\n const defaultAIContent = (\n {\n if (action instanceof CometChatMessageComposerAction) {\n if (action?.onClick) {\n action.onClick();\n closePopover();\n }\n }\n if (action instanceof CometChatActionsView) {\n if (action?.customView) {\n setSmartRepliesView(\n action.customView({ backAction, closePopover })\n );\n }\n }\n }}\n />\n );\n\n if (actions.length <= 0) {\n return <>\n }\n\n return (\n \n
    \n {defaultAIBtn}\n
    \n \n {!smartRepliesView ? defaultAIContent : smartRepliesView}\n \n \n );\n }\n\n /**\n * Creates auxiliary view\n */\n function getAuxiliaryView(): JSX.Element {\n if (auxiliaryButtonView && (user !== undefined || group !== undefined)) {\n return auxiliaryButtonView(\n user !== undefined ? user : group!,\n getComposerId()\n );\n }\n const applyHorizontalMargin = hideLiveReaction && hideSendButton();\n const defaultAuxiliaryOptions =\n ChatConfigurator.getDataSource().getAuxiliaryOptions(\n getComposerId() as unknown as Map,\n theme,\n user,\n group\n );\n // Use default auxiliary button\n const defaultAuxiliaryBtn = (\n \n );\n // Use default auxiliary content\n const defaultAuxiliaryContent = (\n \n );\n return (\n <>\n <>{getAIButtonView()}\n
    \n {defaultAuxiliaryOptions.map((option: any) => option)}\n
    \n \n \n \n {defaultAuxiliaryBtn}\n \n \n {defaultAuxiliaryContent}\n \n \n \n \n );\n }\n\n /**\n * Creates preview view\n */\n function getTextMessageEditPreview(): JSX.Element | null {\n const checkForMentions = (message: CometChat.TextMessage) => {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp = messageText;\n let match = regex.exec(messageText);\n let cometChatUsersGroupMembers = [];\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] === mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n messageTextTmp = messageTextTmp.replace(\n match[0],\n \"@\" + user.getName()\n );\n cometChatUsersGroupMembers.push(user);\n }\n match = regex.exec(messageText);\n }\n mentionsTextFormatterInstanceRef.current.setCometChatUserGroupMembers(\n cometChatUsersGroupMembers\n );\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()!\n );\n return messageTextTmp;\n };\n\n if (state.textMessageToEdit === null) {\n return null;\n }\n const messageToBeEdited = state.textMessageToEdit;\n return (\n \n );\n }\n\n /**\n * Creates the file picker component\n */\n function getMediaFilePicker(): JSX.Element {\n // Purposely not given classname\n return (\n \n );\n }\n\n /**\n * Creates the message input component\n */\n function getTextInput(): JSX.Element {\n return (\n \n \n {getPrimaryView()}\n \n \n {getSecondaryView()}\n \n \n {getAuxiliaryView()}\n \n \n );\n }\n\n /**\n * Creates create poll modal\n */\n function getCreatePollModal(): JSX.Element | null {\n if (state.showPoll && createPollViewRef?.current) {\n return createPollViewRef.current;\n }\n\n return null;\n }\n\n Hooks({\n dispatch,\n textInputRef,\n liveReactionBtnElement,\n LiveReactionIconURL,\n mySetAddToMsgInputText,\n actionSheetElement,\n secondaryBtnElement,\n mediaFilePickerRef,\n textMessageEditPreviewElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n emojiKeyboardElement,\n voiceRecordingElement,\n text: state.text,\n propsText:props.text,\n handleSendButtonClick,\n primaryBtnElement,\n onTextChange,\n actionIdToActionOnClick,\n handleTyping,\n errorHandler,\n getReceiverDetails,\n contentToDisplay: state.contentToDisplay,\n createPollViewRef,\n handleSendVoiceMessage,\n auxiliaryPopoverElement,\n attachmentPopoverElement,\n aiPopoverElement,\n aiBtnElement,\n setSmartRepliesView,\n textFormatters,\n disableMentions,\n textFormatterArray,\n mentionsTextFormatterInstanceRef,\n userMemberWrapperConfiguration,\n setTextFormatters,\n CometChatUIKitLoginListener,\n group,\n user,\n setUserMemberWrapperConfig,\n userMemberWrapperConfig,\n userPropRef,\n groupPropRef,\n setShowListForMentions,\n searchMentions,\n mentionsFormatterInstanceId,\n setUsersRequestBuilder,\n setGroupMembersRequestBuilder,\n setUserMemberListType,\n userMemberWrapperRef,\n getComposerId,\n parentMessageIdPropRef\n });\n return (\n <>\n {getCreatePollModal()}\n \n {showListForMentions && (\n
    \n \n
    \n )}\n {state.showMentionsCountWarning && (\n
    \n \n
    \n )}\n {getMediaFilePicker()}\n {getHeaderView()}\n {getTextInput()}\n \n \n );\n}\n","import { Action, ActionOnClickType, ContentToDisplay } from \".\";\nimport {\n CometChat,\n Group,\n GroupMembersRequestBuilder,\n User,\n UsersRequestBuilder,\n} from \"@cometchat/chat-sdk-javascript\";\nimport {\n CometChatMentionsFormatter,\n CometChatTextFormatter,\n UserMemberWrapperConfiguration,\n UserMentionStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n CometChatMessageEvents,\n CometChatUIEvents,\n IMentionsCountWarning,\n IMessages,\n IModal,\n MessageStatus,\n UserMemberListType,\n} from \"@cometchat/uikit-resources\";\nimport React, { JSX, useEffect, useRef } from \"react\";\n\ntype Args = {\n dispatch: React.Dispatch;\n textInputRef: React.MutableRefObject<\n JSX.IntrinsicElements[\"cometchat-message-input\"] | null\n >;\n liveReactionBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n LiveReactionIconURL: string;\n mySetAddToMsgInputText: (text: string) => void;\n actionSheetElement: JSX.IntrinsicElements[\"cometchat-action-sheet\"] | null;\n mediaFilePickerRef: React.MutableRefObject;\n secondaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n textMessageEditPreviewElement:\n | JSX.IntrinsicElements[\"cometchat-preview\"]\n | null;\n auxiliaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n voiceRecordingBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n emojiKeyboardElement:\n | JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"]\n | null;\n voiceRecordingElement:\n | JSX.IntrinsicElements[\"cometchat-emoji-keyboard\"]\n | null;\n auxiliaryPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n attachmentPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n text: string;\n handleSendButtonClick: (text: string) => Promise;\n primaryBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n onTextChange?: (text: string) => void;\n actionIdToActionOnClick: React.MutableRefObject<\n Map\n >;\n handleTyping: () => void;\n errorHandler: (error: unknown) => void;\n getReceiverDetails: () => { receiverId: string; receiverType: string };\n contentToDisplay: ContentToDisplay;\n createPollViewRef: any;\n handleSendVoiceMessage: (blob: Blob) => Promise;\n aiPopoverElement: JSX.IntrinsicElements[\"cometchat-popover\"] | null;\n aiBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null;\n setSmartRepliesView: any;\n textFormatters: Array;\n disableMentions: boolean;\n textFormatterArray: Array;\n mentionsTextFormatterInstanceRef: React.MutableRefObject;\n userMemberWrapperConfiguration: UserMemberWrapperConfiguration | undefined;\n setTextFormatters: React.Dispatch<\n React.SetStateAction\n >;\n CometChatUIKitLoginListener: any;\n group: CometChat.Group | undefined;\n user: CometChat.User | undefined;\n userMemberWrapperConfig: UserMemberWrapperConfiguration;\n setUserMemberWrapperConfig: React.Dispatch<\n React.SetStateAction\n >;\n userPropRef: React.MutableRefObject;\n groupPropRef: React.MutableRefObject;\n setShowListForMentions: any;\n searchMentions: Function;\n mentionsFormatterInstanceId: string;\n setUsersRequestBuilder: React.Dispatch<\n React.SetStateAction\n >;\n setGroupMembersRequestBuilder: React.Dispatch<\n React.SetStateAction\n >;\n setUserMemberListType: React.Dispatch<\n React.SetStateAction\n >;\n userMemberWrapperRef: any;\n getComposerId: Function;\n parentMessageIdPropRef: any;\n propsText:string | undefined\n};\n\nexport function Hooks(args: Args) {\n const {\n dispatch,\n textInputRef,\n liveReactionBtnElement,\n LiveReactionIconURL,\n mySetAddToMsgInputText,\n actionSheetElement,\n mediaFilePickerRef,\n secondaryBtnElement,\n textMessageEditPreviewElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n emojiKeyboardElement,\n voiceRecordingElement,\n auxiliaryPopoverElement,\n attachmentPopoverElement,\n text,\n handleSendButtonClick,\n primaryBtnElement,\n onTextChange,\n actionIdToActionOnClick,\n handleTyping,\n errorHandler,\n getReceiverDetails,\n contentToDisplay,\n createPollViewRef,\n handleSendVoiceMessage,\n aiPopoverElement,\n aiBtnElement,\n setSmartRepliesView,\n textFormatters,\n disableMentions,\n textFormatterArray,\n mentionsTextFormatterInstanceRef,\n userMemberWrapperConfiguration,\n setTextFormatters,\n CometChatUIKitLoginListener,\n group,\n user,\n userMemberWrapperConfig,\n setUserMemberWrapperConfig,\n userPropRef,\n groupPropRef,\n setShowListForMentions,\n searchMentions,\n mentionsFormatterInstanceId,\n setUsersRequestBuilder,\n setGroupMembersRequestBuilder,\n setUserMemberListType,\n userMemberWrapperRef,\n getComposerId,\n parentMessageIdPropRef,\n propsText } = args;\n const isPreviewVisible = useRef(false);\n\n\n\n\n useEffect(() => {\n // Maintain the initial text passed from props when the conversation changes\n if (propsText && (user?.getUid() || group?.getGuid())) {\n dispatch({ type: \"setAddToMsgInputText\", addToMsgInputText: propsText });\n }\n }, [user?.getUid(), group?.getGuid(), propsText, dispatch]);\n\n\n useEffect(\n /**\n * Subscribes to message edited Message UI event\n */\n () => {\n const subMessageEdited = CometChatMessageEvents.ccMessageEdited.subscribe(\n (object: IMessages) => {\n let parentId = object?.message?.getParentMessageId()\n if ((parentMessageIdPropRef.current && parentId\n && parentId === parentMessageIdPropRef.current)\n || (!parentMessageIdPropRef.current && !parentId)) {\n if (\n object.status === MessageStatus.inprogress &&\n object.message instanceof CometChat.TextMessage\n ) {\n isPreviewVisible.current = true;\n dispatch({\n type: \"setTextMessageToEdit\",\n textMessageToEdit: object.message,\n });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(object.message.getText());\n }\n else {\n isPreviewVisible.current = true;\n }\n }\n }\n );\n const subComposeMessage = CometChatUIEvents.ccComposeMessage.subscribe(\n (text: string) => {\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(text);\n }\n );\n mentionsTextFormatterInstanceRef.current.setId(\n mentionsFormatterInstanceId\n );\n\n const ccShowMentionsCountWarning =\n CometChatUIEvents.ccShowMentionsCountWarning.subscribe(\n (data: IMentionsCountWarning) => {\n if (data.id === mentionsFormatterInstanceId) {\n if (data.showWarning) {\n dispatch({\n type: \"setShowMentionsCountWarning\",\n showMentionsCountWarning: true,\n });\n return;\n }\n dispatch({\n type: \"setShowMentionsCountWarning\",\n showMentionsCountWarning: false,\n });\n }\n }\n );\n return () => {\n subMessageEdited.unsubscribe();\n subComposeMessage.unsubscribe();\n ccShowMentionsCountWarning.unsubscribe();\n };\n },\n [\n mySetAddToMsgInputText,\n dispatch,\n textInputRef,\n mentionsFormatterInstanceId,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the live reaction button element\n */\n () => {\n if (!liveReactionBtnElement) {\n return;\n }\n async function handleEvent() {\n try {\n const reactionURL = LiveReactionIconURL;\n const { receiverId, receiverType } = getReceiverDetails();\n const data = {\n type: \"live_reaction\",\n reaction: \"heart\",\n };\n CometChat.sendTransientMessage(\n new CometChat.TransientMessage(receiverId, receiverType, data)\n );\n CometChatMessageEvents.ccLiveReaction.next(\"heart\");\n } catch (error) {\n errorHandler(error);\n }\n }\n const eventName = \"cc-button-clicked\";\n liveReactionBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n liveReactionBtnElement.removeEventListener(eventName, handleEvent);\n };\n },\n [\n LiveReactionIconURL,\n liveReactionBtnElement,\n errorHandler,\n getReceiverDetails,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-actionsheet-clicked` event listener to the action sheet element\n */\n () => {\n if (!actionSheetElement || !mediaFilePickerRef.current) {\n return;\n }\n function handleEvent(e: CustomEvent) {\n const { action } = e.detail;\n // Hide the secondary content view\n secondaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n const actionOnClick = actionIdToActionOnClick.current.get(\n `${action.id}`\n );\n if (typeof actionOnClick === \"function\") {\n actionOnClick();\n } else {\n // Open the correct file picker\n mediaFilePickerRef.current!.accept = `${action.id}/*`;\n mediaFilePickerRef.current!.click();\n }\n }\n const eventName = \"cc-actionsheet-clicked\";\n actionSheetElement.addEventListener(eventName, handleEvent);\n return () => {\n actionSheetElement.removeEventListener(eventName, handleEvent);\n };\n },\n [\n secondaryBtnElement,\n actionSheetElement,\n dispatch,\n actionIdToActionOnClick,\n mediaFilePickerRef,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-preview-close-clicked` event listener to the preview element\n */\n () => {\n if (!textMessageEditPreviewElement) {\n return;\n }\n function onPreviewCloseClick() {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n // Empty the text in the message composer\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(\"\");\n }\n const eventName = \"cc-preview-close-clicked\";\n textMessageEditPreviewElement.addEventListener(\n eventName,\n onPreviewCloseClick\n );\n return () => {\n textMessageEditPreviewElement.removeEventListener(\n eventName,\n onPreviewCloseClick\n );\n };\n },\n [textMessageEditPreviewElement, dispatch, textInputRef]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the secondary button element\n */\n () => {\n if (!secondaryBtnElement) {\n return;\n }\n function onSecondaryBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"attachments\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n\n function onAttachmentPopoverOutsideClick() {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-button-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n secondaryBtnElement.addEventListener(eventName, onSecondaryBtnClick);\n attachmentPopoverElement.addEventListener(\n outsideClickEventName,\n onAttachmentPopoverOutsideClick\n );\n return () => {\n secondaryBtnElement.removeEventListener(eventName, onSecondaryBtnClick);\n attachmentPopoverElement.removeEventListener(\n outsideClickEventName,\n onAttachmentPopoverOutsideClick\n );\n };\n },\n [\n contentToDisplay,\n secondaryBtnElement,\n attachmentPopoverElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n aiBtnElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the ai button element\n */\n () => {\n if (!aiBtnElement) {\n return;\n }\n\n function onAIBtnClick() {\n setSmartRepliesView(null);\n switch (contentToDisplay) {\n case \"ai\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n case \"none\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"ai\" });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n\n function onAIPopoverOutsideClick() {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-button-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n aiBtnElement.addEventListener(eventName, onAIBtnClick);\n aiPopoverElement.addEventListener(\n outsideClickEventName,\n onAIPopoverOutsideClick\n );\n return () => {\n aiBtnElement.removeEventListener(eventName, onAIBtnClick);\n aiPopoverElement.removeEventListener(\n outsideClickEventName,\n onAIPopoverOutsideClick\n );\n };\n },\n [\n contentToDisplay,\n aiBtnElement,\n aiPopoverElement,\n secondaryBtnElement,\n auxiliaryBtnElement,\n voiceRecordingBtnElement,\n setSmartRepliesView,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the auxiliary button element\n */\n () => {\n if (!auxiliaryBtnElement || !voiceRecordingBtnElement) {\n return;\n }\n function onAuxiliaryBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"voiceRecording\":\n voiceRecordingBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"emojiKeyboard\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"emojiKeyboard\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n function onVoiceRecordingBtnClick() {\n switch (contentToDisplay) {\n case \"attachments\":\n secondaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"emojiKeyboard\":\n auxiliaryBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"voiceRecording\":\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n break;\n case \"ai\":\n aiBtnElement?.click();\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n case \"none\":\n dispatch({\n type: \"setContentToDisplay\",\n contentToDisplay: \"voiceRecording\",\n });\n break;\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const x: never = contentToDisplay;\n }\n }\n }\n const eventName = \"cc-button-clicked\";\n auxiliaryBtnElement.addEventListener(eventName, onAuxiliaryBtnClick);\n voiceRecordingBtnElement.addEventListener(\n eventName,\n onVoiceRecordingBtnClick\n );\n return () => {\n auxiliaryBtnElement.removeEventListener(eventName, onAuxiliaryBtnClick);\n voiceRecordingBtnElement.removeEventListener(\n eventName,\n onVoiceRecordingBtnClick\n );\n };\n },\n [\n contentToDisplay,\n secondaryBtnElement,\n voiceRecordingBtnElement,\n auxiliaryBtnElement,\n aiBtnElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-emoji-clicked` event listener to the emoji keyboard element\n */\n () => {\n if (!emojiKeyboardElement) {\n return;\n }\n function onEmojiClicked(e: CustomEvent) {\n const emoji = e.detail.id;\n if (typeof emoji === \"string\") mySetAddToMsgInputText(emoji);\n }\n\n function onEmojiKeyboardClose(e: CustomEvent) {\n dispatch({ type: \"setContentToDisplay\", contentToDisplay: \"none\" });\n }\n\n const eventName = \"cc-emoji-clicked\";\n const outsideClickEventName = \"cc-popover-outside-clicked\";\n emojiKeyboardElement.addEventListener(eventName, onEmojiClicked);\n auxiliaryPopoverElement.addEventListener(\n outsideClickEventName,\n onEmojiKeyboardClose\n );\n return () => {\n emojiKeyboardElement.removeEventListener(eventName, onEmojiClicked);\n auxiliaryPopoverElement.removeEventListener(\n outsideClickEventName,\n onEmojiKeyboardClose\n );\n };\n },\n [\n mySetAddToMsgInputText,\n auxiliaryPopoverElement,\n emojiKeyboardElement,\n dispatch,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-media-recorder-closed` event listener to the media recorder element\n * Add `cc-media-recorder-submitted` event listener to the media recorder element\n */\n () => {\n if (!voiceRecordingElement) {\n return;\n }\n function onCloseTriggered(e: CustomEvent) {\n const customEvent = new CustomEvent(\"cc-button-clicked\", {});\n voiceRecordingBtnElement?.click();\n voiceRecordingBtnElement?.dispatchEvent(customEvent);\n }\n function sendVoiceMessage($event: CustomEvent) {\n const blob = $event.detail.file;\n onCloseTriggered($event);\n handleSendVoiceMessage(blob);\n }\n const closeEvent = \"cc-media-recorder-closed\";\n const submitEvent = \"cc-media-recorder-submitted\";\n voiceRecordingElement.addEventListener(closeEvent, onCloseTriggered);\n voiceRecordingElement.addEventListener(submitEvent, sendVoiceMessage);\n return () => {\n voiceRecordingElement.removeEventListener(closeEvent, onCloseTriggered);\n voiceRecordingElement.removeEventListener(\n submitEvent,\n sendVoiceMessage\n );\n };\n },\n [\n voiceRecordingElement,\n voiceRecordingBtnElement,\n dispatch,\n handleSendVoiceMessage,\n ]\n );\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the primary button element\n */\n () => {\n if (!primaryBtnElement) {\n return;\n }\n function handleEvent() {\n if (text) {\n handleSendButtonClick(text);\n }\n }\n const eventName = \"cc-button-clicked\";\n primaryBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n primaryBtnElement.removeEventListener(eventName, handleEvent);\n };\n },\n [handleSendButtonClick, text, primaryBtnElement]\n );\n\n useEffect(\n /**\n * Add `cc-message-input-entered` event listener to the message input element\n */\n () => {\n const textInputElement = textInputRef.current;\n if (!textInputElement) {\n return;\n }\n function onTextInputEnter(e: CustomEvent) {\n setShowListForMentions(false);\n const textToSend = e.detail.value;\n if (typeof textToSend === \"string\") handleSendButtonClick(textToSend);\n }\n const eventName = \"cc-text-input-entered\";\n textInputElement.addEventListener(eventName, onTextInputEnter);\n return () => {\n textInputElement.removeEventListener(eventName, onTextInputEnter);\n };\n },\n [handleSendButtonClick, textInputRef]\n );\n\n useEffect(\n /**\n * Add `cc-message-input-changed` event listener to the message input element\n */\n () => {\n const textInputElement = textInputRef.current;\n if (!textInputElement) {\n return;\n }\n function onTextInputChange(e: CustomEvent) {\n const newText = e.detail.value;\n if (typeof newText === \"string\" || newText == undefined) {\n\n handleTyping();\n dispatch({ type: \"setText\", text: newText });\n mySetAddToMsgInputText(\"\") \n if (onTextChange !== undefined) onTextChange(newText);\n }\n }\n const eventName = \"cc-text-input-changed\";\n textInputElement.addEventListener(eventName, onTextInputChange);\n return () => {\n textInputElement.removeEventListener(\n eventName,\n onTextInputChange\n );\n };\n },\n\n // Trigger the cc-text-input-changed action on chat change (guid, uid) to ensure the send button is enabled.\n [onTextChange, handleTyping, dispatch, textInputRef\n ,group?.getGuid()\n ,user?.getUid()\n ]\n );\n\n useEffect(\n /**\n * Subscribes to showModal & hideModal UI event to show & hide the Polls UI.\n */\n () => {\n const subShowModal = CometChatUIEvents.ccShowModal.subscribe(\n (data: IModal) => {\n dispatch({ type: \"setShowPoll\", showPoll: true });\n createPollViewRef.current = data.child;\n }\n );\n\n const subHideModal = CometChatUIEvents.ccHideModal.subscribe(() => {\n dispatch({ type: \"setShowPoll\", showPoll: false });\n createPollViewRef.current = null;\n });\n return () => {\n subShowModal.unsubscribe();\n subHideModal.unsubscribe();\n };\n },\n [createPollViewRef, dispatch]\n );\n\n useEffect(() => {\n if (!disableMentions) {\n if (textFormatters.length) {\n let foundMentionsFormatter = false;\n\n for (let i = 0; i < textFormatterArray.length; i++) {\n if (textFormatterArray[i] instanceof CometChatMentionsFormatter) {\n foundMentionsFormatter = true;\n break;\n }\n }\n\n if (!foundMentionsFormatter) {\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()\n );\n\n if (\n mentionsTextFormatterInstanceRef.current.getKeyDownCallBack() ===\n undefined\n ) {\n mentionsTextFormatterInstanceRef.current.setKeyDownCallBack(\n searchMentions\n );\n mentionsTextFormatterInstanceRef.current.setKeyUpCallBack(\n searchMentions\n );\n }\n\n setTextFormatters([\n ...textFormatterArray,\n mentionsTextFormatterInstanceRef.current,\n ]);\n }\n } else {\n mentionsTextFormatterInstanceRef.current.setLoggedInUser(\n CometChatUIKitLoginListener.getLoggedInUser()\n );\n\n if (\n mentionsTextFormatterInstanceRef.current.getKeyDownCallBack() ===\n undefined\n ) {\n mentionsTextFormatterInstanceRef.current.setKeyDownCallBack(\n searchMentions\n );\n mentionsTextFormatterInstanceRef.current.setKeyUpCallBack(\n searchMentions\n );\n }\n\n setTextFormatters([\n ...textFormatterArray,\n mentionsTextFormatterInstanceRef.current,\n ]);\n }\n }\n let mentionsTextFormatterInstance =\n mentionsTextFormatterInstanceRef.current;\n return () => {\n if (mentionsTextFormatterInstance) {\n mentionsTextFormatterInstance.cleanup();\n }\n };\n }, []);\n\n useEffect(() => {\n const shouldClearText =\n (userPropRef.current &&\n user &&\n userPropRef.current.getUid() !== user.getUid()) ||\n (groupPropRef.current &&\n group &&\n groupPropRef?.current.getGuid() !== group.getGuid());\n\n if (shouldClearText) {\n dispatch({ type: \"setText\", text: \"\" });\n mySetAddToMsgInputText(\"\");\n }\n\n if (userPropRef.current) {\n setShowListForMentions(\n user && userPropRef.current.getUid() !== user.getUid()\n );\n }\n if (groupPropRef.current) {\n setShowListForMentions(\n group && groupPropRef?.current.getGuid() !== group.getGuid()\n );\n }\n for (let i = 0; i < textFormatterArray.length; i++) {\n textFormatterArray[i].setComposerConfig(user, group, getComposerId());\n }\n }, [\n user,\n group,\n userPropRef,\n groupPropRef,\n dispatch,\n textInputRef,\n mySetAddToMsgInputText,\n ]);\n\n useEffect(() => {\n if (!disableMentions) {\n if (group) {\n const listType =\n userMemberWrapperConfiguration?.userMemberListType !== undefined\n ? userMemberWrapperConfiguration?.userMemberListType\n : UserMemberListType.groupmembers;\n\n setUserMemberListType(listType);\n\n const requestBuilder =\n userMemberWrapperConfiguration?.groupMemberRequestBuilder\n ? userMemberWrapperConfiguration?.groupMemberRequestBuilder\n : new CometChat.GroupMembersRequestBuilder(\n group.getGuid()\n ).setLimit(15);\n setGroupMembersRequestBuilder(requestBuilder);\n }\n\n if (user) {\n const listType =\n userMemberWrapperConfiguration?.userMemberListType !== undefined\n ? userMemberWrapperConfiguration?.userMemberListType\n : UserMemberListType.users;\n\n setUserMemberListType(listType);\n\n const requestBuilder =\n userMemberWrapperConfiguration?.usersRequestBuilder\n ? userMemberWrapperConfiguration?.usersRequestBuilder\n : new CometChat.UsersRequestBuilder().setLimit(15);\n\n setUsersRequestBuilder(requestBuilder);\n }\n }\n }, [user, group, disableMentions]);\n\n useEffect(() => {\n const handleMouseDown = (event: { target: any }) => {\n if (\n userMemberWrapperRef.current &&\n !userMemberWrapperRef.current.contains(event.target)\n ) {\n setShowListForMentions(false);\n }\n };\n document.addEventListener(\"mousedown\", handleMouseDown);\n\n return () => {\n document.removeEventListener(\"mousedown\", handleMouseDown);\n };\n }, []);\n // Reset composer when user/group changes.\n useEffect(() => {\n try {\n setTimeout(() => {\n if (isPreviewVisible.current && textInputRef.current) {\n dispatch({ type: \"setTextMessageToEdit\", textMessageToEdit: null });\n dispatch({ type: \"setText\", text: \"\" });\n textInputRef.current?.emptyInputField();\n mySetAddToMsgInputText(\"\");\n isPreviewVisible.current = false;\n }\n });\n\n }\n catch (error) {\n errorHandler(error);\n }\n\n }, [user, group, parentMessageIdPropRef\n ]);\n}\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\"\nimport { ListItemStyle } from \"@cometchat/uikit-elements\";\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\"\nimport { MessageHeaderStyle } from \"@cometchat/uikit-shared\"\nimport React, { CSSProperties } from 'react';\n\nexport const getMessageHeaderWrapperStyle = (messageHeaderStyle: MessageHeaderStyle, theme: CometChatTheme) => {\n\n return {\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: 'inherit',\n background: theme.palette.getBackground(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'row',\n padding: '8px',\n boxSizing: 'border-box',\n ...messageHeaderStyle\n } as CSSProperties\n}\n\nexport const MessageHeaderDivStyle = () => {\n return {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n borderRadius: 'inherit'\n } as CSSProperties\n}\n\nexport const MessageHeaderBackButtonStyle = () => {\n return {\n width: '24px',\n height: '24px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start',\n }\n}\n\nexport const MessageHeaderListItemStyle = () => {\n return {\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-start'\n }\n}\n\nexport const MessageHeaderMenuStyle = () => {\n return {\n width: 'fit-content',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n }\n}\n\nexport const CometChatListItemStyle = () => {\n return {\n width: '100%'\n }\n}\n\nexport const subtitleStyle = (user: CometChat.User | undefined, isTypingRef: React.MutableRefObject, messageHeaderStyle: MessageHeaderStyle, theme: CometChatTheme) => {\n // if (user && user.getStatus() === CometChatUIKitConstants.userStatusType.online) {\n // return {\n // textFont: messageHeaderStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n // textColor: messageHeaderStyle?.onlineStatusColor || theme.palette.getPrimary()\n // }\n // } else {\n // return {\n // textFont: isTypingRef?.current ? getMessageHeaderStyle?.typingIndicatorTextFont : getMessageHeaderStyle?.subtitleTextFont,\n // textColor: isTypingRef?.current ? getMessageHeaderStyle?.typingIndicatorTextColor : getMessageHeaderStyle?.subtitleTextColor\n // }\n // }\n if (isTypingRef && isTypingRef.current) {\n return {\n textFont: messageHeaderStyle?.typingIndicatorTextFont || fontHelper(theme.typography.subtitle2),\n textColor: messageHeaderStyle?.typingIndicatorTextColor || theme.palette.getPrimary()\n }\n } else {\n return {\n textFont: messageHeaderStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n textColor: messageHeaderStyle?.subtitleTextColor || theme.palette.getAccent600()\n }\n }\n}\n\nexport const defaultAvatarStyle = (theme: CometChatTheme) => {\n return {\n borderRadius: \"24px\",\n width: \"36px\",\n height: \"36px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorder: \"\",\n outerViewBorderSpacing: \"\"\n }\n}\n\nexport const defaultStatusIndicatorStyle = () => {\n return {\n height: \"12px\",\n width: \"12px\",\n border: \"none\",\n borderRadius: \"24px\"\n }\n}\n\nexport const defaultListItemStyle = (listItemStyle: ListItemStyle, theme: CometChatTheme) => {\n return new ListItemStyle({\n height: listItemStyle?.height || \"45px\",\n width: listItemStyle?.width || \"100%\",\n background: listItemStyle?.background || \"inherit\",\n activeBackground: listItemStyle?.activeBackground || \"transparent\",\n borderRadius: listItemStyle?.borderRadius || \"0\",\n titleFont: listItemStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: listItemStyle?.titleColor || theme.palette.getAccent(),\n border: listItemStyle?.border || \"none\",\n separatorColor: listItemStyle?.separatorColor || \"\",\n hoverBackground: listItemStyle?.hoverBackground || \"transparent\"\n })\n}\n\nexport const getBackButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"none\",\n background: \"transparent\",\n buttonIconTint: theme.palette.getPrimary()\n }\n}\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2Fbackbutton%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FBack%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.250000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2218.75%22%20y1%3D%228.75%22%20x2%3D%220%22%20y2%3D%228.75%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpolyline%20id%3D%22Path%22%20points%3D%228.75%200%200%208.75%208.75%2017.5%22%3E%3C%2Fpolyline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3ELocked%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Locked%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%23F7A500%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M7%2C3%20C8.1045695%2C3%209%2C3.8954305%209%2C5%20L9.00079851%2C6.00841863%20C9.2437935%2C6.025429%209.36573413%2C6.06795171%209.48842285%2C6.13356635%20C9.65138581%2C6.2207199%209.7792801%2C6.34861419%209.86643365%2C6.51157715%20C9.95358719%2C6.67454011%2010%2C6.83618323%2010%2C7.2819426%20L10%2C9.7180574%20C10%2C10.1638168%209.95358719%2C10.3254599%209.86643365%2C10.4884229%20C9.7792801%2C10.6513858%209.65138581%2C10.7792801%209.48842285%2C10.8664336%20C9.32545989%2C10.9535872%209.16381677%2C11%208.7180574%2C11%20L5.2819426%2C11%20C4.83618323%2C11%204.67454011%2C10.9535872%204.51157715%2C10.8664336%20C4.34861419%2C10.7792801%204.2207199%2C10.6513858%204.13356635%2C10.4884229%20C4.04641281%2C10.3254599%204%2C10.1638168%204%2C9.7180574%20L4%2C7.2819426%20C4%2C6.83618323%204.04641281%2C6.67454011%204.13356635%2C6.51157715%20C4.2207199%2C6.34861419%204.34861419%2C6.2207199%204.51157715%2C6.13356635%20C4.63442137%2C6.06786855%204.7565156%2C6.02532125%205.00012601%2C6.00835408%20L5%2C5%20C5%2C3.8954305%205.8954305%2C3%207%2C3%20Z%20M7%2C4%20C6.48716416%2C4%206.06449284%2C4.38604019%206.00672773%2C4.88337887%20L6%2C5%20L6%2C6%20L8%2C6%20L8%2C5%20C8%2C4.44771525%207.55228475%2C4%207%2C4%20Z%22%20id%3D%22Rectangle-3%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EPrivate%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Symbols-v2%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Private%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20id%3D%22Rectangle%22%20fill%3D%22%2300C86F%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2214%22%20height%3D%2214%22%20rx%3D%227%22%3E%3C%2Frect%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2C5%20C5.33333333%2C4.66666667%206.33333333%2C4%207%2C3%20C7.66666667%2C4%208.66666667%2C4.66666667%2010%2C5%20L10%2C6.14589803%20C10%2C8.20151331%208.83859819%2C10.0807009%207%2C11%20L7%2C11%20L7%2C11%20C5.16140181%2C10.0807009%204%2C8.20151331%204%2C6.14589803%20L4%2C5%20L4%2C5%20Z%22%20id%3D%22Rectangle%22%20fill%3D%22%23FFFFFF%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { AvatarStyle, BaseStyle, ListItemStyle } from '@cometchat/uikit-elements';\nimport { CometChatGroupEvents, CometChatMessageEvents, CometChatUIKitConstants, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IOwnershipChanged, localize } from '@cometchat/uikit-resources';\nimport { CometChatListItemStyle, MessageHeaderBackButtonStyle, MessageHeaderDivStyle, MessageHeaderListItemStyle, MessageHeaderMenuStyle, defaultAvatarStyle, defaultListItemStyle, defaultStatusIndicatorStyle, getBackButtonStyle, getMessageHeaderWrapperStyle, subtitleStyle } from \"./style\";\nimport { JSX, useCallback, useContext, useRef, useState } from \"react\";\nimport { useCometChatErrorHandler, useRefSync, useStateRef } from \"../CometChatCustomHooks\";\n\nimport BackIcon from './assets/backbutton.svg';\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { MessageHeaderStyle } from '@cometchat/uikit-shared';\nimport PasswordGroupIcon from './assets/Locked.svg';\nimport PrivateGroupIcon from './assets/Private.svg';\nimport { Subscription } from 'rxjs';\nimport { MessageUtils } from '../Shared/Utils/MessageUtils';\n\ninterface IMessageHeaderProps {\n avatarStyle?: AvatarStyle,\n statusIndicatorStyle?: BaseStyle,\n messageHeaderStyle?: MessageHeaderStyle,\n listItemStyle?: ListItemStyle,\n subtitleView?: any,\n disableUsersPresence?: boolean,\n disableTyping?: boolean,\n /**\n * @deprecated\n *\n * This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.\n */\n protectedGroupIcon?: string,\n passwordGroupIcon?: string | undefined;\n privateGroupIcon?: string,\n menu?: any,\n user?: CometChat.User,\n group?: CometChat.Group,\n backButtonIconURL?: string\n hideBackButton?: boolean,\n listItemView?: any,\n onError?: ((error: CometChat.CometChatException) => void) | null,\n onBack?: () => void\n}\n\nexport const CometChatMessageHeader = (props: IMessageHeaderProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n avatarStyle = {},\n statusIndicatorStyle = {},\n messageHeaderStyle = {},\n listItemStyle = {},\n subtitleView = null,\n disableUsersPresence = false,\n disableTyping = false,\n protectedGroupIcon = PasswordGroupIcon,\n passwordGroupIcon = undefined,\n privateGroupIcon = PrivateGroupIcon,\n menu = null,\n user,\n group,\n backButtonIconURL = BackIcon,\n hideBackButton,\n listItemView = null,\n onError,\n onBack = () => { }\n } = props;\n\n const [subtitleText, setSubtitleText] = useState('');\n const [loggedInUser, setLoggedInUser] = useState(null);\n const userRef = useRefSync(user);\n const groupRef = useRefSync(group);\n const onBackRef = useRefSync(onBack);\n const [ccBackBtnElement, setCCBackBtnRef] = useStateRef(null);\n const isTypingRef = useRef(false);\n const onErrorCallback = useCometChatErrorHandler(onError);\n\n\n // const setSubTitle = useCallback(() => {\n // const user = userRef.current;\n // const group = groupRef.current;\n // if (user) {\n // setSubtitleText(user.getStatus());\n // }\n // else if (group) {\n // const count = group.getMembersCount();\n // const membersText = localize(count > 1 ? \"MEMBERS\" : \"MEMBER\");\n // setSubtitleText(`${count} ${membersText}`);\n // }\n // }, [groupRef, userRef]);\n\n const updateSubtitle = useCallback(() => {\n const user = userRef.current;\n const group = groupRef.current;\n if (user) {\n setSubtitleText(localize(user.getStatus().toUpperCase()));\n }\n else if (group) {\n const count = group.getMembersCount();\n const membersText = localize(count > 1 ? \"MEMBERS\" : \"MEMBER\");\n setSubtitleText(`${count} ${membersText}`);\n }\n }, [userRef, groupRef]);\n\n const updateUserStatus = useCallback((userObject: CometChat.User) => {\n const user = userRef.current;\n if (user) {\n user.setStatus(userObject.getStatus());\n setSubtitleText(user.getStatus());\n }\n }, [userRef]);\n\n const setTypingIndicatorText = useCallback((typing: CometChat.TypingIndicator) => {\n try {\n const sender = typing?.getSender();\n const receiverId = typing?.getReceiverId();\n if (sender?.getUid() === userRef?.current?.getUid() && loggedInUser?.getUid() === receiverId) {\n let isBlocked = new MessageUtils().getUserStatusVisible(userRef?.current);\n if (isBlocked) {\n return;\n }\n setSubtitleText(localize(\"IS_TYPING\"));\n }\n if (groupRef?.current?.getGuid() === receiverId) {\n setSubtitleText(`${sender?.getName()} ${localize(\"IS_TYPING\")}`);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [userRef, groupRef, onErrorCallback, loggedInUser]);\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccGroupMemberAdded = CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (groupRef?.current?.getGuid() === item?.userAddedIn?.getGuid()) {\n if (item?.usersAdded.length > 0) {\n item?.usersAdded.forEach(\n (userAdded: CometChat.User) => {\n if (userAdded?.getUid() === loggedInUser?.getUid()) {\n groupRef?.current?.setHasJoined(true);\n }\n }\n )\n }\n groupRef?.current?.setMembersCount(item?.userAddedIn?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberBanned = CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (groupRef?.current?.getGuid() === item?.kickedFrom?.getGuid()) {\n if (loggedInUser?.getUid() === item?.kickedUser?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberJoined = CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (groupRef?.current?.getGuid() === item?.joinedGroup?.getGuid()) {\n if (loggedInUser?.getUid() === item?.joinedUser?.getUid()) {\n groupRef?.current?.setHasJoined(true);\n }\n groupRef?.current?.setMembersCount(item?.joinedGroup?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccGroupMemberKicked = CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (groupRef?.current?.getGuid() === item?.kickedFrom?.getGuid()) {\n if (loggedInUser?.getUid() === item?.kickedUser?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n const ccOwnershipChanged = CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (groupRef?.current?.getGuid() === item?.group?.getGuid()) {\n groupRef?.current?.setOwner(item?.group?.getOwner());\n updateSubtitle();\n }\n }\n )\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (groupRef?.current?.getGuid() === item?.leftGroup?.getGuid()) {\n if (loggedInUser?.getUid() === item?.userLeft?.getUid()) {\n groupRef?.current?.setHasJoined(false);\n }\n groupRef?.current?.setMembersCount(item?.leftGroup?.getMembersCount());\n updateSubtitle();\n }\n }\n )\n\n return () => {\n try {\n ccGroupMemberAdded.unsubscribe();\n ccGroupMemberBanned.unsubscribe();\n ccGroupMemberJoined.unsubscribe();\n ccGroupMemberKicked.unsubscribe();\n ccOwnershipChanged.unsubscribe();\n ccGroupLeft.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [groupRef, updateSubtitle, onErrorCallback, loggedInUser]);\n\n const attachListeners = useCallback(() => {\n const userListenerId = \"userList_\" + Date.now();\n const groupsListenerId = \"groupsList_\" + Date.now();\n const connectionListenerId = \"connection_\" + Date.now();\n\n if (!disableUsersPresence) {\n CometChat.addUserListener(\n userListenerId,\n new CometChat.UserListener({\n onUserOnline: (onlineUser: CometChat.User) => {\n if (userRef.current?.getUid() === onlineUser.getUid()) {\n updateUserStatus(onlineUser);\n }\n },\n onUserOffline: (offlineUser: CometChat.User) => {\n if (userRef.current?.getUid() === offlineUser?.getUid()) {\n updateUserStatus(offlineUser);\n }\n },\n })\n );\n }\n let onTypingStarted: Subscription;\n let onTypingEnded: Subscription;\n if (!disableTyping) {\n onTypingStarted = CometChatMessageEvents.onTypingStarted.subscribe((typingIndicator: CometChat.TypingIndicator) => {\n isTypingRef.current = true;\n setTypingIndicatorText(typingIndicator);\n });\n onTypingEnded = CometChatMessageEvents.onTypingEnded.subscribe((typingIndicator: CometChat.TypingIndicator) => {\n isTypingRef.current = false;\n updateSubtitle();\n });\n }\n CometChat.addGroupListener(\n groupsListenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (message: CometChat.Action, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group) => {\n if (groupRef.current?.getGuid() === changedGroup?.getGuid() && changedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setScope(newScope);\n }\n updateSubtitle();\n },\n onGroupMemberKicked: (message: CometChat.Action, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group) => {\n if (groupRef.current?.getGuid() === kickedFrom?.getGuid()) {\n if (kickedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(kickedFrom?.getMembersCount());\n updateSubtitle();\n }\n },\n onMemberAddedToGroup: (message: CometChat.Action, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group) => {\n if (groupRef.current?.getGuid() === userAddedIn.getGuid()) {\n if (userAdded.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(true);\n }\n groupRef.current?.setMembersCount(userAddedIn?.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberLeft: (message: CometChat.Action, leavingUser: CometChat.User, groupObject: CometChat.Group) => {\n if (groupRef.current?.getGuid() === groupObject.getGuid()) {\n if (leavingUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(groupObject.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberJoined: (message: CometChat.Action, joinedUser: CometChat.User, joinedGroup: CometChat.Group) => {\n if (groupRef.current?.getGuid() === joinedGroup.getGuid()) {\n if (joinedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(true);\n }\n groupRef.current?.setMembersCount(joinedGroup.getMembersCount());\n updateSubtitle();\n }\n },\n onGroupMemberBanned: (message: CometChat.Action, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group) => {\n if (groupRef.current?.getGuid() === bannedFrom.getGuid()) {\n if (bannedUser.getUid() === loggedInUser?.getUid()) {\n groupRef.current?.setHasJoined(false);\n }\n groupRef.current?.setMembersCount(bannedFrom.getMembersCount());\n updateSubtitle();\n }\n }\n })\n );\n CometChat.addConnectionListener(\n connectionListenerId,\n new CometChat.ConnectionListener({\n onConnected: () => {\n console.log(\"ConnectionListener => On Connected\");\n },\n\n })\n );\n return () => {\n CometChat.removeUserListener(userListenerId);\n CometChat.removeGroupListener(groupsListenerId);\n CometChat.removeConnectionListener(connectionListenerId);\n onTypingStarted?.unsubscribe();\n onTypingEnded?.unsubscribe();\n };\n }, [userRef, groupRef, updateUserStatus, disableTyping, updateSubtitle, setTypingIndicatorText, loggedInUser, disableUsersPresence]);\n\n const checkStatusType = useCallback(() => {\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(userRef.current);\n if (userRef.current) {\n if (!disableUsersPresence && !userBlockedFlag) {\n return \"#00f300\";\n }\n }\n else if (groupRef.current) {\n const groupType = groupRef.current.getType();\n if (groupType === CometChatUIKitConstants.GroupTypes.private) {\n return \"#00f300\";\n }\n else if (groupType === CometChatUIKitConstants.GroupTypes.password) {\n return \"#F7A500\";\n }\n }\n return null;\n }, [userRef, groupRef, disableUsersPresence]);\n\n const checkGroupType = useCallback(() => {\n let image: string = \"\";\n if (groupRef.current) {\n switch (groupRef.current?.getType()) {\n case CometChatUIKitConstants.GroupTypes.password:\n image = passwordGroupIcon || protectedGroupIcon;\n break;\n case CometChatUIKitConstants.GroupTypes.private:\n image = privateGroupIcon;\n break;\n default:\n image = \"\"\n break;\n }\n }\n return image\n }, [groupRef, protectedGroupIcon, privateGroupIcon, passwordGroupIcon]);\n\n const getAvatarStyle = useCallback(() => {\n return { ...new AvatarStyle(defaultAvatarStyle(theme)), ...avatarStyle };\n }, [avatarStyle, theme]);\n\n const getStatusIndicatorStyle = useCallback(() => {\n return { ...defaultStatusIndicatorStyle(), ...statusIndicatorStyle };\n }, [statusIndicatorStyle, userRef]);\n\n const getListItemStyle = useCallback(() => {\n return defaultListItemStyle(listItemStyle, theme);\n }, [listItemStyle, theme]);\n\n const getSubtitleView = useCallback(() => {\n if (subtitleView) {\n return subtitleView;\n }\n let userBlockedFlag = new MessageUtils().getUserStatusVisible(userRef.current);\n\n return !userBlockedFlag ? (\n
    \n \n
    \n ) : null;\n }, [userRef, subtitleView, subtitleText, theme, messageHeaderStyle]);\n\n const getListItemView = useCallback(() => {\n if (listItemView) {\n return listItemView;\n } else {\n return (\n \n
    \n {getSubtitleView()}\n
    \n
    \n )\n }\n }, [userRef, groupRef, listItemView, getSubtitleView, getAvatarStyle, getStatusIndicatorStyle, getListItemStyle, checkGroupType, checkStatusType]);\n\n const getBackButton = () => {\n\n if (hideBackButton) return null;\n\n return (\n
    \n \n
    \n );\n };\n\n const getMenu = useCallback(() => {\n\n if (!menu) return null;\n\n return (\n
    \n {menu}\n
    \n );\n\n }, [menu]);\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n attachListeners,\n onErrorCallback,\n ccBackBtnElement,\n onBackRef,\n userRef,\n groupRef,\n updateSubtitle\n )\n\n return (\n
    \n
    \n {getBackButton()}\n
    \n {getListItemView()}\n
    \n
    \n {getMenu()}\n
    \n );\n}\n","import React, { JSX, useEffect } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: Function,\n subscribeToEvents: any,\n attachListeners: any,\n onErrorCallback: any,\n ccBackBtnElement: JSX.IntrinsicElements[\"cometchat-button\"],\n onBackRef: React.MutableRefObject<() => void>,\n userRef: React.MutableRefObject, \n groupRef: React.MutableRefObject,\n updateSubtitle: Function\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (userObject: CometChat.User | null) => {\n if (userObject) {\n setLoggedInUser(userObject);\n }\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n const removeListenerFns : (() => void)[] = [];\n if(loggedInUser){\n removeListenerFns.push(subscribeToEvents());\n removeListenerFns.push(attachListeners());\n }\n return () => {\n for (let i = 0; i < removeListenerFns.length; i++) {\n return removeListenerFns[i]();\n }\n }\n }, [loggedInUser, attachListeners, subscribeToEvents]);\n\n useEffect(\n () => {\n if (!ccBackBtnElement) return;\n const eventName = \"cc-button-clicked\";\n const onBackClicked = () => onBackRef.current?.();\n ccBackBtnElement.addEventListener(eventName, onBackClicked);\n return () => {\n ccBackBtnElement.removeEventListener(eventName, onBackClicked);\n }\n },\n [ccBackBtnElement, onBackRef]\n );\n\n useEffect(() => {\n updateSubtitle();\n }, [userRef.current, groupRef.current, updateSubtitle])\n}\n\nexport { Hooks };\n","import { CometChatEmojiKeyboard, CometChatIconButton, CometChatButton, CometChatDate, CometChatLabel, CometChatLoader, CometChatAvatar, CometChatReceipt } from \"@cometchat/uikit-elements\";\nimport { CometChatReactions } from \"@cometchat/uikit-shared\";\nimport { createComponent } from \"@lit-labs/react\";\nimport React from \"react\";\n/**\n * Converts Lit web components into React components using the createComponent function from lit labs. This conversion allows these components to be seamlessly integrated and used within a React application while preserving their original functionalities and event handling capabilities.\n **/\n\n/**\n * Converts CometChatReactions Lit web component to a React component using createComponent from lit labs. This can be used to show a list of reactions for a particular message. It can be customized using the style class of this component.For more details, go to [CometChatReactions](https://www.cometchat.com/docs-beta/ui-kit/react/reaction)\n *\n */\nexport const CometChatReactionsView = createComponent({\n tagName: \"cometchat-reactions\",\n elementClass: CometChatReactions,\n react: React,\n});\n\n/**\n * Converts CometChatEmojiKeyboard Lit web component to a React component using createComponent from lit labs. This can be used to show a list of emojis, which returns a particular emoji on click. It can be customized using the style class of this component.For more details, go to [CometChatEmojiKeyboard](https://www.cometchat.com/docs-beta/ui-kit/react/emoji-keyboard)\n *\n */\nexport const CometChatEmojiKeyboardView = createComponent({\n tagName: \"cometchat-emoji-keyboard\",\n elementClass: CometChatEmojiKeyboard,\n events: {\n onEmojiClick: \"cc-emoji-clicked\",\n },\n react: React,\n});\n\n/**\n * Converts CometChatIconButton Lit web component to a React component using createComponent from lit labs. This can be used to display a button which has an icon, a button, or both. It can be customized using the style class of this component.For more details, go to [CometChatIconButton](https://www.cometchat.com/docs-beta/ui-kit/react/icon-button)\n */\nexport const CometChatIconButtonView = createComponent({\n tagName: \"cometchat-icon-button\",\n elementClass: CometChatIconButton,\n react: React,\n events: {\n buttonClick: \"cc-button-clicked\",\n },\n});\n\n/**\n * Converts CometChatButton Lit web component to a React component using createComponent from lit labs. It can be used to display a button with customizable text. It can be customized using the style class of this component.\n */\nexport const CometChatButtonView = createComponent({\n tagName: \"cometchat-button\",\n elementClass: CometChatButton,\n react: React,\n events: {\n buttonClick: \"cc-button-clicked\",\n },\n});\n\n/**\n * Converts CometChatDate Lit web component to a React component using createComponent from lit labs. It can be used to display a date in different time formats by providing the enum and timestamp. It can be customized using the style class of this component.For more details, go to [CometChatDate](https://www.cometchat.com/docs-beta/ui-kit/react/date)\n */\nexport const CometChatDateView = createComponent({\n tagName: \"cometchat-date\",\n elementClass: CometChatDate,\n react: React,\n});\n\n/**\n * Converts CometChatLabel Lit web component to a React component using createComponent from lit labs. It can be used to display normal text or a title with customizable text. It can be customized using the style class of this component.For more details, go to [CometChatLabel](https://www.cometchat.com/docs-beta/ui-kit/react/label)\n */\nexport const CometChatLabelView = createComponent({\n tagName: \"cometchat-label\",\n elementClass: CometChatLabel,\n react: React,\n});\n\n/**\n * Converts CometChatLoader Lit web component to a React component using createComponent from lit labs. It can be used to display a loading icon which is customizable. By default, it has a loading icon inside the component. It can be customized using the style class of this component.For more details, go to [CometChatLoader](https://www.cometchat.com/docs-beta/ui-kit/react/loader)\n */\n\nexport const CometChatLoaderView = createComponent({\n tagName: \"cometchat-loader\",\n elementClass: CometChatLoader,\n react: React,\n});\n\n/**\n * Converts CometChatAvatar Lit web component to a React component using createComponent from lit labs. It can be used to display a user/group image with a fallback name if the URL is not present. It can be customized using the style class of this component. For more details, go to [CometChatAvatar](https://www.cometchat.com/docs-beta/ui-kit/react/avatar)\n */\nexport const CometChatAvatarView = createComponent({\n tagName: \"cometchat-avatar\",\n elementClass: CometChatAvatar,\n react: React,\n});\n\n/**\n * Converts CometChatReceipt Lit web component to a React component using createComponent from lit labs. It can be used to display various types of receipt statuses for a message (like sent, delivered, etc.) which can be customized by sending the enum for which state to be shown. It can be customized using the style class of this component.For more details, go to [CometChatReceipt](https://www.cometchat.com/docs-beta/ui-kit/react/receipt)\n */\nexport const CometChatReceiptView = createComponent({\n tagName: \"cometchat-receipt\",\n elementClass: CometChatReceipt,\n react: React,\n});\n","import {\n AvatarStyle,\n DateStyle,\n LabelStyle,\n ListItemStyle,\n LoaderStyle,\n ReceiptStyle,\n} from \"@cometchat/uikit-elements\";\nimport {\n CometChatTheme,\n CometChatUIKitConstants,\n MessageBubbleAlignment,\n MessageListAlignment,\n fontHelper,\n} from \"@cometchat/uikit-resources\";\nimport {\n BaseStyle,\n ListStyle,\n MessageListStyle,\n ReactionInfoConfiguration,\n ReactionInfoStyle,\n ReactionListStyle,\n ReactionsStyle,\n StickersConstants,\n} from \"@cometchat/uikit-shared\";\nimport { CSSProperties } from \"react\";\n\n/**\n * Generates the style object for the new unread-messages view, visible when the user is not at the bottom and receives a new message\n *\n * @returns {CSSProperties}\n */\nexport const newMessageIndicatorStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"fit-content\",\n width: \"100%\",\n };\n};\n\n/**\n * Generates the style object for the custom header view, visible on the top of the message list\n *\n * @returns {CSSProperties}\n */\nexport const headerStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n width: \"100%\",\n height: \"auto\",\n };\n};\n\n/**\n * Returns the style object for the custom footer view, visible on the bottom of the message list. By default, smart replies are visible for the message received.\n *\n * @returns {CSSProperties}\n */\nexport const footerStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n width: \"100%\",\n height: \"auto\",\n };\n};\n\n/**\n * Provides the style object for the CometChatList wrapper which renders a list of messages\n\n *\n * @returns {CSSProperties}\n */\nexport const listWrapperStyle: () => CSSProperties = () => {\n return {\n height: \"100%\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n overflowX: \"hidden\",\n boxSizing: \"border-box\",\n };\n};\n\n/**\n * Generates the style object for the MessageList wrapper which renders the CometChatList component\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {CSSProperties}\n */\nexport const wrapperStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => CSSProperties = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n height: \"100%\",\n width: \"100%\",\n flex: \"1 1 0\",\n order: \"2\",\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n border: `1px solid ${theme.palette.getAccent50()}`,\n borderRadius: \"inherit\",\n background: theme.palette.getBackground(),\n ...messageListStyle,\n };\n };\n\n/**\n * Style object for the threadView in the CometChatMessageBubble which shows the message count of a specific thread visible below the CometChatMessageBubble in a particular user/group.\n *\n * @param {CometChat.BaseMessage} message\n * @param {CometChatTheme} theme\n * @param {(CometChat.User | null)} loggedInUser\n * @param {MessageListStyle} [messageListStyle={}]\n * @param {MessageBubbleAlignment} [alignment]\n * @returns {CSSProperties}\n */\nexport const messageThreadViewStyle: (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n loggedInUser: CometChat.User | null,\n messageListStyle: MessageListStyle | undefined,\n alignment?: MessageBubbleAlignment\n) => CSSProperties = (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n loggedInUser: CometChat.User | null,\n messageListStyle: MessageListStyle = {},\n alignment?: MessageBubbleAlignment\n) => {\n\n const baseStyle = {\n height: \"100%\",\n width: \"100%\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: messageListStyle.threadReplyIconTint || theme.palette.getAccent600(),\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n buttonTextColor: messageListStyle?.threadReplyTextColor || theme.palette.getAccent(),\n buttonTextFont: messageListStyle?.threadReplyTextFont || fontHelper(theme.typography.text2),\n iconHeight: \"15px\",\n iconWidth: \"15px\"\n };\n\n if ((!message.getSender() || message.getSender().getUid() === loggedInUser?.getUid()) && alignment != MessageBubbleAlignment.left) {\n return {\n ...baseStyle,\n flexFlow: \"row-reverse\",\n };\n } else {\n return {\n ...baseStyle,\n flexFlow: \"row\",\n };\n }\n };\n\n\n\n/**\n * Style object for the new message indicator text visible upon receiving a new message while the screen is not at the last message of the chat.\n *\n * @param {CometChatTheme} theme\n * @returns {CSSProperties}\n */\nexport const newMessageTextStyleStyle: (theme: CometChatTheme) => CSSProperties = (theme: CometChatTheme) => {\n return {\n height: \"fit-content\",\n width: \"fit-content\",\n background: theme.palette.getPrimary(),\n display: \"flex\",\n justifyContent: \"center\",\n buttonTextFont: fontHelper(theme.typography.text2),\n buttonTextColor: theme.palette.getAccent(\"dark\"),\n border: \"none\",\n borderRadius: \"12px\",\n padding: \"2px 6px\"\n };\n};\n\n\n\n/**\n * Default style object for CometChatMessageBubble component which renders all types of supported message types.\n *\n * @param {CometChat.BaseMessage} message\n * @param {CometChatTheme} theme\n * @param {(MessageListAlignment | undefined)} alignment\n * @param {(CometChat.User | null)} loggedInUser\n * @returns {BaseStyle}\n */\nexport const messageBubbleStyle: (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageListAlignment | undefined,\n loggedInUser: CometChat.User | null\n) => BaseStyle = (\n message: CometChat.BaseMessage,\n theme: CometChatTheme,\n alignment: MessageListAlignment | undefined,\n loggedInUser: CometChat.User | null\n) => {\n const baseBackground: BaseStyle = {\n background: \"transparent\",\n borderRadius: \"12px\",\n };\n\n const coloredBackground: BaseStyle = {\n background: theme.palette.getSecondary(),\n borderRadius: \"12px\",\n };\n\n if (message.getDeletedAt()) {\n return {\n ...baseBackground,\n };\n } else if (\n message?.getType() === CometChatUIKitConstants.calls.meeting &&\n (!message?.getSender() || message?.getSender().getUid() === loggedInUser?.getUid())\n ) {\n return {\n ...coloredBackground,\n background: theme.palette.getPrimary(),\n border: `none`,\n };\n } else if (message?.getType() === StickersConstants.sticker) {\n return baseBackground;\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.text &&\n (!message.getSender() || loggedInUser?.getUid() === message.getSender().getUid())\n ) {\n return {\n ...coloredBackground,\n background:\n alignment === MessageListAlignment.left\n ? theme.palette.getSecondary()\n : theme.palette.getPrimary(),\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.message &&\n message.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return {\n ...coloredBackground,\n borderRadius: \"\",\n };\n } else if (\n message.getType() === CometChatUIKitConstants.MessageTypes.groupMember ||\n message.getCategory() === CometChatUIKitConstants.MessageCategory.call\n ) {\n return {\n ...baseBackground,\n border: `1px solid ${theme.palette.getSecondary()}`,\n };\n } else if (\n !message.getDeletedAt() &&\n message.getCategory() === CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return {\n ...coloredBackground,\n width: \"300px\",\n };\n } else {\n return coloredBackground;\n }\n };\n\n/**\n * Default style object for receipt status of the message if it's read sent or delivered.\n *\n * @param {CometChatTheme} theme\n * @param {CometChat.BaseMessage} message\n * @returns {ReceiptStyle}\n */\nexport const messageReceiptStyle: (theme: CometChatTheme, message: CometChat.BaseMessage) => ReceiptStyle = (theme: CometChatTheme, message: CometChat.BaseMessage) => {\n const isTextMessage = message?.getType() === CometChatUIKitConstants.MessageTypes.text;\n return new ReceiptStyle({\n waitIconTint: theme.palette.getAccent700(),\n sentIconTint: theme.palette.getAccent600(),\n deliveredIconTint: theme.palette.getAccent600(),\n readIconTint: isTextMessage ? theme.palette.getBackground() : theme.palette.getPrimary(),\n errorIconTint: theme.palette.getError(),\n height: \"11px\",\n width: \"12px\",\n background:\"none\"\n });\n};\n\n/**\n * Default style object for statusInfo view which renders the time when the message was sent and receipt status\nof the message if it's read or delivered.\n *\n * @param {boolean} isValid\n * @param {CometChatTheme} theme\n * @param {CometChat.BaseMessage} message\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const getStatusInfoViewStyle: (\n isValid: boolean,\n theme: CometChatTheme,\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n) => CSSProperties = (\n isValid: boolean,\n theme: CometChatTheme,\n message: CometChat.BaseMessage,\n alignment: MessageBubbleAlignment\n) => {\n const baseStyle = {\n display: \"flex\",\n alignItems: \"end\",\n padding: \"1px 8px 8px\",\n gap: \"4px\",\n marginTop: \"0\"\n };\n\n if (isValid) {\n return {\n ...baseStyle,\n justifyContent: \"center\",\n height: \"fit-content\",\n borderRadius: \"22px\",\n padding: \"3px 5px\",\n paddingTop: \"2px\",\n position: \"relative\",\n marginTop: \"-22px\",\n marginRight: \"12px\",\n background: theme.palette.getAccent500(\"dark\"),\n width: \"fit-content\"\n };\n } else {\n if (message?.getType() === CometChatUIKitConstants.MessageTypes.text) {\n baseStyle['padding'] = '0px 8px 8px';\n baseStyle['marginTop'] = alignment === MessageBubbleAlignment.right ? '-6px' : '-5px'\n }\n\n return baseStyle;\n }\n };\n\n/**\n * Style object for footerView wrapper which is visible at the bottom of the CometChatMessageBubble component.\nIt is a placeholder which accepts a custom view. By default, message Reactions are visible at the bottom for the message\nreceived in a particular User/Group Chat.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const bubbleFooterViewWrapperStyle: (alignment: MessageBubbleAlignment) => CSSProperties = (\n alignment: MessageBubbleAlignment\n): CSSProperties => {\n let justifyContent = \"center\";\n if (alignment === MessageBubbleAlignment.right) {\n justifyContent = \"flex-end\";\n } else if (alignment === MessageBubbleAlignment.left) {\n justifyContent = \"flex-start\";\n }\n\n return {\n display: \"flex\",\n justifyContent: justifyContent,\n width: \"100%\",\n boxSizing: \"border-box\",\n };\n};\n\n/**\n * Style object for time in headerView of CometChatMessageBubble which shows the time when the message was sent\nin the particular user/group chat\n\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {DateStyle}\n */\nexport const messageBubbleHeaderDateStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => DateStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n return {\n textColor:\n messageListStyle?.TimestampTextColor || theme.palette.getAccent600(),\n textFont:\n messageListStyle?.TimestampTextFont ||\n fontHelper(theme.typography.caption3),\n padding: \"0\",\n display: \"block\"\n };\n };\n\n/**\n * Style object for title in headerView of CometChatMessageBubble which shows the name\nof the sender of the message in the particular user/group chat\n *\n * @param {CometChatTheme} theme\n * @returns {LabelStyle}\n */\nexport const bubbleHeaderTitleStyle: (theme: CometChatTheme, messageListStyle?: MessageListStyle) => LabelStyle = (theme: CometChatTheme, messageListStyle?: MessageListStyle) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n textFont: defaultMessageListStyle?.nameTextFont || fontHelper(theme.typography.caption2),\n textColor: defaultMessageListStyle?.nameTextColor || theme.palette.getAccent600(),\n };\n};\n\n/**\n * Generates the style object for the CometChatDate component, visible between the messages in CometChatMessageList as a separator for same-date messages.\n *\n * @param {(DateStyle | undefined)} dateSeparatorStyle\n * @param {CometChatTheme} theme\n * @returns {DateStyle}\n */\nexport const dateSeperatorStyle: (\n dateSeparatorStyle: DateStyle | undefined,\n theme: CometChatTheme\n) => DateStyle = (\n dateSeparatorStyle: DateStyle | undefined,\n theme: CometChatTheme\n) => {\n return new DateStyle({\n textFont:\n dateSeparatorStyle?.textFont || fontHelper(theme.typography.subtitle2),\n textColor: dateSeparatorStyle?.textColor || theme.palette.getAccent600(),\n background: dateSeparatorStyle?.background || \"inherit\",\n height: dateSeparatorStyle?.height || \"100%\",\n width: dateSeparatorStyle?.width || \"100%\",\n border:\n dateSeparatorStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: dateSeparatorStyle?.borderRadius || \"8px\",\n });\n };\n\n/**\n * Provides the default style object for the CometChatMessageList component if the required styles are not provided by the parent component.\n *\n * @param {CometChatTheme} theme\n * @returns {MessageListStyle}\n */\nexport const tempMessageListStyle: (theme: CometChatTheme) => MessageListStyle = (theme: CometChatTheme) => {\n return new MessageListStyle({\n background: theme.palette.getBackground(),\n border: `none`,\n emptyStateTextFont: fontHelper(theme.typography.title1),\n emptyStateTextColor: theme.palette.getAccent600(),\n errorStateTextFont: fontHelper(theme.typography.title1),\n errorStateTextColor: theme.palette.getAccent600(),\n loadingIconTint: theme.palette.getAccent600(),\n nameTextFont: fontHelper(theme.typography.caption2),\n nameTextColor: theme.palette.getAccent600(),\n threadReplyTextFont: fontHelper(theme.typography.subtitle1),\n threadReplyIconTint: theme.palette.getAccent600(),\n threadReplyTextColor: theme.palette.getAccent600(),\n TimestampTextFont: fontHelper(theme.typography.caption2),\n TimestampTextColor: theme.palette.getAccent600(),\n });\n};\n\n\n/**\n * Generates the style object for the loading view visible in the center of the CometChatMessageList component until the messages for a specific User/Group are fetched.\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {LoaderStyle}\n */\nexport const loadingViewStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => LoaderStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n iconTint: defaultMessageListStyle.loadingIconTint,\n };\n };\n\n/**\n * Generates the style object for the error view visible in the center of the CometChatMessageList component when there is an issue fetching the messages of a specific User/Group.\n *\n * @param {(MessageListStyle | undefined)} messageListStyle\n * @param {CometChatTheme} theme\n * @returns {LabelStyle}\n */\nexport const errorViewStyle: (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => LabelStyle = (\n messageListStyle: MessageListStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultMessageListStyle: MessageListStyle = {\n ...tempMessageListStyle(theme),\n ...messageListStyle,\n };\n return {\n textFont: defaultMessageListStyle.errorStateTextFont,\n textColor: defaultMessageListStyle.errorStateTextColor,\n };\n };\n\n/**\n * Generates the style object for the CometChatAvatar component, which includes both styling received from the parent component and default styling required in the CometChatAvatar component.\n *\n * @param {(AvatarStyle | undefined)} avatarStyle\n * @param {CometChatTheme} theme\n * @returns {AvatarStyle}\n */\nexport const messageAvatarStyle: (\n avatarStyle: AvatarStyle | undefined,\n theme: CometChatTheme\n) => AvatarStyle = (\n avatarStyle: AvatarStyle | undefined,\n theme: CometChatTheme\n) => {\n const defaultAvatarStyle = new AvatarStyle({\n borderRadius: \"24px\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: \"0\",\n outerViewBorderRadius: \"0\",\n outerViewBorderColor: \"\",\n outerViewBorderSpacing: \"0\",\n });\n return { ...defaultAvatarStyle, ...avatarStyle };\n };\n\n/**\n * Returns the default style object for CometChatDate wrapper, visible in the center between the messages in CometChatMessageList as a separator for same-day messages.\n *\n * @returns {CSSProperties}\n */\nexport const dateSeperatorWrapperStyle: () => CSSProperties = () => {\n return {\n display: \"flex\",\n justifyContent: \"center\",\n width: \"100%\",\n marginBottom: \"16px\",\n };\n};\n\n/**\n * Provides the default style object for the CometChatAvatar visible in the leadingView of CometChatMessageBubble, showing the sender's avatar.\n *\n * @type {AvatarStyle}\n */\nexport const defaultAvatarStyle: AvatarStyle = {\n borderRadius: \"24px\",\n width: \"36px\",\n height: \"36px\",\n};\n/**\n * Returns the default style object for CometChatMessageList if the style is not received from the parent.\n *\n * @type {MessageListStyle}\n */\nexport const defaultMessageListStyle: MessageListStyle = {\n nameTextFont: \"600 15px Inter, sans-serif\",\n nameTextColor: \"white\",\n TimestampTextFont: \"\",\n TimestampTextColor: \"\",\n threadReplyTextFont: \"\",\n threadReplyIconTint: \"\",\n threadReplyTextColor: \"\",\n emptyStateTextFont: \"700 22px Inter, sans-serif\",\n emptyStateTextColor: \"#bcbcbc\",\n errorStateTextFont: \"700 22px Inter, sans-serif\",\n errorStateTextColor: \"#bcbcbc\",\n loadingIconTint: \"grey\",\n};\n\n/**\n * Provides the default style object for the CometChatMessageBubble wrapper div.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const bubbleStyle: (\n alignment: MessageBubbleAlignment\n) => CSSProperties = (\n alignment: MessageBubbleAlignment\n): CSSProperties => {\n let justifyContent = \"center\";\n if (alignment === MessageBubbleAlignment.right) {\n justifyContent = \"flex-end\";\n } else if (alignment === MessageBubbleAlignment.left) {\n justifyContent = \"flex-start\";\n }\n\n return {\n display: \"flex\",\n justifyContent: justifyContent,\n width: \"100%\",\n marginBottom: \"16px\",\n };\n };\n\n/**\n * Supplies the default style object for the CometChatMessageBubble container.\n *\n * @type {CSSProperties}\n */\nexport const defaultMessageListBubbleStyle: CSSProperties = {\n padding: \"0px 0px 0px 15px\",\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n marginRight: \"8px\",\n boxSizing: \"border-box\"\n};\n\n/**\n * Returns the default style for the CometChatList component, which renders a list of messages for a specific user/group.\n *\n * @returns {ListStyle}\n */\nexport const getListStyle: () => ListStyle = () => {\n return new ListStyle({\n height: \"100%\",\n width: \"100%\",\n background: \"inherit\",\n });\n};\n\n/**\n * Provides the default style for the CometChatAvatar component, which renders an Avatar about the reactor in the Reactions list.\n *\n * @param {CometChatTheme} theme\n * @returns {AvatarStyle}\n */\nexport const getReactionListAvatarStyle: (theme: CometChatTheme) => AvatarStyle = (theme: CometChatTheme) => {\n return new AvatarStyle({\n borderRadius: \"50%\",\n width: \"35px\",\n height: \"35px\",\n border: \"none\",\n backgroundColor: theme.palette.getAccent700(),\n nameTextColor: theme.palette.getAccent900(),\n backgroundSize: \"cover\",\n nameTextFont: fontHelper(theme.typography.subtitle1),\n outerViewBorderWidth: \"0\",\n outerViewBorderRadius: \"0\",\n outerViewBorderColor: \"\",\n outerViewBorderSpacing: \"0\",\n });\n}\n\n/**\n * Generates the default style for the CometChatListItem component, which renders details about the reaction in the list.\n *\n * @param {CometChatTheme} theme\n * @returns {ListItemStyle}\n */\nexport const getReactionListItemStyle: (theme: CometChatTheme) => ListItemStyle = (theme: CometChatTheme) => {\n return new ListItemStyle({\n background: \"transparent\",\n activeBackground: \"transparent\",\n hoverBackground: \"transparent\",\n titleFont: fontHelper(theme.typography.subtitle1),\n titleColor: theme.palette.getAccent(),\n separatorColor: theme.palette.getAccent100(),\n });\n}\n\n/**\n * Provides the default style for the CometChatReactionList component, which shows a list of reactions on a specific reaction along with the reactor's details.\n *\n * @param {CometChatTheme} theme\n * @returns {ReactionListStyle}\n */\nexport const getReactionListStyle: (theme: CometChatTheme) => ReactionListStyle = (theme: CometChatTheme) => {\n return new ReactionListStyle({\n width: \"320px\",\n height: \"300px\",\n borderRadius: \"12px\",\n background: theme.palette.getAccent900(),\n border: \"none\",\n errorIconTint: theme.palette.getAccent400(),\n loadingIconTint: theme.palette.getAccent400(),\n sliderEmojiCountFont: fontHelper(theme.typography.subtitle2),\n sliderEmojiFont: fontHelper(theme.typography.subtitle1),\n subtitleTextColor: theme.palette.getAccent500(),\n subtitleTextFont: fontHelper(theme.typography.subtitle2),\n tailViewFont: fontHelper(theme.typography.title1),\n dividerTint: theme.palette.getAccent100(),\n sliderEmojiCountColor: theme.palette.getAccent500(),\n activeEmojiBackground: theme.palette.getAccent100()\n })\n}\n\n/**\n * Default styling for CometChatReactionInfo component. If the configuration styling is not passed.\n *\n * @param {CometChatTheme} theme\n * @param {ReactionInfoConfiguration} config\n * @returns {ReactionInfoStyle}\n */\nexport const getReactionInfoStyle: (theme: CometChatTheme, config: ReactionInfoConfiguration) => ReactionInfoStyle = (theme: CometChatTheme, config: ReactionInfoConfiguration) => {\n return new ReactionInfoStyle({\n background: config?.reactionInfoStyle?.background || theme.palette.getAccent(\"light\"),\n border: config?.reactionInfoStyle?.border || \"none\",\n borderRadius: config?.reactionInfoStyle?.borderRadius || \"12px\",\n errorIconTint: config?.reactionInfoStyle?.errorIconTint || theme.palette.getBackground(\"light\"),\n loadingIconTint: config?.reactionInfoStyle?.loadingIconTint || theme.palette.getBackground(\"light\"),\n namesColor: config?.reactionInfoStyle?.namesColor || theme.palette.getBackground(\"light\"),\n namesFont: config?.reactionInfoStyle?.namesFont || fontHelper(theme.typography.subtitle2),\n reactedTextColor: config?.reactionInfoStyle?.reactedTextColor || theme.palette.getAccent700(\"dark\"),\n reactedTextFont: config?.reactionInfoStyle?.reactedTextFont || fontHelper(theme.typography.subtitle2),\n reactionFontSize: config?.reactionInfoStyle?.reactionFontSize || \"37px\"\n });\n}\n\n/**\n * Default styleing for CometChatReactions component wrapper.\n *\n * @param {MessageBubbleAlignment} alignment\n * @returns {CSSProperties}\n */\nexport const getReactionViewStyle: (alignment: MessageBubbleAlignment) => CSSProperties = (alignment: MessageBubbleAlignment) => {\n return {\n width: \"100%\",\n padding: \"5px 0px\",\n boxSizing: \"border-box\",\n display: \"flex\",\n marginTop: \"-9px\",\n justifyContent: alignment === MessageBubbleAlignment.left ? \"flex-start\" : \"flex-end\",\n }\n}\n/**\n * Returns the default style for the statusInfoView wrapper in CometChatMessageBubble.\n *\n * @returns {CSSProperties}\n */\nexport const getStatusInfoStyle: () => CSSProperties = () => {\n return {\n position: \"relative\", display: \"flex\", justifyContent: \"flex-end\"\n }\n}\n/**\n * Generates the default style for the CometChatReactions component wrapper, which shows a list of reactions on a specific message, visible in the footer view of the message bubble.\n *\n * @param {ReactionsStyle} [reactionsStyle]\n * @param {CometChatTheme} theme\n * @returns {ReactionsStyle}\n */\nexport const getReactionsStyle: (reactionsStyle: ReactionsStyle | undefined, theme: CometChatTheme) => ReactionsStyle = (reactionsStyle: ReactionsStyle = {}, theme: CometChatTheme) => {\n return new ReactionsStyle({\n height: reactionsStyle?.height || \"100%\",\n width: reactionsStyle?.width || \"fit-content\",\n border: reactionsStyle?.border || \"none\",\n borderRadius: reactionsStyle?.borderRadius || \"0\",\n background: reactionsStyle?.background || \"transparent\",\n activeReactionBackground: reactionsStyle?.activeReactionBackground || theme.palette.getPrimary150(),\n reactionBackground: reactionsStyle?.reactionBackground || theme.palette.getAccent100(),\n reactionBorder: reactionsStyle?.reactionBorder || `none`,\n activeReactionBorder: reactionsStyle?.activeReactionBorder || `1px solid ${theme.palette.getPrimary500()}`,\n reactionBorderRadius: reactionsStyle?.reactionBorderRadius || \"20px\",\n activeReactionCountTextColor: reactionsStyle?.activeReactionCountTextColor || theme.palette.getAccent(),\n activeReactionCountTextFont: reactionsStyle?.activeReactionCountTextFont || fontHelper(theme.typography.caption1),\n reactionCountTextFont: reactionsStyle?.reactionCountTextFont || fontHelper(theme.typography.caption1),\n reactionCountTextColor: reactionsStyle?.reactionCountTextColor || theme.palette.getAccent(),\n reactionBoxShadow: reactionsStyle?.reactionBoxShadow || \"rgba(0, 0, 0, 0.1) 0px 4px 12px\",\n reactionEmojiFont: reactionsStyle?.reactionEmojiFont || fontHelper(theme.typography.subtitle1),\n baseReactionBackground: reactionsStyle?.baseReactionBackground || theme.palette.getBackground(),\n })\n}\n","\nimport { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\nimport { CSSProperties } from \"react\";\nimport { ReceiptStyle, DateStyle, BackdropStyle } from \"@cometchat/uikit-elements\";\nimport { BaseStyle, MessageInformationStyle } from \"@cometchat/uikit-shared\";\n\ntype ButtonStyle = CSSProperties & { buttonIconTint?: string };\ntype WrapperStyle = CSSProperties & { position?: string };\n\nexport function closeBtnStyle(theme: CometChatTheme): ButtonStyle {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n buttonIconTint: theme.palette.getPrimary(),\n background: \"transparent\",\n position: \"absolute\",\n top: \"20px\",\n right: \"16px\"\n };\n}\n\nexport const dividerStyle = (theme: CometChatTheme) => {\n return {\n height: \"1px\",\n width: \"100%\",\n background: theme.palette.getAccent100()\n }\n}\n\nexport function receiptStyle(theme: CometChatTheme): ReceiptStyle {\n return new ReceiptStyle({\n deliveredIconTint: theme.palette.getAccent600(),\n readIconTint: theme.palette.getPrimary(),\n errorIconTint: theme.palette.getError(),\n height: \"20px\",\n width: \"20px\"\n });\n}\n\nexport const MessageDateStyle = (dateSeparatorStyle: DateStyle | undefined, theme: CometChatTheme) => {\n let tempDateSeparatorStyle: DateStyle | undefined = dateSeparatorStyle;\n let defaultDateStyle = new DateStyle({\n textFont: fontHelper(theme.typography.caption2),\n textColor: theme.palette.getAccent600(),\n background: theme.palette.getAccent100(),\n height: \"100%\",\n width: \"100%\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: \"8px\",\n })\n\n tempDateSeparatorStyle = { ...defaultDateStyle, ...tempDateSeparatorStyle };\n\n tempDateSeparatorStyle.background = tempDateSeparatorStyle.background || theme.palette.getAccent600()\n\n return tempDateSeparatorStyle;\n}\n\nexport const defaultDateSeparatorStyle = {\n background: \"transparent\",\n height: \"\",\n width: \"\",\n border: \"none\",\n borderRadius: \"none\",\n}\n\nexport const dateInfoStyle = {\n marginLeft: \"auto\"\n}\nexport const receiptWrapperStyle = {\n display: \"flex\"\n}\nexport const receiptSubtitleWrapperStyle = {\n width: \"100%\"\n}\nexport const messageInfoStyle = (theme: CometChatTheme) => {\n return {\n width: \"360px\", height: \"620px\", margin: \"0 auto\", background: theme.palette.getBackground(), borderRadius: \"12px\"\n }\n}\n\nexport const messageInfoHeaderStyle = (theme: CometChatTheme): WrapperStyle => {\n return {\n textAlign: \"center\",\n position: \"relative\",\n font: fontHelper(theme.typography.title1),\n color: theme.palette.getAccent(),\n padding: \"19px 0px\"\n\n }\n}\nexport const getMessageInfoStyle = (theme: CometChatTheme, messageInfo?: MessageInformationStyle): CSSProperties => {\n let defaultStyle = {\n width: \"360px\",\n height: \"620px\",\n margin: \"0 auto\",\n background: theme.palette.getBackground(),\n borderRadius: \"12px\",\n overflow: \"hidden\",\n boxSizing: \"border-box\" as any\n }\n return { ...defaultStyle, ...messageInfo }\n}\n\nexport const getReceiptTextStyle = (theme: CometChatTheme): CSSProperties => {\n return {\n marginTop: \"8px\",\n marginBottom: \"8px\",\n marginLeft: \"10px\",\n fontSize: fontHelper(theme.typography.subtitle2),\n fontWeight: \"500\",\n color: theme.palette.getAccent600(),\n display: \"flex\"\n\n }\n}\n\n\nexport const getMessageTextStyle = (theme: CometChatTheme): CSSProperties => {\n return {\n marginBottom: \"8px\",\n marginLeft: \"10px\",\n fontSize: fontHelper(theme.typography.subtitle2),\n fontWeight: \"500\",\n color: theme.palette.getAccent600(),\n display: \"flex\"\n }\n}\n\n\nexport const getParentBubbleStyle = (alignBubble?: boolean): CSSProperties => {\n return {\n height: \"fit-content\",\n maxHeight: \"182px\",\n overflow: \"hidden auto\",\n boxSizing: \"border-box\",\n padding: \"2px 8px\",\n justifyContent: \"flex-end\",\n display: alignBubble ? \"flex\" : \"inherit\",\n paddingRight: alignBubble ? \"16px\" : \"8px\"\n }\n}\n\nexport function getBackdropStyle(backdropStyleObject : BaseStyle) : BackdropStyle {\n return {\n background: 'rgba(0, 0, 0, 0.5)',\n position: 'absolute',\n width: backdropStyleObject?.width,\n height: backdropStyleObject?.height,\n ...backdropStyleObject,\n };\n}","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERl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Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","import { AvatarStyle, BackdropStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIKitConstants,\n DatePatterns,\n MessageBubbleAlignment,\n Receipts,\n States,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { CometChatUIKitLoginListener, MessageInformationStyle } from \"@cometchat/uikit-shared\";\nimport { MessageDateStyle, closeBtnStyle, dateInfoStyle, defaultDateSeparatorStyle, dividerStyle, getBackdropStyle, getMessageInfoStyle, getMessageTextStyle, getParentBubbleStyle, getReceiptTextStyle, messageInfoHeaderStyle, messageInfoStyle, receiptStyle, receiptSubtitleWrapperStyle, receiptWrapperStyle } from \"./style\"\nimport { useCallback, useContext, useEffect, useRef, useState } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatButton } from \"../Shared/Views/CometChatButton\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatListItem } from \"../Shared/Views/CometChatListItem\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\"\nimport { CometChatUIKit } from \"../Shared/CometChatUIKit/CometChatUIKit\";\nimport DeliveredIcon from \"./assets/message-delivered.svg\";\nimport { MessageUtils } from \"../Shared/Utils/MessageUtils\";\nimport ReadIcon from \"./assets/message-read.svg\";\nimport SpinnerIcon from \"./assets/spinner.svg\";\nimport WarningIcon from \"./assets/warning-small.svg\";\n\ninterface MessageInformationProps {\n title?: string;\n message: CometChat.BaseMessage;\n template?: CometChatMessageTemplate;\n closeIconURL?: string;\n bubbleView?: (messageObject: CometChat.BaseMessage) => void | JSX.Element;\n listItemView?: (\n messageObject: CometChat.BaseMessage,\n messageReceipt?: CometChat.MessageReceipt\n ) => JSX.Element;\n subtitleView?: (\n messageObject: CometChat.BaseMessage,\n messageReceipt?: CometChat.MessageReceipt\n ) => void | JSX.Element;\n receiptDatePattern?: (timestamp: number) => string;\n onClose?: () => void;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n messageInformationStyle?: MessageInformationStyle;\n readIcon?: string;\n deliveredIcon?: string;\n listItemStyle?: ListItemStyle;\n emptyStateText?: any;\n emptyStateView?: any;\n loadingIconURL?: string;\n loadingStateView?: any;\n errorStateText?: any;\n errorStateView?: any;\n backdropStyle?:BackdropStyle;\n}\n\nconst CometChatMessageInformation = (props: MessageInformationProps) => {\n const { theme } = useContext(CometChatThemeContext);\n\n const {\n title = localize(\"MESSAGE_INFORMATION\"),\n closeIconURL,\n onClose,\n message,\n bubbleView,\n subtitleView = null,\n listItemView = null,\n messageInformationStyle,\n listItemStyle,\n receiptDatePattern,\n template,\n loadingIconURL = SpinnerIcon,\n backdropStyle = new BackdropStyle({})\n } = props;\n\n const [userObj, setUserObj] = useState();\n const [templateRef, setTemplateRef] = useState(template!);\n const [messageReceipts, setMessageReceipts] = useState<\n CometChat.MessageReceipt[]\n >([]);\n const loggedInUser = useRef(null);\n\n const getListItemStyle = () => {\n let defaultStyle: ListItemStyle = new ListItemStyle({\n height: \"70px\",\n width: \"100%\",\n background: \"inherit\",\n borderRadius: \"0\",\n titleFont: fontHelper(theme.typography.title2),\n titleColor: theme.palette.getAccent(),\n border: \"none\",\n separatorColor: theme.palette.getAccent200(),\n hoverBackground: theme.palette.getAccent50(),\n });\n return { ...defaultStyle, ...listItemStyle };\n };\n\n async function getMessageReceipt(message?: CometChat.BaseMessage) {\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n let messageReceiptVal: CometChat.MessageReceipt | any =\n await CometChat.getMessageReceipts(message?.getId());\n let receiptList = messageReceiptVal.filter((receipt: CometChat.MessageReceipt) =>\n receipt.getSender().getUid() !== loggedInUser.current?.getUid()) as CometChat.MessageReceipt[]\n setMessageReceipts(receiptList);\n return messageReceiptVal;\n }\n }\n\n useEffect(()=>{\n if(!template){\n const getTemplateRef = CometChatUIKit.getDataSource()?.getMessageTemplate(props.message?.getType(), props.message?.getCategory(), theme);\n if (getTemplateRef)\n setTemplateRef(getTemplateRef);\n }\n },[props.message, template, theme])\n\n useEffect(() => {\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n setUserObj(message.getReceiver() as CometChat.User);\n }\n if (\n message?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n getMessageReceipt(message);\n }\n }, [message]);\n\n function getCloseBtnView() {\n return (\n \n );\n }\n\n const getBubbleView = useCallback(() => {\n if (CometChatUIKitLoginListener.getLoggedInUser()) {\n loggedInUser.current = CometChatUIKitLoginListener.getLoggedInUser();\n }\n if (message) {\n if (bubbleView) return bubbleView(message);\n else {\n\n if (!templateRef) {\n return <>\n }\n\n const style = new MessageUtils().messageBubbleStyle(\n message,\n theme,\n MessageBubbleAlignment.right,\n loggedInUser.current\n );\n const view = new MessageUtils().getMessageBubble(\n message,\n templateRef,\n style,\n MessageBubbleAlignment.right\n );\n return view;\n }\n }\n return null;\n }, [message, bubbleView, templateRef, theme]);\n\n function getListItemSubtitleView(\n deliveredAt: number,\n readAt?: number | undefined\n ): JSX.Element {\n if (subtitleView !== null && typeof(subtitleView) === \"function\" ) {\n return <>{subtitleView(message)};\n }\n\n return (\n
    \n
    \n {getSubtitleReadReceiptView(deliveredAt, readAt)}\n
    \n
    \n );\n }\n\n /**\n * Creates subtitle receipt view\n */\n function getSubtitleReadReceiptView(\n deliveredAt: number,\n readAt?: number\n ): JSX.Element | null {\n return (\n
    \n \n
    \n \n
    \n \n {deliveredAt !== undefined && localize(\"DELIVERED\")}\n
    \n
    \n \n
    \n \n {readAt && \n
    \n \n
    \n \n {readAt !== undefined && localize(\"READ\")}\n \n {readAt !== undefined && (\n
    \n \n
    \n )}\n {readAt === undefined && (\n
    \n ...\n
    \n )}\n \n }\n \n );\n }\n\n const subtitleStyle = {\n font: fontHelper(theme.typography.subtitle2),\n color: theme.palette.getAccent600(),\n };\n\n const defaultAvatarStyle = new AvatarStyle({\n borderRadius: \"50%\",\n width: \"43px\",\n height: \"43px\",\n });\n\n function getListitemReceipt(\n messageReceipt: CometChat.MessageReceipt\n ): JSX.Element {\n return (\n <>\n {listItemView\n ? listItemView(message, messageReceipt)\n : getDefaultListItemView(messageReceipt)}\n \n );\n }\n\n /**\n * Creates default list item view\n */\n function getDefaultListItemView(messageReceipt: CometChat.MessageReceipt) {\n return (\n \n );\n }\n\n return (\n \n \n \n \n
    {title}
    \n {getCloseBtnView()}\n \n \n \n {localize(\"MESSAGE\")}\n \n \n
    {getBubbleView()}
    \n \n \n {localize(\"RECEIPT_INFORMATION\")}\n \n \n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n message.getDeliveredAt() !== undefined && (\n
    \n \n
    \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n message.getDeliveredAt() === undefined && (\n \n {\" \"}\n {localize(\"NO_RECIPIENT\")}{\" \"}\n \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n messageReceipts.length > 0 && (\n
    \n \n
    \n )}\n {message.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n messageReceipts.length <= 0 && (\n \n {\" \"}\n {localize(\"NO_RECIPIENTS\")}{\" \"}\n \n )}\n \n \n \n \n );\n};\n\nexport { CometChatMessageInformation };","export default \"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cline%20y1%3D%22-0.75%22%20x2%3D%2212.5391%22%20y2%3D%22-0.75%22%20transform%3D%22matrix%28-0.641971%200.766729%20-0.836709%20-0.547648%2019%207.38586%29%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M16.6377%207L8.87922%2016.3095L5%2013.3697%22%20stroke%3D%22%2339f%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\n/**\nThe MessageListManager is responsible for controlling chat operations like fetching messages and managing listener lifecycles. It attaches listeners for group and call activities for a particular user or group, which are activated when the chat is open and deactivated when it's closed or when switching to a new chat.\nIn addition, it supports real-time connection monitoring by attaching an SDK websocket listener to the chat session.\n*/\nexport class MessageListManager {\n messagesRequest: CometChat.MessagesRequest | null = null;\n static groupListenerId: string = \"group_\" + new Date().getTime();\n static callListenerId: string = \"call_\" + new Date().getTime();\n static connectionListenerId: string = \"MessageList_connection_\" + String(Date.now());\n\n /**\n * Creates an instance of MessageListManager which constructs a request builder for fetching messages from a particular user/group in the chat.\n * @param {CometChat.MessagesRequestBuilder} [messagesRequestBuilder]\n * @param {CometChat.User} [user]\n * @param {CometChat.Group} [group]\n * @param {number} [messageId]\n * @param {number} [parentMessageId]\n * @memberof MessageListManager\n */\n constructor(messagesRequestBuilder?: CometChat.MessagesRequestBuilder, user?: CometChat.User, group?: CometChat.Group, messageId?: number, parentMessageId?: number) {\n if (messagesRequestBuilder) {\n let requestBuilder!: CometChat.MessagesRequestBuilder;\n if (user) {\n messagesRequestBuilder.guid = undefined;\n requestBuilder = messagesRequestBuilder.setUID(user.getUid())\n\n } else if (group) {\n messagesRequestBuilder.uid = undefined;\n requestBuilder = messagesRequestBuilder.setGUID(group!.getGuid())\n }\n if (messageId) {\n requestBuilder!.setMessageId(messageId);\n }\n this.messagesRequest = requestBuilder.build()!;\n } else {\n const builder: CometChat.MessagesRequestBuilder = new CometChat.MessagesRequestBuilder()\n .setTypes(ChatConfigurator.dataSource.getAllMessageTypes())\n .setCategories(ChatConfigurator.dataSource.getAllMessageCategories())\n .hideReplies(true)\n .setLimit(30)\n\n if (messageId) {\n builder.setMessageId(messageId)\n }\n if (parentMessageId) {\n builder.setParentMessageId(parentMessageId)\n }\n if (user) {\n builder.setUID(user.getUid())\n builder.guid = undefined;\n } else if (group) {\n builder.setGUID(group.getGuid())\n builder.uid = undefined;\n }\n this.messagesRequest = builder.build();\n }\n }\n\n /**\n * Function to invoke the fetchNext method of the messagesRequestBuilder to retrieve the subsequent messages following the latest fetched message.\n *\n * @returns {Promise}\n */\n fetchNextMessages: () => Promise | undefined = () => {\n return this.messagesRequest?.fetchNext();\n };\n /**\n * Function to invoke the fetchPrevious method of the messagesRequestBuilder to retrieve the subsequent messages following the last fetched message.\n *\n * @returns {Promise}\n */\n fetchPreviousMessages: () => Promise | undefined = () => {\n return this.messagesRequest?.fetchPrevious();\n }\n\n /**\n * Function to attach the group and call listeners for a particular user/group. This listener is attached when the chat is opened and is removed once the chat is closed or when switching to a new chat, where it creates a new listener for the particular chat.\n *\n * @param {Function} callback\n */\n static attachListeners: (callback: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void) => void = (callback: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void) => {\n\n /** Add Group Listener to listen to group action messages */\n CometChat.addGroupListener(\n this.groupListenerId,\n new CometChat.GroupListener({\n onGroupMemberScopeChanged: (message: CometChat.BaseMessage, changedUser: CometChat.User, newScope: CometChat.GroupMemberScope, oldScope: CometChat.GroupMemberScope, changedGroup: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, changedGroup);\n },\n onGroupMemberKicked: (message: CometChat.BaseMessage, kickedUser: CometChat.User, kickedBy: CometChat.User, kickedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, kickedFrom);\n },\n onGroupMemberBanned: (message: CometChat.BaseMessage, bannedUser: CometChat.User, bannedBy: CometChat.User, bannedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, bannedFrom);\n },\n onGroupMemberUnbanned: (message: CometChat.BaseMessage, unbannedUser: CometChat.User, unbannedBy: CometChat.User, unbannedFrom: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, unbannedFrom);\n },\n onMemberAddedToGroup: (message: CometChat.BaseMessage, userAdded: CometChat.User, userAddedBy: CometChat.User, userAddedIn: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, userAddedIn);\n },\n onGroupMemberLeft: (message: CometChat.BaseMessage, leavingUser: CometChat.GroupMember, group: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, group);\n },\n onGroupMemberJoined: (message: CometChat.BaseMessage, joinedUser: CometChat.GroupMember, joinedGroup: CometChat.Group): void => {\n callback(CometChatUIKitConstants.MessageCategory.action, message, joinedGroup);\n },\n })\n );\n /** Add Calls Listener to listen to call activities if Calling is enabled. */\n if (ChatConfigurator.names.includes(\"calling\")) {\n CometChat.addCallListener(\n this.callListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onIncomingCallCancelled: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onOutgoingCallRejected: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onOutgoingCallAccepted: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n onCallEndedMessageReceived: (call: CometChat.Call): void => {\n callback(CometChatUIKitConstants.MessageCategory.call, call);\n },\n })\n );\n }\n };\n /**\n * Function to remove the attached listeners for a particular user/group.\n * */\n static removeListeners(): void {\n CometChat.removeGroupListener(this.groupListenerId);\n CometChat.removeConnectionListener(this.connectionListenerId)\n if (ChatConfigurator.names.includes(\"calling\")) {\n CometChat.removeCallListener(this.callListenerId);\n }\n }\n /**\n* Attaches an SDK websocket listener to monitor when the connection disconnects or reconnects.\n*\n* @returns - Function to remove the added SDK websocket listener\n*/\n static attachConnectionListener(callback: () => void): void {\n const listenerId = \"MessageList_connection_\" + String(Date.now());\n CometChat.addConnectionListener(\n listenerId,\n new CometChat.ConnectionListener({\n onConnected: (): void => {\n console.log(\"ConnectionListener =>connected\");\n if (callback) {\n callback()\n }\n },\n onDisconnected: (): void => {\n console.log(\"ConnectionListener => On Disconnected\");\n }\n })\n );\n }\n}\n","import \"@cometchat/uikit-elements\";\n\nimport {\n AvatarStyle,\n BackdropStyle,\n DateStyle,\n EmojiKeyboardStyle,\n} from \"@cometchat/uikit-elements\";\nimport { BaseMessage, CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport {\n CSSProperties,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n CardMessage,\n CometChatActionsIcon,\n CometChatActionsView,\n CometChatCallEvents,\n CometChatGroupEvents,\n CometChatMessageEvents,\n CometChatMessageTemplate,\n CometChatTheme,\n CometChatUIEvents,\n CometChatUIKitConstants,\n CustomInteractiveMessage,\n DatePatterns,\n FormMessage,\n IDialog,\n IGroupLeft,\n IGroupMemberAdded,\n IGroupMemberKickedBanned,\n IGroupMemberScopeChanged,\n IMessages,\n IPanel,\n IShowOngoingCall,\n MessageBubbleAlignment,\n MessageListAlignment,\n MessageStatus,\n PanelAlignment,\n SchedulerMessage,\n States,\n TimestampAlignment,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport { CometChatAvatarView, CometChatButtonView, CometChatDateView, CometChatEmojiKeyboardView, CometChatIconButtonView, CometChatLabelView, CometChatLoaderView, CometChatReactionsView, CometChatReceiptView } from \"../Shared/Views/LitElementsWrapper/LitElementsWrapper\";\nimport {\n CometChatSoundManager,\n CometChatTextFormatter,\n CometChatUIKitUtility,\n InteractiveMessageUtils,\n MessageInformationConfiguration,\n MessageListStyle,\n MessageReceiptUtils,\n ReactionInfoConfiguration,\n ReactionListConfiguration,\n ReactionsConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n bubbleFooterViewWrapperStyle,\n bubbleHeaderTitleStyle,\n bubbleStyle,\n dateSeperatorStyle,\n dateSeperatorWrapperStyle,\n defaultAvatarStyle,\n defaultMessageListBubbleStyle,\n defaultMessageListStyle,\n errorViewStyle,\n footerStyle,\n getListStyle,\n getReactionInfoStyle,\n getReactionListAvatarStyle,\n getReactionListItemStyle,\n getReactionListStyle,\n getReactionViewStyle,\n getReactionsStyle,\n getStatusInfoStyle,\n getStatusInfoViewStyle,\n headerStyle,\n listWrapperStyle,\n loadingViewStyle,\n messageAvatarStyle,\n messageBubbleHeaderDateStyle,\n messageBubbleStyle,\n messageReceiptStyle,\n messageThreadViewStyle,\n newMessageIndicatorStyle,\n newMessageTextStyleStyle,\n wrapperStyle,\n} from \"./style\";\nimport {\n useCometChatErrorHandler,\n useRefSync,\n} from \"../CometChatCustomHooks\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChatList } from \"../Shared/Views/CometChatList\";\nimport { CometChatMessageBubble } from \"../Shared/Views/CometChatMessageBubble\";\nimport { CometChatMessageInformation } from \"../CometChatMessageInformation\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport DeliveredIcon from \"./assets/message-delivered.svg\";\nimport { Hooks } from \"./useCometChatMessageList\";\nimport LoadingIcon from \"./assets/Spinner.svg\";\nimport { MessageListManager } from \"./controller\";\nimport ReadIcon from \"./assets/message-read.svg\";\nimport SentIcon from \"./assets/message-sent.svg\";\nimport { Subscription } from \"rxjs\";\nimport ThreadIndicatorIcon from \"./assets/threadIndicatorIcon.svg\";\nimport WaitIcon from \"./assets/wait.svg\";\nimport WarningIcon from \"./assets/warning-small.svg\";\n\ninterface IMessageListProps {\n parentMessageId?: number;\n user?: CometChat.User;\n group?: CometChat.Group;\n emptyStateText?: string;\n errorStateText?: string;\n emptyStateView?: any;\n errorStateView?: any;\n loadingStateView?: any;\n disableReceipt?: boolean;\n disableSoundForMessages?: boolean;\n customSoundForMessages?: string;\n readIcon?: string;\n deliveredIcon?: string;\n sentIcon?: string;\n waitIcon?: string;\n errorIcon?: string;\n loadingIconURL?: string;\n alignment?: MessageListAlignment;\n showAvatar?: boolean;\n datePattern?: DatePatterns;\n timestampAlignment?: TimestampAlignment;\n DateSeparatorPattern?: DatePatterns;\n hideDateSeparator?: boolean;\n templates?: CometChatMessageTemplate[];\n messagesRequestBuilder?: CometChat.MessagesRequestBuilder;\n newMessageIndicatorText?: string;\n scrollToBottomOnNewMessages?: boolean;\n thresholdValue?: number;\n onThreadRepliesClick?: Function;\n headerView?: any;\n footerView?: any;\n avatarStyle?: AvatarStyle;\n dateSeparatorStyle?: DateStyle;\n messageListStyle?: MessageListStyle;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n hideError?: boolean;\n messageInformationConfiguration?: MessageInformationConfiguration;\n reactionsConfiguration?: ReactionsConfiguration;\n disableReactions?: boolean;\n emojiKeyboardStyle?: EmojiKeyboardStyle;\n threadIndicatorIcon?: string;\n disableMentions?: boolean;\n textFormatters?: CometChatTextFormatter[];\n backdropStyle?: BackdropStyle\n}\nconst defaultProps: IMessageListProps = {\n parentMessageId: 0,\n user: undefined,\n group: undefined,\n emptyStateText: localize(\"NO_MESSAGES_FOUND\"),\n errorStateText: localize(\"SOMETHING_WRONG\"),\n emptyStateView: null,\n errorStateView: null,\n loadingStateView: null,\n disableReceipt: false,\n disableSoundForMessages: false,\n customSoundForMessages: \"\",\n readIcon: ReadIcon,\n deliveredIcon: DeliveredIcon,\n sentIcon: SentIcon,\n waitIcon: WaitIcon,\n errorIcon: WarningIcon,\n loadingIconURL: LoadingIcon,\n alignment: MessageListAlignment.standard,\n showAvatar: true,\n datePattern: DatePatterns.time,\n timestampAlignment: TimestampAlignment.bottom,\n DateSeparatorPattern: DatePatterns.DayDate,\n hideDateSeparator: false,\n templates: [],\n messagesRequestBuilder: undefined,\n newMessageIndicatorText: \"\",\n scrollToBottomOnNewMessages: false,\n thresholdValue: 1000,\n onThreadRepliesClick: () => { },\n headerView: null,\n footerView: null,\n avatarStyle: defaultAvatarStyle,\n dateSeparatorStyle: undefined,\n messageListStyle: defaultMessageListStyle,\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n hideError: false,\n messageInformationConfiguration: new MessageInformationConfiguration({}),\n reactionsConfiguration: new ReactionsConfiguration({}),\n disableReactions: false,\n emojiKeyboardStyle: {} as EmojiKeyboardStyle,\n threadIndicatorIcon: ThreadIndicatorIcon,\n disableMentions: false,\n textFormatters: [],\n backdropStyle: new BackdropStyle({})\n};\nconst CometChatMessageList = (props: IMessageListProps) => {\n const {\n parentMessageId,\n user,\n group,\n emptyStateText,\n errorStateText,\n emptyStateView,\n errorStateView,\n loadingStateView,\n disableReceipt,\n disableSoundForMessages,\n customSoundForMessages,\n readIcon,\n deliveredIcon,\n sentIcon,\n waitIcon,\n errorIcon,\n loadingIconURL,\n alignment,\n showAvatar,\n datePattern,\n timestampAlignment,\n DateSeparatorPattern,\n hideDateSeparator,\n templates,\n messagesRequestBuilder,\n newMessageIndicatorText,\n scrollToBottomOnNewMessages,\n thresholdValue,\n onThreadRepliesClick,\n headerView,\n footerView,\n avatarStyle,\n dateSeparatorStyle,\n messageListStyle,\n onError,\n hideError,\n messageInformationConfiguration,\n reactionsConfiguration,\n disableReactions,\n emojiKeyboardStyle,\n threadIndicatorIcon,\n disableMentions,\n textFormatters,\n backdropStyle\n } = props;\n /**\n * All the useState hooks are declaired here. These trigger a rerender when updated.\n */\n const [messageList, setMessageList] = useState([]);\n const [scrollListToBottom, setScrollListToBottom] = useState(true);\n const [messageListState, setMessageListState] = useState(\n States.loading\n );\n const [showOngoingCall, setShowOngoingCall] = useState(false);\n const [showMessageInfoPopup, setShowMessageInfoPopup] = useState(false);\n const [activeMessageInfo, setActiveMessageInfo] =\n useState(null); // should be state.\n const [showConfirmDialog, setShowConfirmDialog] = useState(false);\n const [ongoingCallView, setOngoingCallView] = useState(null);\n const [showNewMessagesBanner, setShowNewMessagesBanner] = useState(false);\n const [showFooterPanelView, setShowFooterPanelView] = useState(false);\n const [showHeaderPanelView, setShowHeaderPanelView] = useState(false);\n\n\n /**\n * All the useRef hooks are declaired here. These do not trigger a rerender. They are used to get the updated values wherever required in the code.\n */\n const newMessagesBtnRef = useRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n const loggedInUserRef = useRef(null);\n const isFirstReloadRef = useRef(false);\n const elementRefs = useRef({});\n const messageListManagerRef = useRef(null);\n const messageIdRef = useRef({ prevMessageId: 0, nextMessageId: 0 });\n const totalMessagesCountRef = useRef(0);\n const UnreadMessagesRef = useRef([]);\n const newMessageTextRef = useRef(\"\");\n const imageModerationDialogRef = useRef(null);\n const userRef = useRefSync(user);\n const groupRef = useRefSync(group);\n const parentMessageIdRef = useRefSync(parentMessageId);\n const smartReplyViewRef = useRef(null);\n const headerViewRef = useRef(null);\n\n const isConnectionReestablishedRef = useRef(false);\n const isOnBottomRef = useRef(false);\n\n\n /**\n * All the Private variables are declaired here for internal use.\n */\n const { theme } = useContext<{ theme: CometChatTheme }>(CometChatThemeContext);\n const onErrorCallback = useCometChatErrorHandler(onError);\n let keepRecentMessages: boolean = true,\n timestampEnum: any = TimestampAlignment,\n isFetchingPreviousMessages = false,\n threadedAlignment: MessageBubbleAlignment = MessageBubbleAlignment.left;\n const getLoaderHtml: JSX.Element = useMemo(() => {\n if (loadingStateView) {\n return (\n
    \n \n {loadingStateView}\n \n
    \n );\n } else {\n return (\n
    \n \n
    \n );\n }\n }, [loadingStateView, loadingIconURL, messageListStyle, theme]);\n\n const getErrorHtml: JSX.Element = useMemo(() => {\n if (errorStateView) {\n return (\n
    \n \n {errorStateView}\n \n
    \n );\n } else {\n return (\n
    \n \n
    \n );\n }\n }, [errorStateView, errorStateText, messageListStyle, theme]);\n\n const getEmptyHtml: JSX.Element | undefined = useMemo(() => {\n if (emptyStateView) {\n return (\n
    \n \n {emptyStateView}\n \n
    \n );\n } else {\n return undefined;\n }\n }, [emptyStateView, emptyStateText, messageListStyle, theme]);\n const messagesTemplate = useMemo(() => {\n return templates && templates.length > 0\n ? templates\n : ChatConfigurator.getDataSource().getAllMessageTemplates(theme, {\n disableMentions: disableMentions,\n textFormatters: textFormatters,\n });\n }, [templates, theme]);\n const messagesTypesMap = useMemo(() => {\n let messagesTypesArray: { [key: string]: CometChatMessageTemplate } = {};\n messagesTemplate.forEach((el: CometChatMessageTemplate) => {\n messagesTypesArray[el.category + \"_\" + el.type] = el;\n });\n return messagesTypesArray;\n }, [messagesTemplate]);\n\n /*\n * isPartOfCurrentChatForUIEvent: To check if the message belongs for this list and is not part of thread even for current list\n it only runs for UI event because it assumes logged in user is always sender\n * @param: message: CometChat.BaseMessage\n*/\n const isPartOfCurrentChatForUIEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n if (parentMessageIdRef.current) {\n if (message.getParentMessageId() === parentMessageIdRef.current) {\n return true;\n }\n } else {\n if (message.getParentMessageId()) {\n return false\n }\n\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && receiverId === userRef.current.getUid()) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && receiverId === groupRef.current.getGuid()) {\n return true\n }\n }\n\n return false\n\n }\n },\n []\n );\n\n /**\n * Function to validate if a transient message belongs to the current message list.\n * It checks if the message is not part of a thread even for the current list.\n * It only runs for SDK event because it needs senderId to check if the message is sent by the same user.\n * @param {CometChat.TransientMessage} message - The transient message to be validated\n * @returns {boolean | undefined} - Returns true if the message belongs to the current list, false otherwise\n */\n const validateTransientMessage: (message: CometChat.TransientMessage) => boolean | undefined = useCallback(\n (message: CometChat.TransientMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n const senderId = message?.getSender()?.getUid();\n if (parentMessageIdRef.current) {\n return false;\n } else {\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current.getGuid())) {\n return true\n }\n }\n return false\n\n }\n }, []\n )\n\n /*\n * isPartOfCurrentChatForSDKEvent: To check if the message belongs for this list and is not part of thread even for current list\n it only runs for SDK event because it needs senderId to check if the message is sent by the same user\n * @param: message: CometChat.BaseMessage\n */\n const isPartOfCurrentChatForSDKEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n const receiverId = message?.getReceiverId();\n const receiverType = message?.getReceiverType();\n const senderId = message?.getSender()?.getUid();\n if (parentMessageIdRef.current) {\n if (message.getParentMessageId() === parentMessageIdRef.current) {\n return true;\n }\n } else {\n if (message.getParentMessageId()) {\n return false\n }\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current.getGuid())) {\n return true\n }\n }\n\n return false\n\n }\n }, []\n )\n\n /*\n * isThreadOfCurrentChatForUIEvent: To check if the message belongs thread of this list,\n it only runs for UI event because it assumes logged in user is always sender\n * @param: message: CometChat.BaseMessage\n */\n const isThreadOfCurrentChatForUIEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!message.getParentMessageId()) {\n return false\n }\n\n const receiverId = message?.getReceiverId();\n\n if (userRef.current) {\n if (receiverId === userRef.current.getUid()) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverId === groupRef.current.getGuid()) {\n return true\n }\n }\n\n return false\n }, []\n );\n\n\n /*\n * isThreadOfCurrentChatForSDKEvent: To check if the message belongs thread of this list,\n it only runs for SDK event because it needs senderId to check if the message is sent by the same user\n * @param: message: CometChat.BaseMessage\n */\n const isThreadOfCurrentChatForSDKEvent: (message: CometChat.BaseMessage) => boolean | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!message.getParentMessageId()) {\n return false;\n }\n\n const receiverId = message?.getReceiverId();\n const senderId = message?.getSender()?.getUid();\n\n if (userRef.current) {\n if (receiverId === userRef.current.getUid() || senderId === userRef.current.getUid()) {\n return true;\n }\n } else if (groupRef.current) {\n if (receiverId === groupRef.current.getGuid()) {\n return true;\n }\n }\n\n return false;\n },\n []\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is not found, the function will return 'undefined'.\n *\n * @param {number} id The ID of the message to be retrieved.\n * @returns {CometChat.BaseMessage | undefined} Returns the message object if found, otherwise 'undefined'.\n */\n const getMessageById: (id: number) => CometChat.BaseMessage | undefined = useCallback(\n (id: number) => {\n try {\n const messageObject = messageList.find(\n (m: CometChat.BaseMessage) =>\n m?.getId()?.toString() === id?.toString()\n );\n return messageObject;\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [messageList, onErrorCallback]\n );\n\n /**\n * Opens the thread view for a given message.\n * @param {CometChat.BaseMessage} message - The message object for which the thread view should be opened.\n * @returns {void}\n */\n const openThreadView: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n isOnBottomRef.current = false;\n setScrollListToBottom(false);\n if (onThreadRepliesClick) {\n onThreadRepliesClick(message, getThreadedMessageBubble);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onThreadRepliesClick, onErrorCallback, isOnBottomRef]\n );\n\n /**\n * Function to monitor the scrollbar position and update the 'isOnBottom' property.\n * This helps in showing the unread messages count in the message list if a new message is received while the scrollbar is not at the bottom.\n * @param {boolean | undefined} isOnBottom - Indicates whether the scrollbar has reached the bottom or not.\n * @returns {void}\n */\n const updateIsOnBottom: (isOnBottom?: boolean | undefined) => void = useCallback(\n (hasScrolled?: boolean) => {\n if (hasScrolled !== undefined) {\n isOnBottomRef.current = hasScrolled;\n }\n },\n [isOnBottomRef]\n );\n\n /**\n* Function to convert the user ID (UID) to the actual name of the mentioned user. This prevents the user's UID from being exposed when the message text is copied.\n* @param {CometChat.TextMessage} message - The message object, which contains the text with user mentions represented as UIDs.\n* @returns {string} The message text, with mention replaced by the actual name of the user.\n*/\n const getMentionsTextWithoutStyle: (message: CometChat.TextMessage) => string = (message: CometChat.TextMessage) => {\n const regex = /<@uid:(.*?)>/g;\n let messageText = message.getText();\n let messageTextTmp = message.getText();\n let match = regex.exec(messageText);\n let mentionedUsers = message.getMentionedUsers();\n while (match !== null) {\n let user;\n for (let i = 0; i < mentionedUsers.length; i++) {\n if (match[1] === mentionedUsers[i].getUid()) {\n user = mentionedUsers[i];\n }\n }\n if (user) {\n messageTextTmp = messageTextTmp.replace(match[0], \"@\" + user.getName());\n }\n match = regex.exec(messageText);\n }\n return messageTextTmp;\n };\n\n /**\n * Function to find the message in the list and replace it by matching the muid. This works when we send the message in the ui before the success of the api for optmistic ui and then replace the message with actual message object by matching muid because message id is not generated before the api success.\n * @param {CometChat.BaseMessage} message - The message object, which needs to be replaced in the list.\n * @returns {void}\n */\n const updateMessageByMuid: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m.getMuid() === message.getMuid()) {\n return message;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n\n /**\n * Function to find a message in the list and replace it by matching the message ID. This function is useful when we need to edit, delete or update a message object and update it in the UI in real-time.\n * @param {CometChat.BaseMessage} message - The message object that needs to be replaced in the list.\n * @returns {void}\n */\n const updateMessageByMessageId: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setScrollListToBottom(false);\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === message?.getId()) {\n return message;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to handle when a message is edited\n * @param {CometChat.BaseMessage} editedMessage - The message that was edited.\n * @returns {void}\n */\n const replaceUpdatedMessage: (message: CometChat.BaseMessage) => void = useCallback(\n (editedMessage: CometChat.BaseMessage) => {\n try {\n if (isPartOfCurrentChatForSDKEvent(editedMessage)) {\n updateMessageByMessageId(editedMessage);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [updateMessageByMessageId, onErrorCallback, isPartOfCurrentChatForSDKEvent]\n );\n\n /**\n * Function to find a message in the list and replace it, matching either the message ID or MUID based on the boolean flag. The corresponding function for updating the message is then called.\n * @param {CometChat.BaseMessage} message - The message object to be replaced in the list.\n * @param {boolean} replaceByMuid - Optional flag to determine whether replacement should use MUID. If not provided, defaults to `false`.\n * @returns {void}\n */\n const updateMessage: (message: CometChat.BaseMessage, replaceByMuid?: boolean) => void = useCallback(\n (message: CometChat.BaseMessage, replaceByMuid: boolean = false) => {\n try {\n if (replaceByMuid) {\n setScrollListToBottom(true);\n updateMessageByMuid(message);\n } else {\n setScrollListToBottom(false);\n updateMessageByMessageId(message);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n updateMessageByMuid,\n updateMessageByMessageId,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to add a selected reaction to a specific message in the list.\n * @param {string} emoji - The reaction to add to the specified message.\n * @param {CometChat.BaseMessage} message - The message object to which the reaction will be added.\n * @returns {void}\n */\n const reactToMessages: (emoji: string, messageObject: CometChat.BaseMessage) => void = useCallback(\n (emoji: string, messageObject: CometChat.BaseMessage) => {\n const messageId = messageObject?.getId();\n const msgObject = getMessageById(messageId) as CometChat.BaseMessage;\n const reactions = msgObject?.getReactions() || [];\n const emojiObject = reactions?.find((reaction: any) => {\n return reaction?.reaction === emoji;\n });\n\n if (emojiObject && emojiObject?.getReactedByMe()) {\n const updatedReactions: CometChat.ReactionCount[] = [];\n reactions.forEach((reaction) => {\n if (reaction?.getReaction() === emoji) {\n if (reaction?.getCount() === 1) {\n return;\n } else {\n reaction.setCount(reaction?.getCount() - 1);\n reaction.setReactedByMe(false);\n updatedReactions.push(reaction);\n }\n } else {\n updatedReactions.push(reaction);\n }\n });\n const newMessageObj = CometChatUIKitUtility.clone(msgObject);\n newMessageObj.setReactions(updatedReactions);\n updateMessage(newMessageObj);\n CometChat.removeReaction(messageId, emoji)\n .then((message) => { })\n .catch((error) => {\n updateMessage(msgObject);\n console.log(error);\n });\n } else {\n const updatedReactions = [];\n const reactionAvailable = reactions.find((reaction) => {\n return reaction?.getReaction() === emoji;\n });\n\n reactions.forEach((reaction) => {\n if (reaction?.getReaction() === emoji) {\n reaction.setCount(reaction?.getCount() + 1);\n reaction.setReactedByMe(true);\n updatedReactions.push(reaction);\n } else {\n updatedReactions.push(reaction);\n }\n });\n if (!reactionAvailable) {\n const react: CometChat.ReactionCount = new CometChat.ReactionCount(emoji, 1, true);\n updatedReactions.push(react);\n }\n\n const newMessageObj = CometChatUIKitUtility.clone(msgObject);\n newMessageObj.setReactions(updatedReactions);\n updateMessage(newMessageObj);\n\n CometChat.addReaction(messageId, emoji)\n .then(() => { })\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n updateMessage(msgObject);\n });\n }\n }, [getMessageById, onErrorCallback, updateMessage]\n );\n\n /**\n * Default Callback functions for message options.\n */\n\n /**\n *Function fetches a specific message from the message list using its ID. If the message is found, the selected reaction is added beneath the message.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onReactMessage: (id: number) => void = useCallback(\n (id: number) => {\n let defaultStyle: CSSProperties = { zIndex: \"100\" }\n let configKeyboardStyle = emojiKeyboardStyle;\n let keyboardStyle = new EmojiKeyboardStyle({\n width: configKeyboardStyle?.width || \"320px\",\n height: configKeyboardStyle?.height || \"300px\",\n border: configKeyboardStyle?.border || \"1px solid #e0e0e0\",\n borderRadius: configKeyboardStyle?.borderRadius || \"8px\",\n activeIconTint: configKeyboardStyle?.activeIconTint,\n background: configKeyboardStyle?.background,\n iconTint: configKeyboardStyle?.iconTint,\n textColor: configKeyboardStyle?.textColor,\n textFont: configKeyboardStyle?.textFont,\n });\n const messageObject: CometChat.BaseMessage = getMessageById(\n id\n ) as CometChat.BaseMessage;\n return (closePopover: any) => {\n return {\n closePopover(args);\n reactToMessages(args?.detail?.id, messageObject);\n }}\n />\n\n }\n },\n [emojiKeyboardStyle, getMessageById, reactToMessages]\n );\n\n /**\n *Function to retrieve a specific message, identified by its ID, from the message list. If the message is found, the text content of that message will be copied to the clipboard.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onCopyMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.TextMessage = getMessageById(id) as CometChat.TextMessage;\n if (message) {\n let text = message.getText();\n if (\n !disableMentions &&\n message.getMentionedUsers() &&\n message.getMentionedUsers().length\n ) {\n text = getMentionsTextWithoutStyle(message);\n }\n navigator?.clipboard?.writeText(text);\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [getMessageById, onErrorCallback]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the CometChatMessageInformation component will be opened.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onOpenMessageInfo: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n isOnBottomRef.current = false;\n setScrollListToBottom(false);\n setActiveMessageInfo(message);\n setShowMessageInfoPopup(true);\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback, isOnBottomRef, getMessageById]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the CometChatThreadedMessages component will be opened.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onOpenThread: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let messageObject: CometChat.BaseMessage | undefined = getMessageById(id);\n if (messageObject) {\n openThreadView(messageObject);\n\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [openThreadView, onErrorCallback, getMessageById]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If the message is found, the chat will be opened for the particular user of that group to chat privately.\n *\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onMessagePrivately: (id: number) => void = useCallback(\n (id: number) => {\n try {\n const messageObject: CometChat.BaseMessage | undefined = getMessageById(id);\n if (messageObject) {\n const user: CometChat.User = messageObject.getSender();\n CometChatUIEvents.ccOpenChat.next({\n user: user,\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [getMessageById, onErrorCallback]\n );\n\n /**\n * Function to retrieve a specific message by its ID from the message list.\n * If found, the message would be deleted.\n * @param {number} id - The ID of the message to be retrieved.\n * @returns {void}\n */\n const onDeleteMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n const messageId: any = message.getId();\n CometChat.deleteMessage(messageId).then(\n (deletedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(deletedMessage)\n CometChatMessageEvents.ccMessageDeleted.next(deletedMessage);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [replaceUpdatedMessage, onErrorCallback, getMessageById]\n );\n\n /**\n* Function to retrieve a specific message by its ID from the message list.\n* If found, the Edit preview will be opened to edit that particular message.\n* @param {number} id - The ID of the message to be retrieved.\n* @returns {void}\n*/\n const onEditMessage: (id: number) => void = useCallback(\n (id: number) => {\n try {\n let message: CometChat.BaseMessage | undefined = getMessageById(id);\n if (message) {\n CometChatMessageEvents.ccMessageEdited.next({\n message: message,\n status: MessageStatus.inprogress,\n });\n }\n\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback, getMessageById]\n );\n\n /**\n * Function to set a default callback for each message option if none exists. This is called when default CometChatMessageTemplates for supported messages are fetched.\n * @param {(CometChatActionsIcon | CometChatActionsView)[]} options - The array of message options.\n * @param {number} id - Optional parameter. The ID of the option to which the options belong.\n * @returns {(CometChatActionsIcon | CometChatActionsView)[]} - Returns the array of message options with assigned callback functions.\n */\n const setDefaultOptionsCallback: (options: (CometChatActionsIcon | CometChatActionsView)[], id?: number) => (CometChatActionsIcon | CometChatActionsView)[] = useCallback(\n (options: (CometChatActionsIcon | CometChatActionsView)[], id?: number) => {\n try {\n options.forEach(\n (element: CometChatActionsIcon | CometChatActionsView) => {\n switch (element.id) {\n case CometChatUIKitConstants.MessageOption.deleteMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onDeleteMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.editMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onEditMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.copyMessage:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onCopyMessage;\n }\n break;\n case CometChatUIKitConstants.MessageOption.replyInThread:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onOpenThread;\n }\n break;\n case CometChatUIKitConstants.MessageOption.messageInformation:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onOpenMessageInfo;\n }\n break;\n case CometChatUIKitConstants.MessageOption.sendMessagePrivately:\n if (element instanceof CometChatActionsIcon && !element.onClick) {\n element.onClick = onMessagePrivately;\n }\n break;\n case CometChatUIKitConstants.MessageOption.reactToMessage:\n if (element instanceof CometChatActionsView && !element?.customView) {\n element.customView = onReactMessage(id!);\n }\n break;\n default:\n break;\n }\n }\n );\n return options;\n } catch (error: any) {\n onErrorCallback(error);\n return options;\n }\n },\n [\n onErrorCallback,\n onDeleteMessage,\n onEditMessage,\n onOpenThread,\n onCopyMessage,\n onOpenMessageInfo,\n onMessagePrivately,\n onReactMessage,\n ]\n );\n\n /**\n * Function to check if the reaction option should be added in the Message options by checking if the reactions feature is enabled or disabled\n * @param {Array} options - The array of message options.\n * @returns {Array} - Returns the array of message options with assigned callback functions.\n */\n const validateReactionOption: (options: Array) => Array = useCallback(\n (options: Array) => {\n if (!disableReactions) {\n return options;\n }\n\n return options.filter(\n (option: CometChatActionsIcon | CometChatActionsView) => {\n return (\n option.id !== CometChatUIKitConstants.MessageOption.reactToMessage\n );\n }\n );\n },\n [disableReactions]\n );\n\n /**\n * Function to get message options for each message based on the message type.\n * @param {CometChat.BaseMessage} msgObject - The message for which the options are to be retrieved.\n * @returns {Array} - Returns the array of appropriate message options.\n */\n const getMessageOptions: (msgObject: CometChat.BaseMessage) => (CometChatActionsIcon | CometChatActionsView)[] = useCallback(\n (\n msgObject: CometChat.BaseMessage\n ): (CometChatActionsIcon | CometChatActionsView)[] => {\n let options: (CometChatActionsIcon | CometChatActionsView)[] = [];\n if (!msgObject.getId()) {\n return options;\n }\n try {\n if (\n messagesTemplate &&\n messagesTemplate.length > 0 &&\n !msgObject.getDeletedAt() &&\n msgObject.getType() !==\n CometChatUIKitConstants.MessageTypes.groupMember &&\n msgObject?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.call\n ) {\n messagesTemplate.forEach((element: any) => {\n if (\n element.type === msgObject.getType() &&\n element.category === msgObject.getCategory()\n ) {\n options = setDefaultOptionsCallback(\n element?.options?.(loggedInUserRef.current, msgObject, theme, groupRef.current),\n msgObject?.getId()\n );\n }\n });\n }\n options = validateReactionOption(options);\n return options;\n } catch (error: any) {\n onErrorCallback(error);\n return options;\n }\n },\n [\n messagesTemplate,\n validateReactionOption,\n setDefaultOptionsCallback,\n theme,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to set the alignment of the message bubble based on message list alignment and the sender of the message. The MessageBubble then adjusts itself based on the passed alignment.\n * @param {CometChat.BaseMessage} message - Message for which the alignment is to be determined.\n * @returns {MessageBubbleAlignment} - Returns the alignment for the message.\n */\n const setBubbleAlignment: (message: CometChat.BaseMessage) => MessageBubbleAlignment = useCallback(\n (message: CometChat.BaseMessage) => {\n let bubbleAlignment = MessageBubbleAlignment.center;\n try {\n if (alignment === MessageListAlignment.left && message.getType() !== CometChatUIKitConstants.MessageTypes.groupMember) {\n bubbleAlignment = MessageBubbleAlignment.left;\n } else {\n if (\n message?.getType() === CometChatUIKitConstants.MessageTypes.groupMember ||\n message?.getCategory() == CometChatUIKitConstants.MessageCategory.call\n ) {\n bubbleAlignment = MessageBubbleAlignment.center;\n } else if (\n !message.getSender() ||\n (message?.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n message?.getType() !== CometChatUIKitConstants.MessageTypes.groupMember)\n ) {\n bubbleAlignment = MessageBubbleAlignment.right;\n } else {\n bubbleAlignment = MessageBubbleAlignment.left;\n }\n }\n return bubbleAlignment;\n } catch (error: any) {\n onErrorCallback(error);\n return bubbleAlignment;\n }\n },\n [alignment, onErrorCallback]\n );\n\n /**\n * Function to return the content view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the content view is to be returned.\n * @returns {any} - Returns the content view or null.\n */\n const getContentView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.contentView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.contentView(\n item,\n _alignment\n );\n }\n return null;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback, setBubbleAlignment]\n );\n\n /**\n * Function to return the bottom view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the bottom view is to be returned.\n * @returns {any} - Returns the bottom view or null.\n */\n const getBottomView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.bottomView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.bottomView(\n item,\n _alignment\n );\n }\n return null;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback, setBubbleAlignment]\n );\n\n /**\n * Function to return the header view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the header view is to be returned.\n * @returns {any} - Returns the header view or null.\n */\n const getHeaderView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let view: any = null;\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.headerView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.headerView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to return the footer view for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the footer view is to be returned.\n * @returns {any} - Returns the footer view or null.\n */\n const getFooterView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let view: any = null;\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.footerView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.footerView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to return the bubble wrapper for each item based on its type and category.\n * @param {CometChat.BaseMessage} item - The message for which the bubble wrapper is to be returned.\n * @returns {any} - Returns the bubble wrapper or null.\n */\n const getBubbleWrapper: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n let view: any = null;\n try {\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()].bubbleView\n ) {\n view =\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()].bubbleView(item);\n }\n return view;\n } catch (error: any) {\n onErrorCallback(error);\n return view;\n }\n },\n [messagesTypesMap, onErrorCallback]\n );\n\n /**\n * Function to mark a given message as read.\n * @param {CometChat.BaseMessage} message - The message to be marked as read.\n * @returns {void}\n */\n const markMessageRead: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n CometChat.markAsRead(message).then(\n () => {\n CometChatMessageEvents.ccMessageRead.next(message);\n },\n (error: unknown) => {\n onErrorCallback(error);\n }\n );\n }, [onErrorCallback])\n\n /**\n * Function to check and mark a message as read if `disableReceipt` is false and the message is not sent by the logged-in user.\n * @param {CometChat.BaseMessage} message - The message to be checked and marked as read.\n * @returns {void}\n */\n const checkAndMarkMessageAsRead: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n if (!disableReceipt &&\n message.getSender().getUid() !== loggedInUserRef.current?.getUid()) {\n markMessageRead(message);\n }\n }, [disableReceipt, markMessageRead])\n\n /**\n * Function to clear the count of new messages. If the last unread message exists, it marks it as read.\n * @returns {void}\n */\n\n const clearNewMessagesCount: () => void = useCallback(() => {\n isOnBottomRef.current = true;\n if (newMessagesBtnRef.current) {\n newMessagesBtnRef.current?.click();\n }\n const lastMessage: CometChat.BaseMessage =\n UnreadMessagesRef.current[UnreadMessagesRef.current.length - 1];\n if (lastMessage) {\n checkAndMarkMessageAsRead(lastMessage);\n }\n UnreadMessagesRef.current = [];\n if (newMessageTextRef.current) {\n newMessageTextRef.current = \"\";\n }\n\n if (showNewMessagesBanner) {\n setShowNewMessagesBanner(false)\n }\n }, [checkAndMarkMessageAsRead, showNewMessagesBanner])\n\n\n /**\n * Function to reinitialize the Message Request Builder.\n * @returns {void}\n */\n const reinitializeMessagesRequestBuilder: () => void = useCallback(() => {\n try {\n if (keepRecentMessages) {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.slice(-30);\n return messages;\n });\n } else {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.slice(0, 30);\n return messages;\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback]);\n\n /**\n * Function to prepend messages to the beginning of the current message list.\n * @param {CometChat.BaseMessage[]} messages - The messages to be prepended.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const prependMessages: (messages: CometChat.BaseMessage[]) => Promise = useCallback(\n (messages: CometChat.BaseMessage[]) => {\n return new Promise((resolve, reject) => {\n if (isPartOfCurrentChatForSDKEvent(messages[0])) {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const updatedMessageList = [...messages, ...prevMessageList];\n return updatedMessageList;\n });\n totalMessagesCountRef.current = totalMessagesCountRef.current + messages.length;\n setMessageListState(States.loaded);\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = false;\n reinitializeMessagesRequestBuilder();\n }\n resolve(true);\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n }\n else {\n if (messageList.length == 0) {\n setMessageListState(States.loaded);\n }\n\n resolve(true);\n\n }\n });\n },\n [\n messageList,\n thresholdValue,\n reinitializeMessagesRequestBuilder,\n isPartOfCurrentChatForSDKEvent,\n onErrorCallback]\n );\n\n /**\n * Function to fetch previous messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const fetchPreviousMessages: () => Promise = useCallback(() => {\n return new Promise(async (resolve, reject) => {\n try {\n setMessageListState(States.loading);\n\n let unreadMessageCount = 0;\n\n if (userRef?.current) {\n const unreadCountObject: any =\n await CometChat.getUnreadMessageCountForUser(\n userRef.current?.getUid()\n );\n unreadMessageCount =\n unreadCountObject[userRef.current?.getUid()] || 0;\n }\n\n if (groupRef?.current) {\n const unreadCountObject: any =\n await CometChat.getUnreadMessageCountForGroup(\n groupRef.current?.getGuid()\n );\n unreadMessageCount =\n unreadCountObject[groupRef.current?.getGuid()] || 0;\n }\n\n if (!isFetchingPreviousMessages) {\n isFetchingPreviousMessages = true;\n if (!messageListManagerRef.current.previous) {\n messageListManagerRef.current.previous = new MessageListManager(\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n messageIdRef.current.prevMessageId,\n parentMessageIdRef.current\n );\n }\n messageListManagerRef?.current.previous.fetchPreviousMessages().then(\n (messagesList: any) => {\n if (!parentMessageIdRef.current) {\n }\n if (messagesList && messagesList.length > 0) {\n messagesList = messagesList.map(\n (message: CometChat.BaseMessage) => {\n if (\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n );\n } else {\n return message;\n }\n }\n );\n }\n if (isFirstReloadRef.current) {\n CometChatUIEvents.ccActiveChatChanged.next({\n user: userRef.current,\n group: groupRef.current,\n message: messagesList.length > 0 ? messagesList[messagesList.length - 1] : undefined,\n unreadMessageCount\n });\n isFirstReloadRef.current = false;\n MessageListManager.attachConnectionListener(() => {\n isConnectionReestablishedRef.current = true;\n fetchActionMessages().then(() => {\n fetchNextMessages()\n .then(\n (success) => {\n resolve(success);\n isConnectionReestablishedRef.current = false;\n },\n (error) => {\n reject(error);\n }\n )\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n });\n });\n });\n }\n\n isFetchingPreviousMessages = false;\n if (messagesList && messagesList.length > 0) {\n let lastMessage: CometChat.BaseMessage =\n messagesList[messagesList.length - 1];\n let isMyMessage = lastMessage?.getSender().getUid() == loggedInUserRef.current?.getUid()\n if (!lastMessage.getDeliveredAt() && !disableReceipt && !isMyMessage) {\n CometChat.markAsDelivered(lastMessage).then(() => {\n messagesList.forEach((m: CometChat.BaseMessage) => {\n if (\n m?.getId() <= lastMessage?.getId() &&\n !isMyMessage &&\n !m.getDeliveredAt()\n ) {\n m.setDeliveredAt(new Date().getTime());\n }\n return m;\n });\n });\n }\n if (!lastMessage.getReadAt() && !isMyMessage) {\n if (!disableReceipt) {\n CometChat.markAsRead(lastMessage).then(() => {\n messagesList.forEach((m: CometChat.BaseMessage) => {\n if (\n m?.getId() <= lastMessage?.getId() &&\n !isMyMessage &&\n !m.getReadAt()\n ) {\n m.setReadAt(new Date().getTime());\n }\n return m;\n });\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n });\n } else {\n UnreadMessagesRef.current = [];\n }\n }else if(!isMyMessage){\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n }\n\n prependMessages(messagesList).then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } else {\n if (messagesList.length === 0) {\n if (totalMessagesCountRef.current === 0) {\n setMessageListState(States.empty);\n }\n }\n resolve(true);\n }\n },\n (error: CometChat.CometChatException) => {\n isFetchingPreviousMessages = false;\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n if (error.code != \"REQUEST_IN_PROGRESS\") {\n onErrorCallback(error);\n reject(error);\n }\n else {\n setMessageListState(States.loading)\n }\n }\n );\n } else {\n resolve(true);\n }\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n }\n });\n }, [\n disableReceipt,\n onErrorCallback,\n prependMessages,\n ]);\n\n /**\n * Function to append messages to the end of the current message list.\n * @param {CometChat.BaseMessage[]} messages - The messages to be appended.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n\n const appendMessages: (messages: CometChat.BaseMessage[]) => Promise = useCallback(\n (messages: CometChat.BaseMessage[]) => {\n return new Promise((resolve, reject) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]): CometChat.BaseMessage[] => {\n const updatedMessageList: CometChat.BaseMessage[] = [\n ...prevMessageList,\n ...messages,\n ];\n return updatedMessageList;\n });\n totalMessagesCountRef.current = totalMessagesCountRef.current + messages.length;\n let id = messages[messages.length - 1]?.getId();\n if (id && messageIdRef.current.prevMessageId !== id) {\n messageIdRef.current.nextMessageId = id;\n }\n\n if (scrollToBottomOnNewMessages) {\n setTimeout(() => {\n setScrollListToBottom(true);\n isOnBottomRef.current = true;\n }, 100);\n } else {\n if (isConnectionReestablishedRef.current) {\n setScrollListToBottom(isOnBottomRef.current);\n let lastMessage: CometChat.BaseMessage =\n messages[messages?.length - 1];\n if (\n isOnBottomRef.current &&\n lastMessage &&\n lastMessage.getSender().getUid() != loggedInUserRef.current?.getUid() &&\n !lastMessage.getReadAt()\n ) {\n CometChat.markAsRead(lastMessage).then(() => {\n UnreadMessagesRef.current = [];\n CometChatMessageEvents.ccMessageRead.next(lastMessage);\n });\n }\n } else {\n setScrollListToBottom(false);\n }\n let countText = newMessageIndicatorText\n ? newMessageIndicatorText\n : UnreadMessagesRef.current.length > 1\n ? localize(\"NEW_MESSAGES\")\n : localize(\"NEW_MESSAGE\");\n UnreadMessagesRef.current.push(...messages);\n newMessageTextRef.current =\n \" ↓ \" + UnreadMessagesRef.current.length + \" \" + countText;\n setShowNewMessagesBanner(true);\n }\n setMessageListState(States.loaded);\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = true;\n reinitializeMessagesRequestBuilder();\n }\n resolve(true);\n } catch (error: any) {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n });\n },\n [\n thresholdValue,\n reinitializeMessagesRequestBuilder,\n onErrorCallback,\n isOnBottomRef,\n ]\n );\n\n /**\n * Function to fetch action messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n const fetchActionMessages: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n let requestBuilder = new CometChat.MessagesRequestBuilder()\n .setType(CometChatUIKitConstants.MessageCategory.message)\n .setCategory(CometChatUIKitConstants.MessageCategory.action)\n .setMessageId(messageIdRef.current.nextMessageId)\n .setLimit(30);\n if (userRef.current) {\n requestBuilder.setUID(userRef.current.getUid());\n } else if (groupRef.current) {\n requestBuilder.setGUID(groupRef.current.getGuid());\n }\n requestBuilder\n .build()\n .fetchNext()\n .then((messages) => {\n if (messages && messages.length > 0) {\n messages.forEach((message: CometChat.BaseMessage) => {\n replaceUpdatedMessage(\n (\n message as CometChat.Action\n ).getActionOn() as CometChat.BaseMessage\n );\n });\n return resolve(true);\n } else {\n return resolve(true);\n }\n })\n .catch((error: CometChat.CometChatException) => {\n onErrorCallback(error);\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n return reject(error);\n });\n });\n }, [onErrorCallback]);\n\n\n /**\n * Function to fetch the next set of messages.\n * @returns {Promise} - Returns a promise that resolves if the operation is successful or rejects with an error if it fails.\n */\n\n const fetchNextMessages: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n if (messageIdRef.current.nextMessageId) {\n if (!messageListManagerRef.current.next) {\n messageListManagerRef.current.next = new MessageListManager(\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n messageIdRef.current.nextMessageId,\n parentMessageIdRef.current\n );\n }\n setMessageListState(States.loading);\n messageListManagerRef?.current.next.fetchNextMessages().then(\n (messagesList: any) => {\n if (messagesList && messagesList.length > 0) {\n messagesList = messagesList.map(\n (message: CometChat.BaseMessage) => {\n if (\n message.getCategory() ===\n CometChatUIKitConstants.MessageCategory.interactive\n ) {\n return InteractiveMessageUtils.convertInteractiveMessage(\n message as CometChat.InteractiveMessage\n );\n } else {\n return message;\n }\n }\n );\n }\n if (messagesList) {\n if (messagesList.length === 0) {\n totalMessagesCountRef.current === 0\n ? setMessageListState(States.empty)\n : setMessageListState(States.loaded);\n resolve(true);\n } else {\n appendMessages(messagesList).then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n }\n } else {\n resolve(true);\n }\n },\n (error: any) => {\n if (messageList?.length <= 0) {\n setMessageListState(States.error);\n }\n onErrorCallback(error);\n reject(error);\n }\n );\n } else {\n resolve(true);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [\n appendMessages,\n onErrorCallback,\n messageList?.length,\n messagesRequestBuilder]);\n\n /**\n * Function to update the reply count of a message.\n * @param {CometChat.BaseMessage} message - The message for which the reply count is to be updated.\n * @returns {void}\n */\n\n const updateReplyCount: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === message.getParentMessageId()) {\n if (m.getReplyCount()) {\n m.setReplyCount(m.getReplyCount() + 1);\n } else {\n m.setReplyCount(1);\n }\n return m;\n } else {\n return m;\n }\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to update unread reply count for a specific message.\n * @param {CometChat.BaseMessage} message - The message for which the unread reply count is updated.\n * @returns {void}\n */\n const updateUnreadReplyCount: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n let messageList: CometChat.BaseMessage[] = [...prevMessageList];\n let messageKey = messageList.findIndex(\n (m) => m.getId() === message.getParentMessageId()\n );\n if (messageKey > -1) {\n const messageObj: CometChat.BaseMessage = messageList[messageKey];\n messageList.splice(messageKey, 1, messageObj);\n prevMessageList = [...messageList];\n }\n return prevMessageList;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback])\n\n /**\n * Function to add a new message to the current message list.\n * @param {CometChat.BaseMessage} message - The message to be added.\n * @returns {void}\n */\n const addMessage: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n totalMessagesCountRef.current += 1;\n if (totalMessagesCountRef.current > 0 && messageListState != States.loaded) {\n setMessageListState(States.loaded)\n }\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = [...prevMessageList, message];\n return messages;\n });\n if (!message.getSender() || (message.getSender().getUid() == loggedInUserRef.current?.getUid())) {\n setScrollListToBottom(true);\n }\n if (totalMessagesCountRef.current > thresholdValue!) {\n keepRecentMessages = true;\n reinitializeMessagesRequestBuilder();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [thresholdValue, onErrorCallback, scrollListToBottom]\n );\n\n /**\n * Function to get the receipt status of a message.\n * @param {CometChat.BaseMessage} message - The message for which the receipt status is to be fetched.\n * @returns {number | undefined} - Returns the receipt status or undefined.\n */\n\n const getMessageReceipt: (message: CometChat.BaseMessage) => number | undefined = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n return MessageReceiptUtils.getReceiptStatus(message);\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to play an audio notification for new messages if sound is enabled.\n * @returns {void}\n */\n\n const playAudio: () => void = useCallback(() => {\n try {\n if (!disableSoundForMessages) {\n if (customSoundForMessages) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage,\n customSoundForMessages\n );\n } else {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingMessage\n );\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [disableSoundForMessages, customSoundForMessages, onErrorCallback]);\n\n /**\n * Function to show and increment the count of unread messages.\n * @param {CometChat.BaseMessage} message - The unread message to be counted.\n * @returns {void}\n */\n const showAndIncrementUnreadCount: (message: CometChat.BaseMessage) => void = useCallback((message: CometChat.BaseMessage) => {\n if (!isOnBottomRef.current && message.getSender() && message.getSender().getUid() != loggedInUserRef.current?.getUid()) {\n let countText = newMessageIndicatorText\n ? newMessageIndicatorText\n : UnreadMessagesRef.current.length > 1\n ? localize(\"NEW_MESSAGES\")\n : localize(\"NEW_MESSAGE\");\n UnreadMessagesRef.current.push(message);\n newMessageTextRef.current =\n \" ↓ \" + UnreadMessagesRef.current.length + \" \" + countText;\n setShowNewMessagesBanner(true);\n }\n }, [newMessageIndicatorText]);\n\n /**\n * Function to mark all messages up to a certain point as delivered.\n * @param {CometChat.MessageReceipt} message - The receipt message up to which all messages are marked as delivered.\n * @returns {void}\n */\n\n const markAllMessagAsDelivered: (message: CometChat.MessageReceipt) => void = useCallback(\n (message: CometChat.MessageReceipt) => {\n try {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (\n parseInt(m?.getId()?.toString()) <=\n parseInt(message.getMessageId()) &&\n m.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n !m.getDeliveredAt()\n ) {\n m.setDeliveredAt(message.getDeliveredAt());\n }\n return m;\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to mark all messages up to a certain point as read.\n * @param {CometChat.MessageReceipt} message - The receipt message up to which all messages are marked as read.\n * @returns {void}\n */\n const markAllMessageAsRead: (message: CometChat.MessageReceipt) => void = useCallback(\n (message: CometChat.MessageReceipt) => {\n try {\n const listToMarkRead: CometChat.BaseMessage[] = [];\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const messages = prevMessageList.map((m: CometChat.BaseMessage) => {\n if (\n parseInt(m?.getId()?.toString()) <=\n parseInt(message.getMessageId()) &&\n m.getSender().getUid() === loggedInUserRef.current?.getUid() &&\n !m.getReadAt()\n ) {\n m.setReadAt(message.getReadAt());\n if (\n parseInt(m?.getId()?.toString()) ===\n parseInt(message.getMessageId())\n ) {\n listToMarkRead.push(m);\n }\n }\n return m;\n });\n listToMarkRead.forEach((m) => {\n CometChatMessageEvents.ccMessageRead.next(m);\n });\n return messages;\n });\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to handle the marking of messages as read or delivered\n * @param {CometChat.MessageReceipt} messageReceipt - The receipt message\n * @returns {void}\n */\n\n const messageReadAndDelivered: (message: CometChat.MessageReceipt) => void = useCallback(\n (messageReceipt: CometChat.MessageReceipt) => {\n try {\n if (\n messageReceipt.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n messageReceipt.getSender().getUid() === userRef.current?.getUid() &&\n messageReceipt.getReceiver() === loggedInUserRef.current?.getUid()\n ) {\n messageReceipt.getReceiptType() === \"delivery\"\n ? markAllMessagAsDelivered(messageReceipt)\n : markAllMessageAsRead(messageReceipt);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n markAllMessagAsDelivered,\n markAllMessageAsRead,\n onErrorCallback]\n );\n\n\n\n /**\n * Function to update an interactive message\n * @param {CometChat.InteractionReceipt} receipt - The interaction receipt of the message to be updated.\n * @returns {void}\n */\n const updateInteractiveMessage: (message: CometChat.InteractionReceipt) => void = useCallback(\n (receipt: CometChat.InteractionReceipt) => {\n if (loggedInUserRef.current?.getUid() === receipt.getSender().getUid()) {\n setMessageList((previousMessage) => {\n return previousMessage.map((message) => {\n if (String(message.getId()) === String(receipt.getMessageId())) {\n const interaction = receipt.getInteractions();\n (message as CometChat.InteractiveMessage).setInteractions(\n interaction\n );\n return InteractiveMessageUtils.convertInteractiveMessage(message);\n } else {\n return message;\n }\n });\n });\n }\n },\n []\n );\n\n /**\n * Function to check whether to scroll to the bottom of the message list\n * @param {boolean} forceScroll - A boolean indicating whether to force the scroll to the bottom\n * @returns {void}\n */\n const checkAndScrollToBottom: (forceScroll?: boolean) => void = useCallback((forceScroll: boolean = false) => {\n\n if (forceScroll || scrollToBottomOnNewMessages) {\n setTimeout(() => {\n setScrollListToBottom(true);\n isOnBottomRef.current = true;\n UnreadMessagesRef.current = [];\n }, 100);\n return;\n }\n }, [scrollToBottomOnNewMessages]);\n\n /**\n * Function to handle when a new message is received\n * @param {CometChat.BaseMessage} message - The new message received.\n * @returns {void}\n */\n const messageReceivedHandler: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n if (isPartOfCurrentChatForSDKEvent(message)) {\n addMessage(message);\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n checkAndMarkMessageAsRead(message);\n } else {\n if (isOnBottomRef.current) {\n checkAndScrollToBottom(true);\n checkAndMarkMessageAsRead(message);\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(message);\n }\n }\n } else if (isThreadOfCurrentChatForSDKEvent(message)) {\n updateReplyCount(message);\n updateUnreadReplyCount(message);\n }\n playAudio();\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n isPartOfCurrentChatForSDKEvent,\n isThreadOfCurrentChatForSDKEvent,\n playAudio,\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n checkAndMarkMessageAsRead,\n showAndIncrementUnreadCount,\n updateReplyCount,\n updateUnreadReplyCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to handle when a group action message is received\n * @param {CometChat.Action} actionMessage - The action message received.\n * @param {CometChat.Group} group - The group where the action message is received.\n * @returns {void}\n */\n\n const groupActionMessageReceived: (message: CometChat.Action, group: CometChat.Group) => void = useCallback(\n (actionMessage: CometChat.Action, group: CometChat.Group) => {\n try {\n if (group?.getGuid() === groupRef?.current?.getGuid()) {\n addMessage(actionMessage);\n if (!isOnBottomRef.current) {\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(actionMessage);\n }\n } else {\n checkAndScrollToBottom(true);\n }\n }\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n showAndIncrementUnreadCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Checks if receipt is of the current list.\n * @param {CometChat.ReactionEvent} receipt - The reaction event object.\n * @returns {boolean} - Returns true if the receipt is of the current list, otherwise returns false.\n */\n const isReactionOfThisList: (receipt: CometChat.ReactionEvent) => boolean = useCallback((receipt: CometChat.ReactionEvent) => {\n const receiverId = receipt?.getReceiverId();\n const receiverType = receipt?.getReceiverType();\n const reactedById = receipt?.getReaction()?.getReactedBy()?.getUid();\n const parentMessageId = receipt?.getParentMessageId();\n const listParentMessageId = parentMessageId && String(parentMessageId);\n if (listParentMessageId) {\n if (parentMessageId === listParentMessageId) {\n return true;\n } else {\n return false\n }\n } else {\n if (receipt.getParentMessageId()) {\n return false\n }\n\n if (userRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.user && (receiverId === userRef.current?.getUid() || reactedById === userRef.current?.getUid())) {\n return true\n }\n } else if (groupRef.current) {\n if (receiverType === CometChatUIKitConstants.MessageReceiverType.group && (receiverId === groupRef.current?.getGuid())) {\n return true\n }\n }\n }\n return false\n }, [])\n\n /**\n * Updates the message list with the reaction information of a message.\n * @param message - The message reaction object.\n * @param isAdded - Indicates whether the reaction is added or removed.\n */\n const messageReactionUpdated: (receipt: CometChat.ReactionEvent, isAdded: boolean) => boolean | undefined = useCallback(\n (receipt: CometChat.ReactionEvent, isAdded: boolean) => {\n if (!isReactionOfThisList(receipt)) {\n return false;\n }\n\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n const index = prevMessageList.findIndex(\n (i) =>\n i.getId().toString() ===\n receipt.getReaction()?.getMessageId().toString()\n );\n if (index === -1) {\n return prevMessageList;\n }\n const messageObject = prevMessageList[index];\n let action: CometChat.REACTION_ACTION;\n if (isAdded) {\n action = CometChat.REACTION_ACTION.REACTION_ADDED;\n } else {\n action = CometChat.REACTION_ACTION.REACTION_REMOVED;\n }\n const modifiedMessage = CometChat.CometChatHelper.updateMessageWithReactionInfo(messageObject, receipt.getReaction(), action) as CometChat.BaseMessage;\n\n return prevMessageList.map((m) => {\n if (m.getId().toString() === modifiedMessage?.getId().toString()) {\n return CometChatUIKitUtility.clone(modifiedMessage)\n } else {\n return m\n }\n });\n });\n }, [isReactionOfThisList]\n );\n\n /**\n * Function to handle when a call action message is received\n * @param {CometChat.Call} callMessage - The call message received.\n * @returns {void}\n */\n const callActionMessageReceived: (callMessage: CometChat.Call) => void = useCallback(\n (callMessage: CometChat.Call) => {\n try {\n if (\n isPartOfCurrentChatForSDKEvent(callMessage) &&\n ChatConfigurator.names.includes(\"calling\")\n ) {\n addMessage(callMessage);\n if (!isOnBottomRef.current) {\n if (scrollToBottomOnNewMessages) {\n checkAndScrollToBottom();\n } else {\n setScrollListToBottom(false);\n showAndIncrementUnreadCount(callMessage);\n }\n } else {\n checkAndScrollToBottom(true);\n }\n }\n } catch (error) {\n onErrorCallback(error);\n }\n },\n [\n isPartOfCurrentChatForSDKEvent,\n addMessage,\n scrollToBottomOnNewMessages,\n checkAndScrollToBottom,\n showAndIncrementUnreadCount,\n onErrorCallback,\n ]\n );\n\n /**\n * Function to handle the processing of real-time group and call actions.\n * @param {string} key - The key identifying the type of the message category.\n * @param {CometChat.BaseMessage} message - The incoming message.\n * @param {CometChat.Group} group - The group where the message is received (if applicable).\n * @returns {void}\n */\n const handleGroupAndCallActions = useCallback(\n (\n key: string = \"\",\n message: CometChat.BaseMessage,\n group?: CometChat.Group\n ) => {\n try {\n switch (key) {\n case CometChatUIKitConstants.MessageCategory.action: {\n if (group) {\n groupActionMessageReceived(message as CometChat.Action, group);\n }\n break;\n }\n case CometChatUIKitConstants.MessageCategory.call: {\n callActionMessageReceived(message as CometChat.Call);\n break;\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [\n groupActionMessageReceived,\n callActionMessageReceived,\n onErrorCallback,\n ]\n );\n\n /**\n * Callback to be executed when the message list is scrolled to the bottom.\n * @returns {Promise} Returns a promise that resolves to a boolean value or a CometChat exception.\n */\n const onBottomCallback: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n clearNewMessagesCount();\n setScrollListToBottom(false);\n if (messageListManagerRef.current && messageListManagerRef.current.previous) {\n messageListManagerRef.current.previous = null;\n }\n fetchNextMessages().then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [\n messageList,\n checkAndMarkMessageAsRead,\n fetchNextMessages,\n clearNewMessagesCount,\n onErrorCallback,\n ]);\n\n /**\n * Callback to be executed when the message list is scrolled to the top.\n * @returns {Promise} Returns a promise that resolves to a boolean value or a CometChat exception.\n */\n\n const onTopCallback: () => Promise = useCallback(() => {\n return new Promise((resolve, reject) => {\n try {\n setScrollListToBottom(false);\n isOnBottomRef.current = false;\n if (messageListManagerRef.current && messageListManagerRef.current.next) {\n messageListManagerRef.current.next = null;\n }\n fetchPreviousMessages().then(\n (success) => {\n resolve(success);\n },\n (error) => {\n reject(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n });\n }, [fetchPreviousMessages, onErrorCallback, isOnBottomRef]);\n\n /**\n * Function to update the view to focus on a specific message.\n * @param {CometChat.BaseMessage} message - The message to focus on.\n * @returns {void}\n */\n const updateView: (message: CometChat.BaseMessage) => void = useCallback(\n (message: CometChat.BaseMessage) => {\n elementRefs.current[message.getId()].current?.scrollIntoView({\n block: \"center\",\n });\n },\n []\n );\n\n /**\n * Function to scroll the message list to the bottom.\n * @returns {void}\n */\n const scrollToBottom: () => void = useCallback(() => {\n try {\n clearNewMessagesCount()\n setScrollListToBottom(true);\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [markMessageRead, onErrorCallback, clearNewMessagesCount]);\n\n /**\n * Function to reset the count of unread messages in a thread.\n * @param {number | string} parentMessageId - The parent message ID of the thread.\n * @returns {void}\n */\n\n const resetCountForUnreadMessagesInThread: (parentMessageId: number | string) => void = useCallback(\n (parentMessageId: number | string) => {\n setMessageList((prevMessageList: CometChat.BaseMessage[]) => {\n return prevMessageList.map((m: CometChat.BaseMessage) => {\n if (m?.getId() === parentMessageId) {\n return m;\n } else {\n return m;\n }\n });\n });\n },\n []\n );\n\n /**\n * Function to subscribe to UI events for handling various scenarios such as showing a dialog, handling group member events, handling message edits, etc.\n * @returns {() => void} A cleanup function to unsubscribe from the events.\n */\n const subscribeToUIEvents: () => (() => void) | undefined = useCallback(() => {\n try {\n const ccShowOngoingCall = CometChatUIEvents.ccShowOngoingCall.subscribe(\n (data: IShowOngoingCall) => {\n setShowOngoingCall(true);\n setOngoingCallView(data.child);\n }\n );\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n (call: CometChat.Call) => {\n setShowOngoingCall(false);\n setOngoingCallView(null);\n if (!call) {\n return;\n }\n callActionMessageReceived(call);\n }\n );\n const ccCallRejected = CometChatCallEvents.ccCallRejected.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccCallAccepted = CometChatCallEvents.ccCallAccepted.subscribe(\n (call: CometChat.Call) => {\n callActionMessageReceived(call);\n }\n );\n const ccMessageRead = CometChatMessageEvents.ccMessageRead.subscribe(\n (message: CometChat.BaseMessage) => {\n if (isThreadOfCurrentChatForSDKEvent(message)) {\n resetCountForUnreadMessagesInThread(message.getParentMessageId());\n }\n }\n );\n const ccShowDialog = CometChatUIEvents.ccShowDialog.subscribe(\n (data: IDialog) => {\n imageModerationDialogRef.current = data.child;\n setShowConfirmDialog(true);\n }\n );\n const ccHideDialog = CometChatUIEvents.ccHideDialog.subscribe(() => {\n imageModerationDialogRef.current = null;\n setShowConfirmDialog(false);\n });\n const ccShowPanel = CometChatUIEvents.ccShowPanel.subscribe(\n (data: IPanel) => {\n if (!data.message || ((data.message.getParentMessageId() && parentMessageId && data.message.getParentMessageId() == parentMessageId) || (!parentMessageId && !data.message?.getParentMessageId()))) {\n if (data.position === PanelAlignment.messageListFooter) {\n if (smartReplyViewRef.current) {\n smartReplyViewRef.current = null;\n setShowNewMessagesBanner(false);\n setShowFooterPanelView(false);\n }\n setTimeout(() => {\n smartReplyViewRef.current = data.child;\n setShowFooterPanelView(true);\n }, 0);\n }\n else if (data.position === PanelAlignment.messageListHeader) {\n if (headerViewRef.current) {\n headerViewRef.current = null;\n setShowHeaderPanelView(false);\n }\n\n setTimeout(() => {\n headerViewRef.current = data.child;\n setShowHeaderPanelView(true);\n }, 0);\n\n }\n }\n }\n );\n const ccHidePanel = CometChatUIEvents.ccHidePanel.subscribe(\n (alignment) => {\n if (alignment === PanelAlignment.messageListFooter) {\n smartReplyViewRef.current = null;\n setShowNewMessagesBanner(false);\n setShowFooterPanelView(false);\n\n }\n else if (alignment === PanelAlignment.messageListHeader) {\n headerViewRef.current = null;\n setShowHeaderPanelView(false);\n\n }\n }\n );\n const ccGroupMemberAdded =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n item.messages.map((message) => {\n groupActionMessageReceived(message, item.userAddedIn);\n });\n }\n );\n const ccGroupMemberBanned =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n groupActionMessageReceived(item.message, item.kickedFrom);\n }\n );\n const ccGroupMemberKicked =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n groupActionMessageReceived(item.message, item.kickedFrom);\n }\n );\n const ccGroupMemberScopeChanged =\n CometChatGroupEvents.ccGroupMemberScopeChanged.subscribe(\n (item: IGroupMemberScopeChanged) => {\n groupActionMessageReceived(item.message, item.group);\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n groupActionMessageReceived(item.message, item.leftGroup);\n }\n );\n const ccMessageEdit = CometChatMessageEvents.ccMessageEdited.subscribe(\n (obj: IMessages) => {\n if (obj?.status === MessageStatus.success) {\n if (isPartOfCurrentChatForUIEvent(obj.message)) {\n updateMessage(obj.message, false);\n }\n }\n }\n );\n\n const ccMessageTranslated = CometChatMessageEvents.ccMessageTranslated.subscribe(\n (obj: IMessages) => {\n if (obj?.status === MessageStatus.success) {\n if (isPartOfCurrentChatForSDKEvent(obj.message)) {\n updateMessage(obj.message, false);\n setTimeout(() => {\n updateView(obj.message);\n }, 100);\n }\n }\n }\n );\n\n const ccMessageSent = CometChatMessageEvents.ccMessageSent.subscribe(\n (obj: IMessages) => {\n let { message, status } = obj;\n switch (status) {\n case MessageStatus.inprogress: {\n if (isPartOfCurrentChatForUIEvent(message))\n addMessage(message);\n break;\n }\n case MessageStatus.success: {\n if (isPartOfCurrentChatForUIEvent(message)) {\n updateMessage(message, true);\n }\n\n if (isThreadOfCurrentChatForUIEvent(message)) {\n updateReplyCount(message);\n }\n break;\n }\n default:\n updateMessage(message, true);\n if (isThreadOfCurrentChatForUIEvent(message)) {\n updateReplyCount(message);\n }\n break;\n }\n }\n );\n\n const onTextMessageReceived = CometChatMessageEvents.onTextMessageReceived.subscribe((textMessage: CometChat.TextMessage) => {\n messageReceivedHandler(textMessage);\n });\n const onMediaMessageReceived = CometChatMessageEvents.onMediaMessageReceived.subscribe((mediaMessage: CometChat.MediaMessage) => {\n messageReceivedHandler(mediaMessage);\n\n });\n const onCustomMessageReceived = CometChatMessageEvents.onCustomMessageReceived.subscribe((customMessage: CometChat.CustomMessage) => {\n messageReceivedHandler(customMessage);\n });\n const onFormMessageReceived = CometChatMessageEvents.onFormMessageReceived.subscribe((formMessage: FormMessage) => {\n messageReceivedHandler(formMessage);\n });\n const onSchedulerMessageReceived = CometChatMessageEvents.onSchedulerMessageReceived.subscribe((schedulerMessage: SchedulerMessage) => {\n messageReceivedHandler(schedulerMessage);\n });\n const onCardMessageReceived = CometChatMessageEvents.onCardMessageReceived.subscribe((cardMessage: CardMessage) => {\n messageReceivedHandler(cardMessage);\n });\n const onCustomInteractiveMessageReceived = CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe((customInteractiveMessage: CustomInteractiveMessage) => {\n messageReceivedHandler(customInteractiveMessage);\n });\n const onMessagesDelivered = CometChatMessageEvents.onMessagesDelivered.subscribe((messageReceipt: CometChat.MessageReceipt) => {\n if (!disableReceipt) {\n messageReadAndDelivered(messageReceipt);\n }\n });\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe((messageReceipt: CometChat.MessageReceipt) => {\n if (!disableReceipt) {\n messageReadAndDelivered(messageReceipt);\n }\n });\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe((deletedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(deletedMessage);\n });\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe((editedMessage: CometChat.BaseMessage) => {\n replaceUpdatedMessage(editedMessage);\n });\n const onTransientMessageReceived = CometChatMessageEvents.onTransientMessageReceived.subscribe((transientMessage: CometChat.TransientMessage) => {\n let message: CometChat.TransientMessage =\n transientMessage as CometChat.TransientMessage;\n let liveReaction: any = message.getData();\n if (\n validateTransientMessage(transientMessage)\n && liveReaction[\"type\"] == \"live_reaction\"\n ) {\n CometChatMessageEvents.ccLiveReaction.next(\n liveReaction[\"reaction\"]\n );\n }\n });\n const onInteractionGoalCompleted = CometChatMessageEvents.onInteractionGoalCompleted.subscribe((receipt: CometChat.InteractionReceipt) => {\n updateInteractiveMessage(receipt)\n });\n let onMessageReactionAdded: Subscription, onMessageReactionRemoved: Subscription;\n\n if (!disableReactions) {\n onMessageReactionAdded = CometChatMessageEvents.onMessageReactionAdded.subscribe((reactionReceipt) => {\n messageReactionUpdated(reactionReceipt, true);\n });\n onMessageReactionRemoved = CometChatMessageEvents.onMessageReactionRemoved.subscribe((reactionReceipt) => {\n messageReactionUpdated(reactionReceipt, false);\n });\n }\n\n return () => {\n try {\n ccMessageEdit?.unsubscribe();\n ccMessageSent?.unsubscribe();\n ccGroupMemberAdded?.unsubscribe();\n ccGroupMemberBanned?.unsubscribe();\n ccGroupMemberKicked?.unsubscribe();\n ccGroupMemberScopeChanged?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccShowOngoingCall?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n ccCallEnded?.unsubscribe();\n ccCallRejected?.unsubscribe();\n ccCallAccepted?.unsubscribe();\n ccShowDialog?.unsubscribe();\n ccHideDialog?.unsubscribe();\n ccShowPanel?.unsubscribe();\n ccHidePanel?.unsubscribe();\n ccMessageTranslated?.unsubscribe();\n ccMessageRead?.unsubscribe();\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n onMessagesDelivered?.unsubscribe();\n onMessagesRead?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n onMessageEdited?.unsubscribe();\n onTransientMessageReceived?.unsubscribe();\n onInteractionGoalCompleted?.unsubscribe();\n if (!disableReactions) {\n onMessageReactionAdded?.unsubscribe();\n onMessageReactionRemoved?.unsubscribe();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [\n validateTransientMessage,\n resetCountForUnreadMessagesInThread,\n disableReactions,\n callActionMessageReceived,\n isThreadOfCurrentChatForSDKEvent,\n updateMessage,\n groupActionMessageReceived,\n isPartOfCurrentChatForUIEvent,\n updateView,\n addMessage,\n isThreadOfCurrentChatForUIEvent,\n updateReplyCount,\n onErrorCallback,\n showFooterPanelView,\n ]);\n\n /**\n * Function to check if two dates are different\n * @param {number | undefined} firstDate - The first date to compare\n * @param {number | undefined} secondDate - The second date to compare\n * @returns {boolean | undefined} Returns true if dates are different, false otherwise\n */\n const isDateDifferent: (firstDate: number | undefined, secondDate: number | undefined) => boolean | undefined = useCallback(\n (firstDate: number | undefined, secondDate: number | undefined) => {\n try {\n let firstDateObj: Date, secondDateObj: Date;\n firstDateObj = new Date(firstDate! * 1000);\n secondDateObj = new Date(secondDate! * 1000);\n return (\n firstDateObj.getDate() !== secondDateObj.getDate() ||\n firstDateObj.getMonth() !== secondDateObj.getMonth() ||\n firstDateObj.getFullYear() !== secondDateObj.getFullYear()\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [onErrorCallback]\n );\n\n /**\n * Function to decide whether to show header title or not\n * @param {CometChat.BaseMessage} message - The message for which header title needs to be decided\n * @returns {boolean} Returns true if header title needs to be shown, false otherwise\n */\n\n const showHeaderTitle: (message: CometChat.BaseMessage) => boolean = useCallback(\n (message: CometChat.BaseMessage) => {\n if (alignment === MessageListAlignment.left) {\n return true;\n } else {\n if (\n groupRef.current &&\n message?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n message?.getSender() &&\n message?.getSender()?.getUid() !== loggedInUserRef.current?.getUid() &&\n alignment === MessageListAlignment.standard\n ) {\n return true;\n } else {\n return false;\n }\n }\n },\n [alignment]\n );\n\n /**\n * Function to get leading view for message bubble\n * @param {CometChat.BaseMessage} message - The message for which leading view needs to be fetched\n * @returns {any} Returns JSX.Element or null for leading view of a message bubble\n */\n\n const getBubbleLeadingView: (message: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call &&\n showAvatar &&\n showHeaderTitle(item)\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [showAvatar, avatarStyle, showHeaderTitle, theme]\n );\n\n /**\n * Function to get header date for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which header date needs to be fetched\n * @returns {JSX.Element} Returns JSX.Element for header date of a message bubble\n */\n const getBubbleHeaderDate: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n \n \n );\n },\n [messageListStyle, datePattern, theme]\n );\n\n /**\n * Function to get header title for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which header title needs to be fetched\n * @returns {JSX.Element} Returns JSX.Element for header title of a message bubble\n */\n\n const getBubbleHeaderTitle: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n \n \n );\n },\n [theme]\n );\n\n /**\n * Function to get the header of a message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the header needs to be fetched\n * @returns {any} Returns JSX.Element or null for header view of a message bubble\n */\n\n const getBubbleHeader: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (getHeaderView(item)) {\n return getHeaderView(item);\n } else {\n if (\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n if (\n !showHeaderTitle(item) &&\n timestampAlignment !== timestampEnum.top\n ) {\n return null;\n } else {\n return (\n <>\n {showHeaderTitle(item) ? getBubbleHeaderTitle(item) : null}\n {timestampAlignment === timestampEnum.top\n ? getBubbleHeaderDate(item)\n : null}\n \n );\n }\n }\n }\n\n return null;\n },\n [\n timestampAlignment,\n getBubbleHeaderDate,\n showHeaderTitle,\n getHeaderView,\n getBubbleHeaderTitle,\n ]\n );\n\n /**\n * Function to get status and date for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the information needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for status and date of a message bubble or null\n */\n const getBubbleStatusInfoDate: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n timestampAlignment === timestampEnum.bottom &&\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [\n timestampAlignment,\n messageListStyle,\n datePattern,\n theme,\n ]\n );\n\n /**\n * Function to get receipt for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the receipt needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for receipt of a message bubble or null\n */\n\n const getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n if (\n !disableReceipt &&\n (!item?.getSender() ||\n loggedInUserRef.current?.getUid() === item?.getSender()?.getUid()) &&\n item?.getCategory() !==\n CometChatUIKitConstants.MessageCategory.action &&\n item?.getCategory() !== CometChatUIKitConstants.MessageCategory.call\n ) {\n return (\n \n );\n } else {\n return null;\n }\n },\n [\n disableReceipt,\n waitIcon,\n sentIcon,\n deliveredIcon,\n readIcon,\n errorIcon,\n getMessageReceipt,\n theme,\n ]\n );\n\n /**\n * Function to get configuration for reaction list\n * @returns {ReactionListConfiguration} Returns ReactionListConfiguration\n */\n const getReactionListConfiguration: () => ReactionListConfiguration = useCallback(() => {\n const reactionListConfiguration =\n reactionsConfiguration?.reactionListConfiguration || {};\n const avatarStyle = getReactionListAvatarStyle(theme);\n const listItemStyle = getReactionListItemStyle(theme);\n const reactionListStyle = getReactionListStyle(theme);\n const reactionItemClicked = (\n reaction: CometChat.Reaction,\n message: CometChat.BaseMessage\n ) => {\n if (reaction?.getReactedBy()?.getUid() === loggedInUserRef.current?.getUid()) {\n reactToMessages(reaction?.getReaction(), message);\n }\n };\n return new ReactionListConfiguration({\n avatarStyle: {\n ...avatarStyle,\n ...reactionListConfiguration?.avatarStyle,\n },\n errorIconURL: reactionListConfiguration?.errorIconURL || \"\",\n listItemStyle: {\n ...listItemStyle,\n ...reactionListConfiguration?.listItemStyle,\n },\n loadingIconURL: reactionListConfiguration?.loadingIconURL || \"\",\n reactionListStyle: {\n ...reactionListStyle,\n ...reactionListConfiguration?.reactionListStyle,\n },\n reactionItemClicked:\n reactionListConfiguration?.reactionItemClicked || reactionItemClicked,\n reactionsRequestBuilder:\n reactionListConfiguration?.reactionsRequestBuilder || undefined,\n });\n }, [reactionsConfiguration, reactToMessages, theme]);\n\n /**\n * Function to get configuration for reaction info\n * @returns {ReactionInfoConfiguration} Returns ReactionInfoConfiguration\n */\n const getReactionInfoConfiguration: () => ReactionInfoConfiguration = useCallback(() => {\n const config = reactionsConfiguration?.reactionInfoConfiguration || {};\n const reactionInfoStyle = getReactionInfoStyle(theme, config);\n return new ReactionInfoConfiguration({\n reactionInfoStyle: reactionInfoStyle,\n reactionsRequestBuilder: config?.reactionsRequestBuilder || undefined,\n errorIconURL: config?.errorIconURL || \"\",\n loadingIconURL: config?.loadingIconURL || \"\",\n });\n }, [reactionsConfiguration, theme]);\n\n /**\n * Function to get reaction view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the reaction view needs to be fetched\n * @returns {JSX.Element | null} Returns JSX.Element for reaction view of a message bubble or null\n */\n const getReactionView: (item: CometChat.BaseMessage) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage) => {\n const reactions = item?.getReactions() || [];\n const alignment = setBubbleAlignment(item);\n if (reactions && reactions.length > 0 && !disableReactions) {\n const style = getReactionsStyle(reactionsConfiguration?.reactionsStyle, theme);\n return {\n if (reactionsConfiguration?.reactionClick) {\n reactionsConfiguration?.reactionClick(reaction, message);\n } else {\n reactToMessages(reaction?.getReaction(), message);\n }\n }\n }\n reactionListConfiguration={getReactionListConfiguration()}\n reactionInfoConfiguration={getReactionInfoConfiguration()}\n style={getReactionViewStyle(alignment)}\n />\n } else {\n return null;\n }\n },\n [\n disableReactions,\n getReactionInfoConfiguration,\n getReactionListConfiguration,\n reactToMessages,\n reactionsConfiguration,\n setBubbleAlignment,\n theme,\n ]\n );\n\n /**\n * Function to get footer view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the footer view needs to be fetched\n * @returns {any} Returns JSX.Element for footer view of a message bubble\n */\n const getBubbleFooterView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (getFooterView(item)) {\n return (\n \n {getFooterView(item)}\n \n );\n } else {\n return (\n \n {getReactionView(item)}\n \n );\n }\n },\n [getReactionView, getFooterView, setBubbleAlignment]\n );\n\n /**\n * Function to get thread view for message bubble\n * @param {CometChat.BaseMessage} item - The message bubble for which the thread view needs to be fetched\n * @returns {any} Returns JSX.Element for thread view of a message bubble\n */\n const getBubbleThreadView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n if (item?.getReplyCount() && !item?.getDeletedAt()) {\n const alignment = setBubbleAlignment(item);\n const icon = threadIndicatorIcon;\n\n return (\n
    \n {\n openThreadView(item);\n }}\n >\n \n
    \n );\n }\n },\n [\n setBubbleAlignment,\n threadIndicatorIcon,\n theme,\n messageListStyle,\n openThreadView,\n ]\n );\n\n /**\n * Function to validate a message for displaying status information\n * @param {CometChat.BaseMessage} message - The message to be validated\n * @returns {boolean} - Returns true if the message type is valid, false otherwise\n */\n const isValidMessageForStatusInfo: (\n message: CometChat.BaseMessage\n ) => boolean = (\n message: CometChat.BaseMessage\n ): boolean => {\n const messageType = message?.getType();\n const validMessageTypes = [\n CometChatUIKitConstants.MessageTypes.image,\n CometChatUIKitConstants.MessageTypes.video,\n ];\n return validMessageTypes.includes(messageType);\n };\n\n /**\n* Function to create status view for the message\n* @param {CometChat.BaseMessage} item - The message for which the status view needs to be fetched\n* @returns {any} - Returns JSX.Element or null for status view of a message\n*/\n\n const getStatusInfoView: (item: CometChat.BaseMessage) => any = useCallback(\n (item: CometChat.BaseMessage) => {\n try {\n let _alignment = setBubbleAlignment(item);\n if (\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()] &&\n messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.statusInfoView\n ) {\n return messagesTypesMap[item?.getCategory() + \"_\" + item?.getType()]?.statusInfoView(\n item,\n _alignment\n );\n } else if (!item?.getDeletedAt() && !(item instanceof CometChat.Action) && !(item instanceof CometChat.Call)) {\n return (\n \n \n {getBubbleStatusInfoDate(item)}\n {getBubbleStatusInfoReceipt(item)}\n \n \n );\n } else {\n return null;\n }\n } catch (error: any) {\n onErrorCallback(error);\n return null;\n }\n },\n [\n getBubbleStatusInfoDate,\n getBubbleStatusInfoReceipt,\n messagesTypesMap,\n onErrorCallback,\n setBubbleAlignment,\n ]\n );\n\n /**\n * Function to generate a message bubble\n * @param {CometChat.BaseMessage} item - The message for which the bubble needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble\n */\n\n const getMessageBubbleItem: (item: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage, i: any) => {\n return (\n {\n elementRefs.current[item.getId()] = ref;\n }}\n leadingView={getBubbleLeadingView(item)}\n headerView={getBubbleHeader(item)}\n footerView={getBubbleFooterView(item)}\n contentView={getContentView(item)}\n bottomView={getBottomView(item)}\n id={item?.getId() || item?.getMuid()}\n options={getMessageOptions(item)}\n messageBubbleStyle={messageBubbleStyle(\n item,\n theme,\n alignment,\n loggedInUserRef.current\n )}\n alignment={setBubbleAlignment(item)}\n replyView={null}\n threadView={getBubbleThreadView(item)}\n statusInfoView={getStatusInfoView(item)}\n >\n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getBubbleFooterView,\n getContentView,\n alignment,\n setBubbleAlignment,\n getBubbleThreadView,\n getStatusInfoView,\n getMessageOptions,\n getBottomView,\n theme,\n ]\n );\n\n /**\n * Function to create date for the message bubble\n * @param {CometChat.BaseMessage} item - The message for which the date needs to be fetched\n * @param {number} i - The index of the message\n * @returns {JSX.Element | null} - Returns JSX.Element or null for date of a message bubble\n */\n const getMessageBubbleDate: (item: CometChat.BaseMessage, i: number) => JSX.Element | null = useCallback(\n (item: CometChat.BaseMessage, i: number) => {\n if (i === 0) {\n return (\n \n \n \n );\n } else {\n if (\n isDateDifferent(messageList[i - 1]?.getSentAt(), item?.getSentAt())\n ) {\n return (\n \n \n \n );\n } else {\n return null;\n }\n }\n },\n [\n DateSeparatorPattern,\n messageList,\n dateSeparatorStyle,\n isDateDifferent,\n theme,\n ]\n );\n\n /**\n * Function to create a message bubble\n * @param {CometChat.BaseMessage} m - The message for which the bubble needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble\n */\n const getMessageBubble: (m: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (m: CometChat.BaseMessage, i: any) => {\n let _alignment = setBubbleAlignment(m);\n\n return (\n <>\n {\n !hideDateSeparator ?\n getMessageBubbleDate(m, i) : <>}\n \n {getBubbleWrapper(m)\n ? getBubbleWrapper(m)\n : getMessageBubbleItem(m, i)}\n \n \n );\n },\n [\n getBubbleWrapper,\n getMessageBubbleDate,\n getMessageBubbleItem,\n setBubbleAlignment,\n ]\n );\n\n /**\n * Function to generate a message bubble view item\n * @param {CometChat.BaseMessage} item - The message for which the view item needs to be created\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a message bubble view item\n */\n const getMessageBubbleViewItem: (item: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage, i: any) => {\n return (\n \n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getContentView,\n alignment,\n setBubbleAlignment,\n theme,\n ]\n );\n\n /**\n * Function to get the bubble view\n * @param {CometChat.BaseMessage} m - The message for which the bubble view needs to be fetched\n * @param {any} i - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a bubble view\n */\n const getBubbleView: (m: CometChat.BaseMessage, i: any) => JSX.Element = useCallback(\n (m: CometChat.BaseMessage, i: any) => {\n return (\n \n {getBubbleWrapper(m)\n ? getBubbleWrapper(m)\n : getMessageBubbleViewItem(m, i)}\n \n );\n },\n [\n getBubbleWrapper,\n getMessageBubbleDate,\n getMessageBubbleItem,\n getMessageBubbleViewItem,\n ]\n );\n\n /**\n * Function to get the footer of the message list\n * @returns {JSX.Element} - Returns JSX.Element for the footer of the message list\n */\n const getMessageListFooter: () => JSX.Element = useCallback(() => {\n return (\n <>\n {showFooterPanelView && smartReplyViewRef.current ? smartReplyViewRef.current : null}\n {footerView && !smartReplyViewRef.current ? footerView : null}\n \n );\n }, [\n footerView,\n scrollToBottom,\n showFooterPanelView\n ]);\n\n /**\n * Function to get the header of the message list\n * @returns {JSX.Element} - Returns JSX.Element for the header of the message list\n */\n const getMessageListHeader: () => JSX.Element = useCallback(() => {\n return (\n <>\n {showHeaderPanelView && headerViewRef.current ? headerViewRef.current : null}\n {headerView && !headerViewRef.current ? headerView : null}\n \n );\n }, [\n headerView,\n showHeaderPanelView\n ]);\n /**\n * Function to get the thread count of a message\n * @param {CometChat.BaseMessage} message - The message for which the thread count needs to be fetched\n * @returns {string} - Returns the thread count of the message as a string\n */\n const getThreadCount: (message: CometChat.BaseMessage) => string = (message: CometChat.BaseMessage) => {\n const replyCount = message?.getReplyCount() || 0;\n const suffix = replyCount === 1 ? localize(\"REPLY\") : localize(\"REPLIES\");\n return `${replyCount} ${suffix}`;\n };\n\n /**\n * Function to get the threaded message bubble\n * @param {CometChat.BaseMessage} item - The message for which the threaded bubble needs to be fetched\n * @returns {JSX.Element} - Returns JSX.Element for a threaded message bubble\n */\n const getThreadedMessageBubble: (item: CometChat.BaseMessage) => JSX.Element = useCallback(\n (item: CometChat.BaseMessage) => {\n return (\n <>\n {getBubbleWrapper(item) ? (\n getBubbleWrapper(item)\n ) : (\n \n )}\n \n );\n },\n [\n getBubbleLeadingView,\n getBubbleHeader,\n getBubbleFooterView,\n getContentView,\n alignment,\n getMessageOptions,\n getBubbleWrapper,\n getBottomView,\n theme,\n ]\n );\n\n /**\n * Function to get list item\n * @param {CometChat.BaseMessage} message - The message for which the list item needs to be fetched\n * @param {number} index - The index of the message\n * @returns {JSX.Element} - Returns JSX.Element for a list item\n */\n\n const getListItem: (message: CometChat.BaseMessage, index: number) => JSX.Element = useMemo(() => {\n return function (message: CometChat.BaseMessage, index: number): any {\n return getMessageBubble(message, index);\n };\n }, [getMessageBubble]);\n\n /**\n * Function to get the current state of the message list\n * @returns {States} - Returns the current state of the message list\n */\n const getCurrentMessageListState: () => States = useCallback(() => {\n return messageListState\n }, [messageListState]);\n /**\n * Function to hide the message information\n */\n const hideMessageInformation: () => void = () => {\n setShowMessageInfoPopup(false);\n };\n\n /**\n * Function to get the message template based on the message type and category\n * @param {CometChat.BaseMessage} selectedMessage - The message for which the template needs to be fetched\n * @returns {CometChatMessageTemplate} - Returns the template of the selected message\n */\n const getMessageTemplate: (selectedMessage: CometChat.BaseMessage) => CometChatMessageTemplate = (selectedMessage: CometChat.BaseMessage) => {\n return messagesTypesMap[\n `${selectedMessage?.getCategory() + \"_\" + selectedMessage?.getType()}`\n ];\n };\n\n /**\n * Custom hooks for CometChatMessageList component.\n */\n Hooks(\n loggedInUserRef,\n messageListManagerRef,\n fetchPreviousMessages,\n handleGroupAndCallActions,\n messagesRequestBuilder,\n userRef.current,\n groupRef.current,\n subscribeToUIEvents,\n messageIdRef,\n totalMessagesCountRef,\n messageList,\n onErrorCallback,\n setMessageList,\n setScrollListToBottom,\n smartReplyViewRef,\n isOnBottomRef,\n isFirstReloadRef\n );\n\n return (\n <>\n \n \n {getMessageListHeader()}\n \n
    \n \n {showNewMessagesBanner &&\n UnreadMessagesRef.current &&\n UnreadMessagesRef.current.length > 0 &&\n !isOnBottomRef.current ? (\n
    \n \n\n
    \n ) : null}\n
    \n\n \n {getMessageListFooter()}\n \n \n\n {showOngoingCall ? ongoingCallView : null}\n {showConfirmDialog && imageModerationDialogRef.current\n ? imageModerationDialogRef.current\n : null}\n {showMessageInfoPopup && activeMessageInfo !== null && (\n \n )}\n \n );\n};\n\nCometChatMessageList.defaultProps = defaultProps;\nexport { CometChatMessageList };\n","export default \"data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2212%22%20viewBox%3D%220%200%2014%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20opacity%3D%220.8%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.15147%203.15262C9.32528%202.93804%209.29224%202.62319%209.07766%202.44938C8.86308%202.27557%208.54822%202.30861%208.37441%202.52319L3.61414%208.39998L1.626%206.42494C1.4301%206.23032%201.11352%206.23137%200.918901%206.42727C0.724285%206.62318%200.725331%206.93976%200.921238%207.13438L3.30197%209.49942C3.40229%209.59908%203.54012%209.6516%203.68131%209.64398C3.82251%209.63635%203.95388%209.5693%204.04289%209.45942L9.15147%203.15262ZM13.0814%203.16663C13.263%202.95855%2013.2415%202.6427%2013.0334%202.46115C12.8253%202.27961%2012.5095%202.30111%2012.3279%202.50919L7.17358%208.41667L6.74794%207.99934C6.55077%207.80601%206.2342%207.80912%206.04087%208.0063C5.84754%208.20348%205.85066%208.52004%206.04783%208.71337L6.85187%209.50172C6.95016%209.59809%207.08383%209.64968%207.22138%209.64433C7.35892%209.63897%207.48818%209.57715%207.57868%209.47343L13.0814%203.16663Z%22%20fill%3D%22%239C9CA3%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2016%2016%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F16%2FMessage%20Sent%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F16%2FMessage-Sent%22%20fill%3D%22%23000000%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.1282564%2C3.43708984%20C11.3839897%2C3.0108676%2011.9368239%2C2.87265904%2012.3630462%2C3.12839238%20C12.7564821%2C3.36445393%2012.9045099%2C3.85366653%2012.7238142%2C4.26276853%20L12.6717436%2C4.3631822%20L7.87174363%2C12.3631822%20C7.59058211%2C12.8317847%206.96826751%2C12.9373278%206.54992747%2C12.6127032%20L6.4636039%2C12.5365321%20L3.2636039%2C9.33653212%20C2.91213203%2C8.98506026%202.91213203%2C8.41521177%203.2636039%2C8.06373991%20C3.58578644%2C7.74155737%204.091466%2C7.71470883%204.44423138%2C7.98319428%20L4.5363961%2C8.06373991%20L6.921%2C10.448136%20L11.1282564%2C3.43708984%20Z%22%20id%3D%22Style%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2225%22%20height%3D%2224%22%20viewBox%3D%220%200%2025%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.01057%208.04728C8.34753%209.99213%209.53177%2011.3242%2011.6239%2012C13.716%2011.3242%2014.9002%209.99213%2015.2372%208.04728C15.2572%207.91731%2015.2488%207.78455%2015.2125%207.65816C15.1762%207.53177%2015.1129%207.41476%2015.027%207.3152C14.9411%207.21564%2014.8346%207.1359%2014.7149%207.08149C14.5952%207.02707%2014.4651%206.99928%2014.3336%207.00001H8.9142C8.7827%206.99928%208.65261%207.02707%208.5329%207.08149C8.41319%207.1359%208.30671%207.21564%208.2208%207.3152C8.1349%207.41476%208.07161%207.53177%208.03532%207.65816C7.99902%207.78455%207.99058%207.91731%208.01057%208.04728Z%22%20fill%3D%22%23808080%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.91423%2017C8.78279%2017.0007%208.65276%2016.9729%208.5331%2016.9185C8.41343%2016.8642%208.30699%2016.7845%208.22109%2016.685C8.1352%2016.5855%208.0719%2016.4686%208.03556%2016.3423C7.99922%2016.2159%207.9907%2016.0832%208.01059%2015.9533C8.34756%2014.0085%209.5318%2012.6764%2011.6239%2012C13.716%2012.6764%2014.9003%2014.0085%2015.2372%2015.9533C15.2571%2016.0832%2015.2486%2016.2159%2015.2123%2016.3423C15.1759%2016.4686%2015.1126%2016.5855%2015.0267%2016.685C14.9408%2016.7845%2014.8344%2016.8642%2014.7147%2016.9185C14.5951%2016.9729%2014.465%2017.0007%2014.3336%2017H8.91423Z%22%20stroke%3D%22%23808080%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2217%22%20viewBox%3D%220%200%2018%2017%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8.99992%2011C8.96695%2011%208.93473%2011.0098%208.90732%2011.0281C8.87992%2011.0464%208.85855%2011.0724%208.84594%2011.1029C8.83332%2011.1333%208.83002%2011.1669%208.83645%2011.1992C8.84289%2011.2315%208.85876%2011.2612%208.88207%2011.2845C8.90538%2011.3078%208.93507%2011.3237%208.9674%2011.3301C8.99973%2011.3366%209.03324%2011.3333%209.0637%2011.3206C9.09415%2011.308%209.12018%2011.2867%209.1385%2011.2593C9.15681%2011.2319%209.16659%2011.1996%209.16659%2011.1667C9.16659%2011.1225%209.14903%2011.0801%209.11777%2011.0488C9.08651%2011.0176%209.04412%2011%208.99992%2011Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M9%209.66667V6%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4%209C4%2010.3261%204.52678%2011.5979%205.46447%2012.5355C6.40215%2013.4732%207.67392%2014%209%2014C10.3261%2014%2011.5979%2013.4732%2012.5355%2012.5355C13.4732%2011.5979%2014%2010.3261%2014%209C14%207.67392%2013.4732%206.40215%2012.5355%205.46447C11.5979%204.52678%2010.3261%204%209%204C7.67392%204%206.40215%204.52678%205.46447%205.46447C4.52678%206.40215%204%207.67392%204%209V9Z%22%20stroke%3D%22%23ff3b30%22%20stroke-width%3D%221.2%22%2F%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FSpinner%402x%3C%2Ftitle%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Cpattern%20id%3D%22pattern-1%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20patternUnits%3D%22objectBoundingBox%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23image-2%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%3C%2Fpattern%3E%20%20%20%20%20%20%20%20%3Cimage%20id%3D%22image-2%22%20width%3D%2224%22%20height%3D%2224%22%20xlink%3Ahref%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAA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d%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FSpinner%22%20fill%3D%22url%28%23pattern-1%29%22%20fill-rule%3D%22nonzero%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M3.86827202%2C3.86827202%20C4.25879631%2C3.47774772%204.89196129%2C3.47774772%205.28248558%2C3.86827202%20L9.17157288%2C7.75735931%20C9.56209717%2C8.1478836%209.56209717%2C8.78104858%209.17157288%2C9.17157288%20C8.78104858%2C9.56209717%208.1478836%2C9.56209717%207.75735931%2C9.17157288%20L3.86827202%2C5.28248558%20C3.47774772%2C4.89196129%203.47774772%2C4.25879631%203.86827202%2C3.86827202%20Z%20M12%2C0.5%20C12.5522847%2C0.5%2013%2C0.94771525%2013%2C1.5%20L13%2C7%20C13%2C7.55228475%2012.5522847%2C8%2012%2C8%20C11.4477153%2C8%2011%2C7.55228475%2011%2C7%20L11%2C1.5%20C11%2C0.94771525%2011.4477153%2C0.5%2012%2C0.5%20Z%20M20.131728%2C3.86827202%20C20.5222523%2C4.25879631%2020.5222523%2C4.89196129%2020.131728%2C5.28248558%20L16.2426407%2C9.17157288%20C15.8521164%2C9.56209717%2015.2189514%2C9.56209717%2014.8284271%2C9.17157288%20C14.4379028%2C8.78104858%2014.4379028%2C8.1478836%2014.8284271%2C7.75735931%20L18.7175144%2C3.86827202%20C19.1080387%2C3.47774772%2019.7412037%2C3.47774772%2020.131728%2C3.86827202%20Z%20M23.5%2C12%20C23.5%2C12.5522847%2023.0522847%2C13%2022.5%2C13%20L17%2C13%20C16.4477153%2C13%2016%2C12.5522847%2016%2C12%20C16%2C11.4477153%2016.4477153%2C11%2017%2C11%20L22.5%2C11%20C23.0522847%2C11%2023.5%2C11.4477153%2023.5%2C12%20Z%20M20.131728%2C20.131728%20C19.7412037%2C20.5222523%2019.1080387%2C20.5222523%2018.7175144%2C20.131728%20L14.8284271%2C16.2426407%20C14.4379028%2C15.8521164%2014.4379028%2C15.2189514%2014.8284271%2C14.8284271%20C15.2189514%2C14.4379028%2015.8521164%2C14.4379028%2016.2426407%2C14.8284271%20L20.131728%2C18.7175144%20C20.5222523%2C19.1080387%2020.5222523%2C19.7412037%2020.131728%2C20.131728%20Z%20M12%2C23.5%20C11.4477153%2C23.5%2011%2C23.0522847%2011%2C22.5%20L11%2C17%20C11%2C16.4477153%2011.4477153%2C16%2012%2C16%20C12.5522847%2C16%2013%2C16.4477153%2013%2C17%20L13%2C22.5%20C13%2C23.0522847%2012.5522847%2C23.5%2012%2C23.5%20Z%20M3.86827202%2C20.131728%20C3.47774772%2C19.7412037%203.47774772%2C19.1080387%203.86827202%2C18.7175144%20L7.75735931%2C14.8284271%20C8.1478836%2C14.4379028%208.78104858%2C14.4379028%209.17157288%2C14.8284271%20C9.56209717%2C15.2189514%209.56209717%2C15.8521164%209.17157288%2C16.2426407%20L5.28248558%2C20.131728%20C4.89196129%2C20.5222523%204.25879631%2C20.5222523%203.86827202%2C20.131728%20Z%20M0.5%2C12%20C0.5%2C11.4477153%200.94771525%2C11%201.5%2C11%20L7%2C11%20C7.55228475%2C11%208%2C11.4477153%208%2C12%20C8%2C12.5522847%207.55228475%2C13%207%2C13%20L1.5%2C13%20C0.94771525%2C13%200.5%2C12.5522847%200.5%2C12%20Z%22%20id%3D%22Rectangle-2%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3Csvg%20width%3D%2215%22%20height%3D%2215%22%20viewBox%3D%220%200%2015%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_10800_33104%29%22%3E%3Cpath%20d%3D%22M13.9906%201.69617C13.824%204.12358%2012.7401%206.39667%2010.959%208.05423C9.17776%209.71179%206.83266%2010.6296%204.39955%2010.6215C4.23748%2010.6215%203.84965%2010.6297%203.68799%2010.6215H1.03645%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M4.2041%207.43042L1.0094%2010.6251L4.2041%2013.8198%22%20stroke%3D%22%23A1A5AC%22%20stroke-width%3D%221.875%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_10800_33104%22%3E%3Crect%20width%3D%2215%22%20height%3D%2215%22%20fill%3D%22white%22%20transform%3D%22matrix%28-1%200%200%201%2015%200%29%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E\"","import { MutableRefObject, createRef, useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { MessageListManager } from \"./controller\";\nimport { CometChatUIKitLoginListener } from \"@cometchat/uikit-shared\";\n/**\n * This Hooks function is a custom React hook designed to manage functionalities of CometChatMessageList component. It fetches the logged-in user, handles event subscriptions and tracks message IDs for new message retrieval. It plays a key role in maintaining real-time functionality and user interactions in the chat interface.\n **/\nfunction Hooks(\n\tloggedInUserRef: MutableRefObject,\n\tmessageListManagerRef: MutableRefObject,\n\tfetchPreviousMessages: () => void,\n\tupdateMessage: (key: string, mesage: CometChat.BaseMessage, group?: CometChat.Group) => void,\n\tmessagesRequestBuilder: CometChat.MessagesRequestBuilder | undefined,\n\tuser: CometChat.User | undefined,\n\tgroup: CometChat.Group | undefined,\n\tsubscribeToEvents: () => (() => void) | undefined,\n\tmessageIdRef: MutableRefObject,\n\ttotalMessagesCountRef: MutableRefObject,\n\tmessageList: CometChat.BaseMessage[],\n\tonErrorCallback: (error: CometChat.CometChatException) => void,\n\tsetMessageList: (messages: CometChat.BaseMessage[]) => void,\n\tsetScrollListToBottom: (scrollToBottom: boolean) => void,\n\tsmartReplyViewRef: MutableRefObject,\n\tisOnBottomRef: MutableRefObject,\n\tisFirstReloadRef: MutableRefObject,\n): void {\n\t/**\n\t * useEffect hook to fetch the logged-in user when we first launch the user/group chat and set isFirstReloadRef to true. This state variable is used to add a connection listener when the chat is launched for the first time.\n\t * **/\n\tuseEffect(() => {\n\t\tCometChat.getLoggedinUser()\n\t\t\t.then(\n\t\t\t\t(userObject: CometChat.User | null) => {\n\t\t\t\t\tisFirstReloadRef.current = true;\n\t\t\t\t\tif (userObject) {\n\t\t\t\t\t\tloggedInUserRef.current = userObject;\n\t\t\t\t\t}\n\t\t\t\t}, (error: CometChat.CometChatException) => {\n\t\t\t\t\tonErrorCallback(error);\n\t\t\t\t}\n\t\t\t);\n\t}, [onErrorCallback]);\n\t/**\n\t* useEffect hook to subscribe to SDK and UI events when the component launches for the first time, or when changing from one chat to another.\n\t**/\n\n\tuseEffect(() => {\n\t\tlet unsubscribeEvents: (() => void) | undefined;\n\t\tif (CometChatUIKitLoginListener.getLoggedInUser() && (user || group)) {\n\t\t\tmessageListManagerRef.current = {\n\t\t\t\tprevious: new MessageListManager(\n\t\t\t\t\tmessagesRequestBuilder,\n\t\t\t\t\tuser,\n\t\t\t\t\tgroup\n\t\t\t\t)\n\t\t\t}\n\t\t\tMessageListManager.attachListeners(updateMessage);\n\t\t\tunsubscribeEvents = subscribeToEvents();\n\t\t\tsetMessageList([]);\n\t\t\tsetScrollListToBottom(true);\n\t\t\tisOnBottomRef.current = true;\n\t\t\tfetchPreviousMessages();\n\t\t\tsmartReplyViewRef.current = null;\n\t\t}\n\t\treturn () => {\n\t\t\tMessageListManager?.removeListeners?.();\n\t\t\tunsubscribeEvents?.();\n\t\t}\n\t}, [user, group]);\n\t/**\n\t * useEffect hook to store the first and last message ID in the messageList array. These are used to fetch new messages after a particular message when the connection gets reestablished after being interrupted.\n\t**/\n\tuseEffect(() => {\n\t\ttotalMessagesCountRef.current = messageList.length;\n\t\tif (messageList?.length > 0) {\n\t\t\tmessageIdRef.current.prevMessageId = messageList[0].getId();\n\t\t\tmessageIdRef.current.nextMessageId = messageList[messageList.length - 1].getId();\n\t\t}\n\t}, [messageList]);\n\n}\n\nexport { Hooks };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChatTheme, fontHelper } from \"@cometchat/uikit-resources\";\n\nimport { CSSProperties } from \"react\";\n\nexport const ThreadedMessagesWrapperStyle = () => {\n return {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n boxSizing: \"border-box\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesHeaderStyle = () => {\n return {\n padding: \"16px\",\n width: \"100%\",\n display: \"flex\",\n boxSizing: \"border-box\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesCloseButtonStyle = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n width: \"24px\",\n };\n};\n\nexport const ThreadedMessagesTitleStyle = () => {\n return {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"calc(100% - 24px)\",\n };\n};\n\nexport const ThreadedMessagesBubbleViewStyle = () => {\n return {\n display: \"flex\",\n width: \"100%\",\n height: \"fit-content\",\n padding: \"8px 16px\",\n boxSizing: \"border-box\",\n maxHeight: \"20em\",\n overflow: \"hidden scroll\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesActionViewStyle = (theme: CometChatTheme) => {\n return {\n height: \"36px\",\n padding: \"8px 16px\",\n boxSizing: \"border-box\",\n border: `1px solid ${theme.palette.getAccent100()}`,\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesListStyle = () => {\n return {\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\",\n } as CSSProperties;\n};\n\nexport const ThreadedMessagesComposerStyle = () => {\n return {\n height: \"fit-content\",\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n minHeight: \"90px\"\n } as CSSProperties;\n};\n\nexport const threadedMessageListStyle = () => {\n return {\n width: \"100%\",\n height: \"calc(100% - 156px)\",\n display: \"flex\",\n flexDirection: \"column\",\n } as CSSProperties;\n};\n\nexport const actionButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"100%\",\n width: \"100%\",\n border: `0 none`,\n borderRadius: \"0\",\n // padding: \"8px 16px\",\n background: `${theme.palette.getBackground()}`,\n buttonTextFont: `${fontHelper(theme.typography.subtitle1)}`,\n buttonTextColor: `${theme.palette.getAccent600()}`,\n } as CSSProperties;\n};\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatMessageEvents,\n CometChatUIKitConstants,\n IMessages,\n MessageStatus,\n fontHelper,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n MessageComposerConfiguration,\n MessageListConfiguration,\n ThreadedMessagesStyle,\n UserMemberWrapperConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n ThreadedMessagesActionViewStyle,\n ThreadedMessagesBubbleViewStyle,\n ThreadedMessagesCloseButtonStyle,\n ThreadedMessagesComposerStyle,\n ThreadedMessagesHeaderStyle,\n ThreadedMessagesListStyle,\n ThreadedMessagesTitleStyle,\n ThreadedMessagesWrapperStyle,\n actionButtonStyle,\n threadedMessageListStyle,\n} from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport Close2xIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessageComposer } from \"../CometChatMessageComposer\";\nimport { CometChatMessageList } from \"../CometChatMessageList/CometChatMessageList\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport { useCometChatErrorHandler } from \"../CometChatCustomHooks\";\n\ninterface IThreadedMessagesProps {\n parentMessage: CometChat.BaseMessage;\n title?: string;\n closeIconURL?: string;\n bubbleView: any;\n messageActionView?: any;\n onClose?: any;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n threadedMessagesStyle?: any;\n messageListConfiguration?: any;\n messageComposerConfiguration?: any;\n hideMessageComposer?: boolean,\n messageComposerView?: (user?: CometChat.User, group?: CometChat.Group, parentMessage?: CometChat.BaseMessage) => JSX.Element,\n messageListView?: (user?: CometChat.User, group?: CometChat.Group, parentMessage?: CometChat.BaseMessage) => JSX.Element,\n}\n\nconst threadMessagesStyle = {\n width: \"100%\",\n height: \"100%\",\n background: \"white\",\n borderRadius: \"none\",\n border: \"1px solid rgba(20, 20, 20, 0.1)\",\n titleColor: \"rgba(20, 20, 20)\",\n titleFont: \"700 22px Inter\",\n closeIconTint: \"#3399FF\",\n};\n\nconst titleStyle: any = {\n textFont: \"700 22px Inter\",\n textColor: \"black\",\n background: \"transparent\",\n};\nconst buttonStyle: any = {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: \"0\",\n background: \"transparent\",\n buttonIconTint: \"#7dbfff\",\n};\n\nconst CometChatThreadedMessages = (props: IThreadedMessagesProps) => {\n const {\n parentMessage,\n title = localize(\"THREAD\"),\n closeIconURL = Close2xIcon,\n bubbleView = null,\n messageActionView = null,\n onError,\n onClose = () => { },\n threadedMessagesStyle = threadMessagesStyle,\n messageListConfiguration = new MessageListConfiguration({}),\n messageComposerConfiguration = new MessageComposerConfiguration({}),\n messageComposerView,\n messageListView,\n hideMessageComposer\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [parentMessageObject, setParentMessageObject] =\n useState(parentMessage);\n const [replyCount, setReplyCount] = useState(0);\n\n const threadedMessagesStyleRef = useRef(threadedMessagesStyle);\n let defaultStyle: ThreadedMessagesStyle = new ThreadedMessagesStyle({\n width: \"100%\",\n height: \"100%\",\n background: theme.palette.getBackground(),\n borderRadius: \"none\",\n border: \"none\",\n titleColor: theme.palette.getAccent(),\n titleFont: fontHelper(theme.typography.title1),\n closeIconTint: theme.palette.getPrimary(),\n });\n threadedMessagesStyleRef.current = {\n ...defaultStyle,\n ...threadedMessagesStyle,\n };\n titleStyle.textFont =\n threadedMessagesStyleRef?.current?.titleFont ||\n fontHelper(theme.typography.title1);\n titleStyle.textColor =\n threadedMessagesStyleRef?.current?.titleColor || theme.palette.getAccent();\n titleStyle.background = \"transparent\";\n\n buttonStyle.buttonIconTint =\n threadedMessagesStyleRef?.current?.closeIconTint ||\n theme.palette.getPrimary();\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n\n const userObject = useMemo(() => {\n if (\n loggedInUser &&\n parentMessage?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n if (parentMessage?.getSender()?.getUid() === loggedInUser?.getUid()) {\n return parentMessage?.getReceiver() as CometChat.User;\n } else {\n return parentMessage?.getSender() as CometChat.User;\n }\n }\n }, [parentMessage, loggedInUser]);\n\n const groupObject = useMemo(() => {\n if (loggedInUser) {\n if (\n parentMessage?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n return parentMessage?.getReceiver() as CometChat.Group;\n }\n }\n }, [loggedInUser, parentMessage]);\n\n const parentMessageObjectId = parentMessageObject.getId();\n\n const requestBuilder = useMemo(() => {\n return new CometChat.MessagesRequestBuilder()\n .setCategories(ChatConfigurator.getDataSource().getAllMessageCategories())\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .hideReplies(true)\n .setLimit(20)\n .setParentMessageId(parentMessageObjectId);\n }, [parentMessageObjectId]);\n\n const updateReceipt = useCallback(\n (messageReceipt: CometChat.MessageReceipt) => {\n try {\n if (Number(messageReceipt?.getMessageId()) === parentMessageObjectId) {\n if (messageReceipt?.getReadAt()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(messageReceipt?.getReadAt());\n return tempObject;\n });\n } else if (messageReceipt?.getDeliveredAt()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(messageReceipt?.getDeliveredAt());\n return tempObject;\n });\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [parentMessageObjectId, setParentMessageObject, onErrorCallback]\n );\n\n const updateMessage = useCallback(\n (message: CometChat.BaseMessage) => {\n try {\n if (parentMessageObjectId === message?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [parentMessageObjectId, setParentMessageObject, onErrorCallback]\n );\n\n const addListener = useCallback(() => {\n const onMessagesDelivered =\n CometChatMessageEvents.onMessagesDelivered.subscribe(\n (messageReceipt: CometChat.MessageReceipt) => {\n updateReceipt(messageReceipt);\n }\n );\n const onMessagesRead = CometChatMessageEvents.onMessagesRead.subscribe(\n (messageReceipt: CometChat.MessageReceipt) => {\n updateReceipt(messageReceipt);\n }\n );\n const onMessageDeleted = CometChatMessageEvents.onMessageDeleted.subscribe(\n (deletedMessage: CometChat.BaseMessage) => {\n updateMessage(deletedMessage);\n }\n );\n const onMessageEdited = CometChatMessageEvents.onMessageEdited.subscribe(\n (editedMessage: CometChat.BaseMessage) => {\n updateMessage(editedMessage);\n }\n );\n const onTextMessageReceived =\n CometChatMessageEvents.onTextMessageReceived.subscribe(\n (message: CometChat.TextMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onMediaMessageReceived =\n CometChatMessageEvents.onMediaMessageReceived.subscribe(\n (message: CometChat.MediaMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onCustomMessageReceived =\n CometChatMessageEvents.onCustomMessageReceived.subscribe(\n (message: CometChat.CustomMessage) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const onFormMessageReceived =\n CometChatMessageEvents.onFormMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onSchedulerMessageReceived =\n CometChatMessageEvents.onSchedulerMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onCardMessageReceived =\n CometChatMessageEvents.onCardMessageReceived.subscribe((message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n });\n const onCustomInteractiveMessageReceived =\n CometChatMessageEvents.onCustomInteractiveMessageReceived.subscribe(\n (message) => {\n if (\n message?.getParentMessageId() &&\n message.getParentMessageId() == parentMessage.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n\n return () => {\n onMessagesDelivered?.unsubscribe();\n onMessagesRead?.unsubscribe();\n onMessageDeleted?.unsubscribe();\n onMessageEdited?.unsubscribe();\n onTextMessageReceived?.unsubscribe();\n onMediaMessageReceived?.unsubscribe();\n onCustomMessageReceived?.unsubscribe();\n onFormMessageReceived?.unsubscribe();\n onSchedulerMessageReceived?.unsubscribe();\n onCardMessageReceived?.unsubscribe();\n onCustomInteractiveMessageReceived?.unsubscribe();\n };\n }, [updateReceipt, updateMessage, parentMessage]);\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccMessageSent = CometChatMessageEvents.ccMessageSent.subscribe(\n ({ status, message }: IMessages) => {\n if (\n status === MessageStatus.success &&\n message?.getParentMessageId() === parentMessageObject?.getId()\n ) {\n setReplyCount((prevCount) => prevCount + 1);\n }\n }\n );\n const ccMessageEdited = CometChatMessageEvents.ccMessageEdited.subscribe(\n ({ status, message }: IMessages) => {\n if (\n status === MessageStatus.success &&\n message?.getId() === parentMessageObject?.getId()\n ) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n }\n );\n const ccMessageDeleted =\n CometChatMessageEvents.ccMessageDeleted.subscribe(\n (message: CometChat.BaseMessage) => {\n if (message?.getId() === parentMessageObject?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n message\n ) as CometChat.BaseMessage;\n return tempObject;\n });\n }\n }\n );\n const ccMessageRead = CometChatMessageEvents.ccMessageRead.subscribe(\n (message: CometChat.BaseMessage) => {\n if (message?.getId() === parentMessageObject?.getId()) {\n setParentMessageObject((prevState: CometChat.BaseMessage) => {\n const tempObject = CometChatUIKitUtility.clone(\n prevState\n ) as CometChat.BaseMessage;\n tempObject?.setReadAt(message?.getReadAt());\n return tempObject;\n });\n }\n }\n );\n\n return () => {\n try {\n ccMessageDeleted?.unsubscribe();\n ccMessageEdited?.unsubscribe();\n ccMessageRead?.unsubscribe();\n ccMessageSent?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [parentMessageObject, setParentMessageObject, onErrorCallback]);\n\n const closeView = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const wrapperStyle = () => {\n return {\n background:\n threadedMessagesStyleRef?.current?.background ||\n theme.palette.getBackground(),\n height: threadedMessagesStyleRef?.current?.height,\n width: threadedMessagesStyleRef?.current?.width,\n border: threadedMessagesStyleRef?.current?.border,\n borderRadius: threadedMessagesStyleRef?.current?.borderRadius,\n };\n };\n\n const getThreadCount = useCallback(() => {\n try {\n const count = replyCount || 0;\n const suffix = count === 1 ? localize(\"REPLY\") : localize(\"REPLIES\");\n return `${count} ${suffix}`;\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [onErrorCallback, replyCount]);\n\n const getBubbleView = useCallback(() => {\n if (bubbleView && parentMessageObject) {\n return bubbleView(parentMessageObject);\n }\n return null;\n }, [parentMessageObject, bubbleView]);\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n addListener,\n subscribeToEvents,\n onErrorCallback,\n parentMessage,\n setReplyCount\n );\n\n return (\n \n \n \n \n \n \n \n \n \n
    \n \n {getBubbleView()}\n
    \n \n {messageActionView ? (\n messageActionView\n ) : (\n \n )}\n \n {!messageListView ? \n \n : (userObject || groupObject) ? messageListView(userObject, groupObject, parentMessage) : null}\n \n {!hideMessageComposer && !messageComposerView ? \n \n : null}\n {!hideMessageComposer && messageComposerView && (userObject || groupObject) ? messageComposerView(userObject, groupObject, parentMessage) : null}\n\n \n );\n};\n\nexport { CometChatThreadedMessages };\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { UserMemberWrapperConfiguration } from \"@cometchat/uikit-shared\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: any,\n addListener: Function,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n parentMessage: any,\n setReplyCount: Function,\n) {\n \n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n const removeListener = addListener();\n const unsubscribeFromEvents = subscribeToEvents();\n return () => {\n removeListener();\n unsubscribeFromEvents();\n };\n }\n }, [loggedInUser, addListener, subscribeToEvents]);\n\n useEffect(() => {\n if (parentMessage?.getReplyCount() === undefined){\n setReplyCount(0);\n }else{\n setReplyCount(parentMessage?.getReplyCount());\n }\n }, [parentMessage, setReplyCount]);\n\n}\n\nexport { Hooks };","import \"@cometchat/uikit-elements\";\n\nimport {\n CometChatGroupEvents,\n CometChatMessageEvents,\n CometChatUIEvents,\n CometChatUserEvents,\n IGroupLeft,\n PanelAlignment,\n} from \"@cometchat/uikit-resources\";\nimport {\n DetailsConfiguration,\n MessageComposerConfiguration,\n MessageHeaderConfiguration,\n MessageListConfiguration,\n MessagesStyle,\n ThreadedMessagesConfiguration,\n} from \"@cometchat/uikit-shared\";\nimport {\n MessagesComposerDivStyle,\n MessagesDetailsDivStyle,\n MessagesDivStyle,\n MessagesHeaderDivStyle,\n MessagesListDivStyle,\n MessagesWrapperStyle,\n ThreadedMessagesDivStyle,\n detailsButtonStyle,\n getDetailsStyle,\n getMessageComposerStyle,\n getMessageHeaderStyle,\n getMessageListStyle,\n liveReactionStyle,\n panelDivStyle,\n} from \"./style\";\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\n\nimport { ChatConfigurator } from \"../Shared/Framework/ChatConfigurator\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatDetails } from \"../CometChatDetails\";\nimport { CometChatMessageComposer } from \"../CometChatMessageComposer\";\nimport { CometChatMessageHeader } from \"../CometChatMessageHeader\";\nimport { CometChatMessageList } from \"../CometChatMessageList/CometChatMessageList\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatThreadedMessages } from \"../CometChatThreadedMessages\";\nimport { Hooks } from \"./hooks\";\nimport InfoIcon from \"./assets/Info.svg\";\nimport LiveReactionIcon from \"./assets/heart-reaction.png\";\n\ninterface IMessagesProps {\n user?: CometChat.User;\n group?: CometChat.Group;\n hideMessageComposer?: boolean;\n disableTyping?: boolean;\n messageHeaderConfiguration?: MessageHeaderConfiguration;\n messageListConfiguration?: MessageListConfiguration;\n messageComposerConfiguration?: MessageComposerConfiguration;\n threadedMessagesConfiguration?: ThreadedMessagesConfiguration;\n detailsConfiguration?: DetailsConfiguration;\n customSoundForIncomingMessages?: string;\n customSoundForOutgoingMessages?: string;\n disableSoundForMessages?: boolean;\n messagesStyle?: MessagesStyle;\n messageHeaderView?: any;\n messageComposerView?: any;\n messageListView?: any;\n hideMessageHeader?: boolean;\n hideDetails?: boolean;\n auxiliaryMenu?: any;\n}\n\nconst defaultProps: IMessagesProps = {\n user: undefined,\n group: undefined,\n hideMessageComposer: false,\n disableTyping: false,\n messageHeaderConfiguration: new MessageHeaderConfiguration({}),\n messageListConfiguration: new MessageListConfiguration({}),\n messageComposerConfiguration: new MessageComposerConfiguration({}),\n threadedMessagesConfiguration: new ThreadedMessagesConfiguration({}),\n detailsConfiguration: new DetailsConfiguration({}),\n customSoundForIncomingMessages: \"\",\n customSoundForOutgoingMessages: \"\",\n disableSoundForMessages: false,\n messagesStyle: new MessagesStyle({\n width: \"100%\",\n height: \"100%\",\n background: \"white\",\n borderRadius: \"none\",\n border: \"1px solid rgba(20, 20, 20, 0.1)\"\n }),\n messageHeaderView: null,\n messageComposerView: null,\n messageListView: null,\n hideMessageHeader: false,\n hideDetails: false,\n auxiliaryMenu: null,\n};\n\n\n\nconst CometChatMessages = (props: IMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n\n const {\n user,\n group,\n hideMessageComposer,\n disableTyping,\n messageHeaderConfiguration,\n messageListConfiguration,\n messageComposerConfiguration,\n threadedMessagesConfiguration,\n detailsConfiguration,\n customSoundForIncomingMessages,\n customSoundForOutgoingMessages,\n disableSoundForMessages,\n messagesStyle,\n messageHeaderView,\n messageComposerView,\n messageListView,\n hideMessageHeader,\n hideDetails,\n auxiliaryMenu,\n } = props;\n const liveReactionName = \"heart\";\n const [loggedInUser, setLoggedInUser] = useState(null);\n\n const [activeUser, setActiveUser] = useState(user);\n const [activeGroup, setActiveGroup] = useState(group);\n\n const ccHeaderMenuRef = useRef(null);\n const threadMessageObjectRef = useRef(null);\n const parentBubbleViewCallbackRef = useRef(null);\n\n const [liveReaction, setLiveReaction] = useState(false);\n const [openDetails, setOpenDetails] = useState(false);\n const [openThreadedMessages, setOpenThreadedMessages] = useState(false);\n\n const [showPanelView, setShowPanelView] = useState(false);\n const assistBotChatView = useRef(null);\n\n let messagesRequestBuilder = useMemo(() => {\n if (user) {\n return new CometChat.MessagesRequestBuilder()\n .setUID(user.getUid())\n .setCategories(\n ChatConfigurator.getDataSource().getAllMessageCategories()\n )\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .setLimit(20)\n .hideReplies(true);\n } else if (group) {\n return new CometChat.MessagesRequestBuilder()\n .setGUID(group.getGuid())\n .setCategories(\n ChatConfigurator.getDataSource().getAllMessageCategories()\n )\n .setTypes(ChatConfigurator.getDataSource().getAllMessageTypes())\n .setLimit(20)\n .hideReplies(true);\n }\n }, [user, group]);\n\n let reactionName: string = messageComposerConfiguration?.LiveReactionIconURL || LiveReactionIcon,\n infoIconURL: string = InfoIcon;\n\n const liveReactionStart = useCallback(\n (reactionName: string) => {\n if (liveReaction) {\n reactionName = \"\";\n setLiveReaction(false);\n } else {\n setLiveReaction(true);\n setTimeout(() => {\n reactionName = \"\";\n setLiveReaction(false);\n }, 1500);\n }\n },\n [liveReaction, setLiveReaction]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n\n const ccLiveReaction = CometChatMessageEvents.ccLiveReaction.subscribe(\n (reactionName: any) => {\n if (!openThreadedMessages && reactionName && reactionName === liveReactionName) {\n liveReactionStart(reactionName);\n }\n }\n );\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (value: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group?.getGuid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n setActiveGroup(value);\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (activeGroup?.getGuid() === item.leftGroup.getGuid()) {\n if (loggedInUser?.getUid() === item?.userLeft.getUid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n setActiveGroup(item.leftGroup);\n }\n }\n );\n const ccUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(\n (blockedUser: CometChat.User) => {\n if (activeUser?.getUid() === blockedUser.getUid()) {\n blockedUser.setBlockedByMe(true);\n setActiveUser(blockedUser);\n }\n }\n );\n const ccUserUnBlocked = CometChatUserEvents.ccUserUnblocked.subscribe(\n (unblockedUser: CometChat.User) => {\n if (activeUser?.getUid() === unblockedUser.getUid()) {\n unblockedUser.setBlockedByMe(false);\n setActiveUser(unblockedUser);\n }\n }\n );\n\n const ccShowPanel = CometChatUIEvents.ccShowPanel.subscribe((data) => {\n if (data.position === PanelAlignment.messages) {\n assistBotChatView.current = data.child;\n setShowPanelView(true);\n }\n });\n\n const ccHidePanel = CometChatUIEvents.ccHidePanel.subscribe(\n (alignment) => {\n if (alignment === PanelAlignment.messages) {\n assistBotChatView.current = null;\n setShowPanelView(false);\n }\n }\n );\n\n return () => {\n try {\n ccLiveReaction?.unsubscribe();\n ccGroupDeleted?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccUserBlocked?.unsubscribe();\n ccUserUnBlocked?.unsubscribe();\n ccShowPanel?.unsubscribe();\n ccHidePanel?.unsubscribe();\n } catch (error: any) {\n console.log(\"error\", error);\n }\n };\n } catch (error: any) {\n console.log(\"error\", error);\n }\n }, [\n openThreadedMessages,\n liveReactionStart,\n setOpenDetails,\n setOpenThreadedMessages,\n activeGroup,\n activeUser,\n loggedInUser,\n group,\n ]);\n\n const openThreadView = (\n message: CometChat.BaseMessage,\n callback: Function\n ) => {\n threadMessageObjectRef.current = message;\n parentBubbleViewCallbackRef.current = callback;\n setOpenThreadedMessages(true);\n };\n\n const openDetailsPage = () => setOpenDetails(true);\n const closeDetailsPage = () => {\n setOpenDetails(false);\n };\n\n const closeThreadView = () => {\n threadMessageObjectRef.current = null;\n parentBubbleViewCallbackRef.current = null;\n setOpenThreadedMessages(false);\n };\n function getDetailsTemplate() {\n if (props.detailsConfiguration?.data) {\n return props.detailsConfiguration?.data(props.user, props.group);\n }\n return;\n }\n\n const getHeaderMenu = useCallback(() => {\n if (messageHeaderConfiguration?.menu) {\n return messageHeaderConfiguration.menu(activeUser, activeGroup);\n }\n const defaultAuxiliaryMenu =\n ChatConfigurator.getDataSource().getAuxiliaryHeaderMenu(\n activeUser,\n activeGroup\n );\n return (\n <>\n {auxiliaryMenu\n ? auxiliaryMenu\n : defaultAuxiliaryMenu.map((auxMenu: any) => auxMenu)}\n {!hideDetails ? (\n \n \n \n ) : null}\n \n );\n }, [\n messageHeaderConfiguration,\n activeUser,\n activeGroup,\n auxiliaryMenu,\n hideDetails,\n infoIconURL,\n ]);\n\n const getMessageHeaderComponent = () => {\n return (\n \n );\n };\n\n const getMessageHeader = () => {\n if (hideMessageHeader) {\n return null;\n }\n\n return (\n
    \n {messageHeaderView ? messageHeaderView : getMessageHeaderComponent()}\n
    \n );\n };\n\n const getMessageListComponent = () => {\n return (\n \n );\n };\n\n const getMessageList = () => {\n if (messageListView) {\n return messageListView;\n }\n\n return (\n
    \n {getMessageListComponent()}\n
    \n );\n };\n\n const getMessageComposerComponent = () => {\n return (\n !hideMessageComposer ?\n : null\n )\n };\n\n const getMessageComposer = () => {\n if (hideMessageComposer) {\n return null;\n }\n\n if (messageComposerView) {\n return messageComposerView;\n }\n\n return (\n \n {getMessageComposerComponent()}\n \n );\n };\n\n const getThreadedMessagesComponent = () => {\n if (openThreadedMessages && threadMessageObjectRef.current) {\n return (\n \n );\n }\n\n return null;\n };\n\n const getThreadedMessages = () => {\n if (openThreadedMessages && threadMessageObjectRef.current) {\n return (\n
    \n {getThreadedMessagesComponent()}\n
    \n );\n }\n return null;\n };\n const getLiveReactionStyle = () => {\n return {\n height: \"20px\",\n width: \"25px\",\n background: messageComposerConfiguration?.messageComposerStyle?.liveReactionIconTint || \"red\"\n }\n }\n\n const getLiveReaction = () => {\n return liveReaction ? (\n
    \n \n
    \n ) : null;\n };\n\n const getDetailsComponent = () => {\n return (\n \n );\n };\n\n const getDetails = () => {\n return openDetails ? (\n
    \n {getDetailsComponent()}\n
    \n ) : null;\n };\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n ccHeaderMenuRef,\n setOpenDetails,\n messageListConfiguration,\n user ?? null,\n setActiveUser,\n group ?? null,\n setActiveGroup,\n setOpenThreadedMessages\n );\n\n if (!activeUser && !activeGroup) {\n return null;\n }\n\n return (\n \n {showPanelView && assistBotChatView.current ? (\n
    \n {assistBotChatView.current}{\" \"}\n
    \n ) : null}\n
    \n {getMessageHeader()}\n {getMessageList()}\n {getMessageComposer()}\n
    \n {getThreadedMessages()}\n {getLiveReaction()}\n {getDetails()}\n \n );\n};\n\nCometChatMessages.defaultProps = defaultProps;\n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YODwdZeJe2LD+mVDxe/D/efwCuAQs2cnkFkQAAAABJRU5ErkJggg==\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FInfo%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FInfo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-information-circle%4024x24%22%20transform%3D%22translate%282.000000%2C%202.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M12%2C14%20L11.3333333%2C14%20C10.5969537%2C14%2010%2C13.4030463%2010%2C12.6666667%20L10%2C9.33333333%20C10%2C8.9651435%209.70152317%2C8.66666667%209.33333333%2C8.66666667%20L8.66666667%2C8.66666667%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.66666667%2C5.33333333%20C9.48257175%2C5.33333333%209.33333333%2C5.48257175%209.33333333%2C5.66666667%20C9.33333333%2C5.85076158%209.48257175%2C6%209.66666667%2C6%20C9.85076158%2C6%2010%2C5.85076158%2010%2C5.66666667%20C10%2C5.48257175%209.85076158%2C5.33333333%209.66666667%2C5.33333333%20L9.66666667%2C5.33333333%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0%2C10%20C0%2C15.5228475%204.4771525%2C20%2010%2C20%20C15.5228475%2C20%2020%2C15.5228475%2020%2C10%20C20%2C4.4771525%2015.5228475%2C0%2010%2C0%20C4.4771525%2C0%200%2C4.4771525%200%2C10%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { useEffect } from \"react\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n\tsubscribeToEvents: Function,\n\tccHeaderMenuRef: any,\n\tsetOpenDetails: any,\n\tmessageListConfiguration: any,\n user: CometChat.User | null,\n setActiveUser: Function,\n group: CometChat.Group | null,\n setActiveGroup: Function,\n setOpenThreadedMessages: any\n) {\n\tuseEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (userObject: CometChat.User | null) => {\n if (userObject) {\n setLoggedInUser(userObject);\n }\n }\n );\n },\n [setLoggedInUser]\n );\n\n useEffect(\n () => {\n const element = ccHeaderMenuRef.current;\n if (!element) return;\n const headerButtonClick = (event: any) => {\n setOpenDetails(true);\n }\n if (!messageListConfiguration?.menu) {\n element.addEventListener(\"cc-menu-clicked\", headerButtonClick);\n } else {\n element.removeEventListener(\"cc-menu-clicked\", headerButtonClick);\n }\n\n return () => {\n element.removeEventListener(\"cc-menu-clicked\", headerButtonClick);\n }\n }, [messageListConfiguration, ccHeaderMenuRef, setOpenDetails]\n );\n\n useEffect(()=>{\n if(user){\n setActiveGroup(null);\n setActiveUser((previousUser: CometChat.User) => {\n\n if(previousUser?.getUid() !== user?.getUid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n return user;\n });\n }\n \n }, [user, setActiveUser, setActiveGroup, setOpenDetails, setOpenThreadedMessages]);\n\n useEffect(()=>{\n if(group){\n setActiveUser(null);\n setActiveGroup((previousGroup: CometChat.Group) => {\n\n if(previousGroup?.getGuid() !== group?.getGuid()) {\n setOpenDetails(false);\n setOpenThreadedMessages(false);\n }\n return group;\n });\n }\n \n }, [group, setActiveUser, setActiveGroup, setOpenDetails, setOpenThreadedMessages]);\n\n useEffect(()=>{\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n }\n return () => {\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, subscribeToEvents]);\n\n}\n\nexport { Hooks };\n","import {\n CometChatConversationEvents,\n CometChatGroupEvents,\n CometChatUIEvents,\n CometChatUIKitConstants,\n IGroupLeft,\n IGroupMemberAdded,\n IGroupMemberJoined,\n IGroupMemberKickedBanned,\n IOwnershipChanged,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatUIKitUtility,\n ContactsConfiguration,\n ConversationsConfiguration,\n MessageComposerConfiguration,\n MessageHeaderConfiguration,\n MessagesConfiguration,\n WithMessagesStyle,\n} from \"@cometchat/uikit-shared\";\nimport {\n getBackdropStyle,\n getButtonStyle,\n getConversationsStyle,\n getConversationsWrapperStyles,\n getEmptyMessageLayoutStyle,\n getLabelStyle,\n getMessageComposerStyle,\n getMessageHeaderStyle,\n getMessagesStyle,\n getWithMessagesMainStyle,\n getWithMessagesSidebarStyle,\n} from \"./style\";\nimport { useCallback, useContext, useRef, useState } from \"react\";\nimport { useCometChatErrorHandler, useStateRef } from \"../CometChatCustomHooks\";\n\nimport CloseIcon from \"./assets/close2x.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatContacts } from \"../CometChatContacts\";\nimport { CometChatConversations } from \"../CometChatConversations\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport StartConversationIcon from \"./assets/StartConversation.svg\";\n\ninterface IConversationsWithMessagesProps {\n user?: CometChat.User;\n group?: CometChat.Group;\n isMobileView?: boolean;\n messageText?: string;\n conversationsWithMessagesStyle?: WithMessagesStyle;\n messagesConfiguration?: MessagesConfiguration;\n conversationsConfiguration?: ConversationsConfiguration;\n onError?: ((error: CometChat.CometChatException) => void) | null;\n startConversationConfiguration?: ContactsConfiguration;\n startConversationIconURL?: string;\n}\n\nconst defaultProps: IConversationsWithMessagesProps = {\n user: undefined,\n group: undefined,\n isMobileView: false,\n messageText: \"\",\n conversationsWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n conversationsConfiguration: new ConversationsConfiguration({}),\n onError: (error: CometChat.CometChatException) => {\n console.log(error);\n },\n startConversationConfiguration: new ContactsConfiguration({}),\n startConversationIconURL: StartConversationIcon,\n};\n\nconst CometChatConversationsWithMessages = (\n props: IConversationsWithMessagesProps\n) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n user,\n group,\n isMobileView,\n messageText,\n conversationsWithMessagesStyle,\n messagesConfiguration,\n conversationsConfiguration,\n startConversationConfiguration,\n onError,\n startConversationIconURL,\n } = props;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [activeConversation, setActiveConversation] =\n useState(null);\n const [activeUser, setActiveUser] = useState(user ?? null);\n const [activeGroup, setActiveGroup] = useState(group ?? null);\n const [showCometChatContacts, setShowCometChatContacts] = useState(false);\n const activeChatRef = useRef(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n activeChatRef.current = activeConversation\n const [startConversationBtnElement, setStartConversationBtnRef] = useStateRef<\n JSX.IntrinsicElements[\"cometchat-button\"] | null\n >(null);\n\n const setActiveChat = useCallback(async () => {\n try {\n let type: string = activeUser\n ? CometChatUIKitConstants.MessageReceiverType.user\n : CometChatUIKitConstants.MessageReceiverType.group;\n let conversationWith: string | undefined = activeUser\n ? activeUser?.getUid()\n : activeGroup?.getGuid();\n if (typeof conversationWith === \"string\") {\n setActiveConversation(\n await CometChat.getConversation(conversationWith, type)\n );\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeUser, activeGroup, setActiveConversation, onErrorCallback]);\n\n const onBack = () => {\n setActiveUser(null);\n setActiveGroup(null);\n setActiveConversation(null);\n };\n\n const onItemClick = (conversation: CometChat.Conversation) => {\n try {\n activeChatRef.current = conversation\n setActiveConversation(conversation);\n if (\n conversation.getConversationType() &&\n conversation.getConversationType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n setActiveGroup(null);\n setActiveUser(conversation.getConversationWith() as CometChat.User);\n } else if (\n conversation.getConversationType() &&\n conversation.getConversationType() ===\n CometChatUIKitConstants.MessageReceiverType.group\n ) {\n setActiveUser(null);\n setActiveGroup(conversation.getConversationWith() as CometChat.Group);\n } else {\n return;\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n const removeChatOnGroupAction = useCallback((message: CometChat.Action, leavingUser: CometChat.User, user?: CometChat.User) => {\n const activeChat = activeChatRef.current\n const currentuser = loggedInUser || user\n const isSameUser = currentuser?.getUid() === leavingUser.getUid();\n const actionForGroup = message.getActionFor() instanceof CometChat.Group;\n\n if (isSameUser && activeChat && activeChat.getConversationWith() instanceof CometChat.Group) {\n let group = activeChat.getConversationWith() as CometChat.Group;\n\n if (actionForGroup) {\n let actionOnGroup = message.getActionFor() as CometChat.Group;\n\n if (actionOnGroup.getGuid() === group.getGuid()) {\n setActiveConversation(null);\n setActiveGroup(null);\n setActiveUser(null)\n }\n }\n }\n }, [loggedInUser, setLoggedInUser, activeUser, activeGroup, activeChatRef])\n const attachGroupListener = (user?: CometChat.User) => {\n const listenerId = \"ConversationWithMessages_Group_\" + String(Date.now());\n CometChat.addGroupListener(\n listenerId,\n new CometChat.GroupListener({\n onGroupMemberKicked: (message: CometChat.Action, kickedUser: CometChat.User) => {\n removeChatOnGroupAction(message, kickedUser, user);\n\n },\n onGroupMemberBanned: (message: CometChat.Action, bannedUser: CometChat.User) => {\n removeChatOnGroupAction(message, bannedUser, user);\n\n },\n })\n );\n return () => CometChat.removeGroupListener(listenerId);\n }\n\n const removeActiveChatList = useCallback(\n (conversation: CometChat.Conversation) => {\n try {\n const conversationType = conversation.getConversationType();\n const conversationWith = conversation.getConversationWith();\n if (\n conversationType ===\n CometChatUIKitConstants.MessageReceiverType.user &&\n activeUser &&\n activeUser.getUid() === (conversationWith as CometChat.User).getUid()\n ) {\n setActiveUser(null);\n } else if (\n conversationType ===\n CometChatUIKitConstants.MessageReceiverType.group &&\n activeGroup &&\n activeGroup.getGuid() ===\n (conversationWith as CometChat.Group).getGuid()\n ) {\n setActiveGroup(null);\n } else {\n return;\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n },\n [activeGroup, setActiveGroup, activeUser, setActiveUser, onErrorCallback]\n );\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccConversationDeleted =\n CometChatConversationEvents.ccConversationDeleted.subscribe(\n (conversation: CometChat.Conversation) => {\n removeActiveChatList(conversation);\n }\n );\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (group: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group.getGuid()) {\n setActiveConversation(null);\n setActiveGroup(null);\n }\n }\n );\n const ccGroupMemberAdded =\n CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.userAddedIn!.getGuid()\n ) {\n setActiveGroup(item?.userAddedIn);\n }\n }\n );\n const ccGroupMemberBanned =\n CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.kickedFrom!.getGuid()\n ) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n );\n const ccGroupMemberJoined =\n CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.joinedGroup!.getGuid()\n ) {\n setActiveGroup(item?.joinedGroup);\n }\n }\n );\n const ccGroupMemberKicked =\n CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.kickedFrom!.getGuid()\n ) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n );\n const ccOwnershipChanged =\n CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.group!.getGuid()\n ) {\n setActiveGroup(item?.group);\n setActiveConversation((prevState) => {\n if (prevState) {\n let tempConversation: CometChat.Conversation =\n CometChatUIKitUtility.clone(prevState);\n tempConversation.setConversationWith(item?.group);\n return tempConversation;\n }\n return prevState;\n });\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (\n activeGroup &&\n activeGroup.getGuid() === item?.leftGroup!.getGuid() &&\n loggedInUser?.getUid() === item?.userLeft?.getUid()\n ) {\n setActiveGroup(null);\n setActiveConversation(null);\n }\n }\n );\n\n const ccOpenChat = CometChatUIEvents.ccOpenChat.subscribe((item) => {\n const uid = item.user?.getUid()\n if (uid) {\n CometChat.getConversation(uid, CometChatUIKitConstants.MessageReceiverType.user).then((conversation) => {\n onItemClick(conversation);\n })\n }\n })\n\n return () => {\n try {\n ccConversationDeleted?.unsubscribe();\n ccGroupDeleted?.unsubscribe();\n ccGroupMemberAdded?.unsubscribe();\n ccGroupMemberBanned?.unsubscribe();\n ccGroupMemberJoined?.unsubscribe();\n ccGroupMemberKicked?.unsubscribe();\n ccOwnershipChanged?.unsubscribe();\n ccGroupLeft?.unsubscribe();\n ccOpenChat?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [\n activeGroup,\n setActiveConversation,\n setActiveGroup,\n removeActiveChatList,\n onErrorCallback,\n loggedInUser,\n ]);\n\n const showCometChatContactsView = () => setShowCometChatContacts(true);\n const hideCometChatContactsView = () => setShowCometChatContacts(false);\n\n const StartConversationButton = !showCometChatContacts ? (\n \n {\" \"}\n \n ) : null;\n\n const onContactsItemClick = (\n user?: CometChat.User,\n group?: CometChat.Group\n ) => {\n if (user) {\n setActiveGroup(null);\n setActiveUser(user);\n hideCometChatContactsView();\n } else if (group) {\n setActiveUser(null);\n setActiveGroup(group);\n hideCometChatContactsView();\n }\n };\n\n const getMessageHeaderConfiguration = () => {\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack:\n messagesConfiguration?.messageHeaderConfiguration?.onBack || onBack,\n hideBackButton: (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(\n conversationsWithMessagesStyle,\n messagesConfiguration,\n isMobileView\n ),\n ...messagesConfiguration?.messageHeaderConfiguration\n ?.messageHeaderStyle,\n },\n } as MessageHeaderConfiguration;\n };\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(\n conversationsWithMessagesStyle,\n messagesConfiguration,\n isMobileView\n ),\n ...messagesConfiguration?.messageComposerConfiguration\n ?.messageComposerStyle,\n },\n } as MessageComposerConfiguration;\n }\n\n const getConversationsComponent = () => {\n return (\n \n );\n };\n\n const getSidebarContent = () => {\n return (\n \n {getConversationsComponent()}\n \n );\n };\n\n const getMessagesComponent = () => {\n return (\n \n );\n };\n\n const getMainContent = () => {\n return !showCometChatContacts && (activeUser || activeGroup) ? (\n \n {getMessagesComponent()}\n \n ) : null;\n };\n\n const getDecoratorMessageContent = () => {\n\n const text = messageText ? messageText : localize(\"NO_CHATS_SELECTED\");\n\n return (\n \n \n \n );\n };\n\n const getDecoratorMessage = () =>\n !showCometChatContacts && !activeUser && !activeGroup\n ? getDecoratorMessageContent()\n : null;\n\n const getContacts = () =>\n showCometChatContacts && (\n \n );\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n onErrorCallback,\n setActiveChat,\n user,\n group,\n startConversationBtnElement,\n showCometChatContactsView,\n showCometChatContacts,\n hideCometChatContactsView,\n setActiveUser,\n setActiveGroup,\n attachGroupListener\n );\n\n return (\n \n {getSidebarContent()}\n {getMainContent()}\n {getDecoratorMessage()}\n {getContacts()}\n \n );\n};\n\nCometChatConversationsWithMessages.defaultProps = defaultProps;\nexport { CometChatConversationsWithMessages };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FNew%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FNew%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%201.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M10.9288822%2C11.8990317%20L7.62932866%2C12.3710104%20L8.10043948%2C9.07071466%20L16.5857676%2C0.585763632%20C17.3668205%2C-0.195254544%2018.6331574%2C-0.195254544%2019.4142103%2C0.585763632%20C20.1952632%2C1.36678181%2020.1952632%2C2.63306247%2019.4142103%2C3.41408064%20L10.9288822%2C11.8990317%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%2215.6426571%22%20y1%3D%221.52883225%22%20x2%3D%2218.4710998%22%20y2%3D%224.35714926%22%20id%3D%22Path%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M16%2C12.0003604%20L16%2C18.6667267%20C16%2C19.4030732%2015.4030369%2C20%2014.6666577%2C20%20L1.33333252%2C20%20C0.596953301%2C20%200%2C19.4030732%200%2C18.6667267%20L0%2C5.33399414%20C0%2C4.59764765%200.596953301%2C4.00072088%201.33333252%2C4.00072088%20L8%2C4.00072088%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n setLoggedInUser: Function,\n subscribeToEvents: Function,\n onErrorCallback: Function,\n setActiveChat: any,\n user: any,\n group: any,\n startConversationBtnElement: JSX.IntrinsicElements[\"cometchat-button\"] | null,\n showCometChatContactsView: Function,\n showCometChatContacts: any,\n hideCometChatContactsView: Function,\n setActiveUser: any,\n setActiveGroup: any,\n attachGroupListener: any\n) {\n useEffect(\n () => {\n let removeListener: any;\n CometChat.getLoggedinUser().then(\n (user) => {\n if (attachGroupListener) {\n removeListener = attachGroupListener(user);\n }\n setLoggedInUser(user);\n return () => {\n if (removeListener) {\n removeListener();\n }\n };\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(() => {\n let unsubscribeFromEvents: () => void;\n if (loggedInUser) {\n unsubscribeFromEvents = subscribeToEvents();\n setActiveChat();\n }\n return () => {\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, user, group, setActiveChat, subscribeToEvents]);\n\n useEffect(\n /**\n * Add `cc-button-clicked` event listener to the start conversation button element\n */\n () => {\n if (!startConversationBtnElement) {\n return;\n }\n async function handleEvent() {\n if (showCometChatContacts) {\n hideCometChatContactsView()\n }\n else {\n showCometChatContactsView()\n }\n\n }\n const eventName = \"cc-button-clicked\";\n startConversationBtnElement.addEventListener(eventName, handleEvent);\n return () => {\n startConversationBtnElement.removeEventListener(eventName, handleEvent);\n };\n }, [startConversationBtnElement, showCometChatContactsView, hideCometChatContactsView, showCometChatContacts]);\n\n useEffect(() => {\n setActiveUser(user);\n }, [user, setActiveUser]);\n\n useEffect(() => {\n setActiveGroup(group);\n }, [group, setActiveGroup])\n\n}\n\nexport { Hooks };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FClose%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FClose%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%285.000000%2C%205.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%2214%22%20y2%3D%2214%22%20id%3D%22Path-9%22%20transform%3D%22translate%287.000000%2C%207.000000%29%20scale%28-1%2C%201%29%20translate%28-7.000000%2C%20-7.000000%29%20%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatTheme, fontHelper } from '@cometchat/uikit-resources';\nimport { WithMessagesStyle, JoinGroupConfiguration, MessageHeaderStyle, MessageHeaderConfiguration, CreateGroupConfiguration, GroupsStyle, GroupsConfiguration, MessagesConfiguration, MessagesStyle, BaseStyle } from '@cometchat/uikit-shared';\nimport { LabelStyle, JoinGroupStyle, ListItemStyle, CreateGroupStyle, BackdropStyle } from '@cometchat/uikit-elements';\nimport { CSSProperties } from 'react';\n\nconst labelStyle: LabelStyle = {\n height: '100%',\n width: '100%',\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: 'flex',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: 'calc(100% - 280px)',\n height: '100%'\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0',\n left: '0'\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'inherit',\n border: 'none',\n borderRadius: 'inherit',\n width: '100%',\n height: 'auto'\n} as CSSProperties;\n\n\nconst WithMessagesSidebarStyle = {\n width: '280px',\n height: '100%',\n position: 'relative',\n} as CSSProperties;\n\nexport const getGroupsWrapperStyles = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n return {\n ...WithMessagesWrapperStyle,\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: '0',\n background: theme.palette.getBackground(),\n ...groupsWithMessagesStyle\n } as CSSProperties\n}\n\nexport const getWithMessagesSidebarStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme, isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeGroup);\n } else {\n return getDesktopViewSidebarStyle(groupsWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (activeGroup: CometChat.Group | undefined) => {\n\n const visibility = activeGroup ? { \"visibility\": \"hidden\" } : { \"visibility\": \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties\n}\n\nconst getDesktopViewSidebarStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight: groupsWithMessagesStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`\n } as CSSProperties\n}\n\nexport const getWithMessagesMainStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeGroup);\n } else {\n return getDesktopViewMainStyle(groupsWithMessagesStyle);\n }\n}\n\nconst getMobileViewMainStyle = (activeGroup: CometChat.Group | undefined) => {\n\n const visibility = activeGroup ? { \"visibility\": \"visible\" } : { \"visibility\": \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties;\n}\n\nconst getDesktopViewMainStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`\n }\n}\n\nexport const getLabelStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n return {\n ...labelStyle,\n textFont: groupsWithMessagesStyle?.messageTextFont || fontHelper(theme.typography.title1),\n textColor: groupsWithMessagesStyle?.messageTextColor || theme.palette.getAccent600(),\n } as LabelStyle;\n}\n\nexport const getGroupsStyle = (groupsConfiguration: GroupsConfiguration | undefined) => {\n\n const groupsStyle = groupsConfiguration?.groupsStyle;\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...groupsStyle\n } as GroupsStyle;\n}\n\nexport const getMessageHeaderStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `${borderRadius} ${borderRadius} 0 0` : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n } as MessageHeaderStyle;\n}\n\nexport const getMessageComposerStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = groupsWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `0 0 ${borderRadius} ${borderRadius}` : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n}\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n withMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: withMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (isMobileView: boolean | undefined, activeGroup: CometChat.Group | undefined) => {\n\n let visibility = { visibility: 'hidden' };\n if (!activeGroup && !isMobileView) {\n visibility = { \"visibility\": \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`\n } as CSSProperties\n}\n\nexport const getJoinGroupWrapperStyle = (isMobileView: boolean | undefined) => {\n\n if (isMobileView) {\n return {\n ...MobileLayoutStyle,\n background: 'inherit',\n borderRadius: 'inherit'\n }\n } else {\n return {\n width: `calc(100% - 280px)`,\n background: 'inherit',\n borderRadius: 'inherit'\n }\n }\n}\n\nexport const getJoinGroupStyle = (JoinGroupConfiguration: JoinGroupConfiguration | undefined, theme: CometChatTheme) => {\n const configStyle = JoinGroupConfiguration?.joinGroupStyle;\n return {\n width: configStyle?.width || \"100%\",\n height: configStyle?.height || \"100%\",\n boxShadow: configStyle?.boxShadow || 'none',\n background: configStyle?.background || \"transparent\",\n border: configStyle?.border || \"0\",\n borderRadius: configStyle?.borderRadius || \"inherit\",\n titleTextFont: configStyle?.titleTextFont || fontHelper(theme.typography.heading),\n titleTextColor: configStyle?.titleTextFont || theme.palette.getAccent700(),\n passwordInputPlaceholderTextFont: configStyle?.passwordInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputPlaceholderTextColor: configStyle?.passwordInputPlaceholderTextColor || theme.palette.getAccent600(),\n passwordInputBackground: configStyle?.passwordInputBackground || theme.palette.getAccent50(),\n passwordInputBorder: configStyle?.passwordInputBorder || \"none\",\n passwordInputBorderRadius: configStyle?.passwordInputBorderRadius || \"8px\",\n passwordInputBoxShadow: configStyle?.passwordInputBoxShadow || `${theme.palette.getAccent50()} 0 0 0 1px`,\n passwordInputTextFont: configStyle?.passwordInputTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputTextColor: configStyle?.passwordInputTextColor || theme.palette.getAccent(),\n joinButtonTextFont: configStyle?.joinButtonTextFont || fontHelper(theme.typography.title2),\n joinButtonTextColor: configStyle?.joinButtonTextColor || theme.palette.getBackground(),\n joinButtonBackground: configStyle?.joinButtonBackground || theme.palette.getPrimary(),\n joinButtonBorderRadius: configStyle?.joinButtonBorderRadius || \"8px\",\n joinButtonBorder: configStyle?.joinButtonBorder || \"none\",\n errorTextFont: configStyle?.errorTextFont || fontHelper(theme.typography.subtitle1),\n errorTextColor: configStyle?.errorTextFont || theme.palette.getError()\n } as JoinGroupStyle;\n}\n\nexport const getMessageHeaderSlotStyle = () => {\n return {\n position: 'absolute',\n top: '0',\n left: '0'\n } as CSSProperties;\n}\n\nexport const getJoinGroupMessageHederStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined, messageHeaderConfiguration: MessageHeaderConfiguration | undefined, theme: CometChatTheme) => {\n\n const configStyle = messageHeaderConfiguration?.messageHeaderStyle;\n return {\n background: configStyle?.background || 'inherit',\n border: 'none',\n borderRadius: configStyle?.borderRadius || groupsWithMessagesStyle?.borderRadius || 'inherit',\n onlineStatusColor: configStyle?.onlineStatusColor || theme.palette.getSuccess(),\n privateGroupIconBackground: configStyle?.privateGroupIconBackground || theme.palette.getSuccess(),\n passwordGroupIconBackground: configStyle?.passwordGroupIconBackground || \"RGB(247, 165, 0)\",\n backButtonIconTint: configStyle?.backButtonIconTint || theme.palette.getPrimary(),\n subtitleTextColor: configStyle?.subtitleTextColor || theme.palette.getAccent600(),\n subtitleTextFont: configStyle?.subtitleTextFont || fontHelper(theme.typography.subtitle2),\n typingIndicatorTextColor: configStyle?.typingIndicatorTextColor || theme.palette.getPrimary(),\n typingIndicatorTextFont: configStyle?.typingIndicatorTextFont || fontHelper(theme.typography.subtitle1),\n } as MessageHeaderStyle;\n}\n\nexport const getListItemStyle = (messageHeaderConfiguration: MessageHeaderConfiguration | undefined, theme: CometChatTheme) => {\n\n const configStyle = messageHeaderConfiguration?.listItemStyle;\n return {\n width: configStyle?.width || \"100%\",\n height: configStyle?.height || \"45px\",\n background: configStyle?.background || \"inherit\",\n hoverBackground: configStyle?.hoverBackground || \"transparent\",\n activeBackground: configStyle?.activeBackground || \"transparent\",\n borderRadius: configStyle?.borderRadius || \"0\",\n titleFont: configStyle?.titleFont || fontHelper(theme.typography.title2),\n titleColor: configStyle?.titleColor || theme.palette.getAccent(),\n border: configStyle?.border || \"none\",\n separatorColor: configStyle?.separatorColor || \"\",\n } as ListItemStyle;\n}\n\nexport const getBackdropStyle = (groupsWithMessagesStyle: WithMessagesStyle | undefined): BackdropStyle => {\n return {\n height: groupsWithMessagesStyle?.height,\n width: groupsWithMessagesStyle?.width,\n position: 'absolute'\n } as BaseStyle;\n}\n\nexport const getCreateGroupWrapperStyle = (isMobileView: boolean | undefined) => {\n if (isMobileView) {\n return {\n ...MobileLayoutStyle,\n background: 'inherit',\n borderRadius: 'inherit'\n } as CSSProperties;\n }\n}\n\nexport const getCreateGroupStyle = (createGroupConfiguration: CreateGroupConfiguration | undefined, theme: CometChatTheme, isMobileView: boolean | undefined) => {\n\n let width = \"360px\",\n height = '500px';\n if (isMobileView) {\n\n width = '100%';\n height = '100%';\n }\n\n const configStyle = createGroupConfiguration?.createGroupStyle;\n return {\n width: configStyle?.width || width,\n height: configStyle?.height || height,\n border: configStyle?.border || '0 none',\n borderRadius: configStyle?.borderRadius || '0',\n background: configStyle?.background || theme.palette.getBackground(),\n boxShadow: configStyle?.boxShadow || `${theme.palette.getAccent100()} 4px 16px 32px 4px`,\n titleTextFont: configStyle?.titleTextFont || fontHelper(theme.typography.heading),\n titleTextColor: configStyle?.titleTextColor || theme.palette.getAccent(),\n groupTypeTextFont: configStyle?.groupTypeTextFont || fontHelper(theme.typography.text3),\n groupTypeBorder: configStyle?.groupTypeBorder || '0 none',\n groupTypeBorderRadius: configStyle?.groupTypeBorderRadius || \"0px\",\n groupTypeTextColor: configStyle?.groupTypeTextColor || theme.palette.getAccent(),\n groupTypeTextBackground: configStyle?.groupTypeTextBackground || \"inherit\",\n groupTypeBackground: configStyle?.groupTypeBackground || theme.palette.getAccent100(),\n groupTypeBoxShadow: configStyle?.groupTypeBoxShadow || \"\",\n activeGroupTypeTextFont: configStyle?.activeGroupTypeTextFont || fontHelper(theme.typography.text3),\n activeGroupTypeTextColor: configStyle?.activeGroupTypeTextColor || theme.palette.getAccent(),\n activeGroupTypeBackground: configStyle?.activeGroupTypeBackground || theme.palette.getAccent900(),\n activeGroupTypeBoxShadow: configStyle?.activeGroupTypeBoxShadow || `${theme.palette.getAccent200()} 0 3px 8px 0`,\n activeGroupTypeBorderRadius: configStyle?.activeGroupTypeBorderRadius || \"8px\",\n activeGroupTypeBorder: configStyle?.activeGroupTypeBorder || \"none\",\n groupTypeTextBoxShadow: configStyle?.groupTypeTextBoxShadow || \"none\",\n groupTypeTextBorderRadius: configStyle?.groupTypeTextBorderRadius || \"7px\",\n closeIconTint: configStyle?.closeIconTint || theme.palette.getPrimary(),\n errorTextFont: configStyle?.errorTextFont || fontHelper(theme.typography.text2),\n errorTextBackground: configStyle?.errorTextBackground || theme.palette.getError(),\n errorTextBorderRadius: configStyle?.errorTextBorderRadius || \"8px\",\n errorTextBorder: configStyle?.errorTextBorder || \"none\",\n errorTextColor: configStyle?.errorTextColor || theme.palette.getError(),\n nameInputPlaceholderTextFont: configStyle?.nameInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n nameInputPlaceholderTextColor: configStyle?.nameInputPlaceholderTextColor || theme.palette.getAccent600(),\n nameInputBackground: configStyle?.nameInputBackground || theme.palette.getAccent100(),\n nameInputTextFont: configStyle?.nameInputTextFont || fontHelper(theme.typography.subtitle1),\n nameInputTextColor: configStyle?.nameInputTextColor || theme.palette.getAccent(),\n nameInputBorder: configStyle?.nameInputBorder || \"none\",\n nameInputBorderRadius: configStyle?.nameInputBorderRadius || \"8px\",\n nameInputBoxShadow: configStyle?.nameInputBoxShadow || `${theme.palette.getAccent100()} 0 0 0 1px`,\n passwordInputPlaceholderTextFont: configStyle?.passwordInputPlaceholderTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputPlaceholderTextColor: configStyle?.passwordInputPlaceholderTextColor || theme.palette.getAccent600(),\n passwordInputBackground: configStyle?.passwordInputBackground || theme.palette.getAccent100(),\n passwordInputBorder: configStyle?.passwordInputBorder || `none`,\n passwordInputBorderRadius: configStyle?.passwordInputBorderRadius || \"8px\",\n passwordInputBoxShadow: configStyle?.passwordInputBoxShadow || `${theme.palette.getAccent100()} 0 0 0 1px`,\n passwordInputTextFont: configStyle?.passwordInputTextFont || fontHelper(theme.typography.subtitle1),\n passwordInputTextColor: configStyle?.passwordInputTextColor || theme.palette.getAccent(),\n createGroupButtonTextFont: configStyle?.createGroupButtonTextFont || fontHelper(theme.typography.title2),\n createGroupButtonTextColor: configStyle?.createGroupButtonTextColor || theme.palette.getAccent(\"dark\"),\n createGroupButtonBackground: configStyle?.createGroupButtonBackground || theme.palette.getPrimary(),\n createGroupButtonBorderRadius: configStyle?.createGroupButtonBorderRadius || \"8px\",\n createGroupButtonBorder: configStyle?.createGroupButtonBorder || \"none\",\n } as CreateGroupStyle;\n}\n\nexport const createGroupButtonStyle = (theme: CometChatTheme) => {\n return {\n height: \"24px\",\n width: \"24px\",\n border: \"none\",\n borderRadius: '0',\n background: \"transparent\",\n buttonIconTint: `${theme.palette.getPrimary()}`,\n padding: '0'\n }\n};\n","import { CometChatCreateGroup, CometChatJoinGroup } from \"@cometchat/uikit-elements\";\nimport { CometChatGroupEvents, CometChatUIEvents, CometChatUIKitConstants, IGroupLeft, IGroupMemberAdded, IGroupMemberJoined, IGroupMemberKickedBanned, IOwnershipChanged, localize } from \"@cometchat/uikit-resources\";\nimport { CreateGroupConfiguration, GroupsConfiguration, JoinGroupConfiguration, MessageComposerConfiguration, MessageHeaderConfiguration, MessagesConfiguration, WithMessagesStyle } from \"@cometchat/uikit-shared\";\nimport { JSX, useCallback, useContext, useRef, useState } from \"react\";\nimport { createGroupButtonStyle, getBackdropStyle, getCreateGroupStyle, getCreateGroupWrapperStyle, getEmptyMessageLayoutStyle, getGroupsStyle, getGroupsWrapperStyles, getJoinGroupMessageHederStyle, getJoinGroupStyle, getJoinGroupWrapperStyle, getLabelStyle, getListItemStyle, getMessageComposerStyle, getMessageHeaderSlotStyle, getMessageHeaderStyle, getMessagesStyle, getWithMessagesMainStyle, getWithMessagesSidebarStyle } from \"./style\";\nimport { useCometChatErrorHandler, useStateRef } from \"../CometChatCustomHooks\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatGroups } from \"../CometChatGroups\";\nimport { CometChatMessageHeader } from \"../CometChatMessageHeader\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport CreateIcon from \"./assets/create-button.svg\";\nimport { Hooks } from \"./hooks\";\nimport React from \"react\";\nimport { createComponent } from \"@lit-labs/react\";\n\nconst CometChatCreateGroupComponent = createComponent({\n tagName: \"cometchat-create-group\",\n elementClass: CometChatCreateGroup,\n react: React,\n})\n\ninterface IGroupsWithMessagesProps {\n group?: CometChat.Group,\n isMobileView?: boolean,\n messageText?: string,\n groupsWithMessagesStyle?: WithMessagesStyle,\n messagesConfiguration?: MessagesConfiguration,\n groupsConfiguration?: GroupsConfiguration,\n createGroupConfiguration?: CreateGroupConfiguration,\n joinGroupConfiguration?: JoinGroupConfiguration,\n onError?: ((error: CometChat.CometChatException) => void) | null\n}\n\nconst defaultProps: IGroupsWithMessagesProps = {\n group: undefined,\n isMobileView: false,\n messageText: \"\",\n groupsWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n groupsConfiguration: new GroupsConfiguration({}),\n createGroupConfiguration: new CreateGroupConfiguration({}),\n joinGroupConfiguration: new JoinGroupConfiguration({}),\n onError: (error: CometChat.CometChatException) => { console.log(error) }\n};\n\nconst CometChatGroupsWithMessages = (props: IGroupsWithMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n group,\n isMobileView,\n messageText,\n groupsWithMessagesStyle,\n messagesConfiguration,\n groupsConfiguration,\n createGroupConfiguration,\n joinGroupConfiguration,\n onError\n } = props;\n\n const createGroupConfigCreateClick = createGroupConfiguration?.createClick;\n const joinGroupConfigOnError = joinGroupConfiguration?.onError;\n const joinGroupConfigJoinClick = joinGroupConfiguration?.joinClick;\n\n const [loggedInUser, setLoggedInUser] = useState(null);\n const [createGroupElement, setCreateGroupRef] = useStateRef(null);\n const [joinGroupElement, setJoinGroupRef] = useStateRef(null);\n const createGroupButtonRef = useRef(null);\n const [openCreateGroupPage, setOpenCreateGroupPage] = useState(false);\n const [openPasswordModal, setOpenPasswordModal] = useState(false);\n const protectedGroup = useRef(undefined);\n\n const [activeGroup, setActiveGroup] = useState(group ?? undefined);\n const [activeUser, setActiveUser] = useState(null);\n const onErrorCallback = useCometChatErrorHandler(onError);\n const JoinGroup = createComponent({\n tagName: \"cometchat-join-group\",\n elementClass: CometChatJoinGroup,\n react: React,\n events: {\n ccCloseClicked: \"cc-close-clicked\",\n },\n });\n\n const onBack = () => {\n setActiveUser(null);\n setActiveGroup(undefined);\n };\n\n const openCreateGroup = () => setOpenCreateGroupPage(true);\n\n const closeCreateGroup = useCallback(() => {\n setOpenCreateGroupPage(false);\n }, []);\n\n const closeJoinGroup = () => {\n protectedGroup.current = undefined;\n setOpenPasswordModal(false);\n }\n\n\n const onItemClick = (group: CometChat.Group) => {\n\n try {\n setActiveUser(null);\n setOpenPasswordModal(false);\n if (group.getHasJoined()) {\n setActiveGroup(group);\n return;\n }\n if (group.getType() === CometChatUIKitConstants.GroupTypes.password) {\n setActiveGroup(undefined);\n protectedGroup.current = group;\n setOpenPasswordModal(true);\n return;\n }\n CometChat.joinGroup(group).then(\n (groupJoined: CometChat.Group) => {\n setActiveGroup(groupJoined);\n }, (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n\n const onGroupJoined = useCallback(\n (event: any) => {\n try {\n let group: CometChat.Group = event?.detail?.response;\n setOpenPasswordModal(false);\n protectedGroup.current = undefined;\n if (group) {\n setActiveGroup(group);\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [setActiveGroup, protectedGroup, setOpenPasswordModal, onErrorCallback]\n )\n\n const subscribeToEvents = useCallback(\n () => {\n try {\n const ccGroupDeleted = CometChatGroupEvents.ccGroupDeleted.subscribe(\n (group: CometChat.Group) => {\n if (activeGroup && activeGroup.getGuid() === group.getGuid()) {\n setActiveGroup(undefined);\n }\n }\n );\n const ccGroupCreated = CometChatGroupEvents.ccGroupCreated.subscribe(\n (group: CometChat.Group) => {\n if (group) {\n setActiveGroup(group);\n setOpenCreateGroupPage(false);\n }\n }\n );\n const ccGroupMemberAdded = CometChatGroupEvents.ccGroupMemberAdded.subscribe(\n (item: IGroupMemberAdded) => {\n if (activeGroup && activeGroup.getGuid() === item?.userAddedIn!.getGuid()) {\n setActiveGroup(item?.userAddedIn);\n setOpenCreateGroupPage(false);\n }\n }\n )\n const ccGroupMemberBanned = CometChatGroupEvents.ccGroupMemberBanned.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (activeGroup && activeGroup.getGuid() === item?.kickedFrom!.getGuid()) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n )\n const ccGroupMemberJoined = CometChatGroupEvents.ccGroupMemberJoined.subscribe(\n (item: IGroupMemberJoined) => {\n if (protectedGroup.current && protectedGroup.current.getGuid() === item?.joinedGroup!.getGuid()) {\n closeJoinGroup();\n setActiveGroup(item?.joinedGroup);\n }\n }\n )\n const ccGroupMemberKicked = CometChatGroupEvents.ccGroupMemberKicked.subscribe(\n (item: IGroupMemberKickedBanned) => {\n if (activeGroup && activeGroup.getGuid() === item?.kickedFrom!.getGuid()) {\n setActiveGroup(item?.kickedFrom);\n }\n }\n )\n const ccOwnershipChanged = CometChatGroupEvents.ccOwnershipChanged.subscribe(\n (item: IOwnershipChanged) => {\n if (activeGroup && activeGroup.getGuid() === item?.group!.getGuid()) {\n setActiveGroup(item?.group);\n }\n }\n );\n const ccGroupLeft = CometChatGroupEvents.ccGroupLeft.subscribe(\n (item: IGroupLeft) => {\n if (activeGroup && activeGroup.getGuid() === item?.leftGroup!.getGuid() && loggedInUser?.getUid() === item?.userLeft?.getUid()) {\n setActiveGroup(undefined);\n }\n }\n );\n const ccOpenChat = CometChatUIEvents.ccOpenChat.subscribe((item) => {\n const user = item.user\n if (user) {\n setActiveGroup(undefined);\n setActiveUser(user);\n }\n });\n\n return () => {\n ccGroupDeleted.unsubscribe();\n ccGroupMemberAdded.unsubscribe();\n ccGroupMemberBanned.unsubscribe();\n ccGroupMemberJoined.unsubscribe();\n ccGroupMemberKicked.unsubscribe();\n ccOwnershipChanged.unsubscribe();\n ccGroupLeft.unsubscribe();\n ccGroupCreated.unsubscribe();\n ccOpenChat.unsubscribe();\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeGroup, setActiveGroup, protectedGroup, setActiveUser, setOpenCreateGroupPage, onErrorCallback, loggedInUser]\n )\n\n const getJoinGroupHeaderView = useCallback((protectedGroup: CometChat.Group | undefined) => {\n\n if (!isMobileView) {\n return null;\n }\n\n let messageHeaderConfiguration = joinGroupConfiguration?.messageHeaderConfiguration;\n\n return (\n
    \n \n
    \n )\n }, [groupsWithMessagesStyle, isMobileView, joinGroupConfiguration?.messageHeaderConfiguration, theme]);\n\n const getCreateGroupComponent = () => {\n\n return (\n \n )\n }\n\n const getCreateGroup = () => {\n\n if (!isMobileView) {\n return (\n {getCreateGroupComponent()}\n );\n } else {\n return (\n
    \n {getCreateGroupComponent()}\n
    \n )\n }\n }\n\n const getJoinGroup = () => {\n return (\n
    \n \n\n {getJoinGroupHeaderView(protectedGroup.current)}\n \n
    \n )\n }\n\n const getMessageHeaderConfiguration = () => {\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack: messagesConfiguration?.messageHeaderConfiguration?.onBack || closeJoinGroup,\n hideBackButton: messagesConfiguration?.messageHeaderConfiguration?.hideBackButton || (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(groupsWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n },\n\n } as MessageHeaderConfiguration;\n }\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(groupsWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n } as MessageComposerConfiguration;\n }\n\n const getDefaultGroupMenus = useCallback(() => {\n return ();\n }, [theme]);\n\n const getGroupsComponent = () => {\n\n return (\n \n )\n }\n\n const getSidebarContent = () => {\n return (\n
    \n {getGroupsComponent()}\n
    \n )\n }\n\n const getMessagesComponent = () => {\n return (\n \n )\n }\n\n const getMainContent = () => {\n return (\n (activeGroup || activeUser) ?\n
    \n {getMessagesComponent()}\n
    \n : null\n )\n }\n\n const getDecoratorMessageContent = () => {\n const text = messageText ? messageText : localize(\"SELECT__GROUP\");\n return (\n
    \n \n
    \n );\n }\n\n const getDecoratorMessage = () => !(activeGroup || activeUser) && !openPasswordModal && !protectedGroup.current ? getDecoratorMessageContent() : null\n\n Hooks(\n loggedInUser,\n setLoggedInUser,\n subscribeToEvents,\n onErrorCallback,\n isMobileView,\n joinGroupConfiguration,\n group,\n setActiveGroup,\n messagesConfiguration,\n onBack,\n createGroupElement,\n createGroupButtonRef,\n openCreateGroup,\n closeCreateGroup,\n joinGroupElement,\n onGroupJoined,\n createGroupConfigCreateClick,\n joinGroupConfigOnError,\n joinGroupConfigJoinClick\n );\n\n return (\n <>\n
    \n {getSidebarContent()}\n {getMainContent()}\n {getDecoratorMessage()}\n {openPasswordModal && !(activeUser || activeGroup) && protectedGroup.current ? getJoinGroup() : null}\n {openCreateGroupPage ? getCreateGroup() : null}\n
    \n \n );\n}\n\nCometChatGroupsWithMessages.defaultProps = defaultProps;\nexport { CometChatGroupsWithMessages };\n","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FPlus%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FPlus%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%229%22%20y1%3D%220%22%20x2%3D%229%22%20y2%3D%2218%22%20id%3D%22Path-10%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cline%20x1%3D%220%22%20y1%3D%229%22%20x2%3D%2218%22%20y2%3D%229%22%20id%3D%22Path-11%22%3E%3C%2Fline%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { useEffect } from \"react\";\nimport { MessagesConfiguration } from \"@cometchat/uikit-shared\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: Function,\n\tsubscribeToEvents: Function,\n onErrorCallback: Function,\n isMobileView: any,\n joinGroupConfiguration: any,\n group: any,\n setActiveGroup: any,\n messagesConfiguration: MessagesConfiguration | undefined,\n onBack: Function,\n createGroupElement: any,\n createGroupButtonRef: any,\n openCreateGroup: Function,\n closeCreateGroup: Function,\n joinGroupElement: any,\n onGroupJoined: Function,\n createGroupConfigCreateClick : ((group: CometChat.Group) => void) | null | undefined,\n joinGroupConfigOnError : ((error: any) => void) | null | undefined,\n joinGroupConfigJoinClick : ((group: CometChat.Group, password: string) => void) | null | undefined\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user) => {\n setLoggedInUser(user);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n [setLoggedInUser, onErrorCallback]\n );\n\n useEffect(()=>{\n if(loggedInUser){\n return subscribeToEvents();\n }\n }, [loggedInUser, subscribeToEvents]);\n\n useEffect(\n ()=>{\n const element = createGroupButtonRef.current;\n if (!element) return;\n const openCreateGroupModal = () => {\n openCreateGroup();\n }\n element.addEventListener(\"cc-button-clicked\", openCreateGroupModal);\n return ()=>{\n element.removeEventListener(\"cc-button-clicked\", openCreateGroupModal);\n }\n }, [openCreateGroup, createGroupButtonRef]\n )\n\n useEffect(\n () => {\n if (isMobileView) {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.hideBackButton = false;\n }\n\n if(joinGroupConfiguration?.messageHeaderConfiguration){\n joinGroupConfiguration.messageHeaderConfiguration.hideBackButton = false;\n }\n } else {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.hideBackButton = true;\n }\n if(joinGroupConfiguration?.messageHeaderConfiguration){\n joinGroupConfiguration.messageHeaderConfiguration.hideBackButton = true;\n }\n }\n }, [isMobileView, joinGroupConfiguration, messagesConfiguration]\n );\n\n useEffect(\n () => {\n setActiveGroup(group);\n }, [group, setActiveGroup]\n );\n\n useEffect(\n () => {\n if (!messagesConfiguration?.messageHeaderConfiguration?.onBack) {\n if(messagesConfiguration?.messageHeaderConfiguration){\n messagesConfiguration.messageHeaderConfiguration.onBack = onBack;\n }\n }\n }, [messagesConfiguration, onBack]\n );\n\n useEffect(\n () => {\n if (!joinGroupElement) return;\n const eventName = \"cc-joingroup-joined\";\n const onJoinGroupButtonClicked = (event: any) => onGroupJoined(event);\n joinGroupElement.addEventListener(eventName, onJoinGroupButtonClicked);\n return () => {\n joinGroupElement.removeEventListener(eventName, onJoinGroupButtonClicked);\n };\n }, [joinGroupElement, onGroupJoined]\n )\n\n useEffect(()=>{\n if (!createGroupElement) return;\n const eventName = \"cc-creategroup-close-clicked\";\n const closeCreateGroupModal = () => closeCreateGroup();\n createGroupElement.addEventListener(eventName, closeCreateGroupModal);\n return () => {\n createGroupElement.removeEventListener(eventName, closeCreateGroupModal);\n };\n }, [createGroupElement, closeCreateGroup]);\n\n useEffect(()=>{\n if (!createGroupElement) return;\n if (createGroupConfigCreateClick) {\n createGroupElement.createClick = createGroupConfigCreateClick;\n return () => {\n createGroupElement.createClick = null;\n };\n }\n }, [createGroupConfigCreateClick, createGroupElement]);\n\n useEffect(() => {\n if (!joinGroupElement) return;\n if (joinGroupConfigJoinClick) {\n joinGroupElement.joinClick = joinGroupConfigJoinClick;\n return () => {\n joinGroupElement.joinClick = null;\n };\n }\n }, [joinGroupConfigJoinClick, joinGroupElement]);\n\n useEffect(() => {\n if (!joinGroupElement) return;\n if (joinGroupConfigOnError) {\n joinGroupElement.onError = joinGroupConfigOnError;\n return () => {\n joinGroupElement.onError = null;\n };\n }\n }, [joinGroupConfigOnError, joinGroupElement]);\n}\n\nexport { Hooks };","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatTheme, fontHelper } from '@cometchat/uikit-resources';\nimport { MessageHeaderStyle, MessagesConfiguration, MessagesStyle, UsersConfiguration, UsersStyle, WithMessagesStyle } from '@cometchat/uikit-shared';\nimport { LabelStyle } from '@cometchat/uikit-elements';\nimport { CSSProperties } from 'react';\n\nconst labelStyle: LabelStyle = {\n height: '100%',\n width: '100%',\n background: \"transparent\",\n border: \"none\",\n borderRadius: \"0\",\n textFont: \"700 22px Inter, sans-serif\",\n textColor: \"rgba(20, 20, 20, 0.33)\",\n};\n\nconst WithMessagesWrapperStyle = {\n display: 'flex',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n} as CSSProperties;\n\nconst WithMessagesMainStyle = {\n width: 'calc(100% - 280px)',\n height: '100%'\n} as CSSProperties;\n\nconst MobileLayoutStyle = {\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: '0',\n left: '0'\n} as CSSProperties;\n\nconst EmptyMessagesDivStyle = {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: 'inherit',\n border: 'none',\n borderRadius: 'inherit',\n width: '100%',\n height: 'auto'\n} as CSSProperties;\n\nconst WithMessagesSidebarStyle = {\n width: '280px',\n height: '100%',\n position: 'relative',\n} as CSSProperties;\n\nexport const getUsersWrapperStyles = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n return {\n ...WithMessagesWrapperStyle,\n width: '100%',\n height: '100%',\n border: `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: '0',\n background: theme.palette.getBackground(),\n ...usersWithMessagesStyle\n } as CSSProperties\n}\n\nexport const getWithMessagesSidebarStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme, isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n if (isMobileView) {\n return getMobileViewSidebarStyle(activeUser);\n } else {\n return getDesktopViewSidebarStyle(usersWithMessagesStyle, theme);\n }\n};\n\nconst getMobileViewSidebarStyle = (activeUser: CometChat.User | undefined) => {\n\n const visibility = activeUser ? { \"visibility\": \"hidden\" } : { \"visibility\": \"visible\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties\n}\n\nconst getDesktopViewSidebarStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesSidebarStyle,\n borderRight: usersWithMessagesStyle?.border || `1px solid ${theme.palette.getAccent100()}`,\n borderRadius: `${borderRadius} 0 0 ${borderRadius}`\n } as CSSProperties\n}\n\nexport const getWithMessagesMainStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n if (isMobileView) {\n return getMobileViewMainStyle(activeUser);\n } else {\n return getDesktopViewMainStyle(usersWithMessagesStyle);\n }\n}\n\nconst getMobileViewMainStyle = (activeUser: CometChat.User | undefined) => {\n\n const visibility = activeUser ? { \"visibility\": \"visible\" } : { \"visibility\": \"hidden\" };\n return {\n ...visibility,\n ...MobileLayoutStyle,\n borderRadius: 'inherit',\n } as CSSProperties;\n}\n\nconst getDesktopViewMainStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius || 0;\n return {\n ...WithMessagesMainStyle,\n borderRadius: `0 ${borderRadius} ${borderRadius} 0`\n }\n}\n\nexport const getLabelStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => {\n\n return {\n ...labelStyle,\n textFont: usersWithMessagesStyle?.messageTextFont || fontHelper(theme.typography.title1),\n textColor: usersWithMessagesStyle?.messageTextColor || theme.palette.getAccent600(),\n } as LabelStyle;\n}\n\nexport const getUsersStyle = (usersConfiguration: UsersConfiguration | undefined) => {\n\n const usersStyle = usersConfiguration?.usersStyle;\n return {\n width: \"100%\",\n height: \"100%\",\n border: \"0 none\",\n borderRadius: \"inherit\",\n background: \"inherit\",\n ...usersStyle\n } as UsersStyle;\n}\n\nexport const getMessageHeaderStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `${borderRadius} ${borderRadius} 0 0` : `0px ${borderRadius} 0px 0px`,\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n } as MessageHeaderStyle;\n}\n\nexport const getMessageComposerStyle = (usersWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n\n const borderRadius = usersWithMessagesStyle?.borderRadius;\n return {\n borderRadius: isMobileView ? `0 0 ${borderRadius} ${borderRadius}` : `0px 0 ${borderRadius} 0px`,\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n}\n\nexport const getMessagesStyle = (\n messagesStyle?: MessagesStyle,\n withMessagesStyle?: WithMessagesStyle | undefined\n) => {\n return { ...{ background: withMessagesStyle?.background }, ...messagesStyle }\n};\n\nexport const getEmptyMessageLayoutStyle = (isMobileView: boolean | undefined, activeUser: CometChat.User | undefined) => {\n\n let visibility = { visibility: 'hidden' };\n if (!activeUser && !isMobileView) {\n visibility = { \"visibility\": \"visible\" };\n }\n\n return {\n ...EmptyMessagesDivStyle,\n ...visibility,\n width: `calc(100% - 280px)`\n } as CSSProperties\n}\n\nexport const getMessageInformationStyle = (messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {\n const desktopWidth = messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.width || \"320px\";\n const desktopHeight = messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle.height || \"620px\";\n return {\n ...messagesConfiguration?.messageListConfiguration?.messageInformationConfiguration.messageInformationStyle,\n width: isMobileView ? \"100vw\" : desktopWidth,\n height: isMobileView ? \"100vh\" : desktopHeight,\n }\n}\n","import { CometChatUserEvents, localize } from \"@cometchat/uikit-resources\";\nimport { MessageComposerConfiguration, MessageHeaderConfiguration, MessageListConfiguration, MessagesConfiguration, UsersConfiguration, WithMessagesStyle } from \"@cometchat/uikit-shared\";\nimport { getEmptyMessageLayoutStyle, getLabelStyle, getMessageComposerStyle, getMessageHeaderStyle, getMessagesStyle, getUsersStyle, getUsersWrapperStyles, getWithMessagesMainStyle, getWithMessagesSidebarStyle,getMessageInformationStyle } from \"./style\";\nimport { useCallback, useContext, useState } from \"react\";\n\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatMessages } from \"../CometChatMessages\";\nimport { CometChatThemeContext } from \"../CometChatThemeContext\";\nimport { CometChatUsers } from \"../CometChatUsers\";\nimport { Hooks } from \"./hooks\";\n\ninterface IUsersWithMessagesProps {\n user?: CometChat.User,\n isMobileView?: boolean,\n messageText?: string,\n usersWithMessagesStyle?: WithMessagesStyle,\n messagesConfiguration?: MessagesConfiguration,\n usersConfiguration?: UsersConfiguration,\n onError?: Function,\n}\n\nconst defaultProps: IUsersWithMessagesProps = {\n user: undefined,\n isMobileView: false,\n messageText: \"\",\n usersWithMessagesStyle: {},\n messagesConfiguration: new MessagesConfiguration({}),\n usersConfiguration: new UsersConfiguration({}),\n onError: (error: CometChat.CometChatException) => { console.log(error) },\n};\n\nconst CometChatUsersWithMessages = (props: IUsersWithMessagesProps) => {\n const { theme } = useContext(CometChatThemeContext);\n const {\n user,\n isMobileView,\n messageText,\n usersWithMessagesStyle,\n messagesConfiguration,\n usersConfiguration,\n onError\n } = props;\n\n const [activeUser, setActiveUser] = useState(user ?? undefined);\n\n const onBack = () => setActiveUser(undefined);\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details\n }\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n }, [onError]\n );\n\n const onItemClick = (user: CometChat.User) => setActiveUser(user);\n\n const subscribeToEvents = useCallback(\n () => {\n try {\n const ccUserBlocked = CometChatUserEvents.ccUserBlocked.subscribe(\n (user: CometChat.User) => {\n if (activeUser && activeUser.getUid() === user.getUid()) {\n setActiveUser(user);\n }\n }\n );\n const ccUserUnBlocked = CometChatUserEvents.ccUserUnblocked.subscribe(\n (user: CometChat.User) => {\n if (activeUser && activeUser.getUid() === user.getUid()) {\n setActiveUser(user);\n }\n }\n );\n\n return () => {\n try {\n ccUserBlocked?.unsubscribe();\n ccUserUnBlocked?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n }\n } catch (error: any) {\n onErrorCallback(error);\n }\n }, [activeUser, setActiveUser, onErrorCallback]\n )\n\n function getMessageHeaderConfiguration() {\n\n return {\n ...messagesConfiguration?.messageHeaderConfiguration,\n onBack: messagesConfiguration?.messageHeaderConfiguration?.onBack || onBack,\n hideBackButton: messagesConfiguration?.messageHeaderConfiguration?.hideBackButton || (isMobileView ? false : true),\n messageHeaderStyle: {\n ...getMessageHeaderStyle(usersWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageHeaderConfiguration?.messageHeaderStyle\n },\n } as MessageHeaderConfiguration;\n }\n\n function getMessageListConfiguration() {\n return {\n ...messagesConfiguration?.messageListConfiguration,\n messageInformationConfiguration:{\n messageInformationStyle :{\n ...getMessageInformationStyle(messagesConfiguration,isMobileView)\n }\n }\n } as MessageListConfiguration;\n }\n\n function getMessageComposerConfiguration() {\n return {\n ...messagesConfiguration?.messageComposerConfiguration,\n messageComposerStyle: {\n ...getMessageComposerStyle(usersWithMessagesStyle, messagesConfiguration, isMobileView),\n ...messagesConfiguration?.messageComposerConfiguration?.messageComposerStyle\n }\n } as MessageComposerConfiguration;\n }\n\n const getUsersComponent = () => {\n return (\n \n )\n }\n\n const getSidebarContent = () => {\n return (\n
    \n {getUsersComponent()}\n
    \n )\n }\n\n const getMessagesComponent = () => {\n return (\n \n )\n }\n\n const getMainContent = () => {\n return activeUser ? (\n
    \n {getMessagesComponent()}\n
    \n ) : null;\n }\n\n const getDecoratorMessageContent = () => {\n const text = messageText ? messageText : localize(\"SELECT__USER\");\n return (\n
    \n \n
    \n )\n }\n\n const getDecoratorMessage = () => !activeUser ? getDecoratorMessageContent() : null\n\n Hooks(\n subscribeToEvents,\n user,\n setActiveUser\n );\n\n return (\n
    \n {getSidebarContent()}\n {getMainContent()}\n <>\n {getDecoratorMessage()}\n \n
    \n );\n}\n\nCometChatUsersWithMessages.defaultProps = defaultProps;\nexport { CometChatUsersWithMessages };\n","import { useEffect } from \"react\";\n\nfunction Hooks(\n\tsubscribeToEvents: Function,\n user: any,\n setActiveUser: any,\n) {\n useEffect(\n () => subscribeToEvents(),\n [subscribeToEvents]\n );\n\n useEffect(\n () => {\n setActiveUser(user);\n }, [user, setActiveUser]\n );\n}\n\nexport { Hooks };","import { BaseStyle } from \"@cometchat/uikit-shared\";\n\n/**\n * TabsStyle\n *\n * @property {string} height - The height of the component.\n * @property {string} width - The width of the component.\n * @property {string} border - The border of the component.\n * @property {string} borderRadius - The border radius of the component.\n * @property {string} background - The background color of the component.\n * @property {string} tabListHeight - The height of the tab list.\n * @property {string} tabListWidth - The width of the tab list.\n * @property {string} tabListBorder - The border of the tab list.\n * @property {string} tabListBorderRadius - The border radius of the tab list.\n * @property {string} tabListBackground - The background color of the tab list.\n * @property {string} tabListBoxShadow - The box shadow of the tab list.\n * @property {string} tabListPadding - The padding of the tab list.\n * @property {string} tabPaneWidth - The width of the tab pane.\n * @property {string} tabPaneHeight - The height of the tab pane.\n */\n export class TabsStyle extends BaseStyle {\n tabListHeight?: string = \"100%\";\n tabListWidth?: string = \"100%\";\n tabListBorder?: string = \"0 none\";\n tabListBorderRadius?: string = \"0\";\n tabListBackground?: string = \"transparent\";\n tabListBoxShadow?: string = \"0\";\n tabListPadding?:string = \"0\";\n tabPaneWidth?: string = \"100%\";\n tabPaneHeight?: string = \"100%\";\n constructor(props: Partial) {\n super({})\n Object.assign(this, props);\n }\n}","import { DocumentBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { OptionsStyle } from \"@cometchat/uikit-shared\"\n\nexport class CollaborativeDocumentConfiguration {\n private style: DocumentBubbleStyle;\n private iconURL: string;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: DocumentBubbleStyle, iconURL?: string, optionIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, iconURL, optionIconURL, optionStyle } = configuration;\n this.style = (style as DocumentBubbleStyle);\n this.iconURL = (iconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getDocumentBubbleStyle(): DocumentBubbleStyle{\n return this.style;\n }\n\n getIconURL(): string {\n return this.iconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import { DocumentBubbleStyle } from \"@cometchat/uikit-elements\";\nimport { OptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class CollaborativeWhiteboardConfiguration {\n private style: DocumentBubbleStyle;\n private iconURL: string;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: DocumentBubbleStyle, iconURL?: string, optionIconURL?: string, optionStyle?: OptionsStyle}){\n let { style, iconURL, optionIconURL, optionStyle } = configuration;\n this.style = (style as DocumentBubbleStyle);\n this.iconURL = (iconURL as string);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getWhiteboardBubbleStyle(): DocumentBubbleStyle {\n return this.style;\n }\n\n getIconURL(): string {\n return this.iconURL;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import {\n AcceptButtonStyle,\n DeclineButtonStyle,\n IconStyle,\n IncomingCallButtonsStyle,\n IncomingCallLabelStyle,\n IncomingCallListItemStyle,\n IncomingCallSubtitleStyle,\n IncomingCallTailViewStyle,\n IncomingCallWrapperStyle,\n defaultAvatarStyle,\n defaultIncomingCallStyle,\n defaultListItemStyle,\n defaultOngoingCallStyle,\n} from \"./style\";\nimport { AvatarStyle, ListItemStyle } from \"@cometchat/uikit-elements\";\nimport {\n CometChatCallEvents,\n CometChatUIKitConstants,\n localize,\n} from \"@cometchat/uikit-resources\";\nimport {\n CometChatSoundManager,\n CometChatUIKitCalls,\n IncomingCallStyle,\n StorageUtils,\n} from \"@cometchat/uikit-shared\";\nimport { useCallback, useContext, useRef, useState } from \"react\";\n\nimport AudioCallIcon from \"./assets/Audio-Call.svg\";\nimport { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatOngoingCall } from \"../CometChatOngoingCall\";\nimport { CometChatThemeContext } from \"../../CometChatThemeContext\";\nimport { Hooks } from \"./hooks\";\nimport VideoCallIcon from \"./assets/Video-call.svg\";\n\ninterface IIncomingCallProps {\n call?: any;\n disableSoundForCalls?: boolean;\n customSoundForCalls?: string;\n onAccept?: Function;\n onDecline?: Function;\n acceptButtonText?: string;\n declineButtonText?: string;\n subtitleView?: any;\n onError?: Function;\n listItemStyle?: ListItemStyle;\n avatarStyle?: AvatarStyle;\n incomingCallStyle?: IncomingCallStyle;\n}\n\nconst CometChatIncomingCall = (props: IIncomingCallProps) => {\n const {\n call,\n disableSoundForCalls = false,\n customSoundForCalls = \"\",\n onAccept,\n onDecline,\n acceptButtonText = localize(\"ACCEPT\"),\n declineButtonText = localize(\"DECLINE\"),\n subtitleView = null,\n listItemStyle = {\n height: \"100%\",\n width: \"100%\",\n },\n avatarStyle = {\n borderRadius: \"16px\",\n width: \"38px\",\n height: \"38px\",\n },\n incomingCallStyle = {\n width: \"fit-content\",\n height: \"fit-content\",\n },\n onError = (error: CometChat.CometChatException) => {\n console.log(error);\n },\n } = props;\n\n const { theme } = useContext(CometChatThemeContext);\n\n const [loggedInUser, setLoggedInuser] = useState(null);\n const [showIncomingCallScreen, setShowIncomingCallScreen] = useState(false);\n const [showOngoingCallScreen, setShowOngoingCallScreen] = useState(false);\n const [showOutGoingCallScreen, setShowOutGoingCallScreen] = useState(false);\n\n const listItemStyleRef = useRef(null);\n const avatarStyleRef = useRef(null);\n const incomingCallStyleRef = useRef(null);\n const callRef = useRef(null);\n const sessionIdRef = useRef(\"\");\n const rejectCallButtonRef = useRef(null);\n const acceptCallButtonRef = useRef(null);\n\n avatarStyleRef.current = { ...defaultAvatarStyle(theme), ...avatarStyle };\n\n incomingCallStyleRef.current = {\n ...defaultIncomingCallStyle(theme),\n ...incomingCallStyle,\n };\n\n listItemStyleRef.current = {\n ...defaultListItemStyle(incomingCallStyleRef?.current, theme),\n ...listItemStyle,\n };\n\n const acceptButtonStyleRef = useRef({});\n\n acceptButtonStyleRef.current = AcceptButtonStyle(\n incomingCallStyleRef?.current\n );\n\n const declineButtonStyleRef = useRef({});\n\n declineButtonStyleRef.current = DeclineButtonStyle(\n incomingCallStyleRef?.current\n );\n\n const ongoingCallStyleRef = useRef({});\n ongoingCallStyleRef.current = { ...defaultOngoingCallStyle(theme) };\n\n const iconStyleRef = useRef(null);\n\n iconStyleRef.current = IconStyle(incomingCallStyleRef?.current);\n\n let incomingcallListenerId: string = \"incomingcall_\" + new Date().getTime(),\n subtitleText: string = localize(\"INCOMING_CALL\");\n\n const onErrorCallback = useCallback(\n (error: any) => {\n if (!(error instanceof CometChat.CometChatException)) {\n let errorModel = {\n code: error?.code,\n name: error?.name,\n message: error?.message,\n details: error?.details,\n };\n let errorObj = new CometChat.CometChatException(errorModel);\n onError!(errorObj);\n } else {\n onError!(error);\n }\n },\n [onError]\n );\n\n const playAudio = useCallback(() => {\n try {\n if (customSoundForCalls) {\n CometChatSoundManager.play(\n CometChatSoundManager.Sound.incomingCall,\n customSoundForCalls\n );\n } else {\n CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n }, [customSoundForCalls, onErrorCallback]);\n\n const isCallActive = useCallback(\n (call: CometChat.Call) => {\n let isCurrentCall: boolean = false;\n try {\n if (StorageUtils.getItem(CometChatUIKitConstants.calls.activecall)) {\n let oldCall: any = StorageUtils.getItem(\n CometChatUIKitConstants.calls.activecall\n );\n if (oldCall && oldCall.sessionId === call.getSessionId()) {\n isCurrentCall = true;\n } else {\n isCurrentCall = false;\n }\n } else {\n isCurrentCall = false;\n }\n return isCurrentCall;\n } catch (e) {\n onErrorCallback(e);\n return isCurrentCall;\n }\n },\n [onErrorCallback]\n );\n\n const rejectIncomingCall = useCallback(\n (reason: string = CometChatUIKitConstants.calls.rejected) => {\n try {\n CometChatSoundManager.pause();\n if (onDecline) {\n onDecline();\n } else if (typeof callRef?.current?.getSessionId() === \"string\") {\n CometChat.rejectCall(callRef?.current?.getSessionId(), reason).then(\n (rejectedCall: CometChat.Call) => {\n StorageUtils.setItem(\n CometChatUIKitConstants.calls.activecall,\n rejectedCall\n );\n CometChatCallEvents.ccCallRejected.next(rejectedCall);\n setShowIncomingCallScreen(false);\n callRef.current = null;\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [onDecline, onErrorCallback]\n );\n\n const showCall = useCallback(\n (call: CometChat.Call) => {\n try {\n if (\n !isCallActive(call) &&\n loggedInUser?.getUid() !== call?.getSender()?.getUid() &&\n callRef.current\n ) {\n if (\n !disableSoundForCalls &&\n !showOngoingCallScreen &&\n !showOutGoingCallScreen\n ) {\n setTimeout(() => {\n playAudio();\n }, 100);\n }\n if (!showOngoingCallScreen && !showOutGoingCallScreen) {\n setShowIncomingCallScreen(true);\n } else if (showOngoingCallScreen || showOutGoingCallScreen) {\n CometChatSoundManager.pause();\n rejectIncomingCall(CometChatUIKitConstants.calls.busy);\n CometChatCallEvents.ccCallRejected.next(call);\n }\n } else if (loggedInUser?.getUid() === call?.getSender()?.getUid()) {\n CometChatSoundManager.pause();\n return;\n } else {\n CometChatSoundManager.pause();\n rejectIncomingCall(CometChatUIKitConstants.calls.busy);\n }\n } catch (e) {\n onErrorCallback(e);\n }\n },\n [\n isCallActive,\n disableSoundForCalls,\n playAudio,\n rejectIncomingCall,\n onErrorCallback,\n loggedInUser,\n showOngoingCallScreen,\n showOutGoingCallScreen,\n ]\n );\n\n const localStorageChange = useCallback((event: any) => {\n if (event?.key !== CometChatUIKitConstants.calls.activecall) {\n return;\n }\n if (event.newValue || event.oldValue) {\n let call;\n if (event.newValue) {\n call = JSON.parse(event.newValue);\n } else if (event.oldValue) {\n call = JSON.parse(event.oldValue);\n }\n if (callRef.current?.getSessionId() === call?.sessionId) {\n CometChatSoundManager.pause();\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n }\n return;\n }, []);\n\n const closeCallScreen = () => {\n setShowOngoingCallScreen(false);\n setShowOutGoingCallScreen(false)\n callRef.current = null;\n sessionIdRef.current = \"\";\n };\n\n const subscribeToEvents = useCallback(() => {\n try {\n const ccCallEnded = CometChatCallEvents.ccCallEnded.subscribe(\n (call: CometChat.Call) => {\n closeCallScreen();\n }\n \n );\n\n const ccOutgoingCall = CometChatCallEvents.ccOutgoingCall.subscribe(\n () => {\n setShowOutGoingCallScreen(true);\n }\n );\n\n return () => {\n try {\n ccCallEnded?.unsubscribe();\n ccOutgoingCall?.unsubscribe();\n } catch (error: any) {\n onErrorCallback(error);\n }\n };\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const attachListeners = useCallback(() => {\n try {\n StorageUtils.attachChangeDetection(localStorageChange);\n CometChat.addCallListener(\n incomingcallListenerId,\n new CometChat.CallListener({\n onIncomingCallReceived: (call: CometChat.Call) => {\n if (callRef.current?.getSender()?.getUid() === call.getSender()?.getUid()){\n return;\n }\n callRef.current = call;\n showCall(call);\n },\n onIncomingCallCancelled: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n callRef.current = null;\n setShowIncomingCallScreen(false);\n },\n onOutgoingCallAccepted: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n if (call.getSender()?.getUid() === loggedInUser?.getUid()) {\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n },\n onOutgoingCallRejected: (call: CometChat.Call) => {\n CometChatSoundManager.pause();\n if (call.getSender()?.getUid() === loggedInUser?.getUid()){\n callRef.current = null;\n setShowIncomingCallScreen(false);\n }\n }\n })\n );\n } catch (e) {\n onErrorCallback(e);\n }\n }, [localStorageChange, showCall, onErrorCallback, incomingcallListenerId,loggedInUser]);\n\n const removeListener = useCallback(() => {\n try {\n StorageUtils.detachChangeDetection(localStorageChange);\n CometChat.removeCallListener(incomingcallListenerId);\n } catch (e) {\n onErrorCallback(e);\n }\n }, [localStorageChange, onErrorCallback, incomingcallListenerId]);\n\n const checkForActiveCallAndEndCall = useCallback(() => {\n try {\n let call: CometChat.Call = CometChat.getActiveCall();\n return new Promise((resolve, reject) => {\n if (!call) {\n return resolve({ success: true });\n }\n let sessionID = call?.getSessionId();\n CometChat.endCall(sessionID).then(\n (response: CometChat.Call | null) => {\n return resolve(response);\n },\n (error: CometChat.CometChatException) => {\n return reject(error);\n }\n );\n });\n } catch (e) {\n onErrorCallback(e);\n }\n }, [onErrorCallback]);\n\n const acceptIncomingCall = useCallback(() => {\n try {\n CometChatSoundManager.pause();\n if (onAccept) {\n onAccept();\n } else {\n checkForActiveCallAndEndCall()?.then(\n (response) => {\n CometChat.acceptCall(callRef.current!.getSessionId()).then(\n (call: CometChat.Call) => {\n CometChatCallEvents.ccCallAccepted.next(call);\n StorageUtils.setItem(\n CometChatUIKitConstants.calls.activecall,\n call\n );\n setShowOngoingCallScreen(true);\n callRef.current = call;\n sessionIdRef.current = call?.getSessionId();\n setShowIncomingCallScreen(false);\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n },\n (error: CometChat.CometChatException) => {\n onErrorCallback(error);\n }\n );\n }\n } catch (e) { }\n }, [checkForActiveCallAndEndCall, onErrorCallback, onAccept]);\n\n function getCallBuilder(): typeof CometChatUIKitCalls.CallSettings {\n let audioOnlyCall: boolean =\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ? true\n : false;\n if (callRef.current?.getType() === CometChatUIKitConstants.calls.meeting) {\n return undefined;\n }\n\n const callSettings = new CometChatUIKitCalls.CallSettingsBuilder()\n .enableDefaultLayout(true)\n .setIsAudioOnlyCall(audioOnlyCall)\n .setCallListener(\n new CometChatUIKitCalls.OngoingCallListener({\n onCallEnded: () => {\n if (\n callRef.current?.getReceiverType() ===\n CometChatUIKitConstants.MessageReceiverType.user\n ) {\n CometChat.endCall(sessionIdRef.current)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(null as any);\n closeCallScreen();\n })\n .catch((err: CometChat.CometChatException) => { });\n }\n },\n onCallEndButtonPressed: () => {\n CometChat.endCall(sessionIdRef.current)\n .then((call: CometChat.Call) => {\n CometChatUIKitCalls.endSession();\n CometChatCallEvents.ccCallEnded.next(call);\n })\n .catch((err: CometChat.CometChatException) => { });\n },\n onError: (error: any) => {\n onErrorCallback(error);\n },\n })\n ).build();\n return callSettings;\n }\n\n const getCallTypeIcon = () => {\n if (\n callRef.current?.getType() === CometChatUIKitConstants.MessageTypes.audio\n ) {\n return AudioCallIcon;\n } else {\n return VideoCallIcon;\n }\n };\n\n Hooks(\n loggedInUser,\n setLoggedInuser,\n call,\n subscribeToEvents,\n attachListeners,\n removeListener,\n acceptCallButtonRef,\n rejectCallButtonRef,\n showCall,\n callRef,\n acceptIncomingCall,\n rejectIncomingCall,\n showIncomingCallScreen\n );\n return (\n <>\n {callRef.current && showIncomingCallScreen ? (\n \n \n \n {subtitleView ? (\n \n {subtitleView}\n \n ) : (\n \n
    \n \n
    \n \n \n )}\n\n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n ) : null}\n\n {showOngoingCallScreen && callRef.current && !showIncomingCallScreen ? (\n \n ) : null}\n \n );\n};\n\nexport { CometChatIncomingCall };\n","import { CometChat } from \"@cometchat/chat-sdk-javascript\";\nimport { CometChatUIKitConstants } from \"@cometchat/uikit-resources\";\nimport { useEffect } from \"react\";\n\nfunction Hooks(\n loggedInUser: any,\n\tsetLoggedInUser: any,\n call: CometChat.Call,\n\tsubscribeToEvents: Function,\n attachListeners: Function,\n removeListener: Function,\n acceptCallButtonRef: any,\n rejectCallButtonRef: any,\n showCall: any,\n callRef: any,\n acceptIncomingCall: Function,\n rejectIncomingCall: Function,\n showIncomingCallScreen: boolean\n) {\n useEffect(\n () => {\n CometChat.getLoggedinUser().then(\n (user: CometChat.User | null)=>{\n if(user){\n setLoggedInUser(user);\n }\n }\n )\n }, [setLoggedInUser]\n );\n\n useEffect(\n () => {\n let unsubscribeFromEvents : () => void;\n if(loggedInUser){\n unsubscribeFromEvents = subscribeToEvents();\n attachListeners();\n }\n return () => {\n removeListener();\n unsubscribeFromEvents?.();\n }\n }, [loggedInUser, attachListeners, removeListener, subscribeToEvents]\n )\n\n useEffect(\n () => {\n if (call) {\n callRef.current = call;\n showCall(callRef.current);\n }\n }, [call, callRef, showCall]\n )\n\n useEffect(\n () => {\n const acceptCallButton = acceptCallButtonRef?.current;\n const rejectCallButton = rejectCallButtonRef?.current;\n\n if(!acceptCallButton && !rejectCallButton) return;\n\n const acceptCall = () => {\n acceptIncomingCall();\n }\n const rejectCall = () => {\n rejectIncomingCall(CometChatUIKitConstants.calls.rejected);\n }\n \n if(showIncomingCallScreen){\n acceptCallButton?.addEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.addEventListener(\"cc-button-clicked\", rejectCall);\n }else{\n acceptCallButton?.removeEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.removeEventListener(\"cc-button-clicked\", rejectCall);\n }\n return () => {\n acceptCallButton?.removeEventListener(\"cc-button-clicked\", acceptCall);\n rejectCallButton?.removeEventListener(\"cc-button-clicked\", rejectCall);\n }\n }, [showIncomingCallScreen, acceptIncomingCall, rejectIncomingCall, acceptCallButtonRef, rejectCallButtonRef]\n );\n\n}\n\nexport { Hooks };","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FCall%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FCall%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22streamline-icon-phone-actions-voice-mail%4024x24%22%20transform%3D%22translate%283.000000%2C%203.000000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M0.0679824131%2C6.18726899%20L1.15322891%2C7.27252708%20C1.71745406%2C7.8368527%202.48276427%2C8.15389548%203.28076591%2C8.15389548%20C4.07876755%2C8.15389548%204.84407776%2C7.8368527%205.40830291%2C7.27252708%20L7.00415829%2C5.67746515%20C7.28631808%2C5.39534955%207.44483777%2C5.01269036%207.44483777%2C4.61368527%20C7.44483777%2C4.21468018%207.28631808%2C3.83202099%207.00415829%2C3.5499054%20L3.90079098%2C0.446504908%20C3.59388219%2C0.136593264%203.16773676%2C-0.025114152%202.73249452%2C0.00317689658%20C2.29725227%2C0.0314679452%201.89562592%2C0.246981102%201.63141818%2C0.594015717%20C-1.61783738%2C5.00961401%200.349222543%2C9.660257%204.34493966%2C13.6552063%20C8.34065677%2C17.6501557%2012.9904395%2C19.6180471%2017.4059906%2C16.3687568%20C17.7530215%2C16.1045463%2017.9685324%2C15.7029156%2017.9968231%2C15.2676687%20C18.0251139%2C14.8324218%2017.8634082%2C14.4062718%2017.5534999%2C14.0993598%20L14.450943%2C10.9959593%20C14.1688305%2C10.7137965%2013.7861754%2C10.5552751%2013.3871745%2C10.5552751%20C12.9881737%2C10.5552751%2012.6055186%2C10.7137965%2012.323406%2C10.9959593%20L10.7275507%2C12.5918317%20C10.1632311%2C13.1560629%209.8461917%2C13.9213813%209.8461917%2C14.7193915%20C9.8461917%2C15.5174016%2010.1632311%2C16.28272%2010.7275507%2C16.8469512%20L11.8249545%2C17.9443668%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","export default \"data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%2024%2024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%3Ctitle%3EIcons%2F24%2FVideo%402x%3C%2Ftitle%3E%20%20%20%20%3Cg%20id%3D%22Icons%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Icons%2F24%2FVideo%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Group%22%20transform%3D%22translate%282.000000%2C%206.500000%29%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M1.79471961%2C-7.25088203e-17%20L11.9552804%2C7.25088203e-17%20C12.5793435%2C-4.21297127e-17%2012.8056439%2C0.0649779267%2013.033792%2C0.186992889%20C13.2619401%2C0.309007852%2013.4409921%2C0.488059851%2013.5630071%2C0.716207995%20C13.6850221%2C0.94435614%2013.75%2C1.1706565%2013.75%2C1.79471961%20L13.75%2C9.20528039%20C13.75%2C9.8293435%2013.6850221%2C10.0556439%2013.5630071%2C10.283792%20C13.4409921%2C10.5119401%2013.2619401%2C10.6909921%2013.033792%2C10.8130071%20C12.8056439%2C10.9350221%2012.5793435%2C11%2011.9552804%2C11%20L1.79471961%2C11%20C1.1706565%2C11%200.94435614%2C10.9350221%200.716207995%2C10.8130071%20C0.488059851%2C10.6909921%200.309007852%2C10.5119401%200.186992889%2C10.283792%20C0.0649779267%2C10.0556439%209.39485689e-17%2C9.8293435%20-1.61693481e-16%2C9.20528039%20L4.83392135e-17%2C1.79471961%20C-2.80864751e-17%2C1.1706565%200.0649779267%2C0.94435614%200.186992889%2C0.716207995%20C0.309007852%2C0.488059851%200.488059851%2C0.309007852%200.716207995%2C0.186992889%20C0.94435614%2C0.0649779267%201.1706565%2C4.21297127e-17%201.79471961%2C-7.25088203e-17%20Z%22%20id%3D%22Rectangle%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M17.2599167%2C8.63041667%20L19.6304167%2C9.81475%20C19.8435282%2C9.92114296%2020.096526%2C9.90964554%2020.299109%2C9.78436146%20C20.5016921%2C9.65907738%2020.625%2C9.43785985%2020.625%2C9.19966667%20L20.625%2C1.80033333%20C20.625%2C1.56214015%2020.5016921%2C1.34092262%2020.299109%2C1.21563854%20C20.096526%2C1.09035446%2019.8435282%2C1.07885704%2019.6304167%2C1.18525%20L17.2599167%2C2.36958333%20C16.7940465%2C2.60259636%2016.4998441%2C3.07885646%2016.4999999%2C3.59975%20L16.4999999%2C7.40025%20C16.4998441%2C7.92114354%2016.7940465%2C8.39740364%2017.2599167%2C8.63041667%20Z%22%20id%3D%22Path%22%3E%3C%2Fpath%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E\"","import { ConfirmDialogStyle } from \"@cometchat/uikit-elements\";\nimport { BaseStyle, ImageModerationStyle } from \"@cometchat/uikit-shared\";\n\nexport class ImageModerationConfiguration {\n private style: ImageModerationStyle;\n private confirmDialogStyle: ConfirmDialogStyle;\n private backDropStyle: BaseStyle;\n\n constructor(configuration: {\n style?: ImageModerationStyle, \n confirmDialogStyle?: ConfirmDialogStyle;\n backDropStyle?: BaseStyle;\n }) {\n this.style = configuration.style as ImageModerationStyle;\n this.confirmDialogStyle = configuration.confirmDialogStyle as ConfirmDialogStyle;\n this.backDropStyle = configuration.backDropStyle as BaseStyle;\n }\n\n getImageModerationStyle(): ImageModerationStyle{\n return this.style;\n }\n\n getConfirmDialogSyle(): ConfirmDialogStyle{\n return this.confirmDialogStyle;\n }\n \n getBackDropStyle(): BaseStyle{\n return this.backDropStyle;\n }\n\n}","import { LinkPreviewStyle } from \"@cometchat/uikit-shared\";\n\nexport class LinkPreviewConfiguration {\n private style: LinkPreviewStyle;\n\n constructor(configuration: {style?: LinkPreviewStyle}){\n this.style = (configuration.style as LinkPreviewStyle);\n }\n\n getLinkPreviewStyle(): LinkPreviewStyle{\n return this.style;\n }\n\n}","import { MessageTranslationStyle, OptionsStyle } from \"@cometchat/uikit-shared\";\n\nexport class MessageTranslationConfiguration {\n private style: MessageTranslationStyle;\n private optionIconURL: string;\n private optionStyle: OptionsStyle;\n\n constructor(configuration: {style?: MessageTranslationStyle, optionIconURL?: string, optionStyle?: OptionsStyle}) {\n let { style, optionIconURL, optionStyle } = configuration;\n this.style = (style as MessageTranslationStyle);\n this.optionIconURL = (optionIconURL as string);\n this.optionStyle = (optionStyle as OptionsStyle);\n }\n\n getMessageTranslationStyle(): MessageTranslationStyle {\n return this.style;\n }\n\n getOptionIconURL(): string {\n return this.optionIconURL;\n }\n\n getOptionStyle(): OptionsStyle {\n return this.optionStyle;\n }\n\n}","import { SmartRepliesStyle } from \"@cometchat/uikit-shared\";\n\nexport class SmartRepliesConfiguration {\n private style: SmartRepliesStyle;\n\n constructor(configuration: {style?: SmartRepliesStyle}){\n this.style = (configuration.style as SmartRepliesStyle);\n }\n\n getSmartRepliesStyle(): SmartRepliesStyle{\n return this.style;\n }\n\n}","import { StickersStyle } from \"@cometchat/uikit-shared\";\n\nexport class StickersConfiguration {\n private style: StickersStyle;\n private stickerIconURL: string;\n private closeIconURL: string;\n\n constructor(configuration: {style?: StickersStyle, stickerIconURL?: string, closeIconURL?: string}){\n let { style, stickerIconURL, closeIconURL } = configuration;\n this.style = (style as StickersStyle);\n this.stickerIconURL = (stickerIconURL as string);\n this.closeIconURL = (closeIconURL as string);\n }\n\n getStickersStyle(): StickersStyle {\n return this.style;\n }\n\n getStickerIconURL(): string {\n return this.stickerIconURL;\n }\n\n getCloseIconURL(): string {\n return this.closeIconURL;\n }\n\n}"],"names":["process","env","NODE_ENV","jsxRuntimeModule","exports","f","require$$0","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","reactJsxRuntime_production_min","jsx","jsxs","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","ReactSharedInternals","error","format","_len2","arguments","length","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","apply","console","printWarning","REACT_MODULE_REFERENCE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","getContextName","displayName","getComponentNameFromType","tag","name","_context","outerType","innerType","wrapperName","functionName","getWrappedName","render","outerName","lazyComponent","payload","_payload","init","_init","x","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","assign","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","undefined","Error","match","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","get","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","log","info","warn","group","groupCollapsed","groupEnd","configurable","enumerable","value","writable","defineProperties","disableLogs","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","s","_frame","replace","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","isReactComponent","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","_source","setExtraStackFrame","isArrayImpl","isArray","testStringCoercion","checkKeyStringCoercion","willCoercionThrow","toStringTag","constructor","typeName","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","ReactElement","self","_store","freeze","jsxDEV","config","maybeKey","propName","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","hasValidRef","stateNode","componentName","warnIfStringRefCannotBeAutoConverted","warnAboutAccessingKey","defineKeyPropWarningGetter","warnAboutAccessingRef","defineRefPropWarningGetter","propTypesMisspellWarningShown","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","isValidElement","object","getDeclarationErrorAddendum","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","maybeIterable","maybeIterator","getIteratorFn","entries","step","next","done","validatePropTypes","propTypes","typeSpecs","values","location","has","bind","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","jsxWithValidation","isStaticChildren","validType","getModuleId","isValidElementType","keys","typeString","sourceInfo","fileName","lineNumber","getSourceInfoErrorAddendum","children","fragment","validateFragmentProps","reactJsxRuntime_development","Fragment","listStyle","usersStyleObject","theme","ListStyle","width","height","background","border","borderRadius","titleTextFont","fontHelper","typography","title1","titleTextColor","palette","getAccent","searchPlaceholderTextFont","subtitle1","searchPlaceholderTextColor","getAccent500","searchTextFont","searchTextColor","searchBorder","searchBorderRadius","searchBackground","getAccent50","searchIconTint","separatorColor","getAccent400","loadingIconTint","getAccent600","emptyStateTextFont","heading","emptyStateTextColor","errorStateTextFont","errorStateTextColor","sectionHeaderTextFont","caption1","sectionHeaderTextColor","UsersWrapperStyle","boxSizing","position","getBackground","overflow","listItemStyle","listItemStyleObject","ListItemStyle","activeBackground","getAccent100","titleFont","title2","titleColor","getAccent200","hoverBackground","avatarStyle","avatarStyleObject","AvatarStyle","backgroundColor","getAccent700","nameTextColor","getAccent900","backgroundSize","nameTextFont","outerViewBorderWidth","outerViewBorderRadius","outerViewBorderColor","outerViewBorderSpacing","statusIndicatorStyle","statusIndicatorStyleObject","useRefSync","res","useRef","useStateRef","initialValue","state","setState","useState","useCallback","useCometChatErrorHandler","onError","onErrorRef","errorHandler","CometChat","CometChatException","code","CometChatCheckbox","labelText","checked","disabled","checkboxStyle","onChange","onChangePropRef","useEffect","checkboxElement","eventName","handleEvent","addEventListener","removeEventListener","Hooks","_jsx","styleObject","stylePropName","JSON","stringify","listWrapperStyle","boxShadow","display","flexDirection","headerStyle","emptyTitle","flexShrink","padding","titleStyle","titleAlignment","textAlign","TitleAlignment","left","font","color","searchInputStyle","placeholderTextFont","placeholderTextColor","loaderStyle","iconTint","sectionHeaderStyle","errorLabelStyle","textFont","textColor","emptyLabelStyle","getKeyValue","keyValue","result","id","CometChatList","genericMemo","memo","title","hideSearch","searchText","onSearch","searchPlaceholderText","searchIconURL","list","listItem","showSectionHeader","sectionHeaderKey","listItemKey","onScrolledToBottom","onScrolledToTop","loadingView","loadingIconURL","hideError","errorStateView","errorStateText","emptyStateView","emptyStateText","scrollToBottom","scrolledUpCallback","searchInputElement","setSearchInputRef","intersectionObserverRootRef","intersectionObserverTopTargetRef","intersectionObserverBottomTargetRef","didComponentScrollToBottomRef","timeoutIdRef","scrollHeightTupleRef","didTopObserverCallbackRunRef","onScrolledToTopRef","onScrolledToBottomRef","onSearchRef","handleSearchChanged","newSearchText","detail","window","clearTimeout","setTimeout","stopCallingOnScrolledToBottomCallback","rootElement","targetElement","observer","IntersectionObserver","async","entry","relevantEntry","isIntersecting","scrollHeight","clientHeight","Promise","all","root","threshold","observe","unobserve","stopCallingOnScrolledToTopCallback","Math","round","scrollTop","max","scrollIntoView","_jsxs","className","style","placeholderText","paddingTop","overflowX","States","loading","empty","currrentSectionHeader","itemIdx","listSectionJSX","itemSectionHeader","toUpperCase","sectionHeaderJSX","getList","loadingViewJSX","justifyContent","alignItems","iconURL","getLoadingView","errorViewJSX","text","labelStyle","getErrorView","emptyViewJSX","getEmptyView","loaded","getStateView","LoadingIcon$3","CometChatListItem","avatarURL","avatarName","statusIndicatorColor","statusIndicatorIcon","isActive","subtitleView","tailView","menuView","hideSeparator","onClick","subtitleViewClassName","tailViewClassName","menuViewClassName","LoadingIcon","userPresencePlacement","UserPresencePlacement","bottom","getClassNamePropSpreadObject","getStylePropSpreadObject","onListItemClickPropRef","listItemElement","slot","CometChatMenuList","data","moreIconURL","topMenuSize","menuListStyle","onOptionClick","onOptionClickPropRef","idToOnClickMapRef","idToOnClickMap","menuListElement","event","option","CometChatUIKitUtility","clone","CometChatRadioButton","radioButtonStyle","radioBtnElement","CometChatThemeContext","createContext","CometChatTheme","UsersManager","usersRequestBuilder","searchRequestBuilder","usersSearchText","currentUsersRequestBuilder","this","getDefaultRequestBuilder","setSearchKeyword","usersRequest","build","UsersRequestBuilder","setLimit","defaultLimit","fetchNext","getCurrentPage","pagination","current_page","atttachListeners","cb","listenerId","Date","now","userListener","UserListener","onUserOnline","onUserOffline","addUserListener","removeUserListener","attachConnestionListener","callback","addConnectionListener","ConnectionListener","onConnected","onDisconnected","removeConnectionListener","SearchIcon$5","SpinnerIcon$7","MessageBubbleAlignmentStyles","alignment","MessageBubbleAlignment","flex","MessageBubbleTitleStyles","MessageOptionsStyles","headerView","top","right","zIndex","menuListStyles","submenuWidth","submenuHeight","submenuBorder","submenuBorderRadius","submenuBackground","moreIconTint","subMenuStyle","showSubMenu","listStyleType","marginTop","moreButtonStyle","ContextMenuStyle","buttonIconTint","menuButtonStyle","isSubMenu","menuData","buttonTextFont","buttonTextColor","popoverStyle","CometChatButton","hoverText","buttonStyle","childRefCallback","onClickPropRef","buttonElement","CometChatContextMenu","useContext","setShowSubMenu","moreButtonRef","menuButtonRefArray","moreIconHoverText","onOptionClicked","placement","handleMenuClick","getMoreButton","getMenu","menu","index","menuButton","moreButton","CometChatActionsView","customView","el","closeCallback","getTopMenu","slice","getSubMenu","closeContentView","margin","MoreIcon$1","CometChatMessageBubble","leadingView","replyView","contentView","bottomView","threadView","footerView","statusInfoView","options","messageBubbleStyle","BaseStyle","MoreIcon","setRef","contentStyle","messageRef","isHovering","setIsHovering","timeoutId","forEach","CometChatActionsIcon","parseInt","getPlacementAlignment","isMobile","checkBubblePosition","Placement","innerWidth","bubble","rect","getBoundingClientRect","isAtTop","innerHeight","isAtBottom","maxWidth","gap","onMouseEnter","onMouseLeave","alignSelf","getLeadingView","getMessageOptions","getHeaderView","MessageUtils","currentUser","getDeletedAt","getCategory","CometChatUIKitConstants","MessageCategory","getType","MessageTypes","getSender","getUid","audio","groupMember","getPrimary","getContentView","template","view","messageTypesMap","category","html","getBubbleWrapper","bubbleView","getMessageBubble","baseMessage","getId","getMuid","getUserStatusVisible","user","userBlockedFlag","User","GroupMember","getBlockedByMe","getHasBlockedMe","getStatus","userStatusType","offline","stateReducer","action","newState","users","removeOldUsers","disableLoadingState","userList","usersManager","onEmpty","fetchState","targetUser","targetUserUid","targetIdx","findIndex","isFirstReload","CometChatUsers","localize","tileAlignment","SearchIcon","listItemView","loadingStateView","SpinnerIcon","disableUsersPresence","menus","selectionMode","SelectionMode","none","onSelect","onItemClick","usersStyle","activeUser","searchKeyword","fetchingUsers","fetchTimeOut","dispatch","useReducer","usersManagerRef","fetchNextIdRef","attachListenerOnFetch","isConnectionReestablished","isJustMounted","fetchNextAndAppendUsers","fetchId","initialState","newUsers","requestBuilder","trimmedText","updateUser","getDefaultListItemTailView","single","multiple","tailViewContent","paddingRight","getDefaultListItemMenuView","curOptions","getStatusIndicatorColor","onlineStatusColor","getSuccess","subUserBlocked","CometChatUserEvents","ccUserBlocked","subscribe","subUserUnblocked","ccUserUnblocked","unsubscribe","getAvatar","getName","groupMembersWrapperStyle","groupMemberSyleObject","groupMemberStyleObject","defaultBackBtnStyle","backButtonIconTint","closeBtnStyle","closeButtonIconTint","scopeLabelStyle","groupScopeStyleObject","LabelStyle","groupMembersStyle","MenuListStyle","groupScopeStyle","ChangeScopeStyle","activeTextFont","activeTextColor","activeTextBackground","arrowIconTint","optionBackground","optionBorder","optionBorderRadius","hoverTextFont","hoverTextColor","hoverTextBackground","buttonBackground","closeIconTint","getBackdropStyle","groupsMembersStyle","DownArrowIcon","GroupMembersManager","groupMemberRequestBuilder","groupGuid","groupMembersSearchText","finalGroupRequestBuilder","GroupMembersRequestBuilder","groupMembersRequest","attachUserListener","createParticipantGroupMember","groupMemberScope","participant","setName","setGuid","getGuid","setUid","attachGroupListener","addGroupListener","GroupListener","onGroupMemberScopeChanged","changedUser","newScope","oldScope","changedGroup","groupMemberUid","onGroupMemberKicked","kickedUser","kickedBy","kickedFrom","onGroupMemberBanned","bannedUser","bannedBy","bannedFrom","onMemberAddedToGroup","userAdded","userAddedBy","userAddedIn","onGroupMemberLeft","leavingUser","onGroupMemberJoined","joinedUser","joinedGroup","removeGroupListener","SearchIcon$4","backbutton$2","SpinnerIcon$6","groupMembers","groupMembersManager","groupMemberList","targetUid","filter","groupMemberToChangeScopeOf","updatedGroupMember","setStatus","setScope","CometChatGroupMembers","backButtonIconURL","backbutton","showBackButton","onBack","center","searchPlaceholder","errorSateView","dropDownIconURL","closeButtonIconURL","onClose","groupMembersManagerRef","loggedInUserRef","changeScopeElement","setChangeScopeRef","groupPropRef","onSearchTextChange","fetchNextAndAppendGroupMembers","createActionMessage","actionOn","loggedInUser","actionMessage","Action","MessageReceiverType","setAction","setActionBy","setSender","setMessage","setActionFor","setActionOn","setReceiver","setConversationId","setMuid","ID","setSentAt","getUnixTimestamp","setReceiverType","setRawData","extras","scope","new","getScope","banGroupMember","currentGroup","groupClone","setMembersCount","getMembersCount","CometChatGroupEvents","ccGroupMemberBanned","groupMemberAction","BANNED","kickGroupMember","ccGroupMemberKicked","KICKED","updateGroupMemberScope","newScopeCasted","ccGroupMemberScopeChanged","scopeChangedFrom","scopeChangedTo","SCOPE_CHANGE","updatedUser","handleActionOnGroupMember","GroupMemberOptions","ban","kick","changeScope","groupMemberOptions","getSelectionInput","getDefaultTailOptionsView","getDefaultTailView","GroupMemberUtils","getViewMemberOptions","columnGap","getDefaultListItemView","getLoggedinUser","changeScopeClosedEventName","scopeChangedEventName","handleChangeScopeClose","handleScopeChange","groupMemberKickedSub","groupMemberBannedSub","groupMemberChangeScopeSub","groupMemberAddedSub","ccGroupMemberAdded","usersAdded","cursor","groupMemberAllowedScopes","allowScopeChange","backdropStyle","arrowIconURL","changeScopeStyle","getGroupMemberScopeChangeModal","CometChatUserMemberWrapper","userMemberListType","UserMemberListType","loadingIconUrl","getAccent300","minHeight","groupmembers","entity","_Fragment","t","Set","o","HTMLElement","removeAttribute","delete","r","tagName","elementClass","events","react","Component","u","createElement","v","super","componentDidMount","componentDidUpdate","_$Gl","suppressHydrationWarning","forwardRef","TextMessageBubble","createComponent","CometChatTextBubble","ImageMessageBubble","CometChatImageBubble","ccImageClicked","AudioMessageBubble","CometChatAudioBubble","VideoMessageBubble","CometChatVideoBubble","FileMessageBubble","CometChatFileBubble","FormMessageBubble","CometChatFormBubble","ccSubmitClicked","SchedulerMessageBubble","CometChatSchedulerBubble","CardMessageBubble","CometChatCardBubble","FullScreenImageViewer","CometChatFullScreenViewer","ccCloseClicked","defaultTheme","MessagesDataSource","getSchedulerBubbleStyle","text1","calendarStyle","CalendarStyle","dateTextFont","subtitle2","dateTextColor","dayTextFont","text2","dayTextColor","monthYearTextFont","monthYearTextColor","defaultDateTextBackground","disabledDateTextColor","disabledDateTextFont","disabledDateTextBackground","timezoneTextFont","caption2","timezoneTextColor","arrowButtonTextColor","arrowButtonTextFont","timeSlotStyle","TimeSlotStyle","calendarIconTint","timezoneIconTint","emptySlotIconTint","emptySlotTextColor","emptySlotTextFont","seperatorTint","slotBackground","slotBorder","slotBorderRadius","slotTextColor","slotTextFont","qucikViewStyle","QuickViewStyle","subtitleFont","subtitleColor","leadingBarTint","leadingBarWidth","SchedulerBubbleStyle","quickViewStyle","dateSelectorStyle","timeSlotSelectorStyle","suggestedTimeBackground","suggestedTimeBorder","suggestedTimeBorderRadius","suggestedTimeDisabledBackground","suggestedTimeDisabledBorder","suggestedTimeDisabledBorderRadius","suggestedTimeDisabledTextColor","suggestedTimeDisabledTextFont","text3","suggestedTimeTextColor","suggestedTimeTextFont","moreButtonDisabledTextBackground","moreButtonDisabledTextBorder","moreButtonDisabledTextBorderRadius","moreButtonDisabledTextColor","moreButtonDisabledTextFont","moreButtonTextBackground","moreButtonTextBorder","moreButtonTextBorderRadius","moreButtonTextColor","moreButtonTextFont","goalCompletionTextColor","goalCompletionTextFont","errorTextColor","getError","errorTextFont","scheduleButtonStyle","iconHeight","iconWidth","subtitleTextColor","subtitleTextFont","summaryTextColor","summaryTextFont","clockIconTint","getEditOption","MessageOption","editMessage","getDeleteOption","deleteMessage","getReactionOption","reactToMessage","getReplyInThreadOption","replyInThread","getSendMessagePrivatelyOption","sendMessagePrivately","getCopyOption","copyMessage","getMessageInfoOption","messageInformation","isSentByMe","getTextMessageOptions","messageObject","isParticipant","messageOptionList","push","getParentMessageId","getImageMessageOptions","ChatConfigurator","getDataSource","getCommonOptions","getVideoMessageOptions","getAudioMessageOptions","getFileMessageOptions","getBottomView","_messageObject","_alignment","getTextMessageTemplate","additionalConfigurations","CometChatMessageTemplate","textMessage","getDeleteMessageBubble","getTextMessageContentView","_message","getAudioMessageTemplate","audioMessage","getAudioMessageContentView","getVideoMessageTemplate","video","videoMessage","getVideoMessageContentView","getImageMessageTemplate","image","imageMessage","getImageMessageContentView","getGroupActionTemplate","getGroupActionBubble","getFileMessageTemplate","file","fileMessage","getFileMessageContentView","getFormMessageTemplate","form","interactive","formMessage","getFormMessageContentView","getSchedulerMessageTemplate","scheduler","schedulerMessage","getSchedulerMessageContentView","getCardMessageTemplate","card","cardMessage","getCardMessageContentView","getAllMessageTemplates","_theme","disableMentions","getMessageTemplate","messageType","messageCategory","_template","_optionList","getAllMessageTypes","addList","getAllMessageCategories","getAuxiliaryOptions","getTextMessageBubble","getText","getAudioMessageBubble","getAttachments","getUrl","getFileMessageBubble","getFormMessageBubble","getSchedulerMessageBubble","getCardMessageBubble","imageUrl","getImageMessageBubble","getVideoMessageBubble","getActionMessage","JOINED","LEFT","actionBy","byEntity","onEntity","byString","forString","ADDED","UNBANNED","defaultStyle","messageText","textStyle","getTextMessageBubbleStyle","getFormMessageBubbleStyle","InputStyle","RadioButtonStyle","labelTextFont","labelTextColor","CheckboxStyle","dropdownStyle","DropdownStyle","optionHoverBorder","buttonGroupStyle","singleSelectStyle","SingleSelectStyle","FormBubbleStyle","wrapperBackground","wrapperBorderRadius","textInputStyle","wrapperPadding","datePickerBorder","datePickerBorderRadius","datePickerFont","datePickerFontColor","getCardMessageBubbleStyle","CardBubbleStyle","imageHeight","imageWidth","imageRadius","imageBackgroundColor","descriptionFontColor","descriptionFont","dividerTintColor","disabledButtonColor","urlTextFormatter","textFormatters","getAllTextFormatters","mentionsTextFormatter","CometChatMentionsFormatter","getMentionedUsers","setCometChatUserGroupMembers","setLoggedInUser","CometChatUIKitLoginListener","getLoggedInUser","CometChatUrlsFormatter","getMentionsTextFormatter","getUrlTextFormatter","setMessageBubbleAlignment","audioUrl","src","audioStyle","fileUrl","defaulStyle","downloadIconURL","subtitle","fileURL","fileStyle","onSubmitClick","hasCustomCallback","formBubbleStyle","getSchedulerWrapperStyle","schedulerBubbleStyle","onScheduleClick","cardBubbleStyle","placeholderImage","ImageBubbleStyle","maxHeight","fullScreenViewer","URL","closeIconURL","fullScreenViewerStyle","CometChatUIEvents","ccHideDialog","imageStyle","ccShowDialog","confirmCallback","videoUrl","thumbnailUrl","poster","videoStyle","imageAttachmentOption","CometChatMessageComposerAction","videoAttachmentOption","audioAttachmentOption","fileAttachmentOption","getAttachmentOptions","getLastConversationMessage","conversation","ConversationUtils","getLastMessage","TextMessage","getFormattedText","mentionsTargetElement","MentionsTargetElement","getDefaultDetailsTemplate","DetailsUtils","getAuxiliaryHeaderMenu","getAIOptions","AIOptionsStyle","getMentionsFormattedText","mentionsFormatterParams","regex","messageTextTmp","exec","cometChatUsers","mentionedUsers","mentionsFormatter","setClasses","formatterParams","formatters","params","setComposerMentionStyle","UserMentionStyle","loggedInUserTextFont","loggedInUserTextColor","loggedInUserTextBackground","mentionTextFont","mentionTextColor","mentionTextBackground","setConversationMentionStyle","setRightBubbleMentionStyle","getTertiary","setLeftBubbleMentionStyle","setStyle","formattedTextColor","formattedTextFont","initialSource","dataSource","names","enable","newSource","find","nm","AIExtensionDataSource","isAIFeatureEnabled","getExtensionId","then","enabled","addExtension","DataSourceDecorator","getBubbleAlignment","sender","configuration","senderMessageBubbleStyle","botMessageBubbleStyle","getBubbleFooterView","status","displayReceipt","Receipts","wait","sent","timestamp","getSentAt","dateStyle","getMessageBubbleDateStyle","pattern","DatePatterns","time","receipt","waitIcon","errorIcon","errorIconURL","receiptStyle","getMessageReceiptStyle","assistBotStyle","getContainerStyle","getBotTitleStyle","optionTitleFont","optionTitleColor","getBackButtonStyle","backIconTint","getOptionStyle","ActionSheetStyle","ActionSheetSeparatorTint","listItemBackground","getBotBackgroundStyle","getBotChatContainerStyle","minWidth","getBotChatHeaderStyle","marginBottom","getBotHeaderTitleStyle","getBotHeaderSubtitleStyle","getCloseButtonStyle","getMessageBubbleStyle","getMessageInputStyle","MessageInputStyle","dividerColor","inputBorder","inputBorderRadius","inputBackground","getSendButtonStyle","sendIconTint","ReceiptStyle","waitIconTint","errorIconTint","getMessageBubbleContainerStyle","bubbleAlignment","backIcon$4","bots","backCallback","ActionSheet","CometChatActionSheet","AIAssistBotOptoinsView","backIconURL","backIcon","actions","hideLayoutMode","actionSheetStyle","bot","Close2xIcon$5","messageSendCallBack","MessageInput","CometChatTextInput","ccTextInputChanged","ccTextInputEntered","AIAssistBotChatView","scrollBottom","subtitleText","botFirstMessage","messageInputRef","inputTextRef","messagesList","setMessagesList","insertFirstMessage","botFirstMessageText","onComposerEditTextChange","getBotResponse","response","newMessage","prevMessages","messages","catch","onMessageSendClick","emptyInputField","getListItem","useMemo","Close2xIcon","sendIconURL","AIAssistBotDecorator","onMessageSent","resolve","reject","receiverId","receiverType","apiConfiguration","askBot","closeChat","ccHidePanel","PanelAlignment","ccShowPanel","newDataSource","addMessageListener","getAllBots","aiOptionsStyle","generalAskBotText","askText","numberOfBots","titleName","parentMessageId","listItemTextColor","listItemTextFont","messageComposerActions","newAction","botList","callBacks","backAction","closePopover","setTags","ccActiveChatChanged","AIAssistBotExtension","contentContainerStyle","getConversationStarterStyle","replyTextFont","replyTextColor","replyBackground","textBackground","textBorder","textBorderRadius","emptyIcon","getConversationStarterCallback","editReplyCallback","CometChatConversationStarterView","SmartReplies","ccReplyClicked","CometChatAICardView","CometChatAICard","AIConversationStarterView","messageListState","setMessageListState","activeView","setActiveView","loadingStateText","conversationStarters","CustomView","conversationStarterView","smartReplyStyle","conversationStarterStyle","replies","reply","getLoadedView","LoadingView","ErrorView","EmptyView","emptyIconURL","AIConversationStarterDecorator","currentMessage","getConversationStarter","editReply","ccComposeMessage","messageListFooter","closeIfMessageReceived","getReceiverId","loadConversationStarter","CometChatMessageEvents","onTextMessageReceived","onCustomMessageReceived","onMediaMessageReceived","onFormMessageReceived","onSchedulerMessageReceived","onCardMessageReceived","onCustomInteractiveMessageReceived","ccMessageSent","AIConversationStarterExtension","getPanelStyle","summaryStyle","PanelStyle","getConversationSummaryCallback","CometChatPanelView","CometChatPanel","AIConversationSummaryView","titleText","conversationSummary","conversationSummaryView","panelStyle","conversationSummaryStyle","closeIconUrl","AIConversationSummaryDecorator","unreadMessageCount","LISTENER_ID","closePanel","getConversationSummary","loadConversationSummary","unreadMessageThreshold","AIConversationSummaryExtension","getSmartReplyStyle","getSmartRepliesTitleStyle","getSmartRepliesCallback","CometChatSmartRepliesView","AISmartRepliesView","smartReplies","repliesArray","SmartRepliesView","smartRepliesStyle","AISmartRepliesDecorator","isModalClosed","childRef","buttonRef","getSmartReplies","AISmartRepliesExtension","resizeIconHoverText","sessionID","minimizeIconURL","maximizeIconURL","callSettingsBuilder","ongoingCallStyle","minimizeIconTint","maximizeIconTint","callWorkflow","CallWorkflow","defaultCalling","CometChatOngoingCall","setLoggedInuser","callScreenFrameRef","onErrorCallback","errorModel","details","errorObj","getCallBuilder","audioOnlyCall","CometChatUIKitCalls","CallSettingsBuilder","enableDefaultLayout","setIsAudioOnlyCall","setCallListener","OngoingCallListener","onCallEnded","endSession","CometChatCallEvents","ccCallEnded","onCallEndButtonPressed","endCall","startCall","authToken","getAuthToken","generateToken","startSession","token","CometChatUIKit","callscreenStyle","inset","CallButtonsWrapperStyle","callButtonStyle","outgoingCallStyle","defaultCallsButtonStyle","CallButtonsStyle","voiceCallIconTint","videoCallIconTint","voiceCallIconTextFont","videoCallIconTextFont","voiceCallIconTextColor","videoCallIconTextColor","buttonPadding","buttonBorder","buttonBorderRadius","CallscreenStyle","OutgoingCallWrapperStyle","OutgoingCallSubtitleStyle","iconBackground","OutgoingCallCardStyle","defaultAvatarStyle","defaultOutgoingCallStyle","OutgoingCallStyle","declineButtonTextFont","declineButtonTextColor","declineButtonIconTint","declineButtonIconBackground","Close2xIcon$4","CometChatOutgoingCall","disableSoundForCalls","customSoundForCalls","declineButtonText","declineButtonIconURL","onCloseClicked","iconAlignment","IconButtonAlignment","avatarStyleRef","outgoingCallStyleRef","buttonStyleRef","callRef","cancelCallButtonRef","OutgoingCallCancelButtonStyle","CometChatSoundManager","pause","playAudio","play","Sound","incomingCall","cancleCallButton","getReceiver","cardStyle","getReceiverType","getIcon","voiceCallIconURL","voiceCallIconText","voiceCallIconHoverText","videoCallIconURL","videoCallIconText","videoCallIconHoverText","callButtonsStyle","onVoiceCallClick","onVideoCallClick","CometChatCallButtons","callButtonStyleRef","voiceCallButtonStyleRef","videoCallButtonStyleRef","VideoCallButtonStyle","setActiveUser","activeGroup","setActiveGroup","showOngoingCall","setShowOngoingCall","showOutgoingCallScreen","setShowOutgoingCallScreen","disableButtons","setDisableButtons","audioCallButtonRef","videoCallButtonRef","sessionIdRef","onVoiceCallClickRef","onVideoCallClickRef","callbuttonsListenerId","getTime","subscribeToEvents","ccCallRejected","ccOutgoingCall","attachListeners","addCallListener","CallListener","onIncomingCallReceived","onIncomingCallCancelled","onOutgoingCallRejected","onOutgoingCallAccepted","getSessionId","removeListener","removeCallListener","closeCallScreen","initiateCall","callObj","Call","outgoingCall","initiateAudioCall","sendCustomMessage","customData","sessionId","callType","customType","calls","meeting","conversationId","customMessage","CustomMessage","setMetadata","incrementUnreadCount","shouldUpdateConversation","sentAt","muid","MessageStatus","inprogress","success","initiateVideoCall","cancelOutgoingCall","rejectCall","cancelled","getVoiceCallButtonStyle","getVoiceCallButtonTint","getVideoCallButtonStyle","getVideoCallButtonTint","unsubscribeFromEvents","audioCallButton","videoCallButton","audioCallButtonClicked","videoCallButtonClicked","ccBtnDisabledPropSpreadObject","CallingConstants","ongoing","ended","initiated","rejected","unanswered","CometChatDefaultCallBubble","CometChatIconButton","CallingExtensionDecorator","addLoginListener","LoginListener","logoutSuccess","getActiveCall","types","categories","custom","checkIfTemplateTypeExist","some","obj","checkIfTemplateCategoryExist","templates","getDirectCallTemplate","getDefaultCallTemplate","getDirectCallMessageBubble","getDefaultAudioCallMessageBubble","getDefaultVideoCallMessageBubble","getCallBubbleStyle","getData","getCallBubbleTitle","callBubbleAlignment","DocumentIconAlignment","callBubbleStyle","callBubbleTitle","joinCallButtonText","CometChatDirectCallBubble","CometChatDocumentBubble","documentStyle","buttonText","ccClicked","startDirectCall","ongoingCallScreen","directCalling","ccShowOngoingCall","callStatusStyle","CallingDetailsUtils","isMissedCall","getCallActionMessage","getCallStatus","additionalParams","auxMenus","callButtons","ExtensionsDataSource","isExtensionEnabled","CallingExtension","DocumentIcon","CometChatDocumentExtensionBubble","CollaborativeDocumentExtensionDecorator","CollaborativeDocumentConstants","extension_document","checkIfTemplateExist","getDocumentTemplate","documentMessage","getDocumentContentView","documentBubbleAlignment","configurationDocumentBubbleStyle","getDocumentBubbleStyle","documentBubbleStyle","documentURL","getDocumentURL","documentTitle","documentButtonText","documentSubitle","getIconURL","launchCollaborativeDocument","open","metadata","checkHasOwnProperty","injectedObject","extensions","extensionObject","document","document_url","board_url","configurationOptionStyle","isUser","getOptionIconURL","callExtension","post","v1_create","receiver","CollaborativeDocumentExtension","ExtensionsId","WhiteboardIcon","CometChatWhiteboardExtensionBubble","CollaborativeWhiteBoardExtensionDecorator","CollaborativeWhiteboardConstants","extension_whiteboard","getWhiteBoardTemplate","whiteboardMessage","getWhiteboardContentView","configurationWhiteboardBubbleStyle","getWhiteboardBubbleStyle","whiteboardURL","getWhiteboardDocument","whiteboardTitle","whiteboardButtonText","whiteboardSubitle","launchCollaborativeWhiteboardDocument","whiteboard","CollaborativeWhiteboardExtension","CometChatImageModerationBubble","ImageModeration","CCShowDialog","CometChatBackDropElement","CometChatBackdrop","CometChatConfirmDialogBox","CometChatConfirmDialog","ccCancelClicked","ccConfirmClicked","ImageModerationExtensionDecorator","getMetadata","getImageModerationStyle","imageModerationStyle","showDialog","_event","confirmModal","getConfirmationModal","onConfirm","configurationBackdropStyle","getBackDropStyle","configurationConfirmDialogStyle","getConfirmDialogSyle","warningText","confirmText","cancelText","confirmDialogStyle","confirmButtonBackground","cancelButtonBackground","getSecondary","confirmButtonTextColor","confirmButtonTextFont","cancelButtonTextColor","cancelButtonTextFont","messageTextFont","messageTextColor","cancelButtonText","confirmButtonText","onCancelClicked","onConfirmClicked","configurationImageModerationBubbleStyle","filterColor","warningTextColor","warningTextFont","ImageModerationExtension","imageModeration","CometChatLinkPreviewBubble","LinkPreview","ccLinkClicked","LinkPreviewExtensionDecorator","linkPreviewObject","getLinkPreview","getLinkPreviewWrapperStyle","getLinkPreviewDetails","description","favIconURL","linkPreviewStyle","getLinkPreviewStyle","openLink","getTextMessageStyle","url","configuarationLinkPreviewStyle","LinkPreviewStyle","descriptionColor","LinkPreviewConstants","injected","extensionsObject","link_preview","links","LinkPreviewExtension","linkPreview","CometChatMessageTranslationBubble","MessageTranslationBubble","MessageTranslationExtensionDecorator","getTranslationStyle","configurationMessageTranslationStyle","getMessageTranslationStyle","MessageTranslationStyle","translatedTextFont","translatedTextColor","helpTextColor","helpTextFont","checkIfOptionExist","translateMessage","newOption","msgId","languages","navigator","message_translations","translatedMessage","ccMessageTranslated","translatedText","messageTranslationStyle","MessageTranslationExtension","messageTranslation","CometChatPollsBubble","PollsBubble","CometChatCreatePollView","CreatePoll","PollsExtensionDecorator","PollsConstants","extension_poll","getPollsTemplate","pollsMessage","getPollsContentView","configurationPollsBubbleStyle","getPollsBubbleStyle","pollBubbleStyle","votePercentTextFont","votePercentTextColor","pollQuestionTextFont","pollQuestionTextColor","pollOptionTextFont","pollOptionTextColor","pollOptionBackground","optionsIconTint","totalVoteCountTextFont","totalVoteCountTextColor","selectedPollOptionBackground","userSelectedOptionBackground","pollOptionBorder","pollOptionBorderRadius","pollStyle","pollQuestion","getPollBubbleData","pollId","senderUid","getCustomData","onPollsButtonClicked","configurationCreatePollStyle","getCreatePollStyle","createPollStyle","deleteIconTint","questionInputBackground","optionInputBackground","answerHelpTextFont","answerHelpTextColor","addAnswerIconTint","createPollButtonTextFont","createPollButtonTextColor","createPollButtonBackground","addAnswerTextFont","addAnswerTextColor","optionPlaceholderTextFont","optionPlaceholderTextColor","questionInputTextFont","questionInputTextColor","optionInputTextFont","optionInputTextColor","ccShowModal","getPollView","triggerCloseEvent","deleteIconURL","getDeleteIconURL","getCloseIconURL","addAnswerIconURL","getAddAnswerIconURL","ccHideModal","PollsExtension","polls","CometChatSmartReplyBubble","SmartReplyExtensionDecorator","getSmartReplyView","getReplies","smartReply","smartReplyObject","SmartRepliesConstants","smart_reply","reply_positive","reply_neutral","reply_negative","configurationSmartRepliesStyle","getSmartRepliesStyle","sendSmartReply","setParentMessageId","setCategory","sendMessage","closeSmartReply","getSmartReplyButtonStyle","SmartReplyExtension","CometChatStickersKeyboard","StickersKeyboard","ccStickerClicked","CometChatImageMessageBubble","StickersExtensionDecorator","showStickerKeyboard","StickersConstants","sticker","getStickerTemplate","auxiliaryOptions","getStickerAuxiliaryButton","configurationStickersStyle","getStickersStyle","emojiButtonStyle","sticketButtonHeight","stickerButtonWidth","stickerButtonIconTint","PopoverStyle","stickerKeyboardStyle","openIconURL","getStickerIconURL","stickerStyle","sendSticker","stickerName","stickerURL","sticker_url","sticker_name","getSticker","stickerData","custom_data","getStickerMessageContentView","stickerMessage","StickersExtension","stickers","TextModeratorExtensionDecorator","getModeratedtext","getExtensionData","messageObj","getConversationType","RECEIVER_TYPE","USER","moderatedText","setText","TextModeratorExtension","profanityFilter","promise1","promise2","dataMasking","ThumbnailGenerationExtensionDecorator","thumbnailImage","ThumbnailGenerationExtension","thumbnailGeneration","uiKitSettings","checkAuthSettings","appSettingsBuilder","AppSettingsBuilder","getRoles","subscribePresenceForRoles","getSubscriptionType","subscribePresenceForAllUsers","subscribePresenceForFriends","autoEstablishSocketConnection","isAutoEstablishSocketConnection","setRegion","getRegion","overrideAdminHost","getAdminHost","overrideClientHost","getClientHost","appSettings","setSource","CometChatUIKitSharedSettings","uikitSettings","CometChatUiKit","version","appId","initiateAfterLogin","enableCalling","callAppSetting","CallAppSettingsBuilder","setAppId","region","getConversationUpdateSettings","conversationUpdateSettings","extensionList","defaultExtensions","ChatSdkEventInitializer","attachListener","aiFeaturesList","aiFeatures","defaultAIFeatures","extension","login","uid","authKey","loginWithAuthToken","createUser","logout","removeLoggedInUser","sendFormMessage","disableLocalEvents","sendInteractiveMessage","interactiveMessage","InteractiveMessageUtils","convertInteractiveMessage","sendCardMessage","sendCustomInteractiveMessage","sendTextMessage","sendMediaMessage","sendSchedulerMessage","SoundManager","Localize","CometChatLocalize","getTabListStyle","tabsStyle","tabAlignment","positionProperties","TabAlignment","tabListHeight","tabListWidth","tabListBorder","tabListBorderRadius","tabListBackground","tabListBoxShadow","tabListPadding","getTabContentStyle","tabPaneHeight","tabPaneWidth","getTabItemStyle","tab","activeTab","active","borderRadiusStyle","activeBorderRadius","TabPaneContentViewStyle","tabStyle","tabPaneContentStyle","tabs","keepAlive","tabIconAlignment","CometChatIconButtonBubble","ccButtonClicked","CometChatTabs","setActiveTab","activeTabId","setActiveTabId","childViewRef","openViewOnCLick","tabItem","childView","getButtonStyle","activeTitleTextFont","activeTitleTextColor","activeIconTint","ButtonStyle","getTabItems","floor","random","getTabPane","PollsConfiguration","createPollIconURL","optionIconURL","optionStyle","getCreatePollIconURL","IncomingCallWrapperStyle","incomingCallStyle","IncomingCallSubtitleStyle","IncomingCallLabelStyle","IncomingCallListItemStyle","marginLeft","IncomingCallTailViewStyle","IncomingCallButtonsStyle","paddingLeft","defaultIncomingCallStyle","IncomingCallStyle","getAccent800","acceptButtonTextFont","acceptButtonTextColor","acceptButtonBackground","acceptButtonBorderRadius","acceptButtonBorder","declineButtonBackground","declineButtonBorderRadius","declineButtonBorder","defaultListItemStyle","defaultOngoingCallStyle","getInitiator","callStatus","sentByMe","missedStatuses","busy","verifyCallUser","getCallStatusWithType","includeType","callMessageText","callTypeKey","convertMinutesToHoursMinutesSeconds","minutes","hours","remainingMinutes","seconds","hoursString","minutesString","secondsString","getSubtitleStyle","callStatusTextColor","callStatusTextFont","getAvatarStyle","getListItemStyle","callLogsStyle","getListStyle","getCallDateStyle","getDirectionIconStyle","tint","missedCallIconTint","outgoingCallIconTint","incomingCallIconTint","getInfoButtonStyle","infoIconTint","getDateSeparator","dateSeparatorTextFont","dateSeparatorTextColor","incomingAudioCallIconUrl","incomingVideoCallIconUrl","outgoingAudioCallIconUrl","outgoingVideoCallIconUrl","missedAudioCallIconUrl","missedVideoCallIconUrl","infoIconUrl","callLogRequestBuilder","onInfoClick","activeCall","datePattern","dateSeparatorPattern","DayDate","outgoingCallConfiguration","CometChatCallLogs","callList","setCallList","callListState","setCallListState","callInitiated","setCallInitiated","setCall","setSessionId","initiatedCallRef","setCallLogRequestBuilder","CallLogRequestBuilder","setCallCategory","setAuthToken","fetchNextCallList","getCallList","prevCallList","CALL_TYPE","AUDIO","VIDEO","callTmp","handleItemClick","handleInfoClick","getSessionID","getCallDirectionIcon","missedCall","icon","isDateDifferent","firstDate","secondDate","firstDateObj","secondDateObj","getDate","getMonth","getFullYear","getMessageBubbleDate","getInitiatedAt","getOutGoingCallStyle","getOngoingCallStyle","openOngoingCallScreen","detachListeners","getListItemSubtitleView","getListItemTailView","marginRight","avatar","setCallBuilder","onDeclineButtonClicked","getTitleStyle","callLog","getPrimaryDetailsTemplate","getSecondaryDetailsTemplate","getCallButtons","CometChatCallDetailsTemplate","hideSectionSeparator","getPrimaryOptions","getSecondaryOptions","CometChatCallDetailsOption","generateCallDetailsHTML","participants","count","generateCallOptionsHTML","hasRecording","getRecordings","initiatedAt","headingDateStyle","DateStyle","getTotalDurationInMinutes","containerStyle","buttonContainerStyle","getCallStatusStyle","getCallDurationStyle","callDurationTextColor","getDividerStyle","backIconUrl","callUser","callGroup","onBackClick","callLogHistoryStyle","CometChatCallLogHistory","builder","dividerStyle","getCallDuration","setRequestBuilder","callStatusColor","callStatusFont","callLogParticipantsStyle","CometChatCallLogParticipants","getCallParticipants","getParticipants","getCallInitiatedAt","getDurationOfCall","getHasJoined","getJoinedAt","recordingDurationColor","recordingDurationFont","getDownloadButtonStyle","downloadIconTint","downloadIconUrl","hideDownloadButton","callLogRecordingsStyle","onDownloadClick","CometChatCallLogRecordings","handleDownloadClick","getRecordingURL","fetch","blob","blobURL","createObjectURL","href","download","body","appendChild","click","getRecordingStartTime","getStartTime","getRecordingDuration","remainingSeconds","convertSecondsToHoursMinutesSeconds","getDuration","getRid","callLogHistoryConfiguration","callLogParticipantsConfiguration","callLogRecordingsConfiguration","callLogDetailsStyle","CometChatCallLogDetails","detailsTemplates","setDetailsTemplates","showParticipants","setShowParticipants","showRecordings","setShowRecordings","showCallHistory","setShowCallHistory","outerViewBorder","setTemplates","templatesArray","getOptionsForTemplate","callEntity","handleOptionClick","showDetailsPage","showParticipantsPage","showRecordingsPage","showCallHistoryPage","handlePageOnBackClick","getCallUser","getCallGroup","getTemplatesUI","hideItemSeparator","tail","getAvatarTitleStyle","getLabelStyle","isMobileView","withDetailsStyle","callLogDetailsConfiguration","callLogsConfiguration","CometChatCallLogsWithDetails","setActiveCall","getCallLogStyle","getCallDetailStyle","getBackClick","overrideOnBackClick","addMembersStyle","addMembersStyleObject","UsersStyle","addMembersButtonStyle","addMembersButtonBackground","addMembersButtonTextColor","addMembersButtonTextFont","SearchIcon$3","SpinnerIcon$5","backbutton$1","closeButton","CometChatAddMembers","sectionHeaderField","onAddMembersButtonClick","membersToAddRef","selectionModeRef","onSelectPropRef","onBackPropRef","onAddMembersButtonClickPropRef","createGroupMemberFromUser","onSelectWrapper","selected","tmpMembersToAddList","updated","curMember","onAddBtnClickWrapper","onAddBtnClick","UIDsToRemove","addMembersToGroup","add","addedMembers","addedMember","bannedMembersWrapperStyle","bannedMemberStyleObject","unbanBtnStyle","unbanIconTint","Close2xIcon$2","BannedMembersManager","bannedMembersRequestBuilder","bannedMembersSearchText","finalBannedMembersRequestBuilder","BannedMembersRequestBuilder","bannedMembersRequest","setAvatar","attachSDKGroupListener","groupRef","member","onGroupMemberUnbanned","unbannedUser","unbannedBy","unbannedFrom","bannedMemberUid","attachSDKUserListener","SearchIcon$2","SpinnerIcon$4","bannedMembers","bannedMember","CometChatBannedMembers","unbanIconURL","bannedMemberStyle","bannedMembersManagerRef","fetchNextAndAppendBannedMembers","unbanMember","unbanGroupMember","bannedMemberOptions","getDefaultListTailView","groupMemberUnbannedSub","ccGroupMemberUnbanned","conversationsWrapperStyle","conversationsStyleObject","deleteConversationDialogStyle","ConfirmDialogStyle","badgeStyle","badgeStyleObject","BadgeStyle","itemThreadIndicatorStyle","threadIndicatorTextFont","threadIndicatorTextColor","iconStyle","IconStyle","receiptStyleObject","sentIconTint","deliveredIconTint","readIconTint","subtitleTextStyle","typingIndicatorMap","convWith","getConversationWith","typingIndictorTextFont","typingIndictorTextColor","textOverflow","lastMessageTextFont","lastMessageTextColor","dateStyleObject","backdropStyleObject","conversationsStyle","ConversationsManager","conversationsRequestBuilder","convRequestBuilder","ConversationsRequestBuilder","_a","limit","conversationsRequest","conversationType","attachMessageReceivedListener","mediaMessage","attachMessageReceiptListener","onMessagesRead","messageReceipt","onMessagesDelivered","attachMessageTypingListener","onTypingStarted","typingIndicator","onTypingEnded","attachMessageModifiedListener","onMessageEdited","onMessageDeleted","attachCallListener","shouldIncrementForCustomMessage","willUpdateConversation","shouldUpdateOnCustomMessages","shouldLastMessageAndUnreadCountBeUpdated","isCustomMessage","shouldUpdateOnMessageReplies","shouldUpdateOnGroupActions","shouldUpdateOnCallActivities","LockedIcon$2","MessageDeliveredIcon","MessageReadIcon","MessageSentIcon","PrivateIcon$2","SpinnerIcon$3","WaitIcon$1","WarningSmallIcon","isAMessage","MediaMessage","InteractiveMessage","conversations","removeOldConversation","conversationList","newTypingIndicatorMap","convWithId","conversationToBeDeleted","targetConvId","getConversationId","conv","newConversationList","newConv","setConversationWith","targetId","updateReadAt","targetMessageId","getMessageId","lastMessage","getReadAt","getDeliveredAt","setReadAt","setUnreadMessageCount","setDeliveredAt","senderId","isReceiverTypeGroup","Group","setLastMessage","targetConversationId","targetGuidId","targetConversation","messageReadAt","CometChatConversations","activeConversation","disableReceipt","DayDateTime","protectedGroupIcon","LockedIcon","passwordGroupIcon","privateGroupIcon","PrivateIcon","readIcon","deliveredIcon","WaitIcon","sentIcon","disableSoundForMessages","disableTyping","customSoundForMessages","confirmDialogTitle","confirmDialogMessage","backDropStyleObject","unreadMentions","confirmDialogElement","setConfirmDialogRef","conversationsManagerRef","customSoundForMessagesRef","fetchNextAndAppendConversations","conversationManager","getIncrementUnreadCountBoolFromMetaData","metaDataGetterName","metaData","Boolean","updateConversationList","getUnreadMessageCount","Number","getActionFor","updatedGroup","refreshSingleConversation","removeConversation","CometChatHelper","getConversationFromMessage","onMessageReceived","markAsDelivered","incomingMessage","setReceipts","setTypingIndicator","typingStarted","getListItemAvatarURL","getListItemStatusIndicatorColor","GroupTypes","password","passwordGroupIconBackground","private","privateGroupIconBackground","getListItemStatusIndicatorIcon","getSubtitleThreadView","getSubtitleReadReceiptView","shouldDisplaySubtitleReceipt","MessageReceiptUtils","getReceiptStatus","getSubtitleText","textFormattersList","dangerouslySetInnerHTML","__html","whiteSpace","getSubtitleTextView","deleteOptionCallback","getListItemMenuView","defaultOptions","getDefaultOptions","ConversationOptions","getListItemTailContentView","setStatusIndicatorStyle","confirmClickEventName","cancelClickEventName","handleConfirmClick","deleteConversation","CometChatConversationEvents","ccConversationDeleted","handleCancelClick","groupMemberScopeChangedSub","groupDeletedSub","ccGroupDeleted","groupLeftSub","ccGroupLeft","leftGroup","userBlockedSub","messageEditedSub","ccMessageEdited","messageSentSub","messageDeletedSub","ccMessageDeleted","messageReadSub","ccMessageRead","callAcceptedSub","ccCallAccepted","outgoingCallSub","callRejectedSub","callEndedSub","WithMessagesWrapperStyle","WithMessagesMainStyle","MobileLayoutStyle","EmptyMessagesDivStyle","WithMessagesSidebarStyle","getConversationsWrapperStyles","conversationsWithMessagesStyle","getWithMessagesSidebarStyle","getMobileViewSidebarStyle","getDesktopViewSidebarStyle","visibility","borderRight","getWithMessagesMainStyle","getMobileViewMainStyle","getDesktopViewMainStyle","getConversationsStyle","conversationsConfiguration","getMessageHeaderStyle","messagesConfiguration","messageHeaderConfiguration","messageHeaderStyle","getMessageComposerStyle","messageComposerConfiguration","messageComposerStyle","getMessagesStyle","messagesStyle","getEmptyMessageLayoutStyle","showCometChatContacts","contactsStyle","submitBtnStyle","submitButtonBackground","submitButtonTextColor","submitButtonTextFont","contactsHeaderStyle","contactsWrapperStyle","getTabItemStyling","tabVisibility","TabsVisibility","usersAndGroups","tabHeight","tabBorderRadius","tabBorder","tabTitleTextFont","tabTitleTextColor","activeTabTitleTextFont","activeTabTitleTextColor","activeTabBackground","activeBorder","tabBackground","groupsWrapperStyle","groupsStyleObject","groupsStyle","GroupsStyle","subtitleStyle","subTitleTextFont","subTitleTextColor","GroupsManager","groupsRequestBuilder","groupsSearchText","tmpGrpReqBuilder","groupsRequest","GroupsRequestBuilder","createGroupListener","setHasJoined","groupLeft","guid","LockedIcon$1","PrivateIcon$1","SearchIcon$1","SpinnerIcon$2","groups","removeOldGroups","groupList","targetGroup","targetGuid","CometChatGroups","groupsManagerRef","fetchNextAndAppendGroups","groupsManager","getGroupStatusIcon","statusIconURL","getSubtitleView","membersCount","getMenuView","getTailView","groupCreatedSub","ccGroupCreated","groupMemberJoinedSub","ccGroupMemberJoined","groupMemberLeftSub","groupOwnershipChangedSub","ccOwnershipChanged","usersTabTitle","groupsTabTitle","groupsConfiguration","GroupsConfiguration","usersConfiguration","UsersConfiguration","selectionLimit","hideSubmitButton","submitButtonText","CometChatContacts","setTabs","groupsListRef","usersListRef","isActiveUsersTab","setIsActiveUsersTab","isLimitReached","setIsLimitReached","isActiveGroupsTab","setIsActiveGroupsTab","usersTabRef","groupsTabRef","onSubmitButtonClick","hideBlockedUsers","usersSearchRequestBuilder","joinedOnly","groupsSearchRequestBuilder","CometChatTabItem","onUserClicked","onUserSelected","onGroupClicked","onGroupSelected","submitClicked","splice","MessagesWrapperStyle","ThreadedMessagesDivStyle","overflowY","MessagesDetailsDivStyle","MessagesHeaderDivStyle","MessagesListDivStyle","getMessageListStyle","messageListConfiguration","messageListStyle","getDetailsStyle","detailsConfiguration","detailsStyle","detailsButtonStyle","panelDivStyle","detailsStyleObject","isUserOnline","optionBtnStyle","leaveDialogStyle","confirmDialogStyleObject","deleteDialogStyle","isSectionSeparatorStyle","getGroupMembersStyle","groupMembersConfiguration","getAddMembersStyle","addMembersConfiguration","getBannedMembersStyle","bannedMembersConfiguration","bannedMembersStyle","getTransferOwnershipStyle","transferOwnershipConfiguration","transferOwnershipStyle","BackButtonIcon","Close2xIcon$1","transferOwnershipStyleObject","isRadioButton","MemberScopeTextColor","MemberScopeTextFont","transferBtnStyle","transferButtonTextColor","transferButtonTextFont","cancelBtnStyle","GroupMembersStyle","SpinnerIcon$1","CometChatTransferOwnership","groupMembersRequestBuilder","transferButtonText","onTransferOwnership","groupMemberStyle","groupMembersStyleObject","isDisabled","setIsDisabled","selectedMemberRef","onTransferOwnershipPropRef","onTransferOwnershipWrapper","selectedMember","onTransferOwnershipProp","transferGroupOwnership","setOwner","newOwner","getOwner","rowGap","CometChatDetails","customProfileView","hideProfile","leaveButtonText","leaveConfirmDialogMessage","transferConfirmDialogMessage","deleteButtonText","deleteConfirmDialogMessage","listItmeStyleObject","leaveDialogStyleObject","deleteDialogStyleObject","pageToShow","setPageToShow","modalInfo","setModalInfo","userOrGroup","setUserOrGroup","leaveOrTransferConfirmDialogElement","setLeaveOrTransferConfirmDialog","deleteConfirmDialogElement","setDeleteConfirmDialog","onClosePropRef","createGroupMemberLeftActionMessage","handleLeaveOrTransferConfirmClick","leaveGroup","userLeft","handleDeleteConfirmClick","deleteGroup","groupType","getStatusIndicatorIcon","getDefaultProfileSubtitleText","numGroupMembers","getDefaultProfileSubtitleView","online","UserOptions","viewProfile","getLink","block","blockUsers","userClone","setBlockedByMe","blockUser","unblock","unblockUsers","unblockUser","GroupOptions","viewMembers","addMembers","leave","isLoggedInUserGroupOwner","getSeparator","isTemplateSeparator","getSectionJSXWithKeyAdded","sectionSeparatorColor","itemSeparatorColor","titleJSX","optionsJSX","templateOptions","getTemplateOptions","templateOption","buttonJSX","contentJSX","transform","getOptionJSXWithKeyAdded","setPageToShowToNone","closeModal","getCometChatTransferOwnership","getUser","getGroup","paddingBottom","flexGrow","profileViewJSX","getDefaultProfileView","getProfileView","templateJSXList","getTemplates","getSectionList","resJSX","getCometChatAddMembers","getCometChatBannedMembers","dropdownIconURL","getCometChatGroupMembers","getSelectedPage","getModal","RIGHT_MOST_BUTTON_HORIZONTAL_MARGIN","previewStyle","PreviewStyle","previewTitleFont","previewTitleColor","previewSubtitleFont","previewSubtitleColor","closePreviewTint","getMentionInfoIconStyle","mentionsWarningStyle","TextInputStyle","maxInputHeight","dividerTint","sendButtonStyle","getEmojiButtonIconTint","isAuxiliaryContentDisplayed","emojiIconTint","getVoiceButtonIconTint","voiceRecordingIconTint","getAttachButtonIconTint","isSecondaryContentDisplayed","attachIcontint","getAIButtonIconTint","AIIconTint","ACTION_SHEET_HEIGHT","ACTION_SHEET_WIDTH","ACTION_SHEET_BORDER_RADIUS","attachmentPopoverStyle","applyActionsheetStyle","actionSheetContainerStyle","AIActionSheetContainerStyle","aiActionSheetStyle","getActionSheetStyle","layoutModeIconTint","listItemIconTint","listItemIconBackground","listItemIconBorderRadius","getAIActionSheetStyle","optionsSeparatorTint","attachmentButtonStyle","aiButtonStyle","EMOJI_KEYBOARD_HEIGHT","EMOJI_KEYBOARD_WIDTH","EMOJI_KEYBOARD_BORDER_RADIUS","emojiKeyboardContainerStyle","emojiKeyboardStyle","EmojiKeyboardStyle","emojiKeyboardTextFont","emojiKeyboardTextColor","applyHorizontalMargin","VOICE_RECORDING_HEIGHT","VOICE_RECORDING_WIDTH","VOICE_RECORDING_BORDER_RADIUS","voiceRecordingStyle","mediaRecorderStyle","MediaRecorderStyle","submitIconTint","startIconTint","stopIconTint","timerTextColor","timerTextFont","voiceButtonStyle","marginStyle","AIIcon","CloseIcon$1","HeartIcon","MentionWarningIcon","MicIcon","PlusIcon","PlusRotatedIcon","SendIcon","SmileysIcon","StopIcon","ActionSheetView","TextInput","addToMsgInputText","textMessageToEdit","contentToDisplay","showPoll","showMentionsCountWarning","CometChatMessageComposer","initialText","onTextChange","placeHolderText","sendButtonIconURL","sendButtonView","onSendButtonClick","secondaryButtonView","attachmentIconURL","emojiIconURL","AIIconURL","auxiliaryButtonView","auxiliaryButtonAlignment","AuxiliaryButtonAlignment","attachmentOptions","LiveReactionIconURL","hideLiveReaction","customSoundForMessage","disableTypingEvents","messageComposerStyleObject","hideVoiceRecording","voiceRecordingStartIconURL","voiceRecordingCloseIconURL","CloseIcon","voiceRecordingStopIconURL","voiceRecordingSubmitIconURL","userMemberWrapperConfiguration","InfoSimpleIcon","mentionsWarningText","textInputRef","mediaFilePickerRef","emojiKeyboardElement","setEmojiKeyboardRef","voiceRecordingElement","setVoiceRecordingRef","primaryBtnElement","setPrimaryBtnRef","secondaryBtnElement","setSecondaryBtnRef","aiBtnElement","setAIBtnRef","voiceRecordingBtnElement","setVoiceRecordingBtnElement","auxiliaryBtnElement","setAuxiliaryBtnRef","auxiliaryPopoverElement","setAuxiliaryPopoverRef","attachmentPopoverElement","setAttachmentPopoverRef","aiPopoverElement","setAIPopoverRef","textMessageEditPreviewElement","setTextMessageEditPreviewRef","actionSheetElement","setActionSheetRef","aiActionSheetElement","setAIActionSheetRef","liveReactionBtnElement","setLiveReactionBtnRef","actionIdToActionOnClick","endTypingTimeoutId","createPollViewRef","userPropRef","parentMessageIdPropRef","disableSoundForMessagesPropRef","customSoundForMessagePropRef","onSendButtonClickPropRef","smartRepliesView","setSmartRepliesView","textFormatterArray","setTextFormatters","mentionsSearchTerm","setMentionsSearchTerm","mentionsSearchTermTemp","lastEmptySearchTerm","showListForMentions","setShowListForMentions","mentionsTextFormatterInstanceRef","mentionsSearchCount","setMentionsSearchCount","userMemberWrapperConfig","setUserMemberWrapperConfig","UserMemberWrapperConfiguration","setUserMemberListType","setUsersRequestBuilder","setGroupMembersRequestBuilder","userMemberWrapperRef","mentionsFormatterInstanceId","defaultOnEmptyForMentions","searchMentions","searchTerm","currentSearchTerm","toLowerCase","startsWith","getReceiverDetails","isBlocked","getTypingNotification","TypingIndicator","startTyping","typingNotification","endTyping","handleTyping","getComposerId","mySetAddToMsgInputText","flushSync","handleSDKError","wasEditMethodCall","playAudioIfSoundNotDisabled","outgoingMessage","getTextMessage","formatMessageForSending","sentTextMessage","resetCometChatUserGroupMembers","handleTextMessageSend","getCometChatUserGroupMembers","userObj","setMentionedUsers","getEditedTextMessage","newText","textMessageId","newTextMessage","setId","sendEditedTextMessage","editedTextMessage","editedMessage","handleEditTextMessageSend","PreviewMessageMode","edit","handleSendButtonClick","getMediaMessage","fileType","processedFile","reader","FileReader","onload","File","onerror","readAsArrayBuffer","processFile","handleMediaMessageSend","sentMediaMessage","handleSendVoiceMessage","audioFile","string","year","toString","month","padStart","date","getHours","getMinutes","getSeconds","audioRecordingSimpleDateFormat","handleMediaMessageSendWrapper","mediaFilePickerElement","files","accept","hideSendButton","getSendButton","getSecondaryView","defaultSecondaryBtn","curAction","overrideOnClick","defaultSecondaryContent","getVoiceRecordingView","mediaPlayerStyle","autorecording","recordingType","RecordingType","startIconURL","stopIconURL","submitButtonIconURL","startIconText","stopIconText","submitButtonIconText","closeOnOutsideClick","getAIButtonView","defaultAIBtn","defaultAIContent","onActionItemClick","getAuxiliaryView","defaultAuxiliaryOptions","defaultAuxiliaryBtn","defaultAuxiliaryContent","getTextMessageEditPreview","messageToBeEdited","previewSubtitle","cometChatUsersGroupMembers","checkForMentions","propsText","isPreviewVisible","subMessageEdited","parentId","subComposeMessage","ccShowMentionsCountWarning","showWarning","reaction","sendTransientMessage","TransientMessage","ccLiveReaction","actionOnClick","onPreviewCloseClick","onSecondaryBtnClick","onAttachmentPopoverOutsideClick","outsideClickEventName","onAIBtnClick","onAIPopoverOutsideClick","onAuxiliaryBtnClick","onVoiceRecordingBtnClick","onEmojiClicked","emoji","onEmojiKeyboardClose","onCloseTriggered","customEvent","CustomEvent","dispatchEvent","sendVoiceMessage","$event","closeEvent","submitEvent","textInputElement","onTextInputEnter","textToSend","onTextInputChange","subShowModal","subHideModal","foundMentionsFormatter","getKeyDownCallBack","setKeyDownCallBack","setKeyUpCallBack","mentionsTextFormatterInstance","cleanup","setComposerConfig","listType","handleMouseDown","contains","target","reRender","liveReactionIconTint","getMessageHeaderWrapperStyle","isTypingRef","typingIndicatorTextFont","typingIndicatorTextColor","BackIcon","PasswordGroupIcon","PrivateGroupIcon","CometChatMessageHeader","hideBackButton","setSubtitleText","userRef","onBackRef","ccBackBtnElement","setCCBackBtnRef","updateSubtitle","membersText","updateUserStatus","userObject","setTypingIndicatorText","typing","userListenerId","groupsListenerId","connectionListenerId","onlineUser","offlineUser","groupObject","checkStatusType","checkGroupType","getStatusIndicatorStyle","getListItemView","removeListenerFns","onBackClicked","CometChatReactionsView","CometChatReactions","CometChatEmojiKeyboardView","CometChatEmojiKeyboard","onEmojiClick","CometChatIconButtonView","buttonClick","CometChatButtonView","CometChatDateView","CometChatDate","CometChatLabelView","CometChatLabel","CometChatLoaderView","CometChatLoader","CometChatAvatarView","CometChatAvatar","CometChatReceiptView","CometChatReceipt","wrapperStyle","order","messageThreadViewStyle","baseStyle","threadReplyIconTint","threadReplyTextColor","threadReplyTextFont","flexFlow","newMessageTextStyleStyle","baseBackground","coloredBackground","MessageListAlignment","messageReceiptStyle","isTextMessage","getStatusInfoViewStyle","isValid","bubbleFooterViewWrapperStyle","messageBubbleHeaderDateStyle","TimestampTextColor","TimestampTextFont","caption3","bubbleHeaderTitleStyle","defaultMessageListStyle","tempMessageListStyle","dateSeperatorStyle","dateSeparatorStyle","MessageListStyle","loadingViewStyle","errorViewStyle","messageAvatarStyle","bubbleStyle","defaultMessageListBubbleStyle","getReactionViewStyle","MessageDateStyle","tempDateSeparatorStyle","defaultDateSeparatorStyle","dateInfoStyle","receiptWrapperStyle","receiptSubtitleWrapperStyle","getMessageInfoStyle","messageInfo","getReceiptTextStyle","fontSize","fontWeight","getMessageTextStyle","WarningIcon$1","CometChatMessageInformation","messageInformationStyle","receiptDatePattern","BackdropStyle","setUserObj","templateRef","setTemplateRef","messageReceipts","setMessageReceipts","getTemplateRef","messageReceiptVal","getMessageReceipts","receiptList","getMessageReceipt","getBubbleView","deliveredAt","readAt","delivered","WarningIcon","customDateString","DateTime","read","alignBubble","MessageListManager","messagesRequestBuilder","messageId","messagesRequest","fetchNextMessages","fetchPreviousMessages","fetchPrevious","setUID","setGUID","setMessageId","MessagesRequestBuilder","setTypes","setCategories","hideReplies","removeListeners","groupListenerId","callListenerId","attachConnectionListener","onCallEndedMessageReceived","standard","showAvatar","timestampAlignment","TimestampAlignment","DateSeparatorPattern","hideDateSeparator","newMessageIndicatorText","scrollToBottomOnNewMessages","thresholdValue","onThreadRepliesClick","messageInformationConfiguration","MessageInformationConfiguration","reactionsConfiguration","ReactionsConfiguration","disableReactions","threadIndicatorIcon","CometChatMessageList","messageList","setMessageList","scrollListToBottom","setScrollListToBottom","showMessageInfoPopup","setShowMessageInfoPopup","activeMessageInfo","setActiveMessageInfo","showConfirmDialog","setShowConfirmDialog","ongoingCallView","setOngoingCallView","showNewMessagesBanner","setShowNewMessagesBanner","showFooterPanelView","setShowFooterPanelView","showHeaderPanelView","setShowHeaderPanelView","newMessagesBtnRef","isFirstReloadRef","elementRefs","messageListManagerRef","messageIdRef","prevMessageId","nextMessageId","totalMessagesCountRef","UnreadMessagesRef","newMessageTextRef","imageModerationDialogRef","parentMessageIdRef","smartReplyViewRef","headerViewRef","isConnectionReestablishedRef","isOnBottomRef","keepRecentMessages","timestampEnum","isFetchingPreviousMessages","threadedAlignment","getLoaderHtml","getErrorHtml","getEmptyHtml","messagesTemplate","messagesTypesMap","messagesTypesArray","isPartOfCurrentChatForUIEvent","validateTransientMessage","isPartOfCurrentChatForSDKEvent","isThreadOfCurrentChatForUIEvent","isThreadOfCurrentChatForSDKEvent","getMessageById","openThreadView","getThreadedMessageBubble","updateIsOnBottom","hasScrolled","updateMessageByMuid","prevMessageList","updateMessageByMessageId","replaceUpdatedMessage","updateMessage","replaceByMuid","reactToMessages","msgObject","reactions","getReactions","emojiObject","getReactedByMe","updatedReactions","getReaction","getCount","setCount","setReactedByMe","newMessageObj","setReactions","removeReaction","reactionAvailable","ReactionCount","addReaction","onReactMessage","configKeyboardStyle","keyboardStyle","onCopyMessage","getMentionsTextWithoutStyle","clipboard","writeText","onOpenMessageInfo","onOpenThread","onMessagePrivately","ccOpenChat","onDeleteMessage","deletedMessage","onEditMessage","setDefaultOptionsCallback","validateReactionOption","setBubbleAlignment","getFooterView","markMessageRead","markAsRead","checkAndMarkMessageAsRead","clearNewMessagesCount","reinitializeMessagesRequestBuilder","prependMessages","unreadCountObject","getUnreadMessageCountForUser","getUnreadMessageCountForGroup","previous","fetchActionMessages","isMyMessage","appendMessages","countText","setType","getActionOn","updateReplyCount","getReplyCount","setReplyCount","updateUnreadReplyCount","messageKey","addMessage","showAndIncrementUnreadCount","markAllMessagAsDelivered","markAllMessageAsRead","listToMarkRead","messageReadAndDelivered","getReceiptType","updateInteractiveMessage","previousMessage","interaction","getInteractions","setInteractions","checkAndScrollToBottom","forceScroll","messageReceivedHandler","groupActionMessageReceived","isReactionOfThisList","reactedById","getReactedBy","listParentMessageId","messageReactionUpdated","isAdded","REACTION_ACTION","REACTION_ADDED","REACTION_REMOVED","modifiedMessage","updateMessageWithReactionInfo","callActionMessageReceived","callMessage","handleGroupAndCallActions","onBottomCallback","onTopCallback","updateView","resetCountForUnreadMessagesInThread","subscribeToUIEvents","messageListHeader","ccMessageEdit","customInteractiveMessage","onTransientMessageReceived","transientMessage","liveReaction","onInteractionGoalCompleted","onMessageReactionAdded","onMessageReactionRemoved","reactionReceipt","showHeaderTitle","getBubbleLeadingView","getBubbleHeaderDate","getBubbleHeaderTitle","getBubbleHeader","getBubbleStatusInfoDate","getBubbleStatusInfoReceipt","getReactionListConfiguration","reactionListConfiguration","getReactionListAvatarStyle","getReactionListItemStyle","reactionListStyle","ReactionListStyle","sliderEmojiCountFont","sliderEmojiFont","tailViewFont","sliderEmojiCountColor","activeEmojiBackground","getReactionListStyle","ReactionListConfiguration","reactionItemClicked","reactionsRequestBuilder","getReactionInfoConfiguration","reactionInfoConfiguration","reactionInfoStyle","ReactionInfoStyle","namesColor","namesFont","reactedTextColor","reactedTextFont","reactionFontSize","getReactionInfoStyle","ReactionInfoConfiguration","getReactionView","reactionsStyle","ReactionsStyle","activeReactionBackground","getPrimary150","reactionBackground","reactionBorder","activeReactionBorder","getPrimary500","reactionBorderRadius","activeReactionCountTextColor","activeReactionCountTextFont","reactionCountTextFont","reactionCountTextColor","reactionBoxShadow","reactionEmojiFont","baseReactionBackground","getReactionsStyle","hoverDebounceTime","reactionClick","getBubbleThreadView","getThreadCount","mirrorIcon","isValidMessageForStatusInfo","getStatusInfoView","getMessageBubbleItem","getMessageBubbleViewItem","getMessageListFooter","getMessageListHeader","replyCount","getCurrentMessageListState","unsubscribeEvents","selectedMessage","ThreadedMessagesActionViewStyle","actionButtonStyle","threadMessagesStyle","CometChatThreadedMessages","parentMessage","messageActionView","threadedMessagesStyle","MessageListConfiguration","MessageComposerConfiguration","messageComposerView","messageListView","hideMessageComposer","parentMessageObject","setParentMessageObject","threadedMessagesStyleRef","ThreadedMessagesStyle","parentMessageObjectId","updateReceipt","prevState","tempObject","addListener","prevCount","closeView","auxilaryButtonView","auxiliaryButtonsAlignment","MessageHeaderConfiguration","threadedMessagesConfiguration","ThreadedMessagesConfiguration","DetailsConfiguration","customSoundForIncomingMessages","customSoundForOutgoingMessages","MessagesStyle","messageHeaderView","hideMessageHeader","hideDetails","auxiliaryMenu","CometChatMessages","ccHeaderMenuRef","threadMessageObjectRef","parentBubbleViewCallbackRef","setLiveReaction","openDetails","setOpenDetails","openThreadedMessages","setOpenThreadedMessages","showPanelView","setShowPanelView","assistBotChatView","reactionName","infoIconURL","liveReactionStart","blockedUser","ccUserUnBlocked","unblockedUser","openDetailsPage","closeDetailsPage","closeThreadView","getDetailsTemplate","getHeaderMenu","defaultAuxiliaryMenu","auxMenu","headerButtonClick","previousUser","previousGroup","reactionIconURL","liveReactionStyle","MessagesConfiguration","ConversationsConfiguration","startConversationConfiguration","ContactsConfiguration","startConversationIconURL","CometChatConversationsWithMessages","setActiveConversation","setShowCometChatContacts","activeChatRef","startConversationBtnElement","setStartConversationBtnRef","setActiveChat","conversationWith","getConversation","removeChatOnGroupAction","activeChat","currentuser","isSameUser","actionForGroup","removeActiveChatList","tempConversation","hideCometChatContactsView","StartConversationButton","onContactsItemClick","showCometChatContactsView","threadedMessageConfiguration","getDecoratorMessageContent","getGroupsWrapperStyles","groupsWithMessagesStyle","getGroupsStyle","getJoinGroupWrapperStyle","getJoinGroupStyle","JoinGroupConfiguration","configStyle","joinGroupStyle","passwordInputPlaceholderTextFont","passwordInputPlaceholderTextColor","passwordInputBackground","passwordInputBorder","passwordInputBorderRadius","passwordInputBoxShadow","passwordInputTextFont","passwordInputTextColor","joinButtonTextFont","joinButtonTextColor","joinButtonBackground","joinButtonBorderRadius","joinButtonBorder","getJoinGroupMessageHederStyle","getCreateGroupWrapperStyle","getCreateGroupStyle","createGroupConfiguration","createGroupStyle","groupTypeTextFont","groupTypeBorder","groupTypeBorderRadius","groupTypeTextColor","groupTypeTextBackground","groupTypeBackground","groupTypeBoxShadow","activeGroupTypeTextFont","activeGroupTypeTextColor","activeGroupTypeBackground","activeGroupTypeBoxShadow","activeGroupTypeBorderRadius","activeGroupTypeBorder","groupTypeTextBoxShadow","groupTypeTextBorderRadius","errorTextBackground","errorTextBorderRadius","errorTextBorder","nameInputPlaceholderTextFont","nameInputPlaceholderTextColor","nameInputBackground","nameInputTextFont","nameInputTextColor","nameInputBorder","nameInputBorderRadius","nameInputBoxShadow","createGroupButtonTextFont","createGroupButtonTextColor","createGroupButtonBackground","createGroupButtonBorderRadius","createGroupButtonBorder","createGroupButtonStyle","CometChatCreateGroupComponent","CometChatCreateGroup","CreateGroupConfiguration","joinGroupConfiguration","CometChatGroupsWithMessages","createGroupConfigCreateClick","createClick","joinGroupConfigOnError","joinGroupConfigJoinClick","joinClick","createGroupElement","setCreateGroupRef","joinGroupElement","setJoinGroupRef","createGroupButtonRef","openCreateGroupPage","setOpenCreateGroupPage","openPasswordModal","setOpenPasswordModal","protectedGroup","JoinGroup","CometChatJoinGroup","closeCreateGroup","closeJoinGroup","joinGroup","groupJoined","onGroupJoined","getJoinGroupHeaderView","getCreateGroupComponent","hideCloseButton","getDefaultGroupMenus","openCreateGroup","openCreateGroupModal","onJoinGroupButtonClicked","closeCreateGroupModal","withMessagesStyle","getUsersWrapperStyles","usersWithMessagesStyle","getUsersStyle","getMessageInformationStyle","desktopWidth","desktopHeight","CometChatUsersWithMessages","TabsStyle","onAccept","onDecline","acceptButtonText","showIncomingCallScreen","setShowIncomingCallScreen","showOngoingCallScreen","setShowOngoingCallScreen","showOutGoingCallScreen","setShowOutGoingCallScreen","listItemStyleRef","incomingCallStyleRef","rejectCallButtonRef","acceptCallButtonRef","acceptButtonStyleRef","AcceptButtonStyle","declineButtonStyleRef","DeclineButtonStyle","ongoingCallStyleRef","iconStyleRef","incomingcallListenerId","isCallActive","isCurrentCall","StorageUtils","getItem","activecall","oldCall","rejectIncomingCall","reason","rejectedCall","setItem","showCall","localStorageChange","newValue","oldValue","parse","attachChangeDetection","detachChangeDetection","checkForActiveCallAndEndCall","acceptIncomingCall","acceptCall","acceptCallButton","rejectCallButton","callSettings","backDropStyle","stickerIconURL"],"mappings":";;;;;;;;;GAE6B,eAAzBA,QAAQC,IAAIC,SACdC,EAAAC,qCCMW,IAAIC,EAAEC,EAAiBC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAEV,EAAEW,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,GAAGC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,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AAOp1C,KAAK5E,KACf,CAED,gBAAA4zC,GACI,OAAOhvC,KAAK6lD,aACf,CAED,cAAA5yB,GACI,OAAOjzB,KAAK8lD,WACf,2PCnBD,WAAAx8D,CAAY8nC,GACRpxB,KAAK5E,MAASg2B,EAAch2B,KAC/B,CAED,oBAAAggD,GACI,OAAOp7C,KAAK5E,KACf,8GCJD,WAAA9R,CAAY8nC,GACR,IAAIh2B,MAAEA,EAAKu1G,eAAEA,EAAchkF,aAAEA,GAAiByE,EAC9CpxB,KAAK5E,MAASA,EACd4E,KAAK2wG,eAAkBA,EACvB3wG,KAAK2sB,aAAgBA,CACxB,CAED,gBAAA6vB,GACI,OAAOx8C,KAAK5E,KACf,CAED,iBAAA4hD,GACI,OAAOh9C,KAAK2wG,cACf,CAED,eAAAz2D,GACI,OAAOl6C,KAAK2sB,YACf","x_google_ignoreList":[0,1,2,41]} \ No newline at end of file diff --git a/dist/types/CometChatMessageComposer/hooks.d.ts b/dist/types/CometChatMessageComposer/hooks.d.ts index 967c5a7f..da3608cd 100644 --- a/dist/types/CometChatMessageComposer/hooks.d.ts +++ b/dist/types/CometChatMessageComposer/hooks.d.ts @@ -58,6 +58,7 @@ type Args = { userMemberWrapperRef: any; getComposerId: Function; parentMessageIdPropRef: any; + propsText: string | undefined; }; export declare function Hooks(args: Args): void; export {}; diff --git a/dist/types/Shared/Utils/MessageUtils.d.ts b/dist/types/Shared/Utils/MessageUtils.d.ts index 2b847fc0..0a68af4f 100644 --- a/dist/types/Shared/Utils/MessageUtils.d.ts +++ b/dist/types/Shared/Utils/MessageUtils.d.ts @@ -12,4 +12,5 @@ export declare class MessageUtils { getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate): any; getBubbleWrapper(message: CometChat.BaseMessage, template: CometChatMessageTemplate): any; getMessageBubble(baseMessage: CometChat.BaseMessage, template: CometChatMessageTemplate, messageBubbleStyle: any, alignment: MessageBubbleAlignment): any; + getUserStatusVisible(user: CometChat.User | CometChat.GroupMember | any): boolean; } diff --git a/package.json b/package.json index 670d2426..a1c9a578 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "@cometchat/chat-uikit-react", - "version": "4.3.16", + "version": "4.3.17", "description": "Ready-to-use Chat UI Components for React(Javascript/Web)", "author": "CometChat", "peerDependencies": { - "@cometchat/chat-sdk-javascript": "^4.0.7", + "@cometchat/chat-sdk-javascript": "^4.0.8", "@cometchat/uikit-elements": "^4.3.13", "@cometchat/uikit-resources": "^4.3.10", "@cometchat/uikit-shared": "^4.3.15"