/* Metro module 1778; source: unknown; dependencies: [1779, 1653, 1780, 1621, 1762, 1654] */ function _fun19574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:6, offset: 0x00eadbb2, size: 1005 bytes, params: 8, frame: 24 var object6; let env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let closure = pnpm_interpolateColorTs1; const object8 = {}; const interpolate = (require(1779) /* metro dependency 1779 */).interpolate; object8.interpolate = interpolate; const Extrapolation = (require(1779) /* metro dependency 1779 */).Extrapolation; object8.Extrapolation = Extrapolation; object8.hsvToColor = (require(1653) /* metro dependency 1653 */).hsvToColor; closure.__closure = object8; closure.__workletHash = 1574790978150; closure.__initData = {code: 'function pnpm_interpolateColorTs1(value,inputRange,colors,options){const{interpolate,Extrapolation,hsvToColor}=this.__closure;let h=0;const{useCorrectedHSVInterpolation=true}=options;if(useCorrectedHSVInterpolation){const correctedInputRange=[inputRange[0]];const originalH=colors.h;const correctedH=[originalH[0]];for(let i=1;ioriginalH[i-1]&&d>0.5){correctedInputRange.push(inputRange[i]);correctedInputRange.push(inputRange[i]+0.00001);correctedH.push(originalH[i]-1);correctedH.push(originalH[i]);}else if(originalH[i] h[r3 - value]) { if (value2 > 0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] - value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } if (h[r3] < h[r3 - value]) { if (value2 < -0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] + value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } break reducibleJoin8; } break reducibleJoin8; } property = h[r3]; if (property < h[r3 - value]) { if (value2 < -0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] + value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } break reducibleJoin8; } break reducibleJoin8; } push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = h.length; if (value3 < length) { r3 = value3; continue reducibleLoop4; } break reducibleJoin12; } } else { if (!useCorrectedHSVInterpolation) { value = environment; value = require(1779) /* metro dependency 1779 */; interpolate = value.interpolate; h = a2.h; CLAMP = Extrapolation.CLAMP; value = Reflect.apply(interpolate, value, [a0, a1, h, CLAMP]); r5 = value; break reducibleJoin13; } property = a1[0]; items3 = [property]; h = a2.h; property = h[0]; items2 = [property]; length = h.length; value = 1; if (!(value < length)) { break reducibleJoin12; } r3 = value; reducibleLoop4: while (true) { property = h[r3]; value2 = property - h[r3 - value]; property = h[r3]; reducibleJoin11: while (true) { reducibleJoin8: while (true) { if (property > h[r3 - value]) { if (value2 > 0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] - value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } if (h[r3] < h[r3 - value]) { if (value2 < -0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] + value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } break reducibleJoin8; } break reducibleJoin8; } property = h[r3]; if (property < h[r3 - value]) { if (value2 < -0.5) { push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items3.push; Reflect.apply(push, items3, [a1[r3] + 0.00001]); push = items2.push; Reflect.apply(push, items2, [h[r3] + value]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } break reducibleJoin8; } break reducibleJoin8; } push = items3.push; Reflect.apply(push, items3, [a1[r3]]); push = items2.push; Reflect.apply(push, items2, [h[r3]]); break reducibleJoin11; } value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = h.length; if (value3 < length) { r3 = value3; continue reducibleLoop4; } break reducibleJoin12; } } } value4 = environment; moduleValue = require(1779) /* metro dependency 1779 */; interpolate = moduleValue.interpolate; CLAMP = Extrapolation.CLAMP; value = (Reflect.apply(interpolate, moduleValue, [a0, items3, items2, CLAMP]) + value) % value; r5 = value; break reducibleJoin13; } interpolate = (require(1779) /* metro dependency 1779 */).interpolate; const s = a2.s; CLAMP = Extrapolation.CLAMP; value = Reflect.apply(interpolate, value, [a0, a1, s, CLAMP]); const moduleValue2 = require(1779) /* metro dependency 1779 */; interpolate = moduleValue2.interpolate; const v = a2.v; CLAMP = Extrapolation.CLAMP; const value5 = Reflect.apply(interpolate, moduleValue2, [a0, a1, v, CLAMP]); const moduleValue3 = moduleValue2; interpolate = moduleValue3.interpolate; const a = a2.a; CLAMP = Extrapolation.CLAMP; return (require(1653) /* metro dependency 1653 */).hsvToColor(r5, value, value5, Reflect.apply(interpolate, moduleValue3, [a0, a1, a, CLAMP])); } function toLinearSpace(a0, a1) { // fn#19576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:2387, offset: 0x00eae25a, size: 29 bytes, params: 3, frame: 11 const env0_0 = a1; return a0.map(function(a0) { var Math = global.Math; return Math.pow(a0 / 255, require); }); } function pnpm_interpolateColorTs4(a0, a1, {r, g, b, a}, {gamma}) { // fn#19579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:3545, offset: 0x00eae2d8, size: 428 bytes, params: 5, frame: 27 var r6; var r9; var r15; var r0; var toLinearSpaceBinding; var value2; var value3; var moduleValue5; var rgbaColor; var toGammaSpaceBinding; let value = 2.2; const r12 = gamma === undefined ? value : gamma; if (r12 === 1) { r6 = r; r9 = g; r15 = b; } else { toLinearSpaceBinding = toLinearSpace; value = toLinearSpaceBinding(r, r12); value2 = toLinearSpaceBinding(g, r12); value3 = toLinearSpaceBinding(b, r12); r6 = value; r9 = value2; r15 = value3; } const moduleValue = require(1779) /* metro dependency 1779 */; let interpolate = moduleValue.interpolate; const Extrapolation = moduleValue.Extrapolation; let CLAMP = Extrapolation.CLAMP; const value4 = Reflect.apply(interpolate, moduleValue, [a0, a1, r6, CLAMP]); const moduleValue2 = moduleValue; interpolate = moduleValue2.interpolate; CLAMP = Extrapolation.CLAMP; const value5 = Reflect.apply(interpolate, moduleValue2, [a0, a1, r9, CLAMP]); const moduleValue3 = moduleValue; interpolate = moduleValue3.interpolate; CLAMP = Extrapolation.CLAMP; const value6 = Reflect.apply(interpolate, moduleValue3, [a0, a1, r15, CLAMP]); const moduleValue4 = moduleValue; interpolate = moduleValue4.interpolate; CLAMP = Extrapolation.CLAMP; const value7 = Reflect.apply(interpolate, moduleValue4, [a0, a1, a, CLAMP]); if (r12 === 1) { value = require(1653) /* metro dependency 1653 */; value = value.rgbaColor(value4, value5, value6, value7); r0 = value; } else { moduleValue5 = require(1653) /* metro dependency 1653 */; rgbaColor = moduleValue5.rgbaColor; toGammaSpaceBinding = toGammaSpace; value = toGammaSpaceBinding(value4, r12); value = Reflect.apply(rgbaColor, moduleValue5, [value, toGammaSpaceBinding(value5, r12), toGammaSpaceBinding(value6, r12), value7]); r0 = value; } return r0; } function pnpm_interpolateColorTs5(a0, a1, {l, a, b, alpha}, a3) { // fn#19580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:4770, offset: 0x00eae484, size: 353 bytes, params: 5, frame: 25 const moduleValue = require(1779) /* metro dependency 1779 */; let interpolate = moduleValue.interpolate; const Extrapolation = moduleValue.Extrapolation; let CLAMP = Extrapolation.CLAMP; const value2 = Reflect.apply(interpolate, moduleValue, [a0, a1, l, CLAMP]); const moduleValue2 = moduleValue; interpolate = moduleValue2.interpolate; CLAMP = Extrapolation.CLAMP; const value3 = Reflect.apply(interpolate, moduleValue2, [a0, a1, a, CLAMP]); const moduleValue3 = moduleValue; interpolate = moduleValue3.interpolate; CLAMP = Extrapolation.CLAMP; const value4 = Reflect.apply(interpolate, moduleValue3, [a0, a1, b, CLAMP]); const moduleValue4 = moduleValue; interpolate = moduleValue4.interpolate; CLAMP = Extrapolation.CLAMP; const value5 = Reflect.apply(interpolate, moduleValue4, [a0, a1, alpha, CLAMP]); const convert = (importDefault(1780) /* metro dependency 1780 */).oklab.convert; const value = convert.toRgb({l: value2, a: value3, b: value4, alpha: value5}); return (require(1653) /* metro dependency 1653 */).rgbaColor(value.r, value.g, value.b, value.alpha); } function _splitColorsIntoChannels(a0, a1) { // fn#19581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:5977, offset: 0x00eae5e5, size: 297 bytes, params: 3, frame: 25 var r9; var property; var object2; var moduleValue; var moduleValue2; var moduleValue3; var value3; var push; var ch1; var ch2; var ch3; var moduleValue4; var opacity; const items5 = []; const items2 = []; const items3 = []; const items4 = []; let length = a0.length; let value = 0; if (value < length) { r9 = value; while (true) { property = a0[r9]; value = require(1653) /* metro dependency 1653 */; value = value.processColor(property); if (typeof value === 'number') { object2 = {}; moduleValue = require(1653) /* metro dependency 1653 */; object2.r = moduleValue.red(value); moduleValue2 = require(1653) /* metro dependency 1653 */; object2.g = moduleValue2.green(value); moduleValue3 = require(1653) /* metro dependency 1653 */; object2.b = moduleValue3.blue(value); value3 = a1(object2); push = items5.push; ch1 = value3.ch1; Reflect.apply(push, items5, [ch1]); push = items2.push; ch2 = value3.ch2; Reflect.apply(push, items2, [ch2]); push = items3.push; ch3 = value3.ch3; Reflect.apply(push, items3, [ch3]); push = items4.push; moduleValue4 = require(1653) /* metro dependency 1653 */; opacity = moduleValue4.opacity; Reflect.apply(push, items4, [Reflect.apply(opacity, moduleValue4, [value])]); } value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1; length = a0.length; if (value < length) { r9 = value; continue; } break; } } return {ch1: items5, ch2: items2, ch3: items3, alpha: items4}; } function pnpm_interpolateColorTs7(a0) { // fn#19582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:6777, offset: 0x00eae70e, size: 70 bytes, params: 2, frame: 13 const value = _splitColorsIntoChannels(a0, function(a0) { return {ch1: a0.r, ch2: a0.g, ch3: a0.b}; }); return {r: value.ch1, g: value.ch2, b: value.ch3, a: value.alpha}; } function pnpm_interpolateColorTs8(a0) { // fn#19584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7349, offset: 0x00eae77a, size: 69 bytes, params: 2, frame: 13 const value = _splitColorsIntoChannels(a0, _fun19585); return {h: value.ch1, s: value.ch2, v: value.ch3, a: value.alpha}; } function pnpm_interpolateColorTs9(a0) { // fn#19586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7994, offset: 0x00eae81a, size: 71 bytes, params: 2, frame: 13 const value = _splitColorsIntoChannels(a0, _fun19587); return {l: value.ch1, a: value.ch2, b: value.ch3, alpha: value.alpha}; } function _fun19588() { // fn#19588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9007, offset: 0x00eae8b7, size: 112 bytes, params: 1, frame: 4 const closure = interpolateColor_19589; closure.__closure = {interpolateColorsHSV: pnpm_interpolateColorTs1, getInterpolateHSV: pnpm_interpolateColorTs8, interpolateColorsRGB: pnpm_interpolateColorTs4, getInterpolateRGB: pnpm_interpolateColorTs7, interpolateColorsLAB: pnpm_interpolateColorTs5, getInterpolateLAB: pnpm_interpolateColorTs9}; closure.__workletHash = 10004340589678; closure.__initData = env0_12; return closure; } function useInterpolateConfig(a0, a1) { // fn#19590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9786, offset: 0x00eaea41, size: 162 bytes, params: 3, frame: 17 const r4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : env0_13.RGB; const r3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; const value = require(1762) /* metro dependency 1762 */; const useSharedValue = value.useSharedValue; const object2 = {inputRange: a0, outputRange: a1, colorSpace: r4}; object2.cache = (require(1654) /* metro dependency 1654 */).makeMutable(null); object2.options = r3; return Reflect.apply(useSharedValue, value, [object2]); } function _fun19585({r, g, b}) { // fn#19585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7397, offset: 0x00eae7bf, size: 91 bytes, params: 2, frame: 15 let value = environment.__proto__; value = require(1653) /* metro dependency 1653 */; value = value.RGBtoHSV(r, g, b); return {ch1: value.h, ch2: value.s, ch3: value.v}; } function _fun19587(a0) { // fn#19587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:8042, offset: 0x00eae861, size: 86 bytes, params: 2, frame: 11 let value = environment.__proto__; value = (importDefault(1780) /* metro dependency 1780 */).oklab.convert.fromRgb(a0); return {ch1: value.l, ch2: value.a, ch3: value.b}; } function interpolateColor_19589(a0, a1, a2) { // fn#19589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9024, offset: 0x00eae927, size: 282 bytes, params: 4, frame: 22 let value = 'RGB'; const r9 = arguments.length > 3 ? arguments[3] === undefined ? value : arguments[3] : value; const r2 = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; if (r9 === 'HSV') { value = environment.__proto__; return pnpm_interpolateColorTs1(a0, a1, pnpm_interpolateColorTs8(a2), r2); } if (value === r9) { value = environment.__proto__; return pnpm_interpolateColorTs4(a0, a1, pnpm_interpolateColorTs7(a2), r2); } if (r9 === 'LAB') { value = environment.__proto__; return pnpm_interpolateColorTs5(a0, a1, pnpm_interpolateColorTs9(a2), r2); } value = environment.__proto__; const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError; value = 'Invalid color space provided: ' + r9 + ". Supported values are: ['RGB', 'HSV', 'LAB']."; const value4 = Object.create(ReanimatedError.prototype, {constructor: {value: ReanimatedError}}); const reanimatedError = new ReanimatedError(value); throw reanimatedError instanceof Object ? reanimatedError : value4; }