decord/source/8481_extractBrush.js

49 lines
1.3 KiB
JavaScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8481
2026-07-27 11:26:19 +00:00
// Function ID: 67560
2026-07-20 16:05:17 +00:00
// Name: extractBrush
2026-07-25 08:10:48 +00:00
// Dependencies: [27, 8482]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 8481 (extractBrush)
2026-07-23 10:11:24 +00:00
import { processColor } from "get ActivityIndicator";
const re3 = /^url\(#(.+)\)$/;
2026-07-20 16:05:17 +00:00
let closure_4 = { type: 2 };
let closure_5 = { type: 3 };
let closure_6 = { type: 4 };
export default function extractBrush(str) {
if ("none" === str) {
return null;
} else if ("currentColor" === str) {
return closure_4;
} else if ("context-fill" === str) {
return closure_5;
} else if ("context-stroke" === str) {
return closure_6;
} else {
let match = "string" === typeof str;
if (match) {
match = str.match(closure_3);
}
if (match) {
let obj = { type: 1, brushRef: match[1] };
return obj;
} else {
2026-07-25 08:10:48 +00:00
obj = require(8482) /* parsePercentageRGBColor */;
2026-07-20 16:05:17 +00:00
const tmp6 = processColor(obj.convertPercentageColor(str));
if ("number" === typeof tmp6) {
obj = { type: 0, payload: tmp6 };
let tmp11 = obj;
} else {
const _console = console;
const _String = String;
const _HermesInternal = HermesInternal;
console.warn("\"" + String(str) + "\" is not a valid color or brush");
tmp11 = null;
}
return tmp11;
}
}
};