movius-chats 1.4.13 → 1.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +4 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/VoiceRecorder/VoiceRecorder.d.ts +37 -0
- package/lib/typescript/components/VoiceRecorder/VoiceRecorderFlow.d.ts +29 -0
- package/lib/typescript/components/VoiceRecorder/VoiceRecordingGesture.d.ts +25 -0
- package/lib/typescript/index.d.ts +3 -0
- package/package.json +5 -3
- package/src/components/ChatInput/ChatInput.tsx +92 -273
- package/src/components/VoiceRecorder/VoiceRecorder.tsx +388 -0
- package/src/components/VoiceRecorder/VoiceRecorderFlow.tsx +910 -0
- package/src/components/VoiceRecorder/VoiceRecordingGesture.tsx +404 -0
- package/src/index.tsx +17 -0
- package/lib/typescript/components/VoiceRecorder/AnimatedHoldMic.d.ts +0 -10
- package/lib/typescript/components/VoiceRecorder/LockSlideColumn.d.ts +0 -11
- package/lib/typescript/components/VoiceRecorder/LongPressRecording.d.ts +0 -14
- package/lib/typescript/components/VoiceRecorder/NormalRecording.d.ts +0 -22
- package/lib/typescript/components/VoiceRecorder/WaveformAnimation.d.ts +0 -12
- package/lib/typescript/components/VoiceRecorder/recordingContainerStyle.d.ts +0 -4
- package/src/components/VoiceRecorder/AnimatedHoldMic.tsx +0 -47
- package/src/components/VoiceRecorder/LockSlideColumn.tsx +0 -114
- package/src/components/VoiceRecorder/LongPressRecording.tsx +0 -103
- package/src/components/VoiceRecorder/NormalRecording.tsx +0 -235
- package/src/components/VoiceRecorder/WaveformAnimation.tsx +0 -90
- package/src/components/VoiceRecorder/recordingContainerStyle.ts +0 -19
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{Platform as n,Text as o,PanResponder as i,Pressable as A,View as a,Image as l,Animated as c,Easing as s,useWindowDimensions as u,Linking as C,PermissionsAndroid as d,StyleSheet as f,Vibration as h,ScrollView as v,TextInput as p,Modal as m,FlatList as g,Keyboard as y,KeyboardAvoidingView as b}from"react-native";import w from"twrnc";import E,{useState as S,createContext as x,useContext as _,useRef as O,useMemo as I,useCallback as M,useEffect as R}from"react";import k,{Path as G,Svg as D,G as K,Circle as T,Ellipse as L,Rect as P,Line as V}from"react-native-svg";import F from"react-native-video";import{Gesture as H,GestureDetector as B}from"react-native-gesture-handler";import j,{useSharedValue as U,withRepeat as Y,withSequence as N,withTiming as W,Easing as Q,withSpring as z,runOnJS as X,useAnimatedStyle as J,Extrapolation as $,interpolate as q}from"react-native-reanimated";function Z(e,t){this.v=e,this.k=t}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function te(e,t,r,n,o,i,A){try{var a=e[i](A),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function re(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function A(e){te(i,n,o,A,a,"next",e)}function a(e){te(i,n,o,A,a,"throw",e)}A(void 0)}))}}function ne(e,t,r){return t=ae(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,le()?Reflect.construct(t,r||[],ae(e).constructor):t.apply(e,r))}function oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,we(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(e,t,r){return(t=we(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(le=function(){return!!e})()}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ue(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ce(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,
|
|
3
|
+
var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof a?n:a,c=Object.create(l.prototype);return ve(c,"_invoke",function(r,n,o){var i,a,l,c=0,s=o||[],u=!1,C={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,a=0,l=e,C.n=r,A}};function d(r,n){for(a=r,l=n,t=0;!u&&c&&!o&&t<s.length;t++){var o,i=s[t],d=C.p,f=i[2];r>3?(o=f===n)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(a=0,C.v=n,C.n=i[1]):d<f&&(o=r<3||i[0]>n||n>f)&&(i[4]=r,i[5]=n,C.n=f,a=0))}if(o||r>1)return A;throw u=!0,n}return function(o,s,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===s&&d(s,f),a=s,l=f;(t=a<2?e:l)||!u;){i||(a?a<3?(a>1&&(C.n=-1),d(a,l)):C.n=l:C.v=l);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(u=C.n<0)?l:r.call(n,C))!==A)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:u}}}(r,o,i),!0),c}var A={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][n]?t(t([][n]())):(ve(t={},n,(function(){return this})),t),u=c.prototype=a.prototype=Object.create(s);function C(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ve(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,ve(u,"constructor",c),ve(c,"constructor",l),l.displayName="GeneratorFunction",ve(c,o,"GeneratorFunction"),ve(u),ve(u,o,"Generator"),ve(u,n,(function(){return this})),ve(u,"toString",(function(){return"[object Generator]"})),(Ce=function(){return{w:i,m:C}})()}function de(e,t,r,n,o){var i=fe(e,t,r,n,o);return i.next().then((function(e){return e.done?e.value:i.next()}))}function fe(e,t,r,n,o){return new he(Ce().w(e,t,r,n),o||Promise)}function he(e,t){function r(n,o,i,A){try{var a=e[n](o),l=a.value;return l instanceof Z?t.resolve(l.v).then((function(e){r("next",e,i,A)}),(function(e){r("throw",e,i,A)})):t.resolve(l).then((function(e){a.value=e,i(a)}),(function(e){return r("throw",e,i,A)}))}catch(e){A(e)}}var n;this.next||(ve(he.prototype),ve(he.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),ve(this,"_invoke",(function(e,o,i){function A(){return new t((function(t,n){r(e,i,t,n)}))}return n=n?n.then(A,A):A()}),!0)}function ve(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ve=function(e,t,r,n){function i(t,r){ve(e,t,(function(e){return this._invoke(t,r,e)}))}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},ve(e,t,r,n)}function pe(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}}function me(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,A,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function we(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Ee(){var e=Ce(),t=e.m(Ee),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))}var o={throw:1,return:2,break:3,continue:3};function i(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,o[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,me(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(Ee=function(){return{wrap:function(t,r,n,o){return e.w(i(t),r,n,o&&o.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(e,t){return new Z(e,t)},AsyncIterator:he,async:function(e,t,r,o,A){return(n(t)?fe:de)(i(e),t,r,o,A)},keys:pe,values:me}})()}var Se=function(t){var r=t.style,n=t.color;return e(k,{style:r,viewBox:"0 0 48 48",children:e(G,{fill:n,fillRule:"evenodd",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z",clipRule:"evenodd"})})},xe=["children"],_e=x(void 0),Oe=function(t){var r=t.children,n=ue(t,xe),o=ye(S(null),2),i=o[0],A=o[1],a=ye(S(!1),2),l=a[0],c=a[1];return e(_e.Provider,{value:se(se({},n),{},{mediaViewerGallery:i,setMediaViewerGallery:function(e,t){A({items:e,initialIndex:t});var r=e[t];c("video"===(null==r?void 0:r.kind))},clearMediaViewerGallery:function(){A(null),c(!1)},isVideoPlaying:l,setIsVideoPlaying:c}),children:r})},Ie=function(){var e=_(_e);if(!e)throw new Error("useChatContext must be used within a ChatProvider");return e};function Me(e){return null==e?void 0:e.colors}function Re(e,t){var r,n,o,i,A=Me(e),a=t?null!==(r=null==A?void 0:A.sentMediaTimestampBackground)&&void 0!==r?r:"rgba(0,0,0,0.45)":null!==(n=null==A?void 0:A.receivedMediaTimestampBackground)&&void 0!==n?n:"rgba(0,0,0,0.45)",l=t?null==e||null===(o=e.messageStyle)||void 0===o?void 0:o.sentMediaTimestampContainerStyle:null==e||null===(i=e.messageStyle)||void 0===i?void 0:i.receivedMediaTimestampContainerStyle;return se(se({},{paddingHorizontal:8,paddingVertical:4,borderRadius:6}),{},{backgroundColor:a},l)}function ke(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentBackground)&&void 0!==n?n:"rgba(255, 255, 255, 0.15)":null!==(r=null==o?void 0:o.receivedFileAttachmentBackground)&&void 0!==r?r:"rgba(0, 0, 0, 0.08)"}function Ge(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedFileAttachmentTextColor)&&void 0!==r?r:"#1f2937"}function De(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentSubtitleColor)&&void 0!==n?n:"rgba(255,255,255,0.7)":null!==(r=null==o?void 0:o.receivedFileAttachmentSubtitleColor)&&void 0!==r?r:"rgba(31,41,55,0.65)"}function Ke(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentAudioSpeedTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioSpeedTextColor)&&void 0!==r?r:"#e5e7eb"}function Te(e,t){var r=Me(e);return t?null==r?void 0:r.sentMessageTextColor:null==r?void 0:r.receivedMessageTextColor}function Le(e,t){var r=Me(e);return t?null==r?void 0:r.sentBubbleBackgroundColor:null==r?void 0:r.receivedBubbleBackgroundColor}function Pe(e){if(e.mediaItems&&e.mediaItems.length>0)return e.mediaItems;var t=[];return e.image&&t.push({uri:e.image,kind:"image"}),e.video&&t.push({uri:e.video,kind:"video"}),t}var Ve="ios"===n.OS?"h-6 w-6":"w-6 h-6";function Fe(e,t){return t?[e,{fontFamily:t}]:e}function He(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be,je={exports:{}},Ue={exports:{}},Ye={};var Ne,We,Qe,ze,Xe,Je,$e,qe,Ze,et,tt,rt,nt,ot,it,At={};
|
|
4
4
|
/** @license React v16.13.1
|
|
5
5
|
* react-is.development.js
|
|
6
6
|
*
|
|
@@ -8,10 +8,10 @@ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toS
|
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/function
|
|
11
|
+
*/function at(){return We||(We=1,"production"===process.env.NODE_ENV?Ue.exports=function(){if(Be)return Ye;Be=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,A=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var C=e.$$typeof;switch(C){case t:switch(e=e.type){case l:case c:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case s:case f:case d:case A:return e;default:return C}}case r:return C}}}function y(e){return g(e)===c}return Ye.AsyncMode=l,Ye.ConcurrentMode=c,Ye.ContextConsumer=a,Ye.ContextProvider=A,Ye.Element=t,Ye.ForwardRef=s,Ye.Fragment=n,Ye.Lazy=f,Ye.Memo=d,Ye.Portal=r,Ye.Profiler=i,Ye.StrictMode=o,Ye.Suspense=u,Ye.isAsyncMode=function(e){return y(e)||g(e)===l},Ye.isConcurrentMode=y,Ye.isContextConsumer=function(e){return g(e)===a},Ye.isContextProvider=function(e){return g(e)===A},Ye.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ye.isForwardRef=function(e){return g(e)===s},Ye.isFragment=function(e){return g(e)===n},Ye.isLazy=function(e){return g(e)===f},Ye.isMemo=function(e){return g(e)===d},Ye.isPortal=function(e){return g(e)===r},Ye.isProfiler=function(e){return g(e)===i},Ye.isStrictMode=function(e){return g(e)===o},Ye.isSuspense=function(e){return g(e)===u},Ye.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===C||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===A||e.$$typeof===a||e.$$typeof===s||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===h)},Ye.typeOf=g,Ye}():Ue.exports=(Ne||(Ne=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,A=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,s=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var C=e.$$typeof;switch(C){case t:var h=e.type;switch(h){case l:case c:case n:case i:case o:case u:return h;default:var v=h&&h.$$typeof;switch(v){case a:case s:case f:case d:case A:return v;default:return C}}case r:return C}}}var y=l,b=c,w=a,E=A,S=t,x=s,_=n,O=f,I=d,M=r,R=i,k=o,G=u,D=!1;function K(e){return g(e)===c}At.AsyncMode=y,At.ConcurrentMode=b,At.ContextConsumer=w,At.ContextProvider=E,At.Element=S,At.ForwardRef=x,At.Fragment=_,At.Lazy=O,At.Memo=I,At.Portal=M,At.Profiler=R,At.StrictMode=k,At.Suspense=G,At.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),K(e)||g(e)===l},At.isConcurrentMode=K,At.isContextConsumer=function(e){return g(e)===a},At.isContextProvider=function(e){return g(e)===A},At.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},At.isForwardRef=function(e){return g(e)===s},At.isFragment=function(e){return g(e)===n},At.isLazy=function(e){return g(e)===f},At.isMemo=function(e){return g(e)===d},At.isPortal=function(e){return g(e)===r},At.isProfiler=function(e){return g(e)===i},At.isStrictMode=function(e){return g(e)===o},At.isSuspense=function(e){return g(e)===u},At.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===C||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===A||e.$$typeof===a||e.$$typeof===s||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===h)},At.typeOf=g}()),At)),Ue.exports}
|
|
12
12
|
/*
|
|
13
13
|
object-assign
|
|
14
14
|
(c) Sindre Sorhus
|
|
15
15
|
@license MIT
|
|
16
|
-
*/function et(){if(De)return Le;De=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Le=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,l,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),u=1;u<arguments.length;u++){for(var c in i=Object(arguments[u]))t.call(i,c)&&(a[c]=i[c]);if(e){l=e(i);for(var s=0;s<l.length;s++)n.call(i,l[s])&&(a[l[s]]=i[l[s]])}}return a},Le}function tt(){if(We)return Ne;We=1;return Ne="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function nt(){return $e?He:($e=1,He=Function.call.bind(Object.prototype.hasOwnProperty))}function rt(){if(qe)return Ue;qe=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=tt(),n={},r=nt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,l,a,u){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var s;try{if("function"!=typeof o[c]){var d=Error((a||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}s=o[c](i,c,a,l,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((a||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof 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)."),s instanceof Error&&!(s.message in n)){n[s.message]=!0;var f=u?u():"";e("Failed "+l+" type: "+s.message+(null!=f?f:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Ue=o}function ot(){if(Ye)return Ge;Ye=1;var e=Je(),t=et(),n=tt(),r=nt(),o=rt(),i=function(){};function l(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Ge=function(a,u){var c="function"==typeof Symbol&&Symbol.iterator;var s="<<anonymous>>",d={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:h(l),arrayOf:function(e){return h((function(t,r,o,i,l){if("function"!=typeof e)return new v("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new v("Invalid "+i+" `"+l+"` of type `"+g(a)+"` supplied to `"+o+"`, expected an array.");for(var u=0;u<a.length;u++){var c=e(a,u,o,i,l+"["+u+"]",n);if(c instanceof Error)return c}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return a(i)?null:new v("Invalid "+r+" `"+o+"` of type `"+g(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var l=t[n];return e.isValidElementType(l)?null:new v("Invalid "+o+" `"+i+"` of type `"+g(l)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var l=e.name||s;return new v("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:s)+"` supplied to `")+r+"`, expected instance of `"+l+"`.")}var a;return null}))},node:h((function(e,t,n,r,o){return m(e[t])?null:new v("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,l,a){if("function"!=typeof e)return new v("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var u=t[o],c=g(u);if("object"!==c)return new v("Invalid "+l+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var s in u)if(r(u,s)){var d=e(u,s,i,l,a+"."+s,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),l;return h((function(t,n,r,o,i){for(var l=t[n],a=0;a<e.length;a++)if(f(l,e[a]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===b(t)?String(t):t}));return new v("Invalid "+o+" `"+i+"` of value `"+String(l)+"` supplied to `"+r+"`, expected one of "+u+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),l}return h((function(t,o,i,l,a){for(var u=[],c=0;c<e.length;c++){var s=(0,e[c])(t,o,i,l,a,n);if(null==s)return null;s.data&&r(s.data,"expectedType")&&u.push(s.data.expectedType)}return new v("Invalid "+l+" `"+a+"` supplied to `"+i+"`"+(u.length>0?", expected one of type ["+u.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,l){var a=t[r],u=g(a);if("object"!==u)return new v("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var s=e[c];if("function"!=typeof s)return y(o,i,l,c,b(s));var d=s(a,c,o,i,l+"."+c,n);if(d)return d}return null}))},exact:function(e){return h((function(o,i,l,a,u){var c=o[i],s=g(c);if("object"!==s)return new v("Invalid "+a+" `"+u+"` of type `"+s+"` supplied to `"+l+"`, expected `object`.");var d=t({},o[i],e);for(var f in d){var h=e[f];if(r(e,f)&&"function"!=typeof h)return y(l,a,u,f,b(h));if(!h)return new v("Invalid "+a+" `"+u+"` key `"+f+"` supplied to `"+l+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=h(c,f,l,a,u+"."+f,n);if(p)return p}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function v(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,l,a,c,d,f,h){if(c=c||s,f=f||a,h!==n){if(u){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=c+":"+a;!t[y]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==l[a]?o?null===l[a]?new v("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new v("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(l,a,c,d,f)}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}function p(e){return h((function(t,n,r,o,i,l){var a=t[n];return g(a)!==e?new v("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function y(e,t,n,r,o){return new v((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function m(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!m(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!m(o[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function b(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return v.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Ge}function it(){if(Xe)return Ke;Xe=1;var e=tt();function t(){}function n(){}return n.resetWarningCache=t,Ke=function(){function r(t,n,r,o,i,l){if(l!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function lt(){if(Qe)return _e.exports;if(Qe=1,"production"!==process.env.NODE_ENV){var e=Je();_e.exports=ot()(e.isElement,true)}else _e.exports=it()();return _e.exports}var at=Ee(lt()),ut=function(){return Q((function e(t,n){X(this,e),this.text=t,this.patterns=n||[]}),[{key:"parse",value:function(){var e=this,t=[{children:this.text}];return this.patterns.forEach((function(n){var r=[],o=n.nonExhaustiveModeMaxMatchCount||0,i=Math.min(Math.max(Number.isInteger(o)?o:0,0)||Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),l=0;t.forEach((function(t){if(t._matched)r.push(t);else{var o,a=[],u=t.children,c=0;for(n.pattern.lastIndex=0;u&&(o=n.pattern.exec(u));){var s=u.substr(0,o.index);if(c=o.index,++l>i)break;a.push({children:s}),a.push(e.getMatchedPart(n,o[0],o,c)),u=u.substr(o.index+o[0].length),c+=o[0].length-1,n.pattern.lastIndex=0}a.push({children:u}),r.push.apply(r,a)}})),t=r})),t.forEach((function(e){return delete e._matched})),t.filter((function(e){return!!e.children}))}},{key:"getMatchedPart",value:function(e,t,n,r){var o={};Object.keys(e).forEach((function(n){"pattern"!==n&&"renderText"!==n&&"nonExhaustiveModeMaxMatchCount"!==n&&("function"==typeof e[n]?o[n]=function(){return e[n](t,r)}:o[n]=e[n])}));var i=t;return e.renderText&&"function"==typeof e.renderText&&(i=e.renderText(t,n)),ne(ne({},o),{},{children:i,_matched:!0})}}])}(),ct=["type"],st=["style"],dt=["parse","childrenProps"],ft={url:/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{1,256}\.(xn--)?[a-z0-9-]{2,20}\b([-a-zA-Z0-9@:%_\+\[\],.~#?&\/=]*[-a-zA-Z0-9@:%_\+\]~#?&\/=])*/i,phone:/[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,7}/,email:/\S+@\S+\.\S+/},vt=at.shape(ne(ne({},o.propTypes),{},{type:at.oneOf(Object.keys(ft)).isRequired,nonExhaustiveMaxMatchCount:at.number})),ht=at.shape(ne(ne({},o.propTypes),{},{pattern:at.oneOfType([at.string,at.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:at.number})),pt=function(){function t(){return X(this,t),K(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(t,x.Component),Q(t,[{key:"setNativeProps",value:function(e){this._root.setNativeProps(e)}},{key:"getPatterns",value:function(){return this.props.parse.map((function(e){var t=e.type,n=re(e,ct);if(t){if(!ft[t])throw new Error("".concat(e.type," is not a supported type"));n.pattern=ft[t]}return n}))}},{key:"getParsedText",value:function(){var t=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new ut(this.props.children,this.getPatterns()).parse().map((function(n,r){var i=t.props.style,l=n.style,a=re(n,st);return e(o,ne(ne({style:[i,l]},t.props.childrenProps),a),"parsedText-".concat(r))})):this.props.children}},{key:"render",value:function(){var t=this,n=ne({},this.props);n.parse,n.childrenProps;var r=re(n,dt);return e(o,ne(ne({ref:function(e){return t._root=e}},r),{},{children:this.getParsedText()}))}}])}();pt.displayName="ParsedText",pt.propTypes=ne(ne({},o.propTypes),{},{parse:at.arrayOf(at.oneOfType([vt,ht])),childrenProps:at.shape(o.propTypes)}),pt.defaultProps={parse:null,childrenProps:{}};var yt,mt,gt,bt,wt,xt,Ct,St,At,Pt,kt,It=function(t){var n=t.style,r=t.color;return e(M,{style:n,viewBox:"0 0 15 15",children:e(T,{fill:r,fillRule:"evenodd",d:"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z",clipRule:"evenodd"})})},Ot=function(t){var n=t.style,r=t.color;return e(M,{style:n,viewBox:"0 0 24 24",children:e(T,{fill:r,d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})},Mt=S(void 0),Tt=function(t){var n=t.children,r=fe(C(null),2),o=r[0],i=r[1];return e(Mt.Provider,{value:{currentlyPlayingId:o,setCurrentlyPlayingId:i},children:n})},Rt=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n<10?"0":"").concat(n)},Et=[1,1.5,2],jt=42;function _t(t){var n,r,i,c,s,d=t.isPlaying,f=t.playbackRate,v=t.onCycleSpeed,h=t.senderAvatar,p=t.senderName,y=t.isCurrentUser,m=t.theme;return d?e(l,{onPress:v,style:[w(yt||(yt=ve(["rounded-full items-center justify-center"]))),{width:jt,height:jt,backgroundColor:y?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==m||null===(n=m.messageStyle)||void 0===n?void 0:n.audioSpeedButtonStyle],children:e(o,{style:Re([w(mt||(mt=ve(["text-xs font-semibold"]))),{color:ke(m,y)},null==m||null===(r=m.messageStyle)||void 0===r?void 0:r.audioSpeedTextStyle],null==m?void 0:m.fontFamily),children:1===f?"1x":"".concat(f,"x")})}):h?e(u,{source:{uri:h},style:[w(gt||(gt=ve(["rounded-full"]))),{width:jt,height:jt},null==m||null===(i=m.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle],resizeMode:"cover"}):e(a,{style:[w(bt||(bt=ve(["rounded-full items-center justify-center"]))),{width:jt,height:jt,backgroundColor:y?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e(o,{style:Re([w(wt||(wt=ve(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==m?void 0:m.fontFamily),children:(c=p,s=null==c?void 0:c.trim(),s?s.charAt(0).toUpperCase():"?")})})}var Ft,Bt,Vt,zt,Lt,Dt,Nt,Wt,Ht=function(r){var u,c,s=r.audioUrl,d=r.audioId,f=r.isVideoPlaying,v=r.isCurrentUser,h=r.senderAvatar,p=r.senderName,y=r.reserveStatusSpace,m=void 0===y||y,g=we(),b=g.theme,x=g.CustomPlayIcon,S=g.CustomPauseIcon,O=g.showMessageStatus,M=function(){var e=A(Mt);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),T=M.currentlyPlayingId,R=M.setCurrentlyPlayingId,E=P(null),j=fe(C(!1),2),_=j[0],F=j[1],B=fe(C(0),2),z=B[0],L=B[1],D=fe(C(0),2),N=D[0],W=D[1],H=fe(C(!1),2),$=H[0],U=H[1],q=fe(C(1),2),G=q[0],Y=q[1],K=fe(C(0),2),X=K[0],Q=K[1],Z=P(null),J=k((function(){return function(e,t){for(var n=5381,r=0;r<e.length;r++)n=(n<<5)+n+e.charCodeAt(r)|0;return Array.from({length:t},(function(e,t){return n=0|Math.imul(n^n>>>16,73244475+31337*t),n^=n>>>13,.18+Math.abs(n)%100/100*.82}))}(s,50)}),[s]),ee=function(e,t){var n,r,o,i,l=xe(e);return t?{inactive:null!==(o=null==l?void 0:l.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==l?void 0:l.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(n=null==l?void 0:l.receivedAudioWaveformColor)&&void 0!==n?n:"rgba(0,0,0,0.20)",active:null!==(r=null==l?void 0:l.receivedAudioWaveformActiveColor)&&void 0!==r?r:"rgba(0,0,0,0.60)"}}(b,v),te=ee.inactive,re=ee.active,oe=function(e,t){var n,r,o,i,l=xe(e);return t?null!==(o=null!==(i=null==l?void 0:l.sentAudioTimestampColor)&&void 0!==i?i:null==l?void 0:l.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(n=null!==(r=null==l?void 0:l.receivedAudioTimestampColor)&&void 0!==r?r:null==l?void 0:l.receivedTimestampColor)&&void 0!==n?n:"rgba(0,0,0,0.45)"}(b,v),ie=function(e,t){var n,r,o=xe(e);return t?null!==(r=null==o?void 0:o.sentAudioPlayIconColor)&&void 0!==r?r:"#ffffff":null!==(n=null==o?void 0:o.receivedAudioPlayIconColor)&&void 0!==n?n:"#374151"}(b,v),le=function(e,t){var n,r,o=xe(e);return t?null!==(r=null==o?void 0:o.sentAudioPauseIconColor)&&void 0!==r?r:"#ffffff":null!==(n=null==o?void 0:o.receivedAudioPauseIconColor)&&void 0!==n?n:"#374151"}(b,v),ae=_&&!(f||!!T&&T!==d),ue=N>0?z/N:0,ce=I((function(e){var t;(W(e.duration),null!==Z.current)&&(null===(t=E.current)||void 0===t||t.seek(Z.current),Z.current=null)}),[]),se=I((function(e){var t=e.currentTime;$||L(t)}),[$]),de=I((function(){var e;F(!1),L(0),null===(e=E.current)||void 0===e||e.seek(0),R(null)}),[R]),he=I((function(){ae?(F(!1),R(null)):(R(d),F(!0))}),[ae,d,R]),pe=I((function(){Y((function(e){var t=Et.indexOf(e),n=Et[(t+1)%Et.length];return null!=n?n:1}))}),[]),ye=I((function(e){var t=X;if(!(t<=0||N<=0)){var n,r=Math.max(0,Math.min(e/t,1))*N;if(L(r),N>0)null===(n=E.current)||void 0===n||n.seek(r);else Z.current=r}}),[N,X]),me=k((function(){return i.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){U(!0),ye(e.nativeEvent.locationX)},onPanResponderMove:function(e){return ye(e.nativeEvent.locationX)},onPanResponderRelease:function(){return U(!1)},onPanResponderTerminate:function(){return U(!1)}})}),[ye]),ge=e(l,{onPress:he,hitSlop:8,style:w(xt||(xt=ve(["shrink-0 px-0.5"]))),children:ae?S?e(S,{}):e(It,{style:w.style("h-6 w-6"),color:le}):x?e(x,{}):e(Ot,{style:w.style("h-6 w-6"),color:ie})}),be=e(_t,{isPlaying:ae,playbackRate:G,onCycleSpeed:pe,senderAvatar:h,senderName:p,isCurrentUser:v,theme:b}),Ce=e(a,{style:[w(Ct||(Ct=ve(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return Q(e.nativeEvent.layout.width)},children:e(a,ne(ne({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==b||null===(u=b.messageStyle)||void 0===u?void 0:u.progressBarStyle]},me.panHandlers),{},{children:J.map((function(t,n){var r,o=(n+.5)/50<=ue;return e(a,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*t)),borderRadius:2,backgroundColor:o?re:te},o?null==b||null===(r=b.messageStyle)||void 0===r?void 0:r.activeProgressBarStyle:void 0]},n)}))}))});return t(a,{style:[w(St||(St=ve(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),m&&O&&w(At||(At=ve(["pb-4"])))],children:[e(V,{ref:E,source:{uri:s},paused:!ae,rate:G,playInBackground:!1,playWhenInactive:!1,onLoad:ce,onProgress:se,onEnd:de,style:{width:0,height:0},progressUpdateInterval:80}),e(a,{style:w(Pt||(Pt=ve(["flex-row items-center gap-1.5"]))),children:t(n,v?{children:[be,ge,Ce]}:{children:[ge,Ce,be]})}),e(o,{style:Re([w(kt||(kt=ve(["text-[11px] mt-1"]))),{color:oe,paddingLeft:v?82:34},null==b||null===(c=b.messageStyle)||void 0===c?void 0:c.audioDurationStyle],null==b?void 0:b.fontFamily),children:Rt(ae?z:N>0?N:z)})]})},$t=x.memo(Ht),Ut=function(t){var n=t.style,r=t.spinning,o=void 0!==r&&r,i=P(new c.Value(0)).current;O((function(){o&&c.loop(c.timing(i,{toValue:1,duration:1e3,easing:s.linear,useNativeDriver:!0})).start()}),[o]);var l=i.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e(c.View,{style:o?{transform:[{rotate:l}]}:void 0,children:e(M,{style:n,viewBox:"0 0 1024 1024",children:e(T,{d:"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36",fill:"white"})})})},qt=320,Gt=qt,Yt=Math.round(176),Kt=qt-Yt-2,Xt=Math.round(159),Qt=function(r){var i,l=r.uri,u=r.cellStyle,c=r.roundedStyle,s=we(),d=s.theme,f=s.CustomPlayIcon,v=x.useRef(null),h=fe(x.useState(0),2),p=h[0],y=h[1],m=fe(x.useState(!0),2),g=m[0],b=m[1],C=fe(x.useState(!1),2),S=C[0],A=C[1];return t(a,{style:[u,c],pointerEvents:"none",children:[e(V,{source:{uri:l},ref:v,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[c,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){b(!0),A(!1)},onLoad:function(e){y(e.duration),b(!1)},onError:function(){A(!0),b(!1)}}),g&&e(a,{style:[w(Ft||(Ft=ve(["absolute inset-0 items-center justify-center bg-black/40"]))),c],children:e(Ut,{style:w.style("h-8 w-8"),spinning:!0})}),!g&&!S&&t(n,{children:[e(a,{style:w(Bt||(Bt=ve(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:f?e(f,{}):e(Ot,{style:w.style("h-10 w-10"),color:(null==d||null===(i=d.colors)||void 0===i?void 0:i.videoPlayIconColor)||"white"})}),e(a,{style:w(Vt||(Vt=ve(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e(o,{style:w(zt||(zt=ve(["text-white text-[10px] font-semibold"]))),children:Zt(p)})})]}),S&&e(a,{style:[w(Lt||(Lt=ve(["absolute inset-0 items-center justify-center bg-red-500/50"]))),c],children:e(o,{style:Re(w(Dt||(Dt=ve(["text-white text-xs"]))),null==d?void 0:d.fontFamily),children:"Video"})})]})};function Zt(e){if(!e||Number.isNaN(e))return"0:00";var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n.toString().padStart(2,"0"))}var Jt,en,tn,nn,rn,on,ln,an,un,cn,sn,dn,fn,vn,hn,pn,yn,mn,gn,bn,wn,xn,Cn,Sn,An=function(n){var r=n.items,i=n.onOpenGallery,c=d().width,s=Math.min(240,.72*c);if(0===r.length)return null;var f={borderRadius:6,overflow:"hidden"};if(1===r.length){var v=r[0];return e(l,{onPress:function(){return i(r,0)},style:{width:s,height:320,marginVertical:8},children:"image"===v.kind?e(u,{source:{uri:v.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e(Qt,{uri:v.uri,cellStyle:{width:s,height:320},roundedStyle:{borderRadius:8}})})}if(2===r.length){var h=(s-2)/2;return e(a,{style:{width:s,height:Gt,flexDirection:"row",gap:2,marginVertical:8},children:r.slice(0,2).map((function(t,n){return e(l,{onPress:function(){return i(r,n)},style:{width:h,height:Gt},children:"image"===t.kind?e(u,{source:{uri:t.uri},style:[f,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(Qt,{uri:t.uri,cellStyle:{width:h,height:Gt},roundedStyle:f})},"".concat(t.uri,"-").concat(n))}))})}if(3===r.length){var p=r[0],y=r[1],m=r[2],g=(s-2)/2;return t(a,{style:{width:s,height:qt,marginVertical:8,gap:2},children:[e(l,{onPress:function(){return i(r,0)},style:{width:s,height:Yt},children:"image"===p.kind?e(u,{source:{uri:p.uri},style:[f,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(Qt,{uri:p.uri,cellStyle:{width:s,height:Yt},roundedStyle:f})}),t(a,{style:{flexDirection:"row",gap:2,height:Kt},children:[e(l,{onPress:function(){return i(r,1)},style:{width:g,height:Kt},children:"image"===y.kind?e(u,{source:{uri:y.uri},style:[f,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(Qt,{uri:y.uri,cellStyle:{width:g,height:Kt},roundedStyle:f})},"".concat(y.uri,"-1")),e(l,{onPress:function(){return i(r,2)},style:{width:g,height:Kt},children:"image"===m.kind?e(u,{source:{uri:m.uri},style:[f,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(Qt,{uri:m.uri,cellStyle:{width:g,height:Kt},roundedStyle:f})},"".concat(m.uri,"-2"))]})]})}var b=(s-2)/2,x=r.length-4,C=r.slice(0,4);return e(a,{style:{width:s,height:qt,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:C.map((function(n,c){return t(l,{onPress:function(){return i(r,c)},style:{width:b,height:Xt,position:"relative"},children:["image"===n.kind?e(u,{source:{uri:n.uri},style:[f,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(Qt,{uri:n.uri,cellStyle:{width:b,height:Xt},roundedStyle:f}),3===c&&x>0&&e(a,{style:w(Nt||(Nt=ve(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:t(o,{style:w(Wt||(Wt=ve(["text-white text-lg font-bold"]))),children:["+",x]})})]},"".concat(n.uri,"-").concat(c))}))})},Pn=function(n){var r,i,u,c,s=n.message,d=n.onGalleryOpen,v=n.isVideoPlaying,h=n.isCurrentUser,p=we(),y=p.theme,m=p.showMessageStatus,g=p.onFileAttachmentPress,b=k((function(){return Me(s)}),[s]);return t(a,{children:[b.length>0&&e(An,{items:b,onOpenGallery:d}),(null!==(r=s.fileAttachments)&&void 0!==r?r:[]).map((function(n,r){var i,a,u,c,s,d;return t(l,{onPress:function(){g?g(n):f.openURL(n.uri.startsWith("http")||n.uri.startsWith("file:")?n.uri:"file://".concat(n.uri))},style:[w(Jt||(Jt=ve(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:Se(y,h)},h?null==y||null===(i=y.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==y||null===(a=y.messageStyle)||void 0===a?void 0:a.receivedFileAttachmentStyle],children:[t(o,{style:Re([w(en||(en=ve(["text-xs font-semibold"]))),{color:Ae(y,h)},h?null==y||null===(u=y.messageStyle)||void 0===u?void 0:u.sentFileAttachmentTextStyle:null==y||null===(c=y.messageStyle)||void 0===c?void 0:c.receivedFileAttachmentTextStyle],null==y?void 0:y.fontFamily),numberOfLines:2,children:["📎 ",n.name]}),e(o,{style:Re([w(tn||(tn=ve(["text-[10px] mt-0.5"]))),{color:Pe(y,h)},h?null==y||null===(s=y.messageStyle)||void 0===s?void 0:s.sentFileAttachmentSubtitleStyle:null==y||null===(d=y.messageStyle)||void 0===d?void 0:d.receivedFileAttachmentSubtitleStyle],null==y?void 0:y.fontFamily),children:n.type})]},"".concat(n.uri,"-").concat(r))})),s.audio&&e($t,{audioUrl:s.audio,audioId:s.id,isVideoPlaying:v,isCurrentUser:h,senderAvatar:s.senderAvatar,senderName:s.senderName,reserveStatusSpace:!s.text}),s.text&&e(pt,{style:Re([w(nn||(nn=ve(["pt-1"]))),w(m?rn||(rn=ve(["pb-0"])):on||(on=ve(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},h?null==y||null===(i=y.messageStyle)||void 0===i?void 0:i.sentTextStyle:null==y||null===(u=y.messageStyle)||void 0===u?void 0:u.receivedTextStyle,Ie(y,h)?{color:Ie(y,h)}:void 0],null==y?void 0:y.fontFamily),parse:[{type:"url",style:ne({color:"blue",textDecorationLine:"underline"},(c=null==y?void 0:y.fontFamily,c?{fontFamily:c}:void 0)),onPress:function(e){return f.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:s.text})]})},kn=x.memo(Pn),In=function(t){var n=t.style,r=t.fill;return e(M,{style:n,viewBox:"0 0 24 24",children:e(T,{fill:r,d:"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"})})},On=function(t){var n=t.style,r=t.fill;return e(M,{style:n,viewBox:"0 0 24 24",children:e(T,{d:"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z",fill:r})})},Mn=function(r){var i,l,u,c=r.time,s=r.status,d=r.isCurrentUser,f=r.hasText,v=r.hasAudio,h=r.hasGalleryMedia,p=r.hasFileAttachments,y=we(),m=y.theme,g=y.showMessageStatus,b=(h||p)&&!f&&!v,x=h&&!f&&!v?"#ffffff":b?function(e,t){var n,r,o=xe(e);return t?null!==(r=null==o?void 0:o.sentTimestampColor)&&void 0!==r?r:"rgba(255, 255, 255, 0.75)":null!==(n=null==o?void 0:o.receivedTimestampColor)&&void 0!==n?n:"rgba(107, 114, 128, 0.85)"}(m,d):function(e,t){var n,r,o=xe(e);return t?null!==(r=null==o?void 0:o.sentTimestampColor)&&void 0!==r?r:"rgba(255, 255, 255, 0.75)":null!==(n=null==o?void 0:o.receivedTimestampColor)&&void 0!==n?n:"rgba(107, 114, 128, 0.85)"}(m,d);return e(n,{children:g&&t(a,{style:[w(ln||(ln=ve(["flex-row items-center"]))),f?w(an||(an=ve(["justify-end pb-1 ml-4"]))):v?w(un||(un=ve(["absolute right-3 bottom-2"]))):b?[w(cn||(cn=ve(["absolute right-3 bottom-4"]))),Ce(m,d)]:[w(sn||(sn=ve(["absolute right-3 bottom-4"]))),Ce(m,d)]],children:[e(o,{style:Re([w(dn||(dn=ve(["text-xs"]))),{color:x}],null==m?void 0:m.fontFamily),children:c}),d&&t(a,{style:w(fn||(fn=ve(["ml-1 flex-row items-center"]))),children:["sent"===s&&e(On,{style:w.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(i=m.colors)||void 0===i?void 0:i.sentIconColor)||"#6B7280"}),"delivered"===s&&e(In,{style:w.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(l=m.colors)||void 0===l?void 0:l.deliveredIconColor)||"#6B7280"}),"read"===s&&e(In,{style:w.style("h-4 w-4",{opacity:.9}),fill:(null==m||null===(u=m.colors)||void 0===u?void 0:u.readIconColor)||"#3B82F6"})]})]})})},Tn=x.memo(Mn),Rn=function(r){var i,c,s,d,f,v,h,p,y,m,g=r.message,b=r.isCurrentUser,x=r.isFirstInSequence,C=r.onLongPress,S=we(),A=S.theme,P=S.showAvatars,k=S.showUserNames,I=S.showBubbleTail,O=S.setMediaViewerGallery,M=S.isVideoPlaying,T=Me(g),R=(null!==(i=null===(c=g.fileAttachments)||void 0===c?void 0:c.length)&&void 0!==i?i:0)>0&&0===T.length&&!g.text&&!g.audio;return t(l,{onLongPress:C,style:[w(vn||(vn=ve(["px-2 my-1 max-w-[75%] relative"]))),w(b?hn||(hn=ve(["self-end mr-3"])):pn||(pn=ve(["self-start ml-9"]))),w(x?b?yn||(yn=ve(["bg-green-500 rounded-tr-none"])):mn||(mn=ve(["bg-white rounded-tl-none"])):b?gn||(gn=ve(["bg-green-500"])):bn||(bn=ve(["bg-white"]))),ne(ne({borderRadius:8},Oe(A,b)?{backgroundColor:Oe(A,b)}:{}),b?null==A||null===(s=A.bubbleStyle)||void 0===s?void 0:s.sent:null==A||null===(d=A.bubbleStyle)||void 0===d?void 0:d.received)],children:[!b&&x&&P&&t(n,{children:[e(a,{style:w(wn||(wn=ve(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:g.senderAvatar?e(u,{source:{uri:g.senderAvatar},style:[w(xn||(xn=ve(["w-full h-full rounded-full"]))),null==A||null===(f=A.bubbleStyle)||void 0===f?void 0:f.avatarImageStyle],resizeMode:"cover"}):e(o,{style:Re([w(Cn||(Cn=ve(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==A||null===(v=A.bubbleStyle)||void 0===v?void 0:v.avatarTextStyle],null==A?void 0:A.fontFamily),children:null===(h=g.senderName)||void 0===h?void 0:h.charAt(0)})}),k&&g.senderName&&e(o,{style:Re([w(Sn||(Sn=ve(["text-sm text-black font-semibold mt-1 capitalize"]))),null==A||null===(p=A.bubbleStyle)||void 0===p?void 0:p.userNameStyle],null==A?void 0:A.fontFamily),children:g.senderName})]}),x&&I&&e(ye,{style:w.style("absolute w-6 h-6",b?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:b?(null==A||null===(y=A.colors)||void 0===y?void 0:y.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==A||null===(m=A.colors)||void 0===m?void 0:m.receivedMessageTailColor)||"white"}),e(kn,{message:g,isCurrentUser:b,isFirstInSequence:x,onGalleryOpen:function(e,t){O(e,t)},isVideoPlaying:M}),e(Tn,{time:g.time,status:b?g.status:void 0,isCurrentUser:b,hasText:!!g.text,hasAudio:!!g.audio,hasGalleryMedia:T.length>0&&!g.text,hasFileAttachments:R})]})},En=x.memo(Rn),jn=function(n){var r=n.style,o=n.color;return e(R,{style:r,viewBox:"0 0 24 24",children:t(E,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(j,{cx:"12",cy:"13",r:"3"}),e(T,{d:"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z"}),e(T,{strokeLinecap:"round",d:"M19 10h-1"})]})})},_n=function(n){var r=n.style,o=n.color;return e(M,{style:r,viewBox:"0 0 24 24",children:t(E,{fill:"none",stroke:o,children:[e(T,{strokeLinecap:"round",strokeWidth:"1.5",d:"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001"}),e(_,{cx:"14.509",cy:"9.774",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 14.51 9.774)"}),e(_,{cx:"8.714",cy:"11.328",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 8.714 11.328)"}),e(T,{strokeWidth:"1.5",d:"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z"}),e(T,{strokeWidth:"1.5",d:"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935"})]})})},Fn=function(n){var r=n.style,o=n.color;return e(M,{style:r,viewBox:"0 0 24 24",children:t(E,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(T,{d:"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z"}),e(T,{strokeLinecap:"round",d:"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3",opacity:".5"})]})})},Bn=function(t){var n=t.style,r=t.color;return e(M,{style:n,fill:r,viewBox:"0 0 24 24",children:e(T,{d:"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z"})})},Vn=function(n){var r=n.style,o=n.color;return e(M,{style:r,viewBox:"0 0 24 24",children:t(E,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(T,{d:"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z"}),e(T,{strokeLinecap:"round",d:"m17.79 6.21l-4.211 4.165",opacity:".5"})]})})},zn={code:"function AnimatedHoldMicTsx1(){const{scale}=this.__closure;return{transform:[{scale:scale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/AnimatedHoldMic.tsx",sourceMap:'{"version":3,"names":["AnimatedHoldMicTsx1","scale","__closure","transform","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/AnimatedHoldMic.tsx"],"mappings":"AAU2C,SAAAA,oBAAA,QAAAC,KAAA,OAAAC,SAAA,OAAO,CAC1CC,SAAS,CAAE,CAAC,CAAEF,KAAK,CAAEA,KAAK,CAACG,KAAM,CAAC,CACtC,CAAC","ignoreList":[]}',version:"3.16.7"},Ln=function(t){var n=t.color,r=void 0===n?"#ef4444":n,o=t.size,i=void 0===o?28:o,l=t.style,a=L(1);O((function(){a.value=D(N(W(1.22,{duration:700,easing:H.inOut(H.ease)}),W(1,{duration:700,easing:H.inOut(H.ease)})),-1,!1)}),[]);var u,c,s=$((u=[new global.Error,-2,-27],(c=function(){return{transform:[{scale:a.value}]}}).__closure={scale:a},c.__workletHash=3539239666849,c.__initData=zn,c.__stackDetails=u,c));return e(z.View,{style:[s,l],children:e(Fn,{style:{width:i,height:i},color:r})})},Dn=function(t){var n=t.style,r=t.color;return e(M,{style:n,viewBox:"0 0 24 24",fill:"none",children:e(T,{d:"M6 15l6-6 6 6",stroke:void 0===r?"#6b7280":r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},Nn=function(n){var r=n.style,o=n.color,i=void 0===o?"#6b7280":o;return t(M,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e(F,{x:"5",y:"11",width:"14",height:"10",rx:"2",stroke:i,strokeWidth:"1.5"}),e(T,{d:"M8 11V7a4 4 0 0 1 8 0v4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})},Wn={code:"function LockSlideColumnTsx1(){const{chevronY}=this.__closure;return{transform:[{translateY:chevronY.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LockSlideColumn.tsx",sourceMap:'{"version":3,"names":["LockSlideColumnTsx1","chevronY","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LockSlideColumn.tsx"],"mappings":"AAoB0C,SAAAA,oBAAA,QAAAC,QAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,QAAQ,CAACI,KAAM,CAAC,CAC9C,CAAC","ignoreList":[]}',version:"3.16.7"},Hn={code:"function LockSlideColumnTsx2(){const{lockScale}=this.__closure;return{transform:[{scale:lockScale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LockSlideColumn.tsx",sourceMap:'{"version":3,"names":["LockSlideColumnTsx2","lockScale","__closure","transform","scale","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LockSlideColumn.tsx"],"mappings":"AAuBuC,SAAAA,oBAAA,QAAAC,SAAA,OAAAC,SAAA,OAAO,CACtCC,SAAS,CAAE,CAAC,CAAEC,KAAK,CAAEH,SAAS,CAACI,KAAM,CAAC,CAC1C,CAAC","ignoreList":[]}',version:"3.16.7"},$n=function(n){var r,o,i,l,u,c,s=n.slideY,d=n.lockSlideDistance,f=n.recordingUIProps,v=n.voiceRecorderStyles,h=null!==(r=null==f?void 0:f.lockPillBackground)&&void 0!==r?r:"rgba(30,30,30,0.88)",p=null!==(o=null==f?void 0:f.lockIconColor)&&void 0!==o?o:"#e5e7eb",y=null!==(i=null==f?void 0:f.chevronIconColor)&&void 0!==i?i:"#9ca3af",m=null!==(l=null==f?void 0:f.lockPillGap)&&void 0!==l?l:8,g=null!==(u=null==f?void 0:f.lockPillMarginBottom)&&void 0!==u?u:10,b=L(0);O((function(){b.value=D(N(W(-4,{duration:450,easing:H.inOut(H.ease)}),W(0,{duration:450,easing:H.inOut(H.ease)})),-1,!1)}),[]);var w=L(.92);O((function(){w.value=D(N(W(1,{duration:550,easing:H.out(H.ease)}),W(.92,{duration:550,easing:H.in(H.ease)})),-1,!1)}),[]);var x,C,S=$((x=[new global.Error,-2,-27],(C=function(){return{transform:[{translateY:b.value}]}}).__closure={chevronY:b},C.__workletHash=0xfad898b1b5b,C.__initData=Wn,C.__stackDetails=x,C)),A=$(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{scale:w.value}]}};return t.__closure={lockScale:w},t.__workletHash=0xbc18c7930ff,t.__initData=Hn,t.__stackDetails=e,t}()),P=Math.min(1,Math.max(0,-s/d));return e(a,{style:[{alignItems:"center",marginBottom:g},null==v?void 0:v.lockContainer],pointerEvents:"none",children:t(a,{style:[{backgroundColor:h,borderRadius:22,paddingVertical:10,paddingHorizontal:14,alignItems:"center",gap:m,opacity:.85+.15*P,borderWidth:P>.85?1.5:0,borderColor:null!==(c=null==f?void 0:f.lockPillActiveBorderColor)&&void 0!==c?c:"#22c55e"},null==v?void 0:v.lockPill],children:[e(z.View,{style:A,children:e(Nn,{style:{width:20,height:20},color:p})}),e(z.View,{style:S,children:e(Dn,{style:{width:18,height:18},color:y})})]})})},Un={code:"function LongPressRecordingTsx1(){const{slideTextX,cancelProgress}=this.__closure;return{transform:[{translateX:slideTextX.value}],opacity:1-cancelProgress};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LongPressRecording.tsx",sourceMap:'{"version":3,"names":["LongPressRecordingTsx1","slideTextX","cancelProgress","__closure","transform","translateX","value","opacity"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/LongPressRecording.tsx"],"mappings":"AAc4C,SAAAA,uBAAA,QAAAC,UAAA,CAAAC,cAAA,OAAAC,SAAA,OAAO,CAC3CC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEJ,UAAU,CAACK,KAAM,CAAC,CAAC,CAC7CC,OAAO,CAAE,CAAC,CAAGL,cACjB,CAAC","ignoreList":[]}',version:"3.16.7"},qn=function(n){var r,i,l=n.duration,u=n.slideX,c=n.containerHeight,s=void 0===c?50:c,d=n.fontFamily,f=n.voiceRecorderStyles,v=n.recordingUIProps,h=null!==(r=null==v?void 0:v.cancelTextColor)&&void 0!==r?r:"rgba(107,114,128,1)",p=null!==(i=null==v?void 0:v.timerColor)&&void 0!==i?i:"#374151",y=L(0);O((function(){y.value=D(N(W(-6,{duration:600,easing:H.inOut(H.ease)}),W(0,{duration:600,easing:H.inOut(H.ease)})),-1,!1)}),[]);var m,g,b=Math.min(1,Math.abs(Math.min(0,u))/70),w=$((m=[new global.Error,-3,-27],(g=function(){return{transform:[{translateX:y.value}],opacity:1-b}}).__closure={slideTextX:y,cancelProgress:b},g.__workletHash=0xbbdd56b2a8f,g.__initData=Un,g.__stackDetails=m,g));return t(a,{style:[{flex:1,flexDirection:"row",alignItems:"center",minHeight:s,paddingHorizontal:4},null==f?void 0:f.longPressBar],children:[e(o,{style:[{fontSize:15,fontWeight:"600",color:p,minWidth:44,fontFamily:d},null==f?void 0:f.timer,null==v?void 0:v.timerTextStyle],children:Rt(l)}),e(z.View,{style:[w,{flex:1,alignItems:"center"}],children:e(o,{style:[{fontSize:14,color:h,fontFamily:d},null==f?void 0:f.slideText],children:"< Slide to cancel"})})]})},Gn=function(n){var r=n.style,o=n.color,i=void 0===o?"#ef4444":o;return t(M,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e(T,{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e(T,{d:"M10 11v6M14 11v6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})};function Yn(e,t){return Array.from({length:e},(function(n,r){if(!t)return.3;var o=r/(e-1);return o<.12||o>.88?.08:o<.22||o>.78?.18:.3}))}var Kn=function(t){var n=t.isActive,r=t.color,o=void 0===r?"rgba(0,0,0,0.45)":r,i=t.height,l=void 0===i?26:i,u=t.style,c=t.barCount,s=void 0===c?30:c,d=t.showOuterDots,f=void 0!==d&&d,v=fe(C((function(){return Yn(s,f)})),2),h=v[0],p=v[1];return O((function(){p(Yn(s,f))}),[s,f]),O((function(){if(n){var e=setInterval((function(){return p((function(e){return function(e,t){var n=e.length;return Array.from({length:n},(function(r,o){if(!t)return.15+.85*Math.random();var i=o/(n-1);return i<.12||i>.88?e[o]:i<.22||i>.78?.12+.35*Math.random():.2+.8*Math.random()}))}(e,f)}))}),110);return function(){return clearInterval(e)}}p(Yn(s,f))}),[n,s,f]),e(a,{style:[{flexDirection:"row",alignItems:"center",height:l,gap:2},u],children:h.map((function(t,n){var r=Math.max(3,Math.round(t*l)),i=f&&(n/(h.length-1)<.22||n/(h.length-1)>.78);return e(a,{style:{flex:1,height:r,borderRadius:i?r/2:2,backgroundColor:o}},n)}))})};function Xn(t){var n=t.color,r=void 0===n?"rgba(255,255,255,0.5)":n,o=t.size,i=void 0===o?26:o;return e(a,{style:{width:i,height:i,borderRadius:i/2,borderWidth:2,borderColor:r,justifyContent:"center",alignItems:"center"},children:e(a,{style:{width:4,height:4,borderRadius:2,backgroundColor:r}})})}var Qn=function(n){var r,i,u,c,s,d,f,v,h,p,y=n.isRecording,m=n.isPaused,g=n.duration,b=n.onCancel,w=n.onSend,x=n.onPause,C=n.onResume,S=n.containerHeight,A=void 0===S?50:S,P=n.fontFamily,k=n.sendButtonColor,I=void 0===k?"#16a34a":k,O=n.sendIconColor,M=void 0===O?"#ffffff":O,T=n.enablePauseResume,R=void 0===T||T,E=n.voiceRecorderStyles,j=n.recordingUIProps,_=n.CustomPlayIcon,F=n.CustomPauseIcon,B=null!==(r=null==j?void 0:j.waveformColor)&&void 0!==r?r:"rgba(0,0,0,0.45)",V=null!==(i=null==j?void 0:j.cancelTextColor)&&void 0!==i?i:"#ef4444",z=null!==(u=null==j?void 0:j.timerColor)&&void 0!==u?u:"#374151",L=null!==(c=null==j?void 0:j.recordingBackground)&&void 0!==c?c:"transparent",D=null!==(s=null==j?void 0:j.playPauseIconColor)&&void 0!==s?s:"#ef4444",N=null!==(d=null==j?void 0:j.playPauseIconSize)&&void 0!==d?d:24,W=null!==(f=null==j?void 0:j.waveformBarCount)&&void 0!==f?f:30,H=null===(v=null==j?void 0:j.showWaveformOuterDots)||void 0===v||v,$=null===(h=null==j?void 0:j.showTimerRing)||void 0===h||h,U=null!==(p=null==j?void 0:j.timerRingColor)&&void 0!==p?p:"rgba(0,0,0,0.3)";return t(a,{style:[{backgroundColor:L,paddingHorizontal:4,gap:4},null==E?void 0:E.normalBar],children:[t(a,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[e(o,{style:[{fontSize:14,fontWeight:"600",color:z,minWidth:40,fontFamily:P},null==E?void 0:E.timer,null==j?void 0:j.timerTextStyle],children:Rt(g)}),e(Kn,{isActive:y&&!m,color:B,height:Math.round(.5*A),barCount:W,showOuterDots:H,style:[{flex:1},null==E?void 0:E.waveform]}),$&&e(Xn,{color:U,size:24})]}),t(a,{style:{flexDirection:"row",alignItems:"center",minHeight:A},children:[e(l,{onPress:b,style:[{width:A,height:A,borderRadius:A/2,justifyContent:"center",alignItems:"center",backgroundColor:"".concat(V,"18")},null==E?void 0:E.trashButton],hitSlop:6,children:e(Gn,{style:{width:.44*A,height:.44*A},color:V})}),R&&e(l,{onPress:m?C:x,style:[{flex:1,alignItems:"center",justifyContent:"center",height:A},null==E?void 0:E.playPauseButton],hitSlop:8,children:m?_?e(_,{}):e(Ot,{style:{width:N,height:N},color:D}):F?e(F,{}):e(It,{style:{width:N,height:N},color:D})}),!R&&e(a,{style:{flex:1}}),e(l,{onPress:w,style:[{width:A,height:A,borderRadius:A/2,backgroundColor:I,justifyContent:"center",alignItems:"center"},null==E?void 0:E.sendButton],hitSlop:4,children:e(Vn,{style:{width:.44*A,height:.44*A},color:M})})]})]})};function Zn(){return Jn.apply(this,arguments)}function Jn(){return(Jn=Y(pe().mark((function e(){var t;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==r.OS){e.next=11;break}return e.prev=1,e.next=4,v.request(v.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return t=e.sent,e.abrupt("return",t===v.RESULTS.GRANTED);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}var er=function(n){var r=n.style,o=n.fill,i=void 0===o?"currentColor":o;return t(M,{style:r,viewBox:"0 0 24 24",children:[e(T,{fill:i,d:"M13 4H6v16h12V9h-5z",opacity:".3"}),e(T,{fill:i,d:"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z"})]})},tr=function(t){var n=t.fileName,r=t.style,i=we().theme;return e(o,{numberOfLines:2,ellipsizeMode:"tail",style:Re([{fontSize:14,fontWeight:"600",color:"black"},r],null==i?void 0:i.fontFamily),children:function(e){var t=e.lastIndexOf(".");if(-1===t)return e;var n=e.slice(0,t),r=e.slice(t);return n.length>40?n.slice(0,40)+"..."+r:n+r}(n)})},nr=x.memo(tr);function rr(e){return e.filter((function(e){var t,n;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(n=e.type)||void 0===n?void 0:n.startsWith("video/"))})).map((function(e){return{uri:e.uri,kind:e.type.startsWith("video/")?"video":"image"}}))}var or,ir,lr,ar,ur,cr,sr,dr,fr,vr,hr,pr,yr,mr,gr,br,wr,xr,Cr,Sr,Ar,Pr=function(n){var r,i=n.previews,c=n.closePreview,s=n.onRemoveItem,d=n.CustomFileIcon,f=n.CustomImagePreview,v=n.CustomVideoPreview,p=n.inputHeight,y=we(),m=y.theme,g=y.setMediaViewerGallery,b=i.filter((function(e){var t,n;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(n=e.type)||void 0===n?void 0:n.startsWith("video/"))})),w=i.filter((function(e){var t,n;return!(null!==(t=e.type)&&void 0!==t&&t.startsWith("image/")||null!==(n=e.type)&&void 0!==n&&n.startsWith("video/"))})),x=rr(i);if(0===i.length)return null;var C=function(e){0!==x.length&&g(x,e)},S=function(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,i=null===(n=t.type)||void 0===n?void 0:n.startsWith("image/"),l=null===(r=t.type)||void 0===r?void 0:r.startsWith("video/");return i&&f?e(f,{uri:t.uri}):l&&v?e(v,{uri:t.uri}):i?e(u,{source:{uri:t.uri},style:{width:o,height:o,borderRadius:12},resizeMode:"cover"}):l?e(a,{style:{width:o,height:o,borderRadius:12,overflow:"hidden"},children:e(V,{source:{uri:t.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},A=function(t,n){return e(l,{onPress:function(){return s?s(t):null==c?void 0:c()},style:{position:"absolute",zIndex:50,height:22,width:22,backgroundColor:"rgba(0,0,0,0.55)",right:-6,top:-6,borderRadius:11,justifyContent:"center",alignItems:"center",transform:n?[{rotate:n}]:void 0},children:e(o,{style:Re({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==m?void 0:m.fontFamily),children:"×"})})};return e(a,{style:[{position:"absolute",bottom:(null!=p?p:0)+8,zIndex:20,borderRadius:12,maxWidth:"92%",alignSelf:"flex-start"},null==m||null===(r=m.filePreviewStyle)||void 0===r?void 0:r.root],children:t(a,{style:{gap:8},children:[function(){if(0===b.length)return null;if(1===b.length){var n=b[0];return n?t(l,{onPress:function(){return C(0)},style:{position:"relative"},children:[S(n),A(n.uri)]}):null}var r=b.slice(0,3),i=b.length>3?b.length-3:0;return e(a,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:r.map((function(n,u){var c=2===r.length?0===u?"-4deg":"4deg":0===u?"-10deg":1===u?"0deg":"10deg",s=2===r.length?0===u?"4deg":"-4deg":0===u?"10deg":1===u?"0deg":"-10deg";return e(l,{onPress:function(){var e=rr(b).findIndex((function(e){return e.uri===n.uri}));C(e>=0?e:0)},style:{marginLeft:0===u?0:-18,zIndex:u+1,transform:[{rotate:c}],position:"relative"},children:t(a,{style:{position:"relative"},children:[S(n),2===u&&i>0&&e(a,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:12,backgroundColor:"rgba(0,0,0,0.55)",alignItems:"center",justifyContent:"center"},children:t(o,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",i]})}),A(n.uri,s)]})},"".concat(n.uri,"-").concat(u))}))})}(),w.length>0&&e(h,{scrollEnabled:w.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:w.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:w.map((function(n,r){return function(n,r){var o,i,l,u;return t(a,{style:{position:"relative"},children:[t(a,{style:[{backgroundColor:"white",width:240,minHeight:64,borderRadius:12,flexDirection:"row",padding:4,gap:4,alignItems:"center"},null==m||null===(o=m.filePreviewStyle)||void 0===o?void 0:o.container],children:[e(a,{style:[{backgroundColor:"#d1d5db",borderRadius:8,padding:4,justifyContent:"center",alignItems:"center"},null==m||null===(i=m.filePreviewStyle)||void 0===i?void 0:i.iconContainer],children:d?e(d,{}):e(er,{style:{width:40,height:40},fill:"white"})}),e(a,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==m||null===(l=m.filePreviewStyle)||void 0===l?void 0:l.nameContainer],children:e(nr,{fileName:n.name||"File",style:null==m||null===(u=m.filePreviewStyle)||void 0===u?void 0:u.text})})]}),A(n.uri)]},"".concat(n.uri,"-").concat(r))}(n,r)}))})]})})},kr=x.memo(Pr),Ir="ios"===r.OS?32:30,Or="ios"===r.OS?50:48,Mr="h-6 w-6",Tr=function(n){var o,u,c,s,d,f,v,h,y,m,g,b,x,S,A,M,T,R,E,j,_,F,B,V,z,L=n.onSendMessage,D=n.onTypingStart,N=n.onTypingEnd,W=n.onAttachmentPress,H=n.onCameraPress,$=n.onAudioRecordStart,U=n.onAudioRecordEnd,q=n.CustomEmojiIcon,G=n.CustomAttachmentIcon,K=n.CustomCameraIcon,X=n.CustomSendIcon,Q=n.CustomMicrophoneIcon,Z=n.CustomFileIcon,J=n.CustomImagePreview,ee=n.CustomVideoPreview,te=fe(C(""),2),re=te[0],oe=te[1],ie=fe(C(0),2),le=ie[0],ae=ie[1],ue=fe(C({height:Ir,isMultiline:!1}),2),ce=ue[0],se=ue[1],de=we(),he=de.theme,ye=de.currentUserId,me=de.showEmojiButton,ge=de.showAttachmentsButton,be=de.showCameraButton,xe=de.showVoiceRecordButton,Ce=de.placeholder,Se=de.previewData,Ae=de.previewItems,Pe=de.closePreview,ke=de.onRemovePreviewItem,Ie=de.voiceRecorderProps,Oe=de.voiceRecorderStyles,Me=de.recordingUIProps,Ee=de.renderVoiceRecorder,je=de.CustomPlayIcon,_e=de.CustomPauseIcon,Fe=k((function(){return null!=Ae&&Ae.length?Ae:Se?[Se]:[]}),[Ae,Se]),Be=Fe.length>0,Ve=null==he||null===(o=he.sizes)||void 0===o?void 0:o.inputIconSize,ze=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():Te;return w.style(t)}(Ve),Le="number"==typeof(z=Ve)&&z>0?z:24,De=0===re.trim().length&&!ce.isMultiline,Ne=Math.max(0,(Or-Le)/2),We=De?{paddingTop:Ne,paddingBottom:Ne}:{paddingBottom:Ne},He=I((function(){se({height:Ir,isMultiline:!1}),ae((function(e){return e+1}))}),[]),$e=I((function(e){oe(e),0===e.length&&He()}),[He]),Ue=I((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,Ir),118),n=t>Ir;se({height:n?t:Ir,isMultiline:n})}),[]),qe=I((function(){var e=re.trim();(e||Be)&&(L({text:e,senderId:ye}),oe(""),He())}),[re,L,ye,Be,He]);O((function(){re.trim()?null==D||D():null==N||N()}),[re,D,N]);var Ge=!!re.trim()||Be,Ye=fe(C("idle"),2),Ke=Ye[0],Xe=Ye[1],Qe=P("idle"),Ze=I((function(e){Qe.current=e,Xe(e)}),[]),Je=null!==(u=null==Me?void 0:Me.lockSlideDistance)&&void 0!==u?u:72,et=P(Je);et.current=Je;var tt=fe(C(0),2),nt=tt[0],rt=tt[1],ot=fe(C(0),2),it=ot[0],lt=ot[1],at=P(0),ut=P(0),ct=I((function(e){null==U||U(e)}),[U]),st=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxDuration,n=void 0===t?300:t,r=e.onRecordStart,o=e.onRecordEnd,i=fe(C("idle"),2),l=i[0],a=i[1],u=fe(C(0),2),c=u[0],s=u[1],d=P(null),f=P(null),v=P(0),h=P(o);h.current=o;var p=P(r);p.current=r;var y=P(n);y.current=n;var m=I((function(){f.current&&(clearInterval(f.current),f.current=null)}),[]),g=I((function(e){m(),f.current=setInterval((function(){v.current+=1,s(v.current),v.current>=y.current&&e()}),1e3)}),[m]),b=I(Y(pe().mark((function e(){var t,n;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,t=require("react-native-audio-record").default,e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),console.error("[movius-chats] Voice recording requires react-native-audio-record. Install it: yarn add react-native-audio-record"),e.abrupt("return");case 8:return e.next=10,Zn();case 10:if(e.sent){e.next=14;break}return console.warn("[movius-chats] Microphone permission denied."),e.abrupt("return");case 14:try{t.init({sampleRate:16e3,channels:1,bitsPerSample:16,audioSource:6,wavFile:"movius_rec_".concat(Date.now(),".wav")}),t.start(),d.current=t,v.current=0,s(0),a("recording"),g((function(){return A.current()})),null===(n=p.current)||void 0===n||n.call(p)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[g]),w=I(Y(pe().mark((function e(){return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.current){e.next=2;break}return e.abrupt("return");case 2:try{d.current.stop(),a("paused"),m()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[m]),x=I(Y(pe().mark((function e(){return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.current){e.next=2;break}return e.abrupt("return");case 2:try{d.current.start(),a("recording"),g((function(){return A.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[g]),S=I(Y(pe().mark((function e(){var t,n,r,o,i;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=d.current){e.next=3;break}return e.abrupt("return",null);case 3:return m(),d.current=null,n=v.current,v.current=0,a("idle"),s(0),e.prev=9,e.next=12,t.stop();case 12:if(o=e.sent){e.next=15;break}return e.abrupt("return",null);case 15:return i={uri:o.startsWith("file://")?o:"file://".concat(o),duration:Math.max(1,n),mimeType:"audio/wav"},null===(r=h.current)||void 0===r||r.call(h,i),e.abrupt("return",i);case 20:return e.prev=20,e.t0=e.catch(9),console.warn("[movius-chats] Failed to stop recording:",e.t0),e.abrupt("return",null);case 24:case"end":return e.stop()}}),e,null,[[9,20]])}))),[m]),A=P(S);A.current=S;var k=I((function(){return A.current()}),[]),M=I(Y(pe().mark((function e(){var t,n,r,o;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=d.current,m(),d.current=null,v.current=0,a("idle"),s(0),!t){e.next=25;break}return e.prev=7,e.next=10,t.stop();case 10:if(!(n=e.sent)){e.next=21;break}return e.prev=12,r=require("react-native-fs"),o=n.startsWith("file://")?n.slice(7):n,e.next=17,r.unlink(o);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(12);case 21:e.next=25;break;case 23:e.prev=23,e.t1=e.catch(7);case 25:case"end":return e.stop()}}),e,null,[[7,23],[12,19]])}))),[m]);return O((function(){return function(){m();try{var e;null===(e=d.current)||void 0===e||e.stop()}catch(e){}}}),[m]),{status:l,duration:c,isRecording:"recording"===l,isPaused:"paused"===l,startRecording:b,pauseRecording:w,resumeRecording:x,stopRecording:k,cancelRecording:M}}({maxDuration:null!==(c=null==Ie?void 0:Ie.maxDuration)&&void 0!==c?c:300,onRecordStart:$,onRecordEnd:ct}),dt=P(st);dt.current=st;var ft=I(Y(pe().mark((function e(){var t;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dt.current.stopRecording();case 2:t=e.sent,Ze("idle"),t&&L({audio:t.uri,senderId:ye});case 5:case"end":return e.stop()}}),e)}))),[L,ye,Ze]),vt=I((function(){dt.current.cancelRecording(),Ze("idle"),rt(0),lt(0),at.current=0,ut.current=0}),[Ze]),ht=P(ft);ht.current=ft;var pt=P(vt);pt.current=vt;var yt=P(),mt=P(!1),gt=k((function(){return i.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return mt.current},onPanResponderGrant:function(){mt.current=!1,at.current=0,ut.current=0,rt(0),lt(0),yt.current=setTimeout(Y(pe().mark((function e(){return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mt.current=!0,e.next=3,dt.current.startRecording();case 3:Ze("longPress");case 4:case"end":return e.stop()}}),e)}))),500)},onPanResponderMove:function(e,t){mt.current&&(at.current=t.dx,ut.current=t.dy,rt(t.dx),lt(t.dy),!1!==(null==Ie?void 0:Ie.enableLockRecording)&&t.dy<=-et.current&&"longPress"===Qe.current&&(Ze("locked"),ut.current=-et.current,lt(-et.current)))},onPanResponderRelease:(e=Y(pe().mark((function e(t,n){var r;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(clearTimeout(yt.current),r=mt.current,mt.current=!1,r){e.next=8;break}return e.next=6,dt.current.startRecording();case 6:return Ze("normal"),e.abrupt("return");case 8:if("locked"!==Qe.current){e.next=10;break}return e.abrupt("return");case 10:n.dx<-70?pt.current():ht.current();case 11:case"end":return e.stop()}}),e)}))),function(t,n){return e.apply(this,arguments)}),onPanResponderTerminate:function(){clearTimeout(yt.current),mt.current=!1}});var e}),[]),bt=null!==(s=null!==(d=null==Me?void 0:Me.recordingSendButtonBackground)&&void 0!==d?d:null==he||null===(f=he.inputStyles)||void 0===f||null===(f=f.sendButtonStyle)||void 0===f?void 0:f.backgroundColor)&&void 0!==s?s:"#16a34a",wt=null!==(v=null==he||null===(h=he.colors)||void 0===h?void 0:h.sendIconsColor)&&void 0!==v?v:"#ffffff",xt=null!==(y=null!==(m=null==Me?void 0:Me.longPressMicColor)&&void 0!==m?m:null==he||null===(g=he.colors)||void 0===g?void 0:g.sendIconsColor)&&void 0!==y?y:"#ffffff",Ct=function(e,t){var n,r,o=null!==(n=null==t?void 0:t.containerBorderTopColor)&&void 0!==n?n:"rgba(0,0,0,0.12)";return ne({borderTopWidth:null!==(r=null==t?void 0:t.containerBorderTopWidth)&&void 0!==r?r:1,borderTopColor:o,paddingTop:10,paddingBottom:4},null==e?void 0:e.container)}(Oe,Me);if("idle"!==Ke){var St,At,Pt,kt,It,Ot={isRecording:st.isRecording,isPaused:st.isPaused,duration:st.duration,isLocked:"locked"===Ke,slideOffset:{x:nt,y:it},waveformData:[],startRecording:st.startRecording,stopRecording:st.stopRecording,pauseRecording:st.pauseRecording,resumeRecording:st.resumeRecording,cancelRecording:vt};return t(a,{style:w(or||(or=ve(["w-full px-2"]))),children:[Be&&e(kr,{previews:Fe,closePreview:Pe,onRemoveItem:ke,CustomFileIcon:Z,CustomImagePreview:J,CustomVideoPreview:ee,inputHeight:ce.height}),e(a,{style:Ct,children:Ee?Ee(Ot):"longPress"===Ke?t(a,{style:[w(ir||(ir=ve(["flex-row items-end gap-2"]))),null==he||null===(St=he.inputStyles)||void 0===St?void 0:St.inputSectionContainerStyle],children:[e(qn,{duration:st.duration,slideX:nt,containerHeight:Or,fontFamily:null==he?void 0:he.fontFamily,voiceRecorderStyles:Oe,recordingUIProps:Me}),t(a,{style:{alignItems:"center"},children:[e($n,{slideY:it,lockSlideDistance:Je,recordingUIProps:Me,voiceRecorderStyles:Oe}),e(a,ne(ne({},gt.panHandlers),{},{style:[w(lr||(lr=ve(["rounded-full justify-center items-center"]))),{height:Or,width:Or,backgroundColor:bt},null==Oe?void 0:Oe.holdMicButton,null==he||null===(At=he.inputStyles)||void 0===At?void 0:At.sendButtonStyle],children:e(Ln,{color:xt,size:null!==(Pt=null!==(kt=null==Me?void 0:Me.recordingIconSize)&&void 0!==kt?kt:null==Me?void 0:Me.iconSize)&&void 0!==Pt?Pt:28})}))]})]}):e(Qn,{isRecording:st.isRecording,isPaused:st.isPaused,duration:st.duration,onCancel:vt,onSend:ft,onPause:st.pauseRecording,onResume:st.resumeRecording,enablePauseResume:null===(It=null==Ie?void 0:Ie.enablePauseResume)||void 0===It||It,containerHeight:Or,fontFamily:null==he?void 0:he.fontFamily,sendButtonColor:bt,sendIconColor:wt,voiceRecorderStyles:Oe,recordingUIProps:Me,CustomPlayIcon:je,CustomPauseIcon:_e})})]})}return t(a,{style:w(ar||(ar=ve(["w-full px-2"]))),children:[Be&&e(kr,{previews:Fe,closePreview:Pe,onRemoveItem:ke,CustomFileIcon:Z,CustomImagePreview:J,CustomVideoPreview:ee,inputHeight:ce.height}),t(a,{style:[w(ur||(ur=ve(["flex-row items-end gap-2"]))),null==he||null===(b=he.inputStyles)||void 0===b?void 0:b.inputSectionContainerStyle],children:[t(a,{style:[w(cr||(cr=ve(["flex-1 flex-row bg-white overflow-hidden px-3.5"]))),{minHeight:Or,borderRadius:De?9999:24,alignItems:De?"center":"flex-end"},null==he||null===(x=he.inputStyles)||void 0===x?void 0:x.inputContainerStyle],children:[me&&e(a,{style:We,children:e(l,{children:q?e(q,{}):e(_n,{style:ze,color:(null==he||null===(S=he.colors)||void 0===S?void 0:S.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e(p,{value:re,onChangeText:$e,placeholder:Ce||"Message",style:Re([w(sr||(sr=ve(["bg-transparent flex-1 pl-2"]))),"ios"===r.OS?w(dr||(dr=ve(["text-[17px]"]))):w(fr||(fr=ve(["text-[16px]"]))),{minHeight:Ir,maxHeight:118,paddingVertical:De?0:8,marginVertical:De?(Or-Ir)/2:4},{color:(null==he||null===(A=he.colors)||void 0===A?void 0:A.inputTextColor)||"rgba(0, 0, 0, 0.87)"}],null==he?void 0:he.fontFamily),placeholderTextColor:(null==he||null===(M=he.colors)||void 0===M?void 0:M.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:ce.isMultiline&&re.length>0?"top":"center",onContentSizeChange:Ue},"chat-input-".concat(le)),t(a,{style:[w(vr||(vr=ve(["flex-row items-center gap-4"]))),We],children:[ge&&e(l,{onPress:W,children:G?e(G,{}):e(Bn,{style:ze,color:(null==he||null===(T=he.colors)||void 0===T?void 0:T.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),be&&!re.trim()&&e(l,{onPress:H,children:K?e(K,{}):e(jn,{style:ze,color:(null==he||null===(R=he.colors)||void 0===R?void 0:R.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]}),Ge?e(l,{onPress:qe,style:[w(hr||(hr=ve(["rounded-full justify-center items-center"]))),ne({height:Or,width:Or,backgroundColor:"#16a34a"},null==he||null===(E=he.inputStyles)||void 0===E?void 0:E.sendButtonStyle)],children:X?e(X,{}):e(Vn,{style:w.style(Mr),color:(null==he||null===(j=he.colors)||void 0===j?void 0:j.sendIconsColor)||"rgba(255,255,255,0.7)"})}):xe?e(a,ne(ne({},gt.panHandlers),{},{style:[w(pr||(pr=ve(["rounded-full justify-center items-center"]))),ne({height:Or,width:Or,backgroundColor:"#16a34a"},null==he||null===(_=he.inputStyles)||void 0===_?void 0:_.sendButtonStyle)],children:Q?e(Q,{}):e(Fn,{style:w.style("h-8 w-8"),color:(null==he||null===(F=he.colors)||void 0===F?void 0:F.sendIconsColor)||"rgba(255,255,255,0.7)"})})):e(l,{onPress:qe,style:[w(yr||(yr=ve(["rounded-full justify-center items-center"]))),ne({height:Or,width:Or,backgroundColor:"#16a34a"},null==he||null===(B=he.inputStyles)||void 0===B?void 0:B.sendButtonStyle)],children:X?e(X,{}):e(Vn,{style:w.style(Mr),color:(null==he||null===(V=he.colors)||void 0===V?void 0:V.sendIconsColor)||"rgba(255,255,255,0.7)"})})]})]})},Rr=x.memo(Tr);function Er(n){var r=n.style;return t(R,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:w.style("h-6 w-6 text-black",r),children:[e(B,{x1:"18",y1:"6",x2:"6",y2:"18"}),e(B,{x1:"6",y1:"6",x2:"18",y2:"18"})]})}var jr,_r,Fr,Br,Vr,zr,Lr,Dr,Nr,Wr,Hr,$r,Ur,qr=function(n){var r,i=n.gallery,u=n.onClose,c=we(),s=c.theme,f=c.setIsVideoPlaying,v=P(null),h=null!==(r=null==i?void 0:i.initialIndex)&&void 0!==r?r:0,p=fe(C(h),2),g=p[0],b=p[1],x=d(),S=x.width,A=x.height;O((function(){if(null!=i&&i.items.length){var e=i.initialIndex;b(e);var t=i.items[e];f("video"===(null==t?void 0:t.kind)),requestAnimationFrame((function(){try{var t;null===(t=v.current)||void 0===t||t.scrollToIndex({index:e,animated:!1})}catch(e){}}))}}),[null==i?void 0:i.initialIndex,null==i?void 0:i.items,f]);var k=I((function(){f(!1),u()}),[u,f]),M=I((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/S);b(t);var n=null==i?void 0:i.items[t];f("video"===(null==n?void 0:n.kind))}),[null==i?void 0:i.items,S,f]);return i&&0!==i.items.length?e(y,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:k,statusBarTranslucent:!0,children:t(a,{style:[w(mr||(mr=ve(["flex-1 bg-black"]))),{width:S,height:A}],children:[e(l,{onPress:k,style:w(gr||(gr=ve(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e(Er,{style:w(br||(br=ve(["h-8 w-8"])))})}),i.items.length>1&&e(a,{style:w(wr||(wr=ve(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:t(o,{style:Re(w(xr||(xr=ve(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==s?void 0:s.fontFamily),children:[g+1," / ",i.items.length]})}),e(m,{ref:v,data:i.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:i.initialIndex,extraData:g,getItemLayout:function(e,t){return{length:S,offset:S*t,index:t}},onMomentumScrollEnd:M,onScrollToIndexFailed:function(e){var t=e.index;setTimeout((function(){var e;null===(e=v.current)||void 0===e||e.scrollToIndex({index:t,animated:!1})}),100)},renderItem:function(t){var n=t.item,r=t.index;return e(Gr,{item:n,width:S,height:A,isActive:r===g,autoPlayVideo:r===h&&"video"===n.kind})}})]})}):null},Gr=function(n){var r=n.item,i=n.width,l=n.height,c=n.isActive,s=n.autoPlayVideo,d=we().theme,f=P(null),v=fe(C("video"===r.kind),2),h=v[0],p=v[1],y=fe(C(!1),2),m=y[0],g=y[1],b="video"===r.kind&&c&&s;return"image"===r.kind?e(a,{style:{width:i,height:l,justifyContent:"center"},children:e(u,{source:{uri:r.uri},style:{width:i,height:l},resizeMode:"contain"})}):t(a,{style:{width:i,height:l,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e(V,{source:{uri:r.uri},ref:f,controls:!0,paused:!b,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:i-32,height:.55*l,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){p(!0),g(!1)},onLoad:function(){return p(!1)},onBuffer:function(e){var t=e.isBuffering;return p(t)},onError:function(){g(!0),p(!1)}}),h&&e(a,{style:w(Cr||(Cr=ve(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e(Ut,{style:w.style("h-14 w-14"),spinning:!0})}),m&&e(a,{style:w(Sr||(Sr=ve(["absolute inset-0 items-center justify-center px-6"]))),children:e(o,{style:Re(w(Ar||(Ar=ve(["text-white font-semibold"]))),null==d?void 0:d.fontFamily),children:"Failed to load video"})})]})},Yr=x.memo(qr),Kr=function(n){var r,i,l,c,s,d=n.typingUsers,f=n.currentUserId,v=we(),h=v.theme,p=v.showAvatars,y=v.renderCustomTyping,m=v.showBubbleTail,g=v.typingText,b=d.filter((function(e){return e.id!==f}));if(!b.length)return null;var x=b.slice(0,2),C=b.length-2,S=p?x.length+(C>0?1:0):0,A=S>0?24+14*Math.max(0,S-1):0,P=S>0?A+12:8,k=-(A+12);return t(a,{style:[w(jr||(jr=ve(["px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start"]))),{marginLeft:P},null==h||null===(r=h.bubbleStyle)||void 0===r?void 0:r.typingContainerStyle],children:[p&&S>0&&t(a,{style:{position:"absolute",top:0,left:k,flexDirection:"row"},children:[x.map((function(t,n){var r,i,l;return e(a,{style:[w(_r||(_r=ve(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:n>0?-10:0,zIndex:x.length+n}],children:t.avatar?e(u,{source:{uri:t.avatar},style:[w(Fr||(Fr=ve(["w-full h-full object-cover rounded-full"]))),null==h||null===(r=h.bubbleStyle)||void 0===r?void 0:r.avatarImageStyle]}):e(o,{style:Re([w(Br||(Br=ve(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==h||null===(i=h.bubbleStyle)||void 0===i?void 0:i.avatarTextStyle],null==h?void 0:h.fontFamily),children:null===(l=t.name)||void 0===l?void 0:l.charAt(0)})},t.id)})),C>0&&e(a,{style:[w(Vr||(Vr=ve(["bg-gray-400 w-6 h-6 rounded-full items-center justify-center"]))),{marginLeft:-10,zIndex:3},ne({},null==h||null===(i=h.bubbleStyle)||void 0===i?void 0:i.additionalTypingUsersContainerStyle)],children:t(o,{style:Re([w(zr||(zr=ve(["text-white text-xs font-semibold"]))),null==h||null===(l=h.bubbleStyle)||void 0===l?void 0:l.additionalTypingUsersTextStyle],null==h?void 0:h.fontFamily),children:["+",C]})})]}),m&&e(ye,{style:w.style("absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]"),color:(null==h||null===(c=h.colors)||void 0===c?void 0:c.receivedMessageTailColor)||"white"}),y?y():e(a,{style:w(Lr||(Lr=ve(["flex-row items-center py-3 px-2 justify-center"]))),children:e(o,{style:Re([w(Dr||(Dr=ve(["text-gray-600"]))),null==h||null===(s=h.bubbleStyle)||void 0===s?void 0:s.typingTextStyle],null==h?void 0:h.fontFamily),children:null!=g?g:"Typing..."})})]})};var Xr=function(){var n=we(),o=n.messages,i=n.currentUserId,l=n.onMessageLongPress,u=n.mediaViewerGallery,c=n.clearMediaViewerGallery,s=n.typingUsers,d=n.onSendMessage,f=n.onTypingStart,v=n.onTypingEnd,h=n.onAttachmentPress,p=n.onAudioRecordEnd,y=n.onAudioRecordStart,x=n.onCameraPress,S=n.renderCustomInput,A=n.CustomEmojiIcon,P=n.CustomAttachmentIcon,k=n.CustomCameraIcon,I=n.CustomMicrophoneIcon,M=n.CustomSendIcon,T=n.CustomFileIcon,R=n.CustomImagePreview,E=n.CustomVideoPreview,j=n.keyboardVerticalOffset,_=void 0===j?0:j,F=n.disableKeyboardAvoiding,B=void 0!==F&&F,V=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=fe(C(0),2),n=t[0],o=t[1];return O((function(){if(e){var t="ios"===r.OS?"keyboardWillShow":"keyboardDidShow",n="ios"===r.OS?"keyboardWillHide":"keyboardDidHide",i=g.addListener(t,(function(e){o(e.endCoordinates.height)})),l=g.addListener(n,(function(){return o(0)}));return function(){i.remove(),l.remove()}}o(0)}),[e]),e?n:0}(!B),z=S?S():e(Rr,{onSendMessage:d,onTypingStart:f,onTypingEnd:v,onAttachmentPress:h,onAudioRecordEnd:p,onAudioRecordStart:y,onCameraPress:x,CustomEmojiIcon:A,CustomAttachmentIcon:P,CustomCameraIcon:k,CustomMicrophoneIcon:I,CustomSendIcon:M,CustomFileIcon:T,CustomImagePreview:R,CustomVideoPreview:E}),L=t(a,{style:w(Nr||(Nr=ve(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e(m,{style:w(Wr||(Wr=ve(["flex-1"]))),data:o,keyExtractor:function(e){return e.id},renderItem:function(t){var n,r=t.item,a=t.index;return e(En,{message:r,isCurrentUser:r.senderId===i,onLongPress:function(){return null==l?void 0:l(r)},isFirstInSequence:a===o.length-1||(null===(n=o[a+1])||void 0===n?void 0:n.senderId)!==r.senderId})},ListHeaderComponent:e(Kr,{typingUsers:s||[],currentUserId:i}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e(a,{style:!B&&V>0?{marginBottom:V}:void 0,children:z}),e(Yr,{gallery:u,onClose:c})]});return B?e(a,{style:w(Hr||(Hr=ve(["flex-1"]))),children:L}):"android"===r.OS?e(a,{style:w($r||($r=ve(["flex-1"]))),children:L}):e(b,{style:w(Ur||(Ur=ve(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:_,children:L})},Qr=function(t){return e(Tt,{children:e(be,ne(ne({},t),{},{children:e(Xr,{})}))})};export{Qr as default};
|
|
16
|
+
*/function lt(){if(ze)return Qe;ze=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return Qe=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,o){for(var i,A,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(a[c]=i[c]);if(e){A=e(i);for(var s=0;s<A.length;s++)r.call(i,A[s])&&(a[A[s]]=i[A[s]])}}return a},Qe}function ct(){if(Je)return Xe;Je=1;return Xe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function st(){return qe?$e:(qe=1,$e=Function.call.bind(Object.prototype.hasOwnProperty))}function ut(){if(et)return Ze;et=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=ct(),r={},n=st();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,A,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(n(o,c)){var s;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+A+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}s=o[c](i,c,a,A,null,t)}catch(e){s=e}if(!s||s instanceof Error||e((a||"React class")+": type specification of "+A+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof 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)."),s instanceof Error&&!(s.message in r)){r[s.message]=!0;var C=l?l():"";e("Failed "+A+" type: "+s.message+(null!=C?C:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},Ze=o}function Ct(){if(rt)return tt;rt=1;var e=at(),t=lt(),r=ct(),n=st(),o=ut(),i=function(){};function A(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),tt=function(a,l){var c="function"==typeof Symbol&&Symbol.iterator;var s="<<anonymous>>",u={array:h("array"),bigint:h("bigint"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:f(A),arrayOf:function(e){return f((function(t,n,o,i,A){if("function"!=typeof e)return new d("Property `"+A+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new d("Invalid "+i+" `"+A+"` of type `"+m(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,A+"["+l+"]",r);if(c instanceof Error)return c}return null}))},element:f((function(e,t,r,n,o){var i=e[t];return a(i)?null:new d("Invalid "+n+" `"+o+"` of type `"+m(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:f((function(t,r,n,o,i){var A=t[r];return e.isValidElementType(A)?null:new d("Invalid "+o+" `"+i+"` of type `"+m(A)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,r,n,o,i){if(!(t[r]instanceof e)){var A=e.name||s;return new d("Invalid "+o+" `"+i+"` of type `"+(((a=t[r]).constructor&&a.constructor.name?a.constructor.name:s)+"` supplied to `")+n+"`, expected instance of `"+A+"`.")}var a;return null}))},node:f((function(e,t,r,n,o){return p(e[t])?null:new d("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,A,a){if("function"!=typeof e)return new d("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=m(l);if("object"!==c)return new d("Invalid "+A+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var s in l)if(n(l,s)){var u=e(l,s,i,A,a+"."+s,r);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),A;return f((function(t,r,n,o,i){for(var A=t[r],a=0;a<e.length;a++)if(C(A,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===g(t)?String(t):t}));return new d("Invalid "+o+" `"+i+"` of value `"+String(A)+"` supplied to `"+n+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),A;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(o)+" at index "+t+"."),A}return f((function(t,o,i,A,a){for(var l=[],c=0;c<e.length;c++){var s=(0,e[c])(t,o,i,A,a,r);if(null==s)return null;s.data&&n(s.data,"expectedType")&&l.push(s.data.expectedType)}return new d("Invalid "+A+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,n,o,i,A){var a=t[n],l=m(a);if("object"!==l)return new d("Invalid "+i+" `"+A+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var s=e[c];if("function"!=typeof s)return v(o,i,A,c,g(s));var u=s(a,c,o,i,A+"."+c,r);if(u)return u}return null}))},exact:function(e){return f((function(o,i,A,a,l){var c=o[i],s=m(c);if("object"!==s)return new d("Invalid "+a+" `"+l+"` of type `"+s+"` supplied to `"+A+"`, expected `object`.");var u=t({},o[i],e);for(var C in u){var f=e[C];if(n(e,C)&&"function"!=typeof f)return v(A,a,l,C,g(f));if(!f)return new d("Invalid "+a+" `"+l+"` key `"+C+"` supplied to `"+A+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=f(c,C,A,a,l+"."+C,r);if(h)return h}return null}))}};function C(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function o(o,A,a,c,u,C,f){if(c=c||s,C=C||a,f!==r){if(l){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+a;!t[v]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+C+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[v]=!0,n++)}}return null==A[a]?o?null===A[a]?new d("The "+u+" `"+C+"` is marked as required in `"+c+"`, but its value is `null`."):new d("The "+u+" `"+C+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(A,a,c,u,C)}var A=o.bind(null,!1);return A.isRequired=o.bind(null,!0),A}function h(e){return f((function(t,r,n,o,i,A){var a=t[r];return m(a)!==e?new d("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,r,n,o){return new d((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function p(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(p);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!p(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function g(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=g(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},tt}function dt(){if(ot)return nt;ot=1;var e=ct();function t(){}function r(){}return r.resetWarningCache=t,nt=function(){function n(t,r,n,o,i,A){if(A!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}function ft(){if(it)return je.exports;if(it=1,"production"!==process.env.NODE_ENV){var e=at();je.exports=Ct()(e.isElement,true)}else je.exports=dt()();return je.exports}var ht=He(ft()),vt=function(){return ie((function e(t,r){oe(this,e),this.text=t,this.patterns=r||[]}),[{key:"parse",value:function(){var e=this,t=[{children:this.text}];return this.patterns.forEach((function(r){var n=[],o=r.nonExhaustiveModeMaxMatchCount||0,i=Math.min(Math.max(Number.isInteger(o)?o:0,0)||Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),A=0;t.forEach((function(t){if(t._matched)n.push(t);else{var o,a=[],l=t.children,c=0;for(r.pattern.lastIndex=0;l&&(o=r.pattern.exec(l));){var s=l.substr(0,o.index);if(c=o.index,++A>i)break;a.push({children:s}),a.push(e.getMatchedPart(r,o[0],o,c)),l=l.substr(o.index+o[0].length),c+=o[0].length-1,r.pattern.lastIndex=0}a.push({children:l}),n.push.apply(n,a)}})),t=n})),t.forEach((function(e){return delete e._matched})),t.filter((function(e){return!!e.children}))}},{key:"getMatchedPart",value:function(e,t,r,n){var o={};Object.keys(e).forEach((function(r){"pattern"!==r&&"renderText"!==r&&"nonExhaustiveModeMaxMatchCount"!==r&&("function"==typeof e[r]?o[r]=function(){return e[r](t,n)}:o[r]=e[r])}));var i=t;return e.renderText&&"function"==typeof e.renderText&&(i=e.renderText(t,r)),se(se({},o),{},{children:i,_matched:!0})}}])}(),pt=["type"],mt=["style"],gt=["parse","childrenProps"],yt={url:/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{1,256}\.(xn--)?[a-z0-9-]{2,20}\b([-a-zA-Z0-9@:%_\+\[\],.~#?&\/=]*[-a-zA-Z0-9@:%_\+\]~#?&\/=])*/i,phone:/[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,7}/,email:/\S+@\S+\.\S+/},bt=ht.shape(se(se({},o.propTypes),{},{type:ht.oneOf(Object.keys(yt)).isRequired,nonExhaustiveMaxMatchCount:ht.number})),wt=ht.shape(se(se({},o.propTypes),{},{pattern:ht.oneOfType([ht.string,ht.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:ht.number})),Et=function(){function t(){return oe(this,t),ne(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(t,E.Component),ie(t,[{key:"setNativeProps",value:function(e){this._root.setNativeProps(e)}},{key:"getPatterns",value:function(){return this.props.parse.map((function(e){var t=e.type,r=ue(e,pt);if(t){if(!yt[t])throw new Error("".concat(e.type," is not a supported type"));r.pattern=yt[t]}return r}))}},{key:"getParsedText",value:function(){var t=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new vt(this.props.children,this.getPatterns()).parse().map((function(r,n){var i=t.props.style,A=r.style,a=ue(r,mt);return e(o,se(se({style:[i,A]},t.props.childrenProps),a),"parsedText-".concat(n))})):this.props.children}},{key:"render",value:function(){var t=this,r=se({},this.props);r.parse,r.childrenProps;var n=ue(r,gt);return e(o,se(se({ref:function(e){return t._root=e}},n),{},{children:this.getParsedText()}))}}])}();Et.displayName="ParsedText",Et.propTypes=se(se({},o.propTypes),{},{parse:ht.arrayOf(ht.oneOfType([bt,wt])),childrenProps:ht.shape(o.propTypes)}),Et.defaultProps={parse:null,childrenProps:{}};var St,xt,_t,Ot,It,Mt,Rt,kt,Gt,Dt,Kt,Tt=function(t){var r=t.style,n=t.color;return e(k,{style:r,viewBox:"0 0 15 15",children:e(G,{fill:n,fillRule:"evenodd",d:"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z",clipRule:"evenodd"})})},Lt=function(t){var r=t.style,n=t.color;return e(k,{style:r,viewBox:"0 0 24 24",children:e(G,{fill:n,d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})},Pt=x(void 0),Vt=function(t){var r=t.children,n=ye(S(null),2),o=n[0],i=n[1];return e(Pt.Provider,{value:{currentlyPlayingId:o,setCurrentlyPlayingId:i},children:r})},Ft=function(e){var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r<10?"0":"").concat(r)},Ht=[1,1.5,2],Bt=42;function jt(t){var r,n,i,c,s,u=t.isPlaying,C=t.playbackRate,d=t.onCycleSpeed,f=t.senderAvatar,h=t.senderName,v=t.isCurrentUser,p=t.theme;return u?e(A,{onPress:d,style:[w(St||(St=be(["rounded-full items-center justify-center"]))),{width:Bt,height:Bt,backgroundColor:v?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==p||null===(r=p.messageStyle)||void 0===r?void 0:r.audioSpeedButtonStyle],children:e(o,{style:Fe([w(xt||(xt=be(["text-xs font-semibold"]))),{color:Ke(p,v)},null==p||null===(n=p.messageStyle)||void 0===n?void 0:n.audioSpeedTextStyle],null==p?void 0:p.fontFamily),children:1===C?"1x":"".concat(C,"x")})}):f?e(l,{source:{uri:f},style:[w(_t||(_t=be(["rounded-full"]))),{width:Bt,height:Bt},null==p||null===(i=p.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle],resizeMode:"cover"}):e(a,{style:[w(Ot||(Ot=be(["rounded-full items-center justify-center"]))),{width:Bt,height:Bt,backgroundColor:v?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e(o,{style:Fe([w(It||(It=be(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==p?void 0:p.fontFamily),children:(c=h,s=null==c?void 0:c.trim(),s?s.charAt(0).toUpperCase():"?")})})}var Ut,Yt,Nt,Wt,Qt,zt,Xt,Jt,$t=function(n){var l,c,s=n.audioUrl,u=n.audioId,C=n.isVideoPlaying,d=n.isCurrentUser,f=n.senderAvatar,h=n.senderName,v=n.reserveStatusSpace,p=void 0===v||v,m=Ie(),g=m.theme,y=m.CustomPlayIcon,b=m.CustomPauseIcon,E=m.showMessageStatus,x=function(){var e=_(Pt);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),R=x.currentlyPlayingId,k=x.setCurrentlyPlayingId,G=O(null),D=ye(S(!1),2),K=D[0],T=D[1],L=ye(S(0),2),P=L[0],V=L[1],H=ye(S(0),2),B=H[0],j=H[1],U=ye(S(!1),2),Y=U[0],N=U[1],W=ye(S(1),2),Q=W[0],z=W[1],X=ye(S(0),2),J=X[0],$=X[1],q=O(null),Z=I((function(){return function(e,t){for(var r=5381,n=0;n<e.length;n++)r=(r<<5)+r+e.charCodeAt(n)|0;return Array.from({length:t},(function(e,t){return r=0|Math.imul(r^r>>>16,73244475+31337*t),r^=r>>>13,.18+Math.abs(r)%100/100*.82}))}(s,50)}),[s]),ee=function(e,t){var r,n,o,i,A=Me(e);return t?{inactive:null!==(o=null==A?void 0:A.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==A?void 0:A.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(r=null==A?void 0:A.receivedAudioWaveformColor)&&void 0!==r?r:"rgba(0,0,0,0.20)",active:null!==(n=null==A?void 0:A.receivedAudioWaveformActiveColor)&&void 0!==n?n:"rgba(0,0,0,0.60)"}}(g,d),te=ee.inactive,re=ee.active,ne=function(e,t){var r,n,o,i,A=Me(e);return t?null!==(o=null!==(i=null==A?void 0:A.sentAudioTimestampColor)&&void 0!==i?i:null==A?void 0:A.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(r=null!==(n=null==A?void 0:A.receivedAudioTimestampColor)&&void 0!==n?n:null==A?void 0:A.receivedTimestampColor)&&void 0!==r?r:"rgba(0,0,0,0.45)"}(g,d),oe=function(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentAudioPlayIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPlayIconColor)&&void 0!==r?r:"#374151"}(g,d),ie=function(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentAudioPauseIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPauseIconColor)&&void 0!==r?r:"#374151"}(g,d),Ae=K&&!(C||!!R&&R!==u),ae=B>0?P/B:0,le=M((function(e){var t;(j(e.duration),null!==q.current)&&(null===(t=G.current)||void 0===t||t.seek(q.current),q.current=null)}),[]),ce=M((function(e){var t=e.currentTime;Y||V(t)}),[Y]),ue=M((function(){var e;T(!1),V(0),null===(e=G.current)||void 0===e||e.seek(0),k(null)}),[k]),Ce=M((function(){Ae?(T(!1),k(null)):(k(u),T(!0))}),[Ae,u,k]),de=M((function(){z((function(e){var t=Ht.indexOf(e),r=Ht[(t+1)%Ht.length];return null!=r?r:1}))}),[]),fe=M((function(e){var t=J;if(!(t<=0||B<=0)){var r,n=Math.max(0,Math.min(e/t,1))*B;if(V(n),B>0)null===(r=G.current)||void 0===r||r.seek(n);else q.current=n}}),[B,J]),he=I((function(){return i.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){N(!0),fe(e.nativeEvent.locationX)},onPanResponderMove:function(e){return fe(e.nativeEvent.locationX)},onPanResponderRelease:function(){return N(!1)},onPanResponderTerminate:function(){return N(!1)}})}),[fe]),ve=e(A,{onPress:Ce,hitSlop:8,style:w(Mt||(Mt=be(["shrink-0 px-0.5"]))),children:Ae?b?e(b,{}):e(Tt,{style:w.style("h-6 w-6"),color:ie}):y?e(y,{}):e(Lt,{style:w.style("h-6 w-6"),color:oe})}),pe=e(jt,{isPlaying:Ae,playbackRate:Q,onCycleSpeed:de,senderAvatar:f,senderName:h,isCurrentUser:d,theme:g}),me=e(a,{style:[w(Rt||(Rt=be(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return $(e.nativeEvent.layout.width)},children:e(a,se(se({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==g||null===(l=g.messageStyle)||void 0===l?void 0:l.progressBarStyle]},he.panHandlers),{},{children:Z.map((function(t,r){var n,o=(r+.5)/50<=ae;return e(a,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*t)),borderRadius:2,backgroundColor:o?re:te},o?null==g||null===(n=g.messageStyle)||void 0===n?void 0:n.activeProgressBarStyle:void 0]},r)}))}))});return t(a,{style:[w(kt||(kt=be(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),p&&E&&w(Gt||(Gt=be(["pb-4"])))],children:[e(F,{ref:G,source:{uri:s},paused:!Ae,rate:Q,playInBackground:!1,playWhenInactive:!1,onLoad:le,onProgress:ce,onEnd:ue,style:{width:0,height:0},progressUpdateInterval:80}),e(a,{style:w(Dt||(Dt=be(["flex-row items-center gap-1.5"]))),children:t(r,d?{children:[pe,ve,me]}:{children:[ve,me,pe]})}),e(o,{style:Fe([w(Kt||(Kt=be(["text-[11px] mt-1"]))),{color:ne,paddingLeft:d?82:34},null==g||null===(c=g.messageStyle)||void 0===c?void 0:c.audioDurationStyle],null==g?void 0:g.fontFamily),children:Ft(Ae?P:B>0?B:P)})]})},qt=E.memo($t),Zt=function(t){var r=t.style,n=t.spinning,o=void 0!==n&&n,i=O(new c.Value(0)).current;R((function(){o&&c.loop(c.timing(i,{toValue:1,duration:1e3,easing:s.linear,useNativeDriver:!0})).start()}),[o]);var A=i.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e(c.View,{style:o?{transform:[{rotate:A}]}:void 0,children:e(k,{style:r,viewBox:"0 0 1024 1024",children:e(G,{d:"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36",fill:"white"})})})},er=320,tr=er,rr=Math.round(176),nr=er-rr-2,or=Math.round(159),ir=function(n){var i,A=n.uri,l=n.cellStyle,c=n.roundedStyle,s=Ie(),u=s.theme,C=s.CustomPlayIcon,d=E.useRef(null),f=ye(E.useState(0),2),h=f[0],v=f[1],p=ye(E.useState(!0),2),m=p[0],g=p[1],y=ye(E.useState(!1),2),b=y[0],S=y[1];return t(a,{style:[l,c],pointerEvents:"none",children:[e(F,{source:{uri:A},ref:d,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[c,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){g(!0),S(!1)},onLoad:function(e){v(e.duration),g(!1)},onError:function(){S(!0),g(!1)}}),m&&e(a,{style:[w(Ut||(Ut=be(["absolute inset-0 items-center justify-center bg-black/40"]))),c],children:e(Zt,{style:w.style("h-8 w-8"),spinning:!0})}),!m&&!b&&t(r,{children:[e(a,{style:w(Yt||(Yt=be(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:C?e(C,{}):e(Lt,{style:w.style("h-10 w-10"),color:(null==u||null===(i=u.colors)||void 0===i?void 0:i.videoPlayIconColor)||"white"})}),e(a,{style:w(Nt||(Nt=be(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e(o,{style:w(Wt||(Wt=be(["text-white text-[10px] font-semibold"]))),children:Ar(h)})})]}),b&&e(a,{style:[w(Qt||(Qt=be(["absolute inset-0 items-center justify-center bg-red-500/50"]))),c],children:e(o,{style:Fe(w(zt||(zt=be(["text-white text-xs"]))),null==u?void 0:u.fontFamily),children:"Video"})})]})};function Ar(e){if(!e||Number.isNaN(e))return"0:00";var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))}var ar,lr,cr,sr,ur,Cr,dr,fr,hr,vr,pr,mr,gr,yr,br,wr,Er,Sr,xr,_r,Or,Ir,Mr,Rr,kr=function(r){var n=r.items,i=r.onOpenGallery,c=u().width,s=Math.min(240,.72*c);if(0===n.length)return null;var C={borderRadius:6,overflow:"hidden"};if(1===n.length){var d=n[0];return e(A,{onPress:function(){return i(n,0)},style:{width:s,height:320,marginVertical:8},children:"image"===d.kind?e(l,{source:{uri:d.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e(ir,{uri:d.uri,cellStyle:{width:s,height:320},roundedStyle:{borderRadius:8}})})}if(2===n.length){var f=(s-2)/2;return e(a,{style:{width:s,height:tr,flexDirection:"row",gap:2,marginVertical:8},children:n.slice(0,2).map((function(t,r){return e(A,{onPress:function(){return i(n,r)},style:{width:f,height:tr},children:"image"===t.kind?e(l,{source:{uri:t.uri},style:[C,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(ir,{uri:t.uri,cellStyle:{width:f,height:tr},roundedStyle:C})},"".concat(t.uri,"-").concat(r))}))})}if(3===n.length){var h=n[0],v=n[1],p=n[2],m=(s-2)/2;return t(a,{style:{width:s,height:er,marginVertical:8,gap:2},children:[e(A,{onPress:function(){return i(n,0)},style:{width:s,height:rr},children:"image"===h.kind?e(l,{source:{uri:h.uri},style:[C,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(ir,{uri:h.uri,cellStyle:{width:s,height:rr},roundedStyle:C})}),t(a,{style:{flexDirection:"row",gap:2,height:nr},children:[e(A,{onPress:function(){return i(n,1)},style:{width:m,height:nr},children:"image"===v.kind?e(l,{source:{uri:v.uri},style:[C,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(ir,{uri:v.uri,cellStyle:{width:m,height:nr},roundedStyle:C})},"".concat(v.uri,"-1")),e(A,{onPress:function(){return i(n,2)},style:{width:m,height:nr},children:"image"===p.kind?e(l,{source:{uri:p.uri},style:[C,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(ir,{uri:p.uri,cellStyle:{width:m,height:nr},roundedStyle:C})},"".concat(p.uri,"-2"))]})]})}var g=(s-2)/2,y=n.length-4,b=n.slice(0,4);return e(a,{style:{width:s,height:er,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:b.map((function(r,c){return t(A,{onPress:function(){return i(n,c)},style:{width:g,height:or,position:"relative"},children:["image"===r.kind?e(l,{source:{uri:r.uri},style:[C,{width:"100%",height:"100%"}],resizeMode:"cover"}):e(ir,{uri:r.uri,cellStyle:{width:g,height:or},roundedStyle:C}),3===c&&y>0&&e(a,{style:w(Xt||(Xt=be(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:t(o,{style:w(Jt||(Jt=be(["text-white text-lg font-bold"]))),children:["+",y]})})]},"".concat(r.uri,"-").concat(c))}))})},Gr=function(r){var n,i,l,c,s=r.message,u=r.onGalleryOpen,d=r.isVideoPlaying,f=r.isCurrentUser,h=Ie(),v=h.theme,p=h.showMessageStatus,m=h.onFileAttachmentPress,g=I((function(){return Pe(s)}),[s]);return t(a,{children:[g.length>0&&e(kr,{items:g,onOpenGallery:u}),(null!==(n=s.fileAttachments)&&void 0!==n?n:[]).map((function(r,n){var i,a,l,c,s,u;return t(A,{onPress:function(){m?m(r):C.openURL(r.uri.startsWith("http")||r.uri.startsWith("file:")?r.uri:"file://".concat(r.uri))},style:[w(ar||(ar=be(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:ke(v,f)},f?null==v||null===(i=v.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==v||null===(a=v.messageStyle)||void 0===a?void 0:a.receivedFileAttachmentStyle],children:[t(o,{style:Fe([w(lr||(lr=be(["text-xs font-semibold"]))),{color:Ge(v,f)},f?null==v||null===(l=v.messageStyle)||void 0===l?void 0:l.sentFileAttachmentTextStyle:null==v||null===(c=v.messageStyle)||void 0===c?void 0:c.receivedFileAttachmentTextStyle],null==v?void 0:v.fontFamily),numberOfLines:2,children:["📎 ",r.name]}),e(o,{style:Fe([w(cr||(cr=be(["text-[10px] mt-0.5"]))),{color:De(v,f)},f?null==v||null===(s=v.messageStyle)||void 0===s?void 0:s.sentFileAttachmentSubtitleStyle:null==v||null===(u=v.messageStyle)||void 0===u?void 0:u.receivedFileAttachmentSubtitleStyle],null==v?void 0:v.fontFamily),children:r.type})]},"".concat(r.uri,"-").concat(n))})),s.audio&&e(qt,{audioUrl:s.audio,audioId:s.id,isVideoPlaying:d,isCurrentUser:f,senderAvatar:s.senderAvatar,senderName:s.senderName,reserveStatusSpace:!s.text}),s.text&&e(Et,{style:Fe([w(sr||(sr=be(["pt-1"]))),w(p?ur||(ur=be(["pb-0"])):Cr||(Cr=be(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},f?null==v||null===(i=v.messageStyle)||void 0===i?void 0:i.sentTextStyle:null==v||null===(l=v.messageStyle)||void 0===l?void 0:l.receivedTextStyle,Te(v,f)?{color:Te(v,f)}:void 0],null==v?void 0:v.fontFamily),parse:[{type:"url",style:se({color:"blue",textDecorationLine:"underline"},(c=null==v?void 0:v.fontFamily,c?{fontFamily:c}:void 0)),onPress:function(e){return C.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:s.text})]})},Dr=E.memo(Gr),Kr=function(t){var r=t.style,n=t.fill;return e(k,{style:r,viewBox:"0 0 24 24",children:e(G,{fill:n,d:"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"})})},Tr=function(t){var r=t.style,n=t.fill;return e(k,{style:r,viewBox:"0 0 24 24",children:e(G,{d:"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z",fill:n})})},Lr=function(n){var i,A,l,c=n.time,s=n.status,u=n.isCurrentUser,C=n.hasText,d=n.hasAudio,f=n.hasGalleryMedia,h=n.hasFileAttachments,v=Ie(),p=v.theme,m=v.showMessageStatus,g=(f||h)&&!C&&!d,y=f&&!C&&!d?"#ffffff":g?function(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(p,u):function(e,t){var r,n,o=Me(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(p,u);return e(r,{children:m&&t(a,{style:[w(dr||(dr=be(["flex-row items-center"]))),C?w(fr||(fr=be(["justify-end pb-1 ml-4"]))):d?w(hr||(hr=be(["absolute right-3 bottom-2"]))):g?[w(vr||(vr=be(["absolute right-3 bottom-4"]))),Re(p,u)]:[w(pr||(pr=be(["absolute right-3 bottom-4"]))),Re(p,u)]],children:[e(o,{style:Fe([w(mr||(mr=be(["text-xs"]))),{color:y}],null==p?void 0:p.fontFamily),children:c}),u&&t(a,{style:w(gr||(gr=be(["ml-1 flex-row items-center"]))),children:["sent"===s&&e(Tr,{style:w.style("h-4 w-4",{opacity:.7}),fill:(null==p||null===(i=p.colors)||void 0===i?void 0:i.sentIconColor)||"#6B7280"}),"delivered"===s&&e(Kr,{style:w.style("h-4 w-4",{opacity:.7}),fill:(null==p||null===(A=p.colors)||void 0===A?void 0:A.deliveredIconColor)||"#6B7280"}),"read"===s&&e(Kr,{style:w.style("h-4 w-4",{opacity:.9}),fill:(null==p||null===(l=p.colors)||void 0===l?void 0:l.readIconColor)||"#3B82F6"})]})]})})},Pr=E.memo(Lr),Vr=function(n){var i,c,s,u,C,d,f,h,v,p,m=n.message,g=n.isCurrentUser,y=n.isFirstInSequence,b=n.onLongPress,E=Ie(),S=E.theme,x=E.showAvatars,_=E.showUserNames,O=E.showBubbleTail,I=E.setMediaViewerGallery,M=E.isVideoPlaying,R=Pe(m),k=(null!==(i=null===(c=m.fileAttachments)||void 0===c?void 0:c.length)&&void 0!==i?i:0)>0&&0===R.length&&!m.text&&!m.audio;return t(A,{onLongPress:b,style:[w(yr||(yr=be(["px-2 my-1 max-w-[75%] relative"]))),w(g?br||(br=be(["self-end mr-3"])):wr||(wr=be(["self-start ml-9"]))),w(y?g?Er||(Er=be(["bg-green-500 rounded-tr-none"])):Sr||(Sr=be(["bg-white rounded-tl-none"])):g?xr||(xr=be(["bg-green-500"])):_r||(_r=be(["bg-white"]))),se(se({borderRadius:8},Le(S,g)?{backgroundColor:Le(S,g)}:{}),g?null==S||null===(s=S.bubbleStyle)||void 0===s?void 0:s.sent:null==S||null===(u=S.bubbleStyle)||void 0===u?void 0:u.received)],children:[!g&&y&&x&&t(r,{children:[e(a,{style:w(Or||(Or=be(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:m.senderAvatar?e(l,{source:{uri:m.senderAvatar},style:[w(Ir||(Ir=be(["w-full h-full rounded-full"]))),null==S||null===(C=S.bubbleStyle)||void 0===C?void 0:C.avatarImageStyle],resizeMode:"cover"}):e(o,{style:Fe([w(Mr||(Mr=be(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==S||null===(d=S.bubbleStyle)||void 0===d?void 0:d.avatarTextStyle],null==S?void 0:S.fontFamily),children:null===(f=m.senderName)||void 0===f?void 0:f.charAt(0)})}),_&&m.senderName&&e(o,{style:Fe([w(Rr||(Rr=be(["text-sm text-black font-semibold mt-1 capitalize"]))),null==S||null===(h=S.bubbleStyle)||void 0===h?void 0:h.userNameStyle],null==S?void 0:S.fontFamily),children:m.senderName})]}),y&&O&&e(Se,{style:w.style("absolute w-6 h-6",g?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:g?(null==S||null===(v=S.colors)||void 0===v?void 0:v.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==S||null===(p=S.colors)||void 0===p?void 0:p.receivedMessageTailColor)||"white"}),e(Dr,{message:m,isCurrentUser:g,isFirstInSequence:y,onGalleryOpen:function(e,t){I(e,t)},isVideoPlaying:M}),e(Pr,{time:m.time,status:g?m.status:void 0,isCurrentUser:g,hasText:!!m.text,hasAudio:!!m.audio,hasGalleryMedia:R.length>0&&!m.text,hasFileAttachments:k})]})},Fr=E.memo(Vr),Hr=function(r){var n=r.style,o=r.color;return e(D,{style:n,viewBox:"0 0 24 24",children:t(K,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(T,{cx:"12",cy:"13",r:"3"}),e(G,{d:"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z"}),e(G,{strokeLinecap:"round",d:"M19 10h-1"})]})})},Br=function(r){var n=r.style,o=r.color;return e(k,{style:n,viewBox:"0 0 24 24",children:t(K,{fill:"none",stroke:o,children:[e(G,{strokeLinecap:"round",strokeWidth:"1.5",d:"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001"}),e(L,{cx:"14.509",cy:"9.774",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 14.51 9.774)"}),e(L,{cx:"8.714",cy:"11.328",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 8.714 11.328)"}),e(G,{strokeWidth:"1.5",d:"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z"}),e(G,{strokeWidth:"1.5",d:"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935"})]})})},jr=function(r){var n=r.style,o=r.color;return e(k,{style:n,viewBox:"0 0 24 24",children:t(K,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(G,{d:"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z"}),e(G,{strokeLinecap:"round",d:"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3",opacity:".5"})]})})},Ur=function(t){var r=t.style,n=t.color;return e(k,{style:r,fill:n,viewBox:"0 0 24 24",children:e(G,{d:"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z"})})},Yr=function(r){var n=r.style,o=r.color;return e(k,{style:n,viewBox:"0 0 24 24",children:t(K,{fill:"none",strokeWidth:"1.5",stroke:o,children:[e(G,{d:"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z"}),e(G,{strokeLinecap:"round",d:"m17.79 6.21l-4.211 4.165",opacity:".5"})]})})};function Nr(){return Wr.apply(this,arguments)}function Wr(){return(Wr=re(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==n.OS){e.next=11;break}return e.prev=1,e.next=4,d.request(d.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return t=e.sent,e.abrupt("return",t===d.RESULTS.GRANTED);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}var Qr=function(t){var r=t.style,n=t.color;return e(k,{style:r,viewBox:"0 0 24 24",fill:"none",children:e(G,{d:"M6 15l6-6 6 6",stroke:void 0===n?"#6b7280":n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},zr=function(r){var n=r.style,o=r.color,i=void 0===o?"#6b7280":o;return t(k,{style:n,viewBox:"0 0 24 24",fill:"none",children:[e(P,{x:"5",y:"11",width:"14",height:"10",rx:"2",stroke:i,strokeWidth:"1.5"}),e(G,{d:"M8 11V7a4 4 0 0 1 8 0v4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})},Xr=function(r){var n=r.style,o=r.color,i=void 0===o?"#ef4444":o;return t(k,{style:n,viewBox:"0 0 24 24",fill:"none",children:[e(G,{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e(G,{d:"M10 11v6M14 11v6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})};var Jr=72,$r=-120,qr=-100;function Zr(){h.vibrate(20)}var en={code:"function VoiceRecorderFlowTsx1(finished){const{runOnJS,finalizeReset}=this.__closure;if(finished){runOnJS(finalizeReset)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx1","finished","runOnJS","finalizeReset","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAmIgG,SAAAA,qBAAaA,CAAAC,QAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEjG,GAAIH,QAAQ,CAAE,CACVC,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B,CACJ","ignoreList":[]}',version:"3.16.7"},tn={code:"function VoiceRecorderFlowTsx2(_e,success){const{runOnJS,fireQuickTap}=this.__closure;if(success)runOnJS(fireQuickTap)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx2","_e","success","runOnJS","fireQuickTap","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkNmB,QAAC,CAAAA,qBAAgBA,CAAAC,EAAA,CAAAC,OAAA,QAAAC,OAAA,CAAAC,YAAA,OAAAC,SAAA,CAExB,GAAIH,OAAO,CACPC,OAAO,CAACC,YAAY,CAAC,CAAC,CAAC,CAC/B","ignoreList":[]}',version:"3.16.7"},rn={code:"function VoiceRecorderFlowTsx3(){const{runOnJS,fireHoldStart}=this.__closure;runOnJS(fireHoldStart)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx3","runOnJS","fireHoldStart","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAyNqB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEfF,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B","ignoreList":[]}',version:"3.16.7"},nn={code:"function VoiceRecorderFlowTsx4(e){const{stateShared,STATE_HOLD,MAX_LEFT,MAX_UP,translateX,translateY,lockFiredShared,LOCK_THRESHOLD,runOnJS,fireLock,cancelFiredShared,CANCEL_THRESHOLD,fireCancel}=this.__closure;if(stateShared.value!==STATE_HOLD)return;const tx=Math.max(MAX_LEFT,Math.min(0,e.translationX));const ty=Math.max(MAX_UP,Math.min(0,e.translationY));translateX.value=tx;translateY.value=ty;const dominantY=Math.abs(ty)>Math.abs(tx);if(dominantY&&lockFiredShared.value===0&&ty<=LOCK_THRESHOLD){lockFiredShared.value=1;runOnJS(fireLock)();}if(!dominantY&&cancelFiredShared.value===0&&tx<=CANCEL_THRESHOLD){cancelFiredShared.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx4","e","stateShared","STATE_HOLD","MAX_LEFT","MAX_UP","translateX","translateY","lockFiredShared","LOCK_THRESHOLD","runOnJS","fireLock","cancelFiredShared","CANCEL_THRESHOLD","fireCancel","__closure","value","tx","Math","max","min","translationX","ty","translationY","dominantY","abs"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA6NuB,QAAC,CAAAA,qBAAKA,CAAAC,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,QAAA,CAAAC,MAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,eAAA,CAAAC,cAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,iBAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,GAAIb,WAAW,CAACc,KAAK,GAAKb,UAAU,CAChC,OACJ,KAAM,CAAAc,EAAE,CAAGC,IAAI,CAACC,GAAG,CAACf,QAAQ,CAAEc,IAAI,CAACE,GAAG,CAAC,CAAC,CAAEnB,CAAC,CAACoB,YAAY,CAAC,CAAC,CAC1D,KAAM,CAAAC,EAAE,CAAGJ,IAAI,CAACC,GAAG,CAACd,MAAM,CAAEa,IAAI,CAACE,GAAG,CAAC,CAAC,CAAEnB,CAAC,CAACsB,YAAY,CAAC,CAAC,CACxDjB,UAAU,CAACU,KAAK,CAAGC,EAAE,CACrBV,UAAU,CAACS,KAAK,CAAGM,EAAE,CACrB,KAAM,CAAAE,SAAS,CAAGN,IAAI,CAACO,GAAG,CAACH,EAAE,CAAC,CAAGJ,IAAI,CAACO,GAAG,CAACR,EAAE,CAAC,CAC7C,GAAIO,SAAS,EACThB,eAAe,CAACQ,KAAK,GAAK,CAAC,EAC3BM,EAAE,EAAIb,cAAc,CAAE,CACtBD,eAAe,CAACQ,KAAK,CAAG,CAAC,CACzBN,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAI,CAACa,SAAS,EACVZ,iBAAiB,CAACI,KAAK,GAAK,CAAC,EAC7BC,EAAE,EAAIJ,gBAAgB,CAAE,CACxBD,iBAAiB,CAACI,KAAK,CAAG,CAAC,CAC3BN,OAAO,CAACI,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},on={code:"function VoiceRecorderFlowTsx5(){const{runOnJS,fireHoldEnd}=this.__closure;runOnJS(fireHoldEnd)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx5","runOnJS","fireHoldEnd","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAmPmB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,WAAA,OAAAC,SAAA,CAEbF,OAAO,CAACC,WAAW,CAAC,CAAC,CAAC,CAC1B","ignoreList":[]}',version:"3.16.7"},An={code:"function VoiceRecorderFlowTsx6(){const{lockFiredShared,cancelFiredShared,translateX,withSpring,translateY}=this.__closure;if(lockFiredShared.value===0&&cancelFiredShared.value===0){translateX.value=withSpring(0,{damping:18,stiffness:180});translateY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx6","lockFiredShared","cancelFiredShared","translateX","withSpring","translateY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAuPwB,SAAAA,qBAAMA,CAAA,QAAAC,eAAA,CAAAC,iBAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,OAAAC,SAAA,CAElB,GAAIL,eAAe,CAACM,KAAK,GAAK,CAAC,EAAIL,iBAAiB,CAACK,KAAK,GAAK,CAAC,CAAE,CAC9DJ,UAAU,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEJ,UAAU,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACrE,CACJ","ignoreList":[]}',version:"3.16.7"},an={code:"function VoiceRecorderFlowTsx7(){const{containerOpacity,containerY}=this.__closure;return{opacity:containerOpacity.value,transform:[{translateY:containerY.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx7","containerOpacity","containerY","__closure","opacity","value","transform","translateY"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAiQ4C,SAAAA,sBAAA,QAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,OAAO,CAC3CC,OAAO,CAAEH,gBAAgB,CAACI,KAAK,CAC/BC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEL,UAAU,CAACG,KAAM,CAAC,CAChD,CAAC","ignoreList":[]}',version:"3.16.7"},ln={code:"function VoiceRecorderFlowTsx8(){const{stateShared,STATE_HOLD,STATE_IDLE,micPulse,translateX,translateY}=this.__closure;const isHold=stateShared.value===STATE_HOLD;const pulse=stateShared.value===STATE_IDLE?1:micPulse.value;return{transform:[{translateX:isHold?translateX.value:0},{translateY:isHold?translateY.value:0},{scale:pulse}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx8","stateShared","STATE_HOLD","STATE_IDLE","micPulse","translateX","translateY","__closure","isHold","value","pulse","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAqQ4C,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,QAAA,CAAAC,UAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,MAAM,CAAGP,WAAW,CAACQ,KAAK,GAAKP,UAAU,CAC/C,KAAM,CAAAQ,KAAK,CAAGT,WAAW,CAACQ,KAAK,GAAKN,UAAU,CAAG,CAAC,CAAGC,QAAQ,CAACK,KAAK,CACnE,MAAO,CACHE,SAAS,CAAE,CACP,CAAEN,UAAU,CAAEG,MAAM,CAAGH,UAAU,CAACI,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEH,UAAU,CAAEE,MAAM,CAAGF,UAAU,CAACG,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEG,KAAK,CAAEF,KAAM,CAAC,CAExB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},cn={code:"function VoiceRecorderFlowTsx9(){const{interpolate,translateX,CANCEL_THRESHOLD,Extrapolation,arrowPulse}=this.__closure;const opacity=interpolate(translateX.value,[0,CANCEL_THRESHOLD],[1,0],Extrapolation.CLAMP);return{opacity:opacity,transform:[{translateX:translateX.value*0.55+arrowPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx9","interpolate","translateX","CANCEL_THRESHOLD","Extrapolation","arrowPulse","__closure","opacity","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAgR4C,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,gBAAA,CAAAC,aAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,OAAO,CAAGN,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEL,gBAAgB,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACK,KAAK,CAAC,CACjG,MAAO,CACHF,OAAO,CAAPA,OAAO,CACPG,SAAS,CAAE,CAAC,CAAER,UAAU,CAAEA,UAAU,CAACM,KAAK,CAAG,IAAI,CAAGH,UAAU,CAACG,KAAM,CAAC,CAC1E,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},sn={code:"function VoiceRecorderFlowTsx10(){const{interpolate,translateY,LOCK_REVEAL_TRAVEL,Extrapolation,LOCK_THRESHOLD}=this.__closure;const reveal=interpolate(translateY.value,[0,LOCK_REVEAL_TRAVEL],[0,1],Extrapolation.CLAMP);const lockProgress=interpolate(translateY.value,[0,LOCK_THRESHOLD],[0,1],Extrapolation.CLAMP);return{opacity:reveal,transform:[{scale:0.7+reveal*0.3},{translateY:interpolate(lockProgress,[0,1],[0,-22])}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx10","interpolate","translateY","LOCK_REVEAL_TRAVEL","Extrapolation","LOCK_THRESHOLD","__closure","reveal","value","CLAMP","lockProgress","opacity","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAuR2C,SAAAA,sBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,kBAAA,CAAAC,aAAA,CAAAC,cAAA,OAAAC,SAAA,CACzC,KAAM,CAAAC,MAAM,CAAGN,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEL,kBAAkB,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACK,KAAK,CAAC,CAClG,KAAM,CAAAC,YAAY,CAAGT,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEH,cAAc,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAED,aAAa,CAACK,KAAK,CAAC,CACpG,MAAO,CACHE,OAAO,CAAEJ,MAAM,CACfK,SAAS,CAAE,CACP,CAAEC,KAAK,CAAE,GAAG,CAAGN,MAAM,CAAG,GAAI,CAAC,CAC7B,CAAEL,UAAU,CAAED,WAAW,CAACS,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAE,CAAC,CAEnE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},un={code:'function VoiceRecorderFlowTsx11(){const{interpolate,translateY,LOCK_THRESHOLD,Extrapolation}=this.__closure;const progress=interpolate(translateY.value,[0,LOCK_THRESHOLD],[0,1],Extrapolation.CLAMP);return{height:Math.round(progress*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx11","interpolate","translateY","LOCK_THRESHOLD","Extrapolation","__closure","progress","value","CLAMP","height","Math","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkSmD,SAAAA,sBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,cAAA,CAAAC,aAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,QAAQ,CAAGL,WAAW,CAACC,UAAU,CAACK,KAAK,CAAE,CAAC,CAAC,CAAEJ,cAAc,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACI,KAAK,CAAC,CAChG,MAAO,CAAEC,MAAM,CAAKC,IAAI,CAACC,KAAK,CAACL,QAAQ,CAAG,GAAG,CAAC,IAAI,CAAC,CACvD","ignoreList":[]}',version:"3.16.7"},Cn={code:"function VoiceRecorderFlowTsx12(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx12","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAsS0C,SAAAA,uBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},dn={code:"function VoiceRecorderFlowTsx13(){const{pauseOpacity}=this.__closure;return{opacity:pauseOpacity.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx13","pauseOpacity","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAySgD,SAAAA,uBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CAC/CC,OAAO,CAAEF,YAAY,CAACG,KAC1B,CAAC","ignoreList":[]}',version:"3.16.7"},fn=function(r){var n=r.primaryColor,o=void 0===n?"#22C55E":n,i=r.backgroundColor,A=void 0===i?"#0B141A":i,l=r.timerColor,c=void 0===l?"#FFFFFF":l,s=r.microphoneColor,u=void 0===s?"#FFFFFF":s,C=r.lockColor,d=void 0===C?"#E9EDEF":C,f=r.waveformColor,h=void 0===f?"#E9EDEF":f,v=r.deleteIconColor,p=void 0===v?"#8696A0":v,m=r.renderMicIcon,g=r.renderSendIcon,y=r.renderLockIcon,b=r.renderArrowIcon,w=r.renderDeleteIcon,E=r.renderWaveform,x=r.onRecordingStart,_=r.onRecordingStop,k=r.onSend,G=r.onDelete,D=r.onLock,K=r.onCancel,T=ye(S("IDLE"),2),L=T[0],P=T[1],V=ye(S(0),2),F=V[0],Z=V[1],ee=O("IDLE");R((function(){ee.current=L}),[L]);var te=U(0);R((function(){te.value=function(e){switch(e){case"IDLE":return 0;case"RECORDING_TAP":return 1;case"RECORDING_HOLD":return 2;case"LOCKED_RECORDING":return 3;case"SENDING":return 4;case"CANCELLED":return 5}}(L)}),[L]);var re=O(0),ne=U(0),oe=U(0),ie=U(0),Ae=U(120),ae=U(1),le=U(0),ce=U(0),se=U(1),ue=U(0),Ce=U(0),de=U(0);R((function(){ae.value=Y(N(W(1.06,{duration:850,easing:Q.inOut(Q.ease)}),W(1,{duration:850,easing:Q.inOut(Q.ease)})),-1,!1),le.value=Y(N(W(-4,{duration:700,easing:Q.inOut(Q.ease)}),W(0,{duration:700,easing:Q.inOut(Q.ease)})),-1,!1),ce.value=Y(N(W(-5,{duration:500,easing:Q.inOut(Q.ease)}),W(0,{duration:500,easing:Q.inOut(Q.ease)})),-1,!1),se.value=Y(N(W(.45,{duration:600,easing:Q.inOut(Q.ease)}),W(1,{duration:600,easing:Q.inOut(Q.ease)})),-1,!1),ue.value=Y(W(1,{duration:4500,easing:Q.linear}),-1,!1)}),[]),R((function(){if("RECORDING_TAP"===L||"RECORDING_HOLD"===L||"LOCKED_RECORDING"===L){var e=setInterval((function(){Z((Date.now()-re.current)/1e3)}),250);return function(){return clearInterval(e)}}}),[L]);var fe=O(x);fe.current=x;var he=O(_);he.current=_;var ve=O(k);ve.current=k;var pe=O(G);pe.current=G;var me=O(D);me.current=D;var ge=O(K);ge.current=K;var be=M((function(){var e;re.current=Date.now(),Z(0),Ce.value=0,de.value=0,ne.value=0,oe.value=0,ie.value=W(1,{duration:280}),Ae.value=z(0,{damping:18,stiffness:180}),null===(e=fe.current)||void 0===e||e.call(fe)}),[]),we=M((function(){Z(0),ne.value=0,oe.value=0,Ae.value=120,ie.value=0,P("IDLE")}),[]),Ee=M((function(){var e,t;ie.value=W(0,{duration:280}),Ae.value=W(120,{duration:280,easing:Q.in(Q.cubic)},(e=[new global.Error,-3,-27],(t=function(e){e&&X(we)()}).__closure={runOnJS:X,finalizeReset:we},t.__workletHash=6814982830705,t.__initData=en,t.__stackDetails=e,t))}),[we]),Se=M((function(){var e,t,r=(Date.now()-re.current)/1e3;P("SENDING"),null===(e=he.current)||void 0===e||e.call(he),null===(t=ve.current)||void 0===t||t.call(ve,{duration:r}),Ee()}),[Ee]),xe=M((function(){var e=ee.current;if("IDLE"===e)return P("RECORDING_TAP"),void be();"RECORDING_TAP"!==e&&"LOCKED_RECORDING"!==e||Se()}),[be,Se]),_e=M((function(){"IDLE"===ee.current&&(P("RECORDING_HOLD"),be())}),[be]),Oe=M((function(){var e;"RECORDING_HOLD"===ee.current&&(Zr(),P("LOCKED_RECORDING"),ne.value=z(0,{damping:18,stiffness:180}),oe.value=z(0,{damping:18,stiffness:180}),null===(e=me.current)||void 0===e||e.call(me))}),[]),Ie=M((function(){var e,t,r,n=ee.current;"RECORDING_HOLD"!==n&&"RECORDING_TAP"!==n&&"LOCKED_RECORDING"!==n||(Zr(),P("CANCELLED"),null===(e=he.current)||void 0===e||e.call(he),null===(t=ge.current)||void 0===t||t.call(ge),null===(r=pe.current)||void 0===r||r.call(pe),Ee())}),[Ee]),Me=M((function(){"RECORDING_HOLD"===ee.current&&Se()}),[Se]),Re=O(xe);Re.current=xe;var ke=O(_e);ke.current=_e;var Ge=O(Me);Ge.current=Me;var De=O(Oe);De.current=Oe;var Ke=O(Ie);Ke.current=Ie;var Te,Le,Pe=function(){return Re.current()},Ve=function(){return ke.current()},Fe=function(){return Ge.current()},He=function(){return De.current()},Be=function(){return Ke.current()},je=I((function(){var e,t,r=H.Tap().maxDuration(290).onEnd((e=[new global.Error,-3,-27],(t=function(e,t){t&&X(Pe)()}).__closure={runOnJS:X,fireQuickTap:Pe},t.__workletHash=0xe487aac71a2,t.__initData=tn,t.__stackDetails=e,t)),n=H.Pan().activateAfterLongPress(300).onStart(function(){var e=[new global.Error,-3,-27],t=function(){X(Ve)()};return t.__closure={runOnJS:X,fireHoldStart:Ve},t.__workletHash=5634645742267,t.__initData=rn,t.__stackDetails=e,t}()).onUpdate(function(){var e=[new global.Error,-14,-27],t=function(e){if(2===te.value){var t=Math.max(-150,Math.min(0,e.translationX)),r=Math.max(-120,Math.min(0,e.translationY));ne.value=t,oe.value=r;var n=Math.abs(r)>Math.abs(t);n&&0===de.value&&r<=qr&&(de.value=1,X(He)()),!n&&0===Ce.value&&t<=$r&&(Ce.value=1,X(Be)())}};return t.__closure={stateShared:te,STATE_HOLD:2,MAX_LEFT:-150,MAX_UP:-120,translateX:ne,translateY:oe,lockFiredShared:de,LOCK_THRESHOLD:qr,runOnJS:X,fireLock:He,cancelFiredShared:Ce,CANCEL_THRESHOLD:$r,fireCancel:Be},t.__workletHash=3774937740471,t.__initData=nn,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-3,-27],t=function(){X(Fe)()};return t.__closure={runOnJS:X,fireHoldEnd:Fe},t.__workletHash=8780501045437,t.__initData=on,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===de.value&&0===Ce.value&&(ne.value=z(0,{damping:18,stiffness:180}),oe.value=z(0,{damping:18,stiffness:180}))};return t.__closure={lockFiredShared:de,cancelFiredShared:Ce,translateX:ne,withSpring:z,translateY:oe},t.__workletHash=0xf5629271812,t.__initData=An,t.__stackDetails=e,t}());return H.Race(r,n)}),[]),Ue=J((Te=[new global.Error,-3,-27],(Le=function(){return{opacity:ie.value,transform:[{translateY:Ae.value}]}}).__closure={containerOpacity:ie,containerY:Ae},Le.__workletHash=0xe4a6e44ca8f,Le.__initData=an,Le.__stackDetails=Te,Le)),Ye=J(function(){var e=[new global.Error,-7,-27],t=function(){var e=2===te.value,t=0===te.value?1:ae.value;return{transform:[{translateX:e?ne.value:0},{translateY:e?oe.value:0},{scale:t}]}};return t.__closure={stateShared:te,STATE_HOLD:2,STATE_IDLE:0,micPulse:ae,translateX:ne,translateY:oe},t.__workletHash=966893052371,t.__initData=ln,t.__stackDetails=e,t}()),Ne=J(function(){var e=[new global.Error,-6,-27],t=function(){return{opacity:q(ne.value,[0,$r],[1,0],$.CLAMP),transform:[{translateX:.55*ne.value+le.value}]}};return t.__closure={interpolate:q,translateX:ne,CANCEL_THRESHOLD:$r,Extrapolation:$,arrowPulse:le},t.__workletHash=289901874090,t.__initData=cn,t.__stackDetails=e,t}()),We=J(function(){var e=[new global.Error,-6,-27],t=function(){var e=q(oe.value,[0,-10],[0,1],$.CLAMP),t=q(oe.value,[0,qr],[0,1],$.CLAMP);return{opacity:e,transform:[{scale:.7+.3*e},{translateY:q(t,[0,1],[0,-22])}]}};return t.__closure={interpolate:q,translateY:oe,LOCK_REVEAL_TRAVEL:-10,Extrapolation:$,LOCK_THRESHOLD:qr},t.__workletHash=7437293893991,t.__initData=sn,t.__stackDetails=e,t}()),Qe=J(function(){var e=[new global.Error,-5,-27],t=function(){var e=q(oe.value,[0,qr],[0,1],$.CLAMP);return{height:"".concat(Math.round(100*e),"%")}};return t.__closure={interpolate:q,translateY:oe,LOCK_THRESHOLD:qr,Extrapolation:$},t.__workletHash=2643638419470,t.__initData=un,t.__stackDetails=e,t}()),ze=J(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:ce.value}]}};return t.__closure={chevronPulse:ce},t.__workletHash=2094038225597,t.__initData=Cn,t.__stackDetails=e,t}()),Xe=J(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:se.value}};return t.__closure={pauseOpacity:se},t.__workletHash=0xe14e5c18bcc,t.__initData=dn,t.__stackDetails=e,t}()),Je="IDLE"!==L,$e="RECORDING_HOLD"===L,qe="RECORDING_TAP"===L||"LOCKED_RECORDING"===L||"SENDING"===L;return t(a,{style:yn.root,pointerEvents:"box-none",children:[Je&&e(j.View,{style:[yn.bar,{backgroundColor:A},Ue],children:qe?e(hn,{duration:F,timerColor:c,waveformColor:h,deleteIconColor:p,waveTick:ue,pauseAnimatedStyle:Xe,renderDeleteIcon:w,renderWaveform:E,onDeletePress:Ie}):e(vn,{duration:F,timerColor:c,slideTextStyle:Ne,renderArrowIcon:b})}),$e&&t(j.View,{style:[yn.lockPill,We],pointerEvents:"none",children:[y?y():e(zr,{style:{width:20,height:20},color:d}),e(a,{style:yn.lockProgressTrack,children:e(j.View,{style:[yn.lockProgressFill,{backgroundColor:o},Qe]})}),e(j.View,{style:ze,children:e(Qr,{style:{width:16,height:16},color:d})})]}),e(a,{style:yn.buttonAnchor,pointerEvents:"box-none",children:e(B,{gesture:je,children:e(j.View,{style:[yn.micPressable,Ye],accessibilityRole:"button",accessibilityLabel:qe?"Send recording":"Tap to record. Long-press and slide left to cancel or up to lock.",children:e(a,{style:[yn.mic,{backgroundColor:o}],children:qe?g?g():e(Yr,{style:{width:30,height:30},color:"#FFFFFF"}):m?m():e(jr,{style:{width:30,height:30},color:u})})})})})]})},hn=function(r){var n=r.duration,i=r.timerColor,l=r.waveformColor,c=r.deleteIconColor,s=r.waveTick,u=r.pauseAnimatedStyle,C=r.renderDeleteIcon,d=r.renderWaveform,f=r.onDeletePress;return t(a,{style:yn.screenOneRow,children:[e(A,{onPress:f,hitSlop:10,style:yn.deleteWrapper,accessibilityRole:"button",accessibilityLabel:"Delete recording",children:C?C():e(Xr,{style:{width:26,height:26},color:c})}),t(a,{style:yn.screenOneCenter,children:[t(a,{style:yn.timerRow,children:[e(o,{style:[yn.timer,{color:i}],numberOfLines:1,children:Ft(n)}),e(a,{style:yn.waveformWrapper,children:d?d():e(pn,{color:l,tick:s})})]}),t(j.View,{style:[yn.pauseRow,u],children:[e(a,{style:yn.pauseBar}),e(a,{style:yn.pauseBar})]})]}),e(a,{style:yn.micSpacer})]})},vn=function(r){var n=r.duration,i=r.timerColor,A=r.slideTextStyle,l=r.renderArrowIcon;return t(a,{style:yn.screenTwoRow,children:[e(o,{style:[yn.timer,{color:i}],numberOfLines:1,children:Ft(n)}),t(j.View,{style:[yn.slideArea,A],children:[l?l():e(o,{style:yn.slideArrow,children:"‹"}),e(o,{style:yn.slideText,children:"Slide to cancel"})]}),e(a,{style:yn.micSpacer})]})},pn=function(t){var r=t.color,n=t.tick;return e(a,{style:yn.waveform,children:Array.from({length:28}).map((function(t,o){return e(gn,{index:o,total:28,color:r,tick:n},o)}))})},mn={code:'function VoiceRecorderFlowTsx14(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edge=Math.sin(index/Math.max(1,total-1)*Math.PI);const amp=Math.max(0.15,Math.min(1,combined)*(0.35+0.65*edge));return{height:Math.round(amp*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx14","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edge","max","amp","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA8U2C,SAAAA,sBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,IAAI,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACjE,KAAM,CAAAQ,GAAG,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,IAAI,CAAC,CAAC,CACxE,MAAO,CAAEI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,GAAG,CAAG,GAAG,CAAC,IAAI,CAAC,CAClD","ignoreList":[]}',version:"3.16.7"},gn=function(t){var r,n,o=t.index,i=t.total,A=t.color,a=t.tick,l=J((r=[new global.Error,-4,-27],(n=function(){var e=a.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*o)+.3*Math.sin(4*e+1.3*o)+.4*Math.sin(.9*e+.27*o))+.5,r=Math.sin(o/Math.max(1,i-1)*Math.PI),n=Math.max(.15,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:a,index:o,total:i},n.__workletHash=0xecc749b626f,n.__initData=mn,n.__stackDetails=r,n));return e(j.View,{style:[{width:3,marginHorizontal:1.5,backgroundColor:A,borderRadius:3},l]})},yn=f.create({root:{position:"absolute",left:0,right:0,bottom:0},bar:{width:"100%",height:110,paddingHorizontal:18,paddingVertical:14,borderTopLeftRadius:18,borderTopRightRadius:18,flexDirection:"row",alignItems:"center"},buttonAnchor:{position:"absolute",right:18,bottom:19},micPressable:{width:Jr,height:Jr,justifyContent:"center",alignItems:"center"},mic:{width:Jr,height:Jr,borderRadius:36,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:6},micSpacer:{width:Jr,height:Jr},lockPill:{position:"absolute",right:31,bottom:118,width:46,paddingVertical:12,borderRadius:28,backgroundColor:"rgba(20,28,33,0.95)",alignItems:"center",justifyContent:"center",gap:10,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:8},lockProgressTrack:{width:4,height:18,borderRadius:2,backgroundColor:"rgba(255,255,255,0.15)",overflow:"hidden",justifyContent:"flex-end"},lockProgressFill:{width:"100%",borderRadius:2},screenOneRow:{flex:1,flexDirection:"row",alignItems:"center"},screenOneCenter:{flex:1,height:"100%",paddingHorizontal:12,justifyContent:"center"},screenTwoRow:{flex:1,flexDirection:"row",alignItems:"center",height:"100%"},deleteWrapper:{width:26,height:"100%",justifyContent:"flex-end",alignItems:"flex-start",paddingBottom:4},timerRow:{flexDirection:"row",alignItems:"center",gap:12},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},waveformWrapper:{flex:1,alignItems:"flex-start",justifyContent:"center"},waveform:{width:200,height:36,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},pauseRow:{flexDirection:"row",justifyContent:"center",alignItems:"center",marginTop:6,gap:4},pauseBar:{width:3,height:12,borderRadius:2,backgroundColor:"#F15C6D"},slideArea:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},slideArrow:{fontSize:18,lineHeight:18,color:"rgba(255,255,255,0.55)",fontWeight:"500",marginTop:-2},slideText:{fontSize:14,color:"rgba(255,255,255,0.55)",fontWeight:"500"}}),bn=function(r){var n=r.style,o=r.fill,i=void 0===o?"currentColor":o;return t(k,{style:n,viewBox:"0 0 24 24",children:[e(G,{fill:i,d:"M13 4H6v16h12V9h-5z",opacity:".3"}),e(G,{fill:i,d:"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z"})]})},wn=function(t){var r=t.fileName,n=t.style,i=Ie().theme;return e(o,{numberOfLines:2,ellipsizeMode:"tail",style:Fe([{fontSize:14,fontWeight:"600",color:"black"},n],null==i?void 0:i.fontFamily),children:function(e){var t=e.lastIndexOf(".");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t);return r.length>40?r.slice(0,40)+"..."+n:r+n}(r)})},En=E.memo(wn);function Sn(e){return e.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})).map((function(e){return{uri:e.uri,kind:e.type.startsWith("video/")?"video":"image"}}))}var xn,_n,On,In,Mn,Rn,kn,Gn,Dn,Kn,Tn,Ln,Pn,Vn,Fn,Hn,Bn,jn=function(r){var n,i=r.previews,c=r.closePreview,s=r.onRemoveItem,u=r.CustomFileIcon,C=r.CustomImagePreview,d=r.CustomVideoPreview,f=r.inputHeight,h=Ie(),p=h.theme,m=h.setMediaViewerGallery,g=i.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})),y=i.filter((function(e){var t,r;return!(null!==(t=e.type)&&void 0!==t&&t.startsWith("image/")||null!==(r=e.type)&&void 0!==r&&r.startsWith("video/"))})),b=Sn(i);if(0===i.length)return null;var w=function(e){0!==b.length&&m(b,e)},E=function(t){var r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,i=null===(r=t.type)||void 0===r?void 0:r.startsWith("image/"),A=null===(n=t.type)||void 0===n?void 0:n.startsWith("video/");return i&&C?e(C,{uri:t.uri}):A&&d?e(d,{uri:t.uri}):i?e(l,{source:{uri:t.uri},style:{width:o,height:o,borderRadius:12},resizeMode:"cover"}):A?e(a,{style:{width:o,height:o,borderRadius:12,overflow:"hidden"},children:e(F,{source:{uri:t.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},S=function(t,r){return e(A,{onPress:function(){return s?s(t):null==c?void 0:c()},style:{position:"absolute",zIndex:50,height:22,width:22,backgroundColor:"rgba(0,0,0,0.55)",right:-6,top:-6,borderRadius:11,justifyContent:"center",alignItems:"center",transform:r?[{rotate:r}]:void 0},children:e(o,{style:Fe({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==p?void 0:p.fontFamily),children:"×"})})};return e(a,{style:[{position:"absolute",bottom:(null!=f?f:0)+8,zIndex:20,borderRadius:12,maxWidth:"92%",alignSelf:"flex-start"},null==p||null===(n=p.filePreviewStyle)||void 0===n?void 0:n.root],children:t(a,{style:{gap:8},children:[function(){if(0===g.length)return null;if(1===g.length){var r=g[0];return r?t(A,{onPress:function(){return w(0)},style:{position:"relative"},children:[E(r),S(r.uri)]}):null}var n=g.slice(0,3),i=g.length>3?g.length-3:0;return e(a,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:n.map((function(r,l){var c=2===n.length?0===l?"-4deg":"4deg":0===l?"-10deg":1===l?"0deg":"10deg",s=2===n.length?0===l?"4deg":"-4deg":0===l?"10deg":1===l?"0deg":"-10deg";return e(A,{onPress:function(){var e=Sn(g).findIndex((function(e){return e.uri===r.uri}));w(e>=0?e:0)},style:{marginLeft:0===l?0:-18,zIndex:l+1,transform:[{rotate:c}],position:"relative"},children:t(a,{style:{position:"relative"},children:[E(r),2===l&&i>0&&e(a,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:12,backgroundColor:"rgba(0,0,0,0.55)",alignItems:"center",justifyContent:"center"},children:t(o,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",i]})}),S(r.uri,s)]})},"".concat(r.uri,"-").concat(l))}))})}(),y.length>0&&e(v,{scrollEnabled:y.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:y.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:y.map((function(r,n){return function(r,n){var o,i,A,l;return t(a,{style:{position:"relative"},children:[t(a,{style:[{backgroundColor:"white",width:240,minHeight:64,borderRadius:12,flexDirection:"row",padding:4,gap:4,alignItems:"center"},null==p||null===(o=p.filePreviewStyle)||void 0===o?void 0:o.container],children:[e(a,{style:[{backgroundColor:"#d1d5db",borderRadius:8,padding:4,justifyContent:"center",alignItems:"center"},null==p||null===(i=p.filePreviewStyle)||void 0===i?void 0:i.iconContainer],children:u?e(u,{}):e(bn,{style:{width:40,height:40},fill:"white"})}),e(a,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==p||null===(A=p.filePreviewStyle)||void 0===A?void 0:A.nameContainer],children:e(En,{fileName:r.name||"File",style:null==p||null===(l=p.filePreviewStyle)||void 0===l?void 0:l.text})})]}),S(r.uri)]},"".concat(r.uri,"-").concat(n))}(r,n)}))})]})})},Un=E.memo(jn),Yn="ios"===n.OS?32:30,Nn="ios"===n.OS?50:48,Wn="h-6 w-6",Qn=function(r){var o,i,l,c,s,u,C,d,f,h,v,m,g,y,b,E,x,_,k,G,D,K,T,L,P=r.onSendMessage,V=r.onTypingStart,F=r.onTypingEnd,H=r.onAttachmentPress,B=r.onCameraPress,j=r.onAudioRecordStart,U=r.onAudioRecordEnd,Y=r.CustomEmojiIcon,N=r.CustomAttachmentIcon,W=r.CustomCameraIcon,Q=r.CustomSendIcon,z=r.CustomMicrophoneIcon,X=r.CustomFileIcon,J=r.CustomImagePreview,$=r.CustomVideoPreview,q=ye(S(""),2),Z=q[0],ee=q[1],te=ye(S(0),2),ne=te[0],oe=te[1],ie=ye(S({height:Yn,isMultiline:!1}),2),Ae=ie[0],ae=ie[1],le=Ie(),ce=le.theme,ue=le.currentUserId,Ce=le.showEmojiButton,de=le.showAttachmentsButton,fe=le.showCameraButton,he=le.showVoiceRecordButton,ve=le.placeholder,pe=le.previewData,me=le.previewItems,ge=le.closePreview,we=le.onRemovePreviewItem,Se=le.voiceRecorderProps,xe=le.recordingUIProps,_e=le.renderVoiceRecorder,Oe=I((function(){return null!=me&&me.length?me:pe?[pe]:[]}),[me,pe]),Me=Oe.length>0,Re=null==ce||null===(o=ce.sizes)||void 0===o?void 0:o.inputIconSize,ke=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():Ve;return w.style(t)}(Re),Ge="number"==typeof(L=Re)&&L>0?L:24,De=0===Z.trim().length&&!Ae.isMultiline,Ke=Math.max(0,(Nn-Ge)/2),Te=De?{paddingTop:Ke,paddingBottom:Ke}:{paddingBottom:Ke},Le=M((function(){ae({height:Yn,isMultiline:!1}),oe((function(e){return e+1}))}),[]),Pe=M((function(e){ee(e),0===e.length&&Le()}),[Le]),He=M((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,Yn),118),r=t>Yn;ae({height:r?t:Yn,isMultiline:r})}),[]),Be=M((function(){var e=Z.trim();(e||Me)&&(P({text:e,senderId:ue}),ee(""),Le())}),[Z,P,ue,Me,Le]);R((function(){Z.trim()?null==V||V():null==F||F()}),[Z,V,F]);var je=!!Z.trim()||Me,Ue=M((function(e){null==U||U(e)}),[U]),Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxDuration,r=void 0===t?300:t,n=e.onRecordStart,o=e.onRecordEnd,i=ye(S("idle"),2),A=i[0],a=i[1],l=ye(S(0),2),c=l[0],s=l[1],u=O(null),C=O(null),d=O(0),f=O(o);f.current=o;var h=O(n);h.current=n;var v=O(r);v.current=r;var p=M((function(){C.current&&(clearInterval(C.current),C.current=null)}),[]),m=M((function(e){p(),C.current=setInterval((function(){d.current+=1,s(d.current),d.current>=v.current&&e()}),1e3)}),[p]),g=M(re(Ee().mark((function e(){var t,r;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,t=require("react-native-audio-record").default,e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),console.error("[movius-chats] Voice recording requires react-native-audio-record. Install it: yarn add react-native-audio-record"),e.abrupt("return");case 8:return e.next=10,Nr();case 10:if(e.sent){e.next=14;break}return console.warn("[movius-chats] Microphone permission denied."),e.abrupt("return");case 14:try{t.init({sampleRate:16e3,channels:1,bitsPerSample:16,audioSource:6,wavFile:"movius_rec_".concat(Date.now(),".wav")}),t.start(),u.current=t,d.current=0,s(0),a("recording"),m((function(){return E.current()})),null===(r=h.current)||void 0===r||r.call(h)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[m]),y=M(re(Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u.current){e.next=2;break}return e.abrupt("return");case 2:try{u.current.stop(),a("paused"),p()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[p]),b=M(re(Ee().mark((function e(){return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u.current){e.next=2;break}return e.abrupt("return");case 2:try{u.current.start(),a("recording"),m((function(){return E.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[m]),w=M(re(Ee().mark((function e(){var t,r,n,o,i;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=u.current){e.next=3;break}return e.abrupt("return",null);case 3:return p(),u.current=null,r=d.current,d.current=0,a("idle"),s(0),e.prev=9,e.next=12,t.stop();case 12:if(o=e.sent){e.next=15;break}return e.abrupt("return",null);case 15:return i={uri:o.startsWith("file://")?o:"file://".concat(o),duration:Math.max(1,r),mimeType:"audio/wav"},null===(n=f.current)||void 0===n||n.call(f,i),e.abrupt("return",i);case 20:return e.prev=20,e.t0=e.catch(9),console.warn("[movius-chats] Failed to stop recording:",e.t0),e.abrupt("return",null);case 24:case"end":return e.stop()}}),e,null,[[9,20]])}))),[p]),E=O(w);E.current=w;var x=M((function(){return E.current()}),[]),_=M(re(Ee().mark((function e(){var t,r,n,o;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=u.current,p(),u.current=null,d.current=0,a("idle"),s(0),!t){e.next=25;break}return e.prev=7,e.next=10,t.stop();case 10:if(!(r=e.sent)){e.next=21;break}return e.prev=12,n=require("react-native-fs"),o=r.startsWith("file://")?r.slice(7):r,e.next=17,n.unlink(o);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(12);case 21:e.next=25;break;case 23:e.prev=23,e.t1=e.catch(7);case 25:case"end":return e.stop()}}),e,null,[[7,23],[12,19]])}))),[p]);return R((function(){return function(){p();try{var e;null===(e=u.current)||void 0===e||e.stop()}catch(e){}}}),[p]),{status:A,duration:c,isRecording:"recording"===A,isPaused:"paused"===A,startRecording:g,pauseRecording:y,resumeRecording:b,stopRecording:x,cancelRecording:_}}({maxDuration:null!==(i=null==Se?void 0:Se.maxDuration)&&void 0!==i?i:300,onRecordStart:j,onRecordEnd:Ue}),Ne=O(Ye);Ne.current=Ye;var We=M((function(){Ne.current.startRecording()}),[]),Qe=M(re(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ne.current.stopRecording();case 2:(t=e.sent)&&P({audio:t.uri,senderId:ue});case 4:case"end":return e.stop()}}),e)}))),[P,ue]),ze=M((function(){Ne.current.cancelRecording()}),[]),Xe=null!==(l=null!==(c=null==xe?void 0:xe.recordingSendButtonBackground)&&void 0!==c?c:null==ce||null===(s=ce.inputStyles)||void 0===s||null===(s=s.sendButtonStyle)||void 0===s?void 0:s.backgroundColor)&&void 0!==l?l:"#22C55E",Je=null!==(u=null==xe?void 0:xe.recordingBackground)&&void 0!==u?u:"#0B141A",$e=null!==(C=null==xe?void 0:xe.timerColor)&&void 0!==C?C:"#FFFFFF",qe=null!==(d=null!==(f=null==xe?void 0:xe.longPressMicColor)&&void 0!==f?f:null==ce||null===(h=ce.colors)||void 0===h?void 0:h.sendIconsColor)&&void 0!==d?d:"#FFFFFF",Ze=null!==(v=null==xe?void 0:xe.waveformColor)&&void 0!==v?v:"#E9EDEF",et={isRecording:Ye.isRecording,isPaused:Ye.isPaused,duration:Ye.duration,isLocked:!1,slideOffset:{x:0,y:0},waveformData:[],startRecording:Ye.startRecording,stopRecording:Ye.stopRecording,pauseRecording:Ye.pauseRecording,resumeRecording:Ye.resumeRecording,cancelRecording:Ye.cancelRecording},tt=_e?_e(et):null,rt=!je&&he;return t(a,{style:w(xn||(xn=be(["w-full px-2 relative"]))),children:[Me&&e(Un,{previews:Oe,closePreview:ge,onRemoveItem:we,CustomFileIcon:X,CustomImagePreview:J,CustomVideoPreview:$,inputHeight:Ae.height}),t(a,{style:[w(_n||(_n=be(["flex-row items-end gap-2"]))),null==ce||null===(m=ce.inputStyles)||void 0===m?void 0:m.inputSectionContainerStyle],children:[t(a,{style:[w(On||(On=be(["flex-1 flex-row bg-white overflow-hidden px-3.5"]))),{minHeight:Nn,borderRadius:De?9999:24,alignItems:De?"center":"flex-end"},null==ce||null===(g=ce.inputStyles)||void 0===g?void 0:g.inputContainerStyle],children:[Ce&&e(a,{style:Te,children:e(A,{children:Y?e(Y,{}):e(Br,{style:ke,color:(null==ce||null===(y=ce.colors)||void 0===y?void 0:y.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e(p,{value:Z,onChangeText:Pe,placeholder:ve||"Message",style:Fe([w(In||(In=be(["bg-transparent flex-1 pl-2"]))),"ios"===n.OS?w(Mn||(Mn=be(["text-[17px]"]))):w(Rn||(Rn=be(["text-[16px]"]))),{minHeight:Yn,maxHeight:118,paddingVertical:De?0:8,marginVertical:De?(Nn-Yn)/2:4},{color:(null==ce||null===(b=ce.colors)||void 0===b?void 0:b.inputTextColor)||"rgba(0, 0, 0, 0.87)"}],null==ce?void 0:ce.fontFamily),placeholderTextColor:(null==ce||null===(E=ce.colors)||void 0===E?void 0:E.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:Ae.isMultiline&&Z.length>0?"top":"center",onContentSizeChange:He},"chat-input-".concat(ne)),t(a,{style:[w(kn||(kn=be(["flex-row items-center gap-4"]))),Te],children:[de&&e(A,{onPress:H,children:N?e(N,{}):e(Ur,{style:ke,color:(null==ce||null===(x=ce.colors)||void 0===x?void 0:x.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),fe&&!Z.trim()&&e(A,{onPress:B,children:W?e(W,{}):e(Hr,{style:ke,color:(null==ce||null===(_=ce.colors)||void 0===_?void 0:_.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]}),je?e(A,{onPress:Be,style:[w(Gn||(Gn=be(["rounded-full justify-center items-center"]))),se({height:Nn,width:Nn,backgroundColor:"#16a34a"},null==ce||null===(k=ce.inputStyles)||void 0===k?void 0:k.sendButtonStyle)],children:Q?e(Q,{}):e(Yr,{style:w.style(Wn),color:(null==ce||null===(G=ce.colors)||void 0===G?void 0:G.sendIconsColor)||"rgba(255,255,255,0.7)"})}):rt&&!tt?e(a,{style:{height:Nn,width:Nn},pointerEvents:"none"}):he&&tt?e(a,{style:{height:Nn,width:Nn,justifyContent:"center",alignItems:"center"},children:z?e(z,{}):e(jr,{style:w.style("h-8 w-8"),color:(null==ce||null===(D=ce.colors)||void 0===D?void 0:D.sendIconsColor)||"rgba(255,255,255,0.7)"})}):e(A,{onPress:Be,style:[w(Dn||(Dn=be(["rounded-full justify-center items-center"]))),se({height:Nn,width:Nn,backgroundColor:"#16a34a"},null==ce||null===(K=ce.inputStyles)||void 0===K?void 0:K.sendButtonStyle)],children:Q?e(Q,{}):e(Yr,{style:w.style(Wn),color:(null==ce||null===(T=ce.colors)||void 0===T?void 0:T.sendIconsColor)||"rgba(255,255,255,0.7)"})})]}),null!=tt?tt:he&&e(fn,{primaryColor:Xe,backgroundColor:Je,timerColor:$e,microphoneColor:qe,waveformColor:Ze,onRecordingStart:We,onSend:Qe,onCancel:ze,onDelete:ze})]})},zn=E.memo(Qn);function Xn(r){var n=r.style;return t(D,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:w.style("h-6 w-6 text-black",n),children:[e(V,{x1:"18",y1:"6",x2:"6",y2:"18"}),e(V,{x1:"6",y1:"6",x2:"18",y2:"18"})]})}var Jn,$n,qn,Zn,eo,to,ro,no,oo=function(r){var n,i=r.gallery,l=r.onClose,c=Ie(),s=c.theme,C=c.setIsVideoPlaying,d=O(null),f=null!==(n=null==i?void 0:i.initialIndex)&&void 0!==n?n:0,h=ye(S(f),2),v=h[0],p=h[1],y=u(),b=y.width,E=y.height;R((function(){if(null!=i&&i.items.length){var e=i.initialIndex;p(e);var t=i.items[e];C("video"===(null==t?void 0:t.kind)),requestAnimationFrame((function(){try{var t;null===(t=d.current)||void 0===t||t.scrollToIndex({index:e,animated:!1})}catch(e){}}))}}),[null==i?void 0:i.initialIndex,null==i?void 0:i.items,C]);var x=M((function(){C(!1),l()}),[l,C]),_=M((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/b);p(t);var r=null==i?void 0:i.items[t];C("video"===(null==r?void 0:r.kind))}),[null==i?void 0:i.items,b,C]);return i&&0!==i.items.length?e(m,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:x,statusBarTranslucent:!0,children:t(a,{style:[w(Kn||(Kn=be(["flex-1 bg-black"]))),{width:b,height:E}],children:[e(A,{onPress:x,style:w(Tn||(Tn=be(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e(Xn,{style:w(Ln||(Ln=be(["h-8 w-8"])))})}),i.items.length>1&&e(a,{style:w(Pn||(Pn=be(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:t(o,{style:Fe(w(Vn||(Vn=be(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==s?void 0:s.fontFamily),children:[v+1," / ",i.items.length]})}),e(g,{ref:d,data:i.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:i.initialIndex,extraData:v,getItemLayout:function(e,t){return{length:b,offset:b*t,index:t}},onMomentumScrollEnd:_,onScrollToIndexFailed:function(e){var t=e.index;setTimeout((function(){var e;null===(e=d.current)||void 0===e||e.scrollToIndex({index:t,animated:!1})}),100)},renderItem:function(t){var r=t.item,n=t.index;return e(io,{item:r,width:b,height:E,isActive:n===v,autoPlayVideo:n===f&&"video"===r.kind})}})]})}):null},io=function(r){var n=r.item,i=r.width,A=r.height,c=r.isActive,s=r.autoPlayVideo,u=Ie().theme,C=O(null),d=ye(S("video"===n.kind),2),f=d[0],h=d[1],v=ye(S(!1),2),p=v[0],m=v[1],g="video"===n.kind&&c&&s;return"image"===n.kind?e(a,{style:{width:i,height:A,justifyContent:"center"},children:e(l,{source:{uri:n.uri},style:{width:i,height:A},resizeMode:"contain"})}):t(a,{style:{width:i,height:A,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e(F,{source:{uri:n.uri},ref:C,controls:!0,paused:!g,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:i-32,height:.55*A,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){h(!0),m(!1)},onLoad:function(){return h(!1)},onBuffer:function(e){var t=e.isBuffering;return h(t)},onError:function(){m(!0),h(!1)}}),f&&e(a,{style:w(Fn||(Fn=be(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e(Zt,{style:w.style("h-14 w-14"),spinning:!0})}),p&&e(a,{style:w(Hn||(Hn=be(["absolute inset-0 items-center justify-center px-6"]))),children:e(o,{style:Fe(w(Bn||(Bn=be(["text-white font-semibold"]))),null==u?void 0:u.fontFamily),children:"Failed to load video"})})]})},Ao=E.memo(oo),ao=function(r){var n,i,A,c,s,u=r.typingUsers,C=r.currentUserId,d=Ie(),f=d.theme,h=d.showAvatars,v=d.renderCustomTyping,p=d.showBubbleTail,m=d.typingText,g=u.filter((function(e){return e.id!==C}));if(!g.length)return null;var y=g.slice(0,2),b=g.length-2,E=h?y.length+(b>0?1:0):0,S=E>0?24+14*Math.max(0,E-1):0,x=E>0?S+12:8,_=-(S+12);return t(a,{style:[w(Jn||(Jn=be(["px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start"]))),{marginLeft:x},null==f||null===(n=f.bubbleStyle)||void 0===n?void 0:n.typingContainerStyle],children:[h&&E>0&&t(a,{style:{position:"absolute",top:0,left:_,flexDirection:"row"},children:[y.map((function(t,r){var n,i,A;return e(a,{style:[w($n||($n=be(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:r>0?-10:0,zIndex:y.length+r}],children:t.avatar?e(l,{source:{uri:t.avatar},style:[w(qn||(qn=be(["w-full h-full object-cover rounded-full"]))),null==f||null===(n=f.bubbleStyle)||void 0===n?void 0:n.avatarImageStyle]}):e(o,{style:Fe([w(Zn||(Zn=be(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==f||null===(i=f.bubbleStyle)||void 0===i?void 0:i.avatarTextStyle],null==f?void 0:f.fontFamily),children:null===(A=t.name)||void 0===A?void 0:A.charAt(0)})},t.id)})),b>0&&e(a,{style:[w(eo||(eo=be(["bg-gray-400 w-6 h-6 rounded-full items-center justify-center"]))),{marginLeft:-10,zIndex:3},se({},null==f||null===(i=f.bubbleStyle)||void 0===i?void 0:i.additionalTypingUsersContainerStyle)],children:t(o,{style:Fe([w(to||(to=be(["text-white text-xs font-semibold"]))),null==f||null===(A=f.bubbleStyle)||void 0===A?void 0:A.additionalTypingUsersTextStyle],null==f?void 0:f.fontFamily),children:["+",b]})})]}),p&&e(Se,{style:w.style("absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]"),color:(null==f||null===(c=f.colors)||void 0===c?void 0:c.receivedMessageTailColor)||"white"}),v?v():e(a,{style:w(ro||(ro=be(["flex-row items-center py-3 px-2 justify-center"]))),children:e(o,{style:Fe([w(no||(no=be(["text-gray-600"]))),null==f||null===(s=f.bubbleStyle)||void 0===s?void 0:s.typingTextStyle],null==f?void 0:f.fontFamily),children:null!=m?m:"Typing..."})})]})};var lo={code:"function VoiceRecorderTsx1(){const{sendScale}=this.__closure;return{transform:[{scale:sendScale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx1","sendScale","__closure","transform","scale","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAuC+C,SAAAA,kBAAA,QAAAC,SAAA,OAAAC,SAAA,OAAO,CAC9CC,SAAS,CAAE,CAAC,CAAEC,KAAK,CAAEH,SAAS,CAACI,KAAM,CAAC,CAC1C,CAAC","ignoreList":[]}',version:"3.16.7"},co={code:"function VoiceRecorderTsx2(){const{pauseOpacity}=this.__closure;return{opacity:pauseOpacity.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx2","pauseOpacity","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AA0CgD,SAAAA,kBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CAC/CC,OAAO,CAAEF,YAAY,CAACG,KAC1B,CAAC","ignoreList":[]}',version:"3.16.7"},so=function(r){var n=r.primaryColor,i=void 0===n?"#22C55E":n,l=r.backgroundColor,c=void 0===l?"#0B141A":l,s=r.waveformColor,u=void 0===s?"#E9EDEF":s,C=r.timerColor,d=void 0===C?"#FFFFFF":C,f=r.sendButtonColor,h=r.deleteIconColor,v=void 0===h?"#8696A0":h,p=r.height,m=void 0===p?110:p,g=r.borderRadius,y=void 0===g?18:g,b=r.waveCount,w=void 0===b?28:b,E=r.waveSpacing,x=void 0===E?3:E,_=r.waveWidth,I=void 0===_?3:_,M=r.renderDeleteIcon,k=r.renderSendIcon,G=r.renderWaveform,D=r.onSend,K=r.onDelete,T=ye(S(0),2),L=T[0],P=T[1],V=O(Date.now());R((function(){V.current=Date.now();var e=setInterval((function(){P((Date.now()-V.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var F=U(1),H=U(1);R((function(){F.value=Y(N(W(1.05,{duration:900,easing:Q.inOut(Q.ease)}),W(1,{duration:900,easing:Q.inOut(Q.ease)})),-1,!1),H.value=Y(N(W(.45,{duration:600,easing:Q.inOut(Q.ease)}),W(1,{duration:600,easing:Q.inOut(Q.ease)})),-1,!1)}),[]);var B,z,X=J((B=[new global.Error,-2,-27],(z=function(){return{transform:[{scale:F.value}]}}).__closure={sendScale:F},z.__workletHash=0xb10ea8440da,z.__initData=lo,z.__stackDetails=B,z)),$=J(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:H.value}};return t.__closure={pauseOpacity:H},t.__workletHash=0xfe959e3782e,t.__initData=co,t.__stackDetails=e,t}()),q={height:m,backgroundColor:c,borderTopLeftRadius:y,borderTopRightRadius:y},Z=null!=f?f:i;return e(a,{style:[ho.container,q],children:t(a,{style:ho.row,children:[e(A,{onPress:K,hitSlop:10,style:ho.deleteWrapper,accessibilityRole:"button",accessibilityLabel:"Delete recording",children:M?M():e(Xr,{style:{width:26,height:26},color:v})}),t(a,{style:ho.center,children:[t(a,{style:ho.timerRow,children:[e(o,{style:[ho.timer,{color:d}],numberOfLines:1,children:Ft(L)}),e(a,{style:ho.waveformWrapper,children:G?G():e(uo,{color:u,count:w,spacing:x,barWidth:I})})]}),t(j.View,{style:[ho.pauseRow,$],children:[e(a,{style:ho.pauseBar}),e(a,{style:ho.pauseBar})]})]}),e(j.View,{style:X,children:e(A,{onPress:D,hitSlop:6,accessibilityRole:"button",accessibilityLabel:"Send recording",style:[ho.sendButton,{backgroundColor:Z}],children:k?k():e(Yr,{style:{width:30,height:30},color:"#FFFFFF"})})})]})})},uo=function(t){var r=t.color,n=t.count,o=t.spacing,i=t.barWidth,A=U(0);R((function(){A.value=Y(W(1,{duration:4500,easing:Q.linear}),-1,!1)}),[]);var l=Math.min(200,n*i+(n-1)*o);return e(a,{style:[ho.waveform,{width:l,height:36}],children:Array.from({length:n}).map((function(t,a){return e(fo,{index:a,total:n,tick:A,color:r,width:i,spacing:o},a)}))})},Co={code:'function VoiceRecorderTsx3(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edgeFalloff=Math.sin(index/Math.max(1,total-1)*Math.PI);const amplitude=Math.max(0.15,Math.min(1,combined)*(0.35+0.65*edgeFalloff));return{height:Math.round(amplitude*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx3","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edgeFalloff","max","amplitude","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAqE2C,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,WAAW,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACxE,KAAM,CAAAQ,SAAS,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,WAAW,CAAC,CAAC,CACrF,MAAO,CACHI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,SAAS,CAAG,GAAG,CAAC,IAC1C,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},fo=function(t){var r,n,o=t.index,i=t.total,A=t.tick,a=t.color,l=t.width,c=t.spacing,s=J((r=[new global.Error,-4,-27],(n=function(){var e=A.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*o)+.3*Math.sin(4*e+1.3*o)+.4*Math.sin(.9*e+.27*o))+.5,r=Math.sin(o/Math.max(1,i-1)*Math.PI),n=Math.max(.15,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:A,index:o,total:i},n.__workletHash=7061037340779,n.__initData=Co,n.__stackDetails=r,n));return e(j.View,{style:[{width:l,marginHorizontal:c/2,backgroundColor:a,borderRadius:l},s]})},ho=f.create({container:{width:"100%",paddingHorizontal:18,paddingVertical:14,justifyContent:"center"},row:{flex:1,flexDirection:"row",alignItems:"center"},deleteWrapper:{width:26,height:"100%",justifyContent:"flex-end",alignItems:"flex-start",paddingBottom:2},center:{flex:1,height:"100%",paddingHorizontal:12,justifyContent:"center"},timerRow:{flexDirection:"row",alignItems:"center",gap:12},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},waveformWrapper:{flex:1,alignItems:"flex-start",justifyContent:"center"},waveform:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},pauseRow:{flexDirection:"row",justifyContent:"center",alignItems:"center",marginTop:6,gap:4},pauseBar:{width:3,height:12,borderRadius:2,backgroundColor:"#F15C6D"},sendButton:{width:72,height:72,borderRadius:36,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.25,shadowRadius:8,elevation:6}}),vo="rgba(255,255,255,0.55)",po=72,mo=70;function go(){h.vibrate(20)}var yo,bo,wo,Eo,So,xo={code:"function VoiceRecordingGestureTsx1(){const{cancelFired,lockFired,dragX,dragY}=this.__closure;cancelFired.value=0;lockFired.value=0;dragX.value=0;dragY.value=0;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx1","cancelFired","lockFired","dragX","dragY","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA4DiB,SAAAA,yBAAMA,CAAA,QAAAC,WAAA,CAAAC,SAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEfJ,WAAW,CAACK,KAAK,CAAG,CAAC,CACrBJ,SAAS,CAACI,KAAK,CAAG,CAAC,CACnBH,KAAK,CAACG,KAAK,CAAG,CAAC,CACfF,KAAK,CAACE,KAAK,CAAG,CAAC,CACnB","ignoreList":[]}',version:"3.16.7"},_o={code:"function VoiceRecordingGestureTsx2(e){const{dragX,dragY,lockFired,LOCK_THRESHOLD,lockHighlight,withTiming,runOnJS,fireLock,cancelFired,CANCEL_THRESHOLD,fireCancel}=this.__closure;const x=Math.min(0,e.translationX);const y=Math.min(0,e.translationY);dragX.value=x;dragY.value=y;if(lockFired.value===0&&y<=-LOCK_THRESHOLD){lockFired.value=1;lockHighlight.value=withTiming(1,{duration:180});runOnJS(fireLock)();}if(cancelFired.value===0&&x<=-CANCEL_THRESHOLD){cancelFired.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx2","e","dragX","dragY","lockFired","LOCK_THRESHOLD","lockHighlight","withTiming","runOnJS","fireLock","cancelFired","CANCEL_THRESHOLD","fireCancel","__closure","x","Math","min","translationX","y","translationY","value","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmEmB,QAAC,CAAAA,yBAAKA,CAAAC,CAAA,QAAAC,KAAA,CAAAC,KAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,aAAA,CAAAC,UAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,WAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,CAAC,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEf,CAAC,CAACgB,YAAY,CAAC,CACrC,KAAM,CAAAC,CAAC,CAAGH,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEf,CAAC,CAACkB,YAAY,CAAC,CACrCjB,KAAK,CAACkB,KAAK,CAAGN,CAAC,CACfX,KAAK,CAACiB,KAAK,CAAGF,CAAC,CACf,GAAId,SAAS,CAACgB,KAAK,GAAK,CAAC,EAAIF,CAAC,EAAI,CAACb,cAAc,CAAE,CAC/CD,SAAS,CAACgB,KAAK,CAAG,CAAC,CACnBd,aAAa,CAACc,KAAK,CAAGb,UAAU,CAAC,CAAC,CAAE,CAAEc,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtDb,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAIC,WAAW,CAACU,KAAK,GAAK,CAAC,EAAIN,CAAC,EAAI,CAACH,gBAAgB,CAAE,CACnDD,WAAW,CAACU,KAAK,CAAG,CAAC,CACrBZ,OAAO,CAACI,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},Oo={code:"function VoiceRecordingGestureTsx3(){const{lockFired,dragX,withSpring,dragY}=this.__closure;if(lockFired.value===0){dragX.value=withSpring(0,{damping:18,stiffness:180});dragY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx3","lockFired","dragX","withSpring","dragY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmFe,SAAAA,yBAAMA,CAAA,QAAAC,SAAA,CAAAC,KAAA,CAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA,CAEb,GAAIJ,SAAS,CAACK,KAAK,GAAK,CAAC,CAAE,CACvBJ,KAAK,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAC5DJ,KAAK,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAChE,CACJ","ignoreList":[]}',version:"3.16.7"},Io={code:"function VoiceRecordingGestureTsx4(){const{lockFired,dragX,withSpring,dragY}=this.__closure;if(lockFired.value===0){dragX.value=withSpring(0,{damping:18,stiffness:180});dragY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx4","lockFired","dragX","withSpring","dragY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA0FoB,SAAAA,yBAAMA,CAAA,QAAAC,SAAA,CAAAC,KAAA,CAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA,CAElB,GAAIJ,SAAS,CAACK,KAAK,GAAK,CAAC,CAAE,CACvBJ,KAAK,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAC5DJ,KAAK,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAChE,CACJ","ignoreList":[]}',version:"3.16.7"},Mo={code:"function VoiceRecordingGestureTsx5(){const{dragX,CANCEL_THRESHOLD,arrowPulse}=this.__closure;const progress=Math.min(1,Math.abs(dragX.value)/CANCEL_THRESHOLD);return{transform:[{translateX:dragX.value*0.55+arrowPulse.value}],opacity:1-progress};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx5","dragX","CANCEL_THRESHOLD","arrowPulse","__closure","progress","Math","min","abs","value","transform","translateX","opacity"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAiG4C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAACP,KAAK,CAACQ,KAAK,CAAC,CAAGP,gBAAgB,CAAC,CACtE,MAAO,CACHQ,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEV,KAAK,CAACQ,KAAK,CAAG,IAAI,CAAGN,UAAU,CAACM,KAAM,CAAC,CAAC,CAClEG,OAAO,CAAE,CAAC,CAAGP,QACjB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Ro={code:"function VoiceRecordingGestureTsx6(){const{dragY,LOCK_REVEAL_TRAVEL,LOCK_THRESHOLD,interpolate}=this.__closure;const reveal=Math.min(1,Math.max(0,-dragY.value/LOCK_REVEAL_TRAVEL));const lockProgress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));const rise=interpolate(lockProgress,[0,1],[0,-22]);return{opacity:reveal,transform:[{scale:0.85+reveal*0.15},{translateY:rise}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx6","dragY","LOCK_REVEAL_TRAVEL","LOCK_THRESHOLD","interpolate","__closure","reveal","Math","min","max","value","lockProgress","rise","opacity","transform","scale","translateY"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAwG2C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,kBAAA,CAAAC,cAAA,CAAAC,WAAA,OAAAC,SAAA,CACzC,KAAM,CAAAC,MAAM,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACR,KAAK,CAACS,KAAK,CAAGR,kBAAkB,CAAC,CAAC,CAC1E,KAAM,CAAAS,YAAY,CAAGJ,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACR,KAAK,CAACS,KAAK,CAAGP,cAAc,CAAC,CAAC,CAC5E,KAAM,CAAAS,IAAI,CAAGR,WAAW,CAACO,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAC,CACxD,MAAO,CACHE,OAAO,CAAEP,MAAM,CACfQ,SAAS,CAAE,CACP,CAAEC,KAAK,CAAE,IAAI,CAAGT,MAAM,CAAG,IAAK,CAAC,CAC/B,CAAEU,UAAU,CAAEJ,IAAK,CAAC,CAE5B,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},ko={code:"function VoiceRecordingGestureTsx7(){const{dragY,LOCK_THRESHOLD,lockHighlight}=this.__closure;const lockProgress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));return{borderWidth:lockProgress>0.85||lockHighlight.value>0?1.5:0};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx7","dragY","LOCK_THRESHOLD","lockHighlight","__closure","lockProgress","Math","min","max","value","borderWidth"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAoH6C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,cAAA,CAAAC,aAAA,OAAAC,SAAA,CAC3C,KAAM,CAAAC,YAAY,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACP,KAAK,CAACQ,KAAK,CAAGP,cAAc,CAAC,CAAC,CAC5E,MAAO,CACHQ,WAAW,CAAEL,YAAY,CAAG,IAAI,EAAIF,aAAa,CAACM,KAAK,CAAG,CAAC,CAAG,GAAG,CAAG,CACxE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Go={code:"function VoiceRecordingGestureTsx8(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx8","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA0H0C,SAAAA,0BAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},Do={code:'function VoiceRecordingGestureTsx9(){const{dragY,LOCK_THRESHOLD}=this.__closure;const progress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));return{height:Math.round(progress*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx9","dragY","LOCK_THRESHOLD","__closure","progress","Math","min","max","value","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA6HmD,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,cAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACN,KAAK,CAACO,KAAK,CAAGN,cAAc,CAAC,CAAC,CACxE,MAAO,CACHO,MAAM,CAAKJ,IAAI,CAACK,KAAK,CAACN,QAAQ,CAAG,GAAG,CAAC,IACzC,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Ko={code:"function VoiceRecordingGestureTsx10(){const{lockHighlight,dragX,dragY,micPulse}=this.__closure;const lockedScale=lockHighlight.value;return{transform:[{translateX:dragX.value},{translateY:dragY.value},{scale:micPulse.value*(1+lockedScale*0.04)}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx10","lockHighlight","dragX","dragY","micPulse","__closure","lockedScale","value","transform","translateX","translateY","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmIsC,SAAAA,0BAAMA,CAAA,QAAAC,aAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,QAAA,OAAAC,SAAA,CACpC,KAAM,CAAAC,WAAW,CAAGL,aAAa,CAACM,KAAK,CACvC,MAAO,CACHC,SAAS,CAAE,CACP,CAAEC,UAAU,CAAEP,KAAK,CAACK,KAAM,CAAC,CAC3B,CAAEG,UAAU,CAAEP,KAAK,CAACI,KAAM,CAAC,CAC3B,CAAEI,KAAK,CAAEP,QAAQ,CAACG,KAAK,EAAI,CAAC,CAAGD,WAAW,CAAG,IAAI,CAAE,CAAC,CAE5D,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},To=function(r){var n=r.primaryColor,i=void 0===n?"#22C55E":n,A=r.backgroundColor,l=void 0===A?"#0B141A":A,c=r.timerColor,s=void 0===c?"#FFFFFF":c,u=r.microphoneColor,C=void 0===u?"#FFFFFF":u,d=r.lockColor,f=void 0===d?"#E9EDEF":d,h=r.renderMicIcon,v=r.renderLockIcon,p=r.renderArrowIcon,m=r.onCancel,g=r.onLock,y=ye(S(0),2),b=y[0],w=y[1],E=O(Date.now());R((function(){E.current=Date.now();var e=setInterval((function(){w((Date.now()-E.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var x=U(0),_=U(0),I=U(0),M=U(1),k=U(0),G=U(0),D=U(0),K=U(0);R((function(){I.value=Y(N(W(-4,{duration:700,easing:Q.inOut(Q.ease)}),W(0,{duration:700,easing:Q.inOut(Q.ease)})),-1,!1),M.value=Y(N(W(1.08,{duration:850,easing:Q.inOut(Q.ease)}),W(1,{duration:850,easing:Q.inOut(Q.ease)})),-1,!1),k.value=Y(N(W(-5,{duration:500,easing:Q.inOut(Q.ease)}),W(0,{duration:500,easing:Q.inOut(Q.ease)})),-1,!1)}),[]);var T=O(m);T.current=m;var L=O(g);L.current=g;var P,V,F=function(){var e;go(),null===(e=T.current)||void 0===e||e.call(T)},$=function(){var e;go(),null===(e=L.current)||void 0===e||e.call(L)},Z=H.Pan().minDistance(0).onBegin((P=[new global.Error,-5,-27],V=function(){D.value=0,K.value=0,x.value=0,_.value=0},V.__closure={cancelFired:D,lockFired:K,dragX:x,dragY:_},V.__workletHash=9031413480896,V.__initData=xo,V.__stackDetails=P,V)).onUpdate(function(){var e=[new global.Error,-12,-27],t=function(e){var t=Math.min(0,e.translationX),r=Math.min(0,e.translationY);x.value=t,_.value=r,0===K.value&&r<=-70&&(K.value=1,G.value=W(1,{duration:180}),X($)()),0===D.value&&t<=-90&&(D.value=1,X(F)())};return t.__closure={dragX:x,dragY:_,lockFired:K,LOCK_THRESHOLD:mo,lockHighlight:G,withTiming:W,runOnJS:X,fireLock:$,cancelFired:D,CANCEL_THRESHOLD:90,fireCancel:F},t.__workletHash=0x920fdf71852,t.__initData=_o,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-5,-27],t=function(){0===K.value&&(x.value=z(0,{damping:18,stiffness:180}),_.value=z(0,{damping:18,stiffness:180}))};return t.__closure={lockFired:K,dragX:x,withSpring:z,dragY:_},t.__workletHash=0xb14c5cd4e31,t.__initData=Oo,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-5,-27],t=function(){0===K.value&&(x.value=z(0,{damping:18,stiffness:180}),_.value=z(0,{damping:18,stiffness:180}))};return t.__closure={lockFired:K,dragX:x,withSpring:z,dragY:_},t.__workletHash=6312451443030,t.__initData=Io,t.__stackDetails=e,t}()),ee=J(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.abs(x.value)/90);return{transform:[{translateX:.55*x.value+I.value}],opacity:1-e}};return t.__closure={dragX:x,CANCEL_THRESHOLD:90,arrowPulse:I},t.__workletHash=0xd7ebb4d9e07,t.__initData=Mo,t.__stackDetails=e,t}()),te=J(function(){var e=[new global.Error,-5,-27],t=function(){var e=Math.min(1,Math.max(0,-_.value/12)),t=Math.min(1,Math.max(0,-_.value/mo));return{opacity:e,transform:[{scale:.85+.15*e},{translateY:q(t,[0,1],[0,-22])}]}};return t.__closure={dragY:_,LOCK_REVEAL_TRAVEL:12,LOCK_THRESHOLD:mo,interpolate:q},t.__workletHash=4153451354770,t.__initData=Ro,t.__stackDetails=e,t}()),re=J(function(){var e=[new global.Error,-4,-27],t=function(){return{borderWidth:Math.min(1,Math.max(0,-_.value/mo))>.85||G.value>0?1.5:0}};return t.__closure={dragY:_,LOCK_THRESHOLD:mo,lockHighlight:G},t.__workletHash=0xedc5d558aef,t.__initData=ko,t.__stackDetails=e,t}()),ne=J(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:k.value}]}};return t.__closure={chevronPulse:k},t.__workletHash=2030830631140,t.__initData=Go,t.__stackDetails=e,t}()),oe=J(function(){var e=[new global.Error,-3,-27],t=function(){var e=Math.min(1,Math.max(0,-_.value/mo));return{height:"".concat(Math.round(100*e),"%")}};return t.__closure={dragY:_,LOCK_THRESHOLD:mo},t.__workletHash=0xe54f0ad7c69,t.__initData=Do,t.__stackDetails=e,t}()),ie=J(function(){var e=[new global.Error,-5,-27],t=function(){var e=G.value;return{transform:[{translateX:x.value},{translateY:_.value},{scale:M.value*(1+.04*e)}]}};return t.__closure={lockHighlight:G,dragX:x,dragY:_,micPulse:M},t.__workletHash=6567433970992,t.__initData=Ko,t.__stackDetails=e,t}()),Ae={backgroundColor:l};return t(a,{style:Lo.wrapper,pointerEvents:"box-none",children:[t(j.View,{style:[Lo.lockPill,te,re],pointerEvents:"none",children:[e(j.View,{children:v?v():e(zr,{style:{width:20,height:20},color:f})}),e(a,{style:Lo.lockProgressTrack,children:e(j.View,{style:[Lo.lockProgressFill,{backgroundColor:i},oe]})}),e(j.View,{style:ne,children:e(Qr,{style:{width:16,height:16},color:f})})]}),t(a,{style:[Lo.bar,Ae],children:[e(o,{style:[Lo.timer,{color:s}],numberOfLines:1,children:Ft(b)}),t(j.View,{style:[Lo.slideArea,ee],children:[p?p():e(o,{style:Lo.slideArrow,children:"‹"}),e(o,{style:Lo.slideText,children:"Slide to cancel"})]}),e(B,{gesture:Z,children:e(j.View,{style:Lo.micPressable,accessibilityRole:"button",accessibilityLabel:"Hold to record. Slide left to cancel, slide up to lock.",children:e(j.View,{style:[Lo.mic,{backgroundColor:i},ie],children:h?h():e(jr,{style:{width:30,height:30},color:C})})})})]})]})},Lo=f.create({wrapper:{width:"100%"},lockPill:{position:"absolute",right:31,bottom:103,width:46,paddingVertical:12,borderRadius:28,backgroundColor:"rgba(20,28,33,0.95)",borderColor:"#22C55E",alignItems:"center",justifyContent:"center",gap:10,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:8},lockProgressTrack:{width:4,height:18,borderRadius:2,backgroundColor:"rgba(255,255,255,0.15)",overflow:"hidden",justifyContent:"flex-end"},lockProgressFill:{width:"100%",borderRadius:2},bar:{width:"100%",height:95,paddingHorizontal:18,borderTopLeftRadius:18,borderTopRightRadius:18,flexDirection:"row",alignItems:"center"},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},slideArea:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},slideArrow:{fontSize:18,lineHeight:18,color:vo,fontWeight:"500",marginTop:-2},slideText:{fontSize:14,color:vo,fontWeight:"500"},micPressable:{width:po,height:po,justifyContent:"center",alignItems:"center"},mic:{width:po,height:po,borderRadius:36,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:6}}),Po=function(){var r=Ie(),o=r.messages,i=r.currentUserId,A=r.onMessageLongPress,l=r.mediaViewerGallery,c=r.clearMediaViewerGallery,s=r.typingUsers,u=r.onSendMessage,C=r.onTypingStart,d=r.onTypingEnd,f=r.onAttachmentPress,h=r.onAudioRecordEnd,v=r.onAudioRecordStart,p=r.onCameraPress,m=r.renderCustomInput,E=r.CustomEmojiIcon,x=r.CustomAttachmentIcon,_=r.CustomCameraIcon,O=r.CustomMicrophoneIcon,I=r.CustomSendIcon,M=r.CustomFileIcon,k=r.CustomImagePreview,G=r.CustomVideoPreview,D=r.keyboardVerticalOffset,K=void 0===D?0:D,T=r.disableKeyboardAvoiding,L=void 0!==T&&T,P=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=ye(S(0),2),r=t[0],o=t[1];return R((function(){if(e){var t="ios"===n.OS?"keyboardWillShow":"keyboardDidShow",r="ios"===n.OS?"keyboardWillHide":"keyboardDidHide",i=y.addListener(t,(function(e){o(e.endCoordinates.height)})),A=y.addListener(r,(function(){return o(0)}));return function(){i.remove(),A.remove()}}o(0)}),[e]),e?r:0}(!L),V=m?m():e(zn,{onSendMessage:u,onTypingStart:C,onTypingEnd:d,onAttachmentPress:f,onAudioRecordEnd:h,onAudioRecordStart:v,onCameraPress:p,CustomEmojiIcon:E,CustomAttachmentIcon:x,CustomCameraIcon:_,CustomMicrophoneIcon:O,CustomSendIcon:I,CustomFileIcon:M,CustomImagePreview:k,CustomVideoPreview:G}),F=t(a,{style:w(yo||(yo=be(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e(g,{style:w(bo||(bo=be(["flex-1"]))),data:o,keyExtractor:function(e){return e.id},renderItem:function(t){var r,n=t.item,a=t.index;return e(Fr,{message:n,isCurrentUser:n.senderId===i,onLongPress:function(){return null==A?void 0:A(n)},isFirstInSequence:a===o.length-1||(null===(r=o[a+1])||void 0===r?void 0:r.senderId)!==n.senderId})},ListHeaderComponent:e(ao,{typingUsers:s||[],currentUserId:i}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e(a,{style:!L&&P>0?{marginBottom:P}:void 0,children:V}),e(Ao,{gallery:l,onClose:c})]});return L?e(a,{style:w(wo||(wo=be(["flex-1"]))),children:F}):"android"===n.OS?e(a,{style:w(Eo||(Eo=be(["flex-1"]))),children:F}):e(b,{style:w(So||(So=be(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:K,children:F})},Vo=function(t){return e(Vt,{children:e(Oe,se(se({},t),{},{children:e(Po,{})}))})};export{so as VoiceRecorder,fn as VoiceRecorderFlow,To as VoiceRecordingGesture,Vo as default};
|
|
17
17
|
//# sourceMappingURL=index.js.map
|