Sync latest web IM fixes
This commit is contained in:
Vendored
+9
-9
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
define('IM_ADMIN_URL', getenv('IM_ADMIN_URL') ?: 'http://127.0.0.1:18080');
|
||||
define('IM_ADMIN_SECRET', getenv('IM_ADMIN_SECRET') ?: '');
|
||||
define('IM_DB_DSN', getenv('IM_DB_DSN') ?: 'mysql:host=127.0.0.1;port=3306;dbname=wfchat;charset=utf8mb4');
|
||||
define('IM_DB_USER', getenv('IM_DB_USER') ?: '');
|
||||
define('IM_DB_PASSWORD', getenv('IM_DB_PASSWORD') ?: '');
|
||||
define('IM_APP_DB_DSN', getenv('IM_APP_DB_DSN') ?: 'mysql:host=127.0.0.1;port=3306;dbname=appdata;charset=utf8mb4');
|
||||
define('IM_APP_DB_USER', getenv('IM_APP_DB_USER') ?: '');
|
||||
define('IM_APP_DB_PASSWORD', getenv('IM_APP_DB_PASSWORD') ?: '');
|
||||
define('IM_DB_TIMEZONE', getenv('IM_DB_TIMEZONE') ?: 'Asia/Bangkok');
|
||||
define('IM_ADMIN_URL', getenv('JC_WEB_IM_ADMIN_URL') ?: 'http://127.0.0.1:18080');
|
||||
define('IM_ADMIN_SECRET', getenv('JC_WEB_IM_ADMIN_SECRET') ?: '123456');
|
||||
const IM_DB_DSN = 'mysql:host=im-mysql-005.cbgumoq8g1ks.ap-southeast-1.rds.amazonaws.com;port=3306;dbname=zhongliao_wfchat;charset=utf8mb4';
|
||||
const IM_DB_USER = 'zhongliaoMysql';
|
||||
const IM_DB_PASSWORD = 'ZhongLiao@admin';
|
||||
const IM_APP_DB_DSN = 'mysql:host=im-mysql-005.cbgumoq8g1ks.ap-southeast-1.rds.amazonaws.com;port=3306;dbname=zhongliao_app;charset=utf8mb4';
|
||||
const IM_APP_DB_USER = 'zhongliaoMysql';
|
||||
const IM_APP_DB_PASSWORD = 'ZhongLiao@admin';
|
||||
const IM_DB_TIMEZONE = 'Asia/Shanghai';
|
||||
|
||||
function respond(int $code, string $message, array $result = []): void
|
||||
{
|
||||
|
||||
Vendored
+236
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/im_web_bootstrap.php';
|
||||
|
||||
const WEB_MEDIA_PROXY_MAX_BYTES = 15 * 1024 * 1024;
|
||||
const WEB_MEDIA_PROXY_MAX_SECONDS = 25;
|
||||
|
||||
function failMediaProxy(int $status, string $message): never
|
||||
{
|
||||
http_response_code($status);
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
header('Cache-Control: no-store');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
echo $message;
|
||||
exit;
|
||||
}
|
||||
|
||||
function mediaProxyAllowedHosts(): array
|
||||
{
|
||||
$configured = webImEnv('JC_WEB_IM_MEDIA_PROXY_HOSTS');
|
||||
$hosts = array_map(
|
||||
static fn(string $host): string => strtolower(rtrim(trim($host), '.')),
|
||||
preg_split('/[,\s]+/', $configured) ?: []
|
||||
);
|
||||
|
||||
return array_values(array_unique(array_filter($hosts)));
|
||||
}
|
||||
|
||||
function validatedMediaProxyUrl(string $url): array
|
||||
{
|
||||
if ($url === '' || strlen($url) > 2048 || filter_var($url, FILTER_VALIDATE_URL) === false) {
|
||||
failMediaProxy(400, '媒体地址不合法');
|
||||
}
|
||||
|
||||
$parts = parse_url($url);
|
||||
$scheme = strtolower((string)($parts['scheme'] ?? ''));
|
||||
$host = strtolower(rtrim((string)($parts['host'] ?? ''), '.'));
|
||||
$port = isset($parts['port']) ? (int)$parts['port'] : 443;
|
||||
if (
|
||||
$scheme !== 'https'
|
||||
|| $host === ''
|
||||
|| $port !== 443
|
||||
|| isset($parts['user'])
|
||||
|| isset($parts['pass'])
|
||||
|| !in_array($host, mediaProxyAllowedHosts(), true)
|
||||
) {
|
||||
failMediaProxy(403, '媒体来源不允许代理');
|
||||
}
|
||||
|
||||
return [$url, $host];
|
||||
}
|
||||
|
||||
function mediaProxyCacheRoot(): string
|
||||
{
|
||||
$root = rtrim(webImEnv('JC_WEB_IM_MEDIA_CACHE_ROOT', '/var/cache/jc-web-im-media'), '/');
|
||||
if ($root === '' || !is_dir($root) || !is_writable($root)) {
|
||||
failMediaProxy(503, '媒体缓存目录不可用');
|
||||
}
|
||||
|
||||
return $root;
|
||||
}
|
||||
|
||||
function mediaProxyPreferredIps(): array
|
||||
{
|
||||
$configured = preg_split('/[,\s]+/', webImEnv('JC_WEB_IM_MEDIA_PROXY_IPS')) ?: [];
|
||||
$ips = [];
|
||||
foreach ($configured as $ip) {
|
||||
$ip = trim($ip);
|
||||
if (
|
||||
$ip !== ''
|
||||
&& filter_var(
|
||||
$ip,
|
||||
FILTER_VALIDATE_IP,
|
||||
FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE
|
||||
) !== false
|
||||
) {
|
||||
$ips[$ip] = $ip;
|
||||
}
|
||||
}
|
||||
|
||||
return array_values($ips);
|
||||
}
|
||||
|
||||
function mediaProxyMime(string $path): string
|
||||
{
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mime = $finfo !== false ? (string)(finfo_file($finfo, $path) ?: '') : '';
|
||||
if ($finfo !== false) {
|
||||
finfo_close($finfo);
|
||||
}
|
||||
|
||||
return $mime;
|
||||
}
|
||||
|
||||
function fetchMediaProxyImage(string $url, string $host, string $cacheFile): void
|
||||
{
|
||||
$deadline = microtime(true) + WEB_MEDIA_PROXY_MAX_SECONDS;
|
||||
$lastError = '媒体源无响应';
|
||||
$preferredIps = mediaProxyPreferredIps();
|
||||
$targets = array_merge($preferredIps, array_fill(0, max(2, 6 - count($preferredIps)), null));
|
||||
|
||||
foreach ($targets as $index => $preferredIp) {
|
||||
if (microtime(true) >= $deadline) {
|
||||
break;
|
||||
}
|
||||
$attempt = $index + 1;
|
||||
$temporaryFile = $cacheFile . '.tmp.' . getmypid() . '.' . $attempt;
|
||||
$stream = @fopen($temporaryFile, 'x+b');
|
||||
if ($stream === false) {
|
||||
$lastError = '无法创建媒体缓存文件';
|
||||
break;
|
||||
}
|
||||
|
||||
$bytes = 0;
|
||||
$tooLarge = false;
|
||||
$curl = curl_init($url);
|
||||
if ($curl === false) {
|
||||
fclose($stream);
|
||||
@unlink($temporaryFile);
|
||||
$lastError = '无法初始化媒体请求';
|
||||
break;
|
||||
}
|
||||
|
||||
$remainingMs = max(1000, (int)floor(($deadline - microtime(true)) * 1000));
|
||||
$curlOptions = [
|
||||
CURLOPT_RETURNTRANSFER => false,
|
||||
CURLOPT_FOLLOWLOCATION => false,
|
||||
CURLOPT_CONNECTTIMEOUT_MS => min(2500, $remainingMs),
|
||||
CURLOPT_TIMEOUT_MS => min(12000, $remainingMs),
|
||||
CURLOPT_NOSIGNAL => true,
|
||||
CURLOPT_DNS_CACHE_TIMEOUT => 0,
|
||||
CURLOPT_FRESH_CONNECT => true,
|
||||
CURLOPT_FORBID_REUSE => true,
|
||||
CURLOPT_PROTOCOLS => CURLPROTO_HTTPS,
|
||||
CURLOPT_SSL_VERIFYPEER => true,
|
||||
CURLOPT_SSL_VERIFYHOST => 2,
|
||||
CURLOPT_USERAGENT => 'JC-Web-IM-Media-Proxy/1.0',
|
||||
CURLOPT_HTTPHEADER => ['Accept: image/avif,image/webp,image/*,*/*;q=0.8'],
|
||||
CURLOPT_WRITEFUNCTION => static function ($handle, string $chunk) use ($stream, &$bytes, &$tooLarge): int {
|
||||
$length = strlen($chunk);
|
||||
if ($bytes + $length > WEB_MEDIA_PROXY_MAX_BYTES) {
|
||||
$tooLarge = true;
|
||||
return 0;
|
||||
}
|
||||
$written = fwrite($stream, $chunk);
|
||||
if ($written === false) {
|
||||
return 0;
|
||||
}
|
||||
$bytes += $written;
|
||||
return $written;
|
||||
},
|
||||
];
|
||||
if (is_string($preferredIp) && $preferredIp !== '') {
|
||||
$curlOptions[CURLOPT_RESOLVE] = [$host . ':443:' . $preferredIp];
|
||||
}
|
||||
curl_setopt_array($curl, $curlOptions);
|
||||
|
||||
$result = curl_exec($curl);
|
||||
$status = (int)curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
|
||||
$curlError = curl_error($curl);
|
||||
curl_close($curl);
|
||||
fflush($stream);
|
||||
fclose($stream);
|
||||
|
||||
$mime = $bytes > 0 && is_file($temporaryFile) ? mediaProxyMime($temporaryFile) : '';
|
||||
if ($result !== false && $status >= 200 && $status < 300 && !$tooLarge && str_starts_with($mime, 'image/')) {
|
||||
if (!@rename($temporaryFile, $cacheFile)) {
|
||||
@unlink($temporaryFile);
|
||||
$lastError = '媒体缓存保存失败';
|
||||
break;
|
||||
}
|
||||
@chmod($cacheFile, 0644);
|
||||
return;
|
||||
}
|
||||
|
||||
@unlink($temporaryFile);
|
||||
$lastError = $tooLarge
|
||||
? '图片超过代理大小限制'
|
||||
: ($curlError !== '' ? $curlError : ($status > 0 ? '媒体源返回 HTTP ' . $status : '媒体源无响应'));
|
||||
if ($attempt < count($targets) && microtime(true) < $deadline) {
|
||||
usleep(150000);
|
||||
}
|
||||
}
|
||||
|
||||
error_log(sprintf('media_proxy fetch failed host=%s error=%s', $host, $lastError));
|
||||
failMediaProxy(502, '图片源暂时不可用,请稍后重试');
|
||||
}
|
||||
|
||||
function serveMediaProxyImage(string $cacheFile, string $etag): never
|
||||
{
|
||||
if (!is_file($cacheFile)) {
|
||||
failMediaProxy(404, '媒体缓存不存在');
|
||||
}
|
||||
$mime = mediaProxyMime($cacheFile);
|
||||
if (!str_starts_with($mime, 'image/')) {
|
||||
failMediaProxy(415, '媒体内容不是图片');
|
||||
}
|
||||
|
||||
header('ETag: "' . $etag . '"');
|
||||
header('Cache-Control: public, max-age=86400, immutable');
|
||||
header('Content-Type: ' . $mime);
|
||||
header('Content-Length: ' . (string)filesize($cacheFile));
|
||||
header('Content-Disposition: inline');
|
||||
header('X-Content-Type-Options: nosniff');
|
||||
if (trim((string)($_SERVER['HTTP_IF_NONE_MATCH'] ?? ''), ' W/') === '"' . $etag . '"') {
|
||||
http_response_code(304);
|
||||
exit;
|
||||
}
|
||||
|
||||
readfile($cacheFile);
|
||||
exit;
|
||||
}
|
||||
|
||||
[$url, $host] = validatedMediaProxyUrl(trim((string)($_GET['url'] ?? '')));
|
||||
$cacheRoot = mediaProxyCacheRoot();
|
||||
$cacheKey = hash('sha256', $url);
|
||||
$cacheFile = $cacheRoot . '/' . $cacheKey . '.image';
|
||||
$lockFile = $cacheRoot . '/' . $cacheKey . '.lock';
|
||||
|
||||
if (!is_file($cacheFile)) {
|
||||
$lock = @fopen($lockFile, 'c');
|
||||
if ($lock === false || !flock($lock, LOCK_EX)) {
|
||||
if (is_resource($lock)) {
|
||||
fclose($lock);
|
||||
}
|
||||
failMediaProxy(503, '媒体缓存暂时忙碌');
|
||||
}
|
||||
if (!is_file($cacheFile)) {
|
||||
fetchMediaProxyImage($url, $host, $cacheFile);
|
||||
}
|
||||
flock($lock, LOCK_UN);
|
||||
fclose($lock);
|
||||
}
|
||||
|
||||
serveMediaProxyImage($cacheFile, $cacheKey);
|
||||
Vendored
+1618
-900
File diff suppressed because it is too large
Load Diff
Vendored
+8
-7
@@ -1,12 +1,13 @@
|
||||
window.JC_WEB_IM_CONFIG = {
|
||||
adminServer: 'http://winchen.ezpay.asia:8024',
|
||||
appServer: 'http://winchen.ezpay.asia:8888',
|
||||
qrAppServer: 'http://winchen.ezpay.asia:18888',
|
||||
adminServer: 'http://18.141.44.165:8100',
|
||||
appServer: '/app-server',
|
||||
qrAppServer: 'http://18.141.44.165:8888',
|
||||
platformConfigApi: '/api/platform_config.php',
|
||||
registerConfigApi: 'http://winchen.ezpay.asia:8024/api/register-config',
|
||||
imServerHost: 'winchen.ezpay.asia',
|
||||
imRoutePort: 18000,
|
||||
registerConfigApi: 'http://18.141.44.165:8100/api/register-config',
|
||||
imServerHost: '18.141.44.165',
|
||||
imRoutePort: 80,
|
||||
useWss: false,
|
||||
wsPath: '/ws',
|
||||
sdkMode: 'http'
|
||||
sdkMode: 'legacy-http',
|
||||
syncIntervalMs: 2500
|
||||
};
|
||||
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
window.JC_WEB_IM_CONFIG = {
|
||||
runtimeEnvironment: 'local',
|
||||
adminServer: 'http://18.141.44.165:8100',
|
||||
appServer: '/app-server',
|
||||
qrAppServer: 'http://18.141.44.165:8888',
|
||||
platformConfigApi: '/local-api/platform_config.php',
|
||||
registerConfigApi: '/local-api/register_config.php',
|
||||
registerPhoneExistsApi: 'http://18.141.44.165:8100/api/register-phone-exists',
|
||||
imServerHost: '18.141.44.165',
|
||||
imRoutePort: 80,
|
||||
useWss: false,
|
||||
wsPath: '/ws',
|
||||
sdkMode: 'legacy-http',
|
||||
syncIntervalMs: 2500,
|
||||
sseEnabled: false,
|
||||
sseTicketApi: '/local-api/sse_ticket.php',
|
||||
sseUrl: '/ws-events'
|
||||
};
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
(() => {
|
||||
const protocol = window.location.protocol || 'http:';
|
||||
const host = window.location.hostname || '18.141.44.165';
|
||||
|
||||
window.JC_WEB_IM_CONFIG = {
|
||||
runtimeEnvironment: 'production',
|
||||
adminServer: `${protocol}//${host}:8100`,
|
||||
appServer: `${protocol}//${host}:8888`,
|
||||
qrAppServer: `${protocol}//${host}:8888`,
|
||||
platformConfigApi: '/api/platform_config.php',
|
||||
registerConfigApi: `${protocol}//${host}:8100/api/register-config`,
|
||||
registerPhoneExistsApi: `${protocol}//${host}:8100/api/register-phone-exists`,
|
||||
imServerHost: host,
|
||||
imRoutePort: 80,
|
||||
useWss: false,
|
||||
wsPath: '/ws',
|
||||
sdkMode: 'legacy-http',
|
||||
syncIntervalMs: 15000,
|
||||
sseEnabled: true,
|
||||
sseTicketApi: '/api/sse_ticket.php',
|
||||
sseUrl: '/ws-events'
|
||||
};
|
||||
})();
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Web IM</title><link rel="icon" href="favicon.ico"><script src="config/runtime-config.js"></script><script defer="defer" src="js/chunk-vendors.cd0faf68.js"></script><script defer="defer" src="js/app.26bc1008.js"></script><link href="css/app.5af3ef7e.css" rel="stylesheet"></head><body><noscript>请启用 JavaScript 后使用 Web IM。</noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Web IM</title><link rel="icon" href="favicon.ico"><script src="config/runtime-config.production.js"></script><script defer="defer" src="js/chunk-vendors.d3ec3fbc.js"></script><script defer="defer" src="js/app.d5ef3122.js"></script><link href="css/app.5af3ef7e.css" rel="stylesheet"></head><body><noscript>请启用 JavaScript 后使用 Web IM。</noscript><div id="app"></div></body></html>
|
||||
Vendored
-3213
File diff suppressed because it is too large
Load Diff
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+9540
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
@@ -16,6 +16,7 @@
|
||||
/* harmony export */ R1: function() { return /* binding */ unref; },
|
||||
/* harmony export */ X2: function() { return /* binding */ ReactiveEffect; },
|
||||
/* harmony export */ bl: function() { return /* binding */ resetTracking; },
|
||||
/* harmony export */ fE: function() { return /* binding */ isShallow; },
|
||||
/* harmony export */ g8: function() { return /* binding */ isReactive; },
|
||||
/* harmony export */ hV: function() { return /* binding */ traverse; },
|
||||
/* harmony export */ hZ: function() { return /* binding */ trigger; },
|
||||
@@ -23,13 +24,14 @@
|
||||
/* harmony export */ jr: function() { return /* binding */ onScopeDispose; },
|
||||
/* harmony export */ ju: function() { return /* binding */ isProxy; },
|
||||
/* harmony export */ o5: function() { return /* binding */ getCurrentScope; },
|
||||
/* harmony export */ qA: function() { return /* binding */ shallowReadArray; },
|
||||
/* harmony export */ u4: function() { return /* binding */ track; },
|
||||
/* harmony export */ uY: function() { return /* binding */ effectScope; },
|
||||
/* harmony export */ ux: function() { return /* binding */ toRaw; },
|
||||
/* harmony export */ wB: function() { return /* binding */ watch; },
|
||||
/* harmony export */ yC: function() { return /* binding */ EffectScope; }
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports ARRAY_ITERATE_KEY, EffectFlags, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, customRef, effect, enableTracking, getCurrentWatcher, isReadonly, isShallow, onEffectCleanup, onWatcherCleanup, reactiveReadArray, readonly, shallowReadArray, shallowReadonly, shallowRef, stop, toReactive, toReadonly, toRef, toValue, triggerRef */
|
||||
/* unused harmony exports ARRAY_ITERATE_KEY, EffectFlags, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, customRef, effect, enableTracking, getCurrentWatcher, isReadonly, onEffectCleanup, onWatcherCleanup, reactiveReadArray, readonly, shallowReadonly, shallowRef, stop, toReadonly, toRef, toValue, triggerRef */
|
||||
/* unused harmony import specifier */ var extend;
|
||||
/* unused harmony import specifier */ var toRawType;
|
||||
/* unused harmony import specifier */ var isFunction;
|
||||
@@ -1825,6 +1827,10 @@ function traverse(value, depth = Infinity, seen) {
|
||||
return value;
|
||||
}
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
||||
/* harmony export */ "lJ", 0, /* binding */ toReactive
|
||||
/* harmony export */ ]);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
@@ -2363,11 +2369,15 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* harmony export */ Wv: function() { return /* binding */ createBlock; },
|
||||
/* harmony export */ bo: function() { return /* binding */ withDirectives; },
|
||||
/* harmony export */ dY: function() { return /* binding */ nextTick; },
|
||||
/* harmony export */ eW: function() { return /* binding */ createTextVNode; },
|
||||
/* harmony export */ h: function() { return /* binding */ h; },
|
||||
/* harmony export */ pI: function() { return /* binding */ renderList; },
|
||||
/* harmony export */ pM: function() { return /* binding */ defineComponent; },
|
||||
/* harmony export */ qL: function() { return /* binding */ callWithAsyncErrorHandling; },
|
||||
/* harmony export */ uX: function() { return /* binding */ openBlock; },
|
||||
/* harmony export */ wB: function() { return /* binding */ watch; }
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithErrorHandling, cloneVNode, compatUtils, createHydrationRenderer, createPropsRestProxy, createSlots, createTextVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, onActivated, onBeforeMount, onBeforeUpdate, onDeactivated, onErrorCaptured, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withMemo, withScopeId */
|
||||
/* unused harmony exports BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, KeepAlive, Static, Suspense, Text, assertNumber, callWithErrorHandling, cloneVNode, compatUtils, createHydrationRenderer, createPropsRestProxy, createSlots, defineAsyncComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, handleError, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, onActivated, onBeforeMount, onBeforeUpdate, onDeactivated, onErrorCaptured, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withMemo, withScopeId */
|
||||
/* unused harmony import specifier */ var pauseTracking;
|
||||
/* unused harmony import specifier */ var resetTracking;
|
||||
/* unused harmony import specifier */ var isRef;
|
||||
@@ -2375,11 +2385,9 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* unused harmony import specifier */ var shallowRef;
|
||||
/* unused harmony import specifier */ var isReactive;
|
||||
/* unused harmony import specifier */ var ref;
|
||||
/* unused harmony import specifier */ var isShallow;
|
||||
/* unused harmony import specifier */ var shallowReadArray;
|
||||
/* unused harmony import specifier */ var toReactive;
|
||||
/* unused harmony import specifier */ var customRef;
|
||||
/* unused harmony import specifier */ var track;
|
||||
/* unused harmony import specifier */ var isShallow;
|
||||
/* unused harmony import specifier */ var isString;
|
||||
/* unused harmony import specifier */ var isFunction;
|
||||
/* unused harmony import specifier */ var extend;
|
||||
@@ -2401,13 +2409,13 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* unused harmony import specifier */ var isRegExp;
|
||||
/* unused harmony import specifier */ var camelize;
|
||||
/* unused harmony import specifier */ var capitalize;
|
||||
/* unused harmony import specifier */ var isObject;
|
||||
/* unused harmony import specifier */ var isSymbol;
|
||||
/* unused harmony import specifier */ var toHandlerKey;
|
||||
/* unused harmony import specifier */ var isGloballyAllowed;
|
||||
/* unused harmony import specifier */ var NOOP;
|
||||
/* unused harmony import specifier */ var isPromise;
|
||||
/* unused harmony import specifier */ var makeMap;
|
||||
/* unused harmony import specifier */ var isObject;
|
||||
/* unused harmony import specifier */ var toRawType;
|
||||
/* unused harmony import specifier */ var hyphenate;
|
||||
/* unused harmony import specifier */ var hasChanged;
|
||||
@@ -3174,7 +3182,7 @@ const isTargetSVG = target => typeof SVGElement !== "undefined" && target instan
|
||||
const isTargetMathML = target => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
||||
const resolveTarget = (props, select) => {
|
||||
const targetSelector = props && props.to;
|
||||
if (isString(targetSelector)) {
|
||||
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isString */ .Kg)(targetSelector)) {
|
||||
if (!select) {
|
||||
false && 0;
|
||||
return null;
|
||||
@@ -3190,7 +3198,7 @@ const resolveTarget = (props, select) => {
|
||||
return targetSelector;
|
||||
}
|
||||
};
|
||||
const TeleportImpl = (/* unused pure expression or super */ null && ({
|
||||
const TeleportImpl = {
|
||||
name: "Teleport",
|
||||
__isTeleport: true,
|
||||
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
||||
@@ -3333,7 +3341,7 @@ const TeleportImpl = (/* unused pure expression or super */ null && ({
|
||||
},
|
||||
move: moveTeleport,
|
||||
hydrate: hydrateTeleport
|
||||
}));
|
||||
};
|
||||
function moveTeleport(vnode, container, parentAnchor, {
|
||||
o: {
|
||||
insert
|
||||
@@ -3408,7 +3416,7 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
||||
}
|
||||
return vnode.anchor && nextSibling(vnode.anchor);
|
||||
}
|
||||
const Teleport = (/* unused pure expression or super */ null && (TeleportImpl));
|
||||
const Teleport = TeleportImpl;
|
||||
function updateCssVars(vnode, isDisabled) {
|
||||
const ctx = vnode.ctx;
|
||||
if (ctx && ctx.ut) {
|
||||
@@ -3774,11 +3782,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
||||
/*! #__NO_SIDE_EFFECTS__ */
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function defineComponent(options, extraOptions) {
|
||||
return isFunction(options) ?
|
||||
return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isFunction */ .Tn)(options) ?
|
||||
// #8236: extend call and options.name access are considered side-effects
|
||||
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
||||
/* @__PURE__ */
|
||||
(() => extend({
|
||||
(() => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .extend */ .X$)({
|
||||
name: options.name
|
||||
}, extraOptions, {
|
||||
setup: options
|
||||
@@ -4998,17 +5006,17 @@ function resolve(registry, name) {
|
||||
function renderList(source, renderItem, cache, index) {
|
||||
let ret;
|
||||
const cached = cache && cache[index];
|
||||
const sourceIsArray = isArray(source);
|
||||
if (sourceIsArray || isString(source)) {
|
||||
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
||||
const sourceIsArray = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isArray */ .cy)(source);
|
||||
if (sourceIsArray || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isString */ .Kg)(source)) {
|
||||
const sourceIsReactiveArray = sourceIsArray && (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_20__/* .isReactive */ .g8)(source);
|
||||
let needsWrap = false;
|
||||
if (sourceIsReactiveArray) {
|
||||
needsWrap = !isShallow(source);
|
||||
source = shallowReadArray(source);
|
||||
needsWrap = !(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_20__/* .isShallow */ .fE)(source);
|
||||
source = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_20__/* .shallowReadArray */ .qA)(source);
|
||||
}
|
||||
ret = new Array(source.length);
|
||||
for (let i = 0, l = source.length; i < l; i++) {
|
||||
ret[i] = renderItem(needsWrap ? toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
||||
ret[i] = renderItem(needsWrap ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_20__/* .toReactive */ .lJ)(source[i]) : source[i], i, void 0, cached && cached[i]);
|
||||
}
|
||||
} else if (typeof source === "number") {
|
||||
if (false) // removed by dead control flow
|
||||
@@ -5017,7 +5025,7 @@ function renderList(source, renderItem, cache, index) {
|
||||
for (let i = 0; i < source; i++) {
|
||||
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
||||
}
|
||||
} else if (isObject(source)) {
|
||||
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isObject */ .Gv)(source)) {
|
||||
if (source[Symbol.iterator]) {
|
||||
ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
||||
} else {
|
||||
@@ -9275,7 +9283,7 @@ const computed = (getterOrOptions, debugOptions) => {
|
||||
function h(type, propsOrChildren, children) {
|
||||
const l = arguments.length;
|
||||
if (l === 2) {
|
||||
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
||||
if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isObject */ .Gv)(propsOrChildren) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isArray */ .cy)(propsOrChildren)) {
|
||||
if (isVNode(propsOrChildren)) {
|
||||
return createVNode(type, null, [propsOrChildren]);
|
||||
}
|
||||
@@ -9449,6 +9457,7 @@ const DeprecationTypes = null;
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
||||
/* harmony export */ "EW", 0, /* binding */ computed,
|
||||
/* harmony export */ "FK", 0, /* binding */ Fragment,
|
||||
/* harmony export */ "Im", 0, /* binding */ Teleport,
|
||||
/* harmony export */ "bF", 0, /* binding */ createVNode,
|
||||
/* harmony export */ "sV", 0, /* binding */ onMounted,
|
||||
/* harmony export */ "xo", 0, /* binding */ onBeforeUnmount
|
||||
@@ -9989,7 +9998,7 @@ const stringifySymbol = (v, i = "") => {
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* unused harmony exports Transition, TransitionGroup, VueElement, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vShow, withKeys */
|
||||
/* unused harmony exports Transition, TransitionGroup, VueElement, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, useHost, useShadowRoot, vModelCheckbox, vModelDynamic, vModelRadio, vShow */
|
||||
/* unused harmony import specifier */ var BaseTransitionPropsValidators;
|
||||
/* unused harmony import specifier */ var h;
|
||||
/* unused harmony import specifier */ var BaseTransition;
|
||||
@@ -10009,7 +10018,6 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* unused harmony import specifier */ var resolveTransitionHooks;
|
||||
/* unused harmony import specifier */ var getTransitionRawChildren;
|
||||
/* unused harmony import specifier */ var createVNode;
|
||||
/* unused harmony import specifier */ var nextTick;
|
||||
/* unused harmony import specifier */ var createHydrationRenderer;
|
||||
/* unused harmony import specifier */ var isRuntimeOnly;
|
||||
/* unused harmony import specifier */ var toRaw;
|
||||
@@ -10024,8 +10032,6 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* unused harmony import specifier */ var looseIndexOf;
|
||||
/* unused harmony import specifier */ var isSet;
|
||||
/* unused harmony import specifier */ var looseEqual;
|
||||
/* unused harmony import specifier */ var looseToNumber;
|
||||
/* unused harmony import specifier */ var hyphenate;
|
||||
/* unused harmony import specifier */ var isHTMLTag;
|
||||
/* unused harmony import specifier */ var isSVGTag;
|
||||
/* unused harmony import specifier */ var isMathMLTag;
|
||||
@@ -11571,7 +11577,7 @@ const vModelRadio = (/* unused pure expression or super */ null && ({
|
||||
}
|
||||
}
|
||||
}));
|
||||
const vModelSelect = (/* unused pure expression or super */ null && ({
|
||||
const vModelSelect = {
|
||||
// <select multiple> value need to be deep traversed
|
||||
deep: true,
|
||||
created(el, {
|
||||
@@ -11580,12 +11586,12 @@ const vModelSelect = (/* unused pure expression or super */ null && ({
|
||||
number
|
||||
}
|
||||
}, vnode) {
|
||||
const isSetModel = isSet(value);
|
||||
const isSetModel = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isSet */ .vM)(value);
|
||||
addEventListener(el, "change", () => {
|
||||
const selectedVal = Array.prototype.filter.call(el.options, o => o.selected).map(o => number ? looseToNumber(getValue(o)) : getValue(o));
|
||||
const selectedVal = Array.prototype.filter.call(el.options, o => o.selected).map(o => number ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .looseToNumber */ .bB)(getValue(o)) : getValue(o));
|
||||
el[assignKey](el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
||||
el._assigning = true;
|
||||
nextTick(() => {
|
||||
(0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_18__/* .nextTick */ .dY)(() => {
|
||||
el._assigning = false;
|
||||
});
|
||||
});
|
||||
@@ -11608,11 +11614,11 @@ const vModelSelect = (/* unused pure expression or super */ null && ({
|
||||
setSelected(el, value);
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
function setSelected(el, value) {
|
||||
const isMultiple = el.multiple;
|
||||
const isArrayValue = isArray(value);
|
||||
if (isMultiple && !isArrayValue && !isSet(value)) {
|
||||
const isArrayValue = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isArray */ .cy)(value);
|
||||
if (isMultiple && !isArrayValue && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .isSet */ .vM)(value)) {
|
||||
false && 0;
|
||||
return;
|
||||
}
|
||||
@@ -11625,12 +11631,12 @@ function setSelected(el, value) {
|
||||
if (optionType === "string" || optionType === "number") {
|
||||
option.selected = value.some(v => String(v) === String(optionValue));
|
||||
} else {
|
||||
option.selected = looseIndexOf(value, optionValue) > -1;
|
||||
option.selected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .looseIndexOf */ .u3)(value, optionValue) > -1;
|
||||
}
|
||||
} else {
|
||||
option.selected = value.has(optionValue);
|
||||
}
|
||||
} else if (looseEqual(getValue(option), value)) {
|
||||
} else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .looseEqual */ .BX)(getValue(option), value)) {
|
||||
if (el.selectedIndex !== i) el.selectedIndex = i;
|
||||
return;
|
||||
}
|
||||
@@ -11755,7 +11761,7 @@ const withModifiers = (fn, modifiers) => {
|
||||
return fn(event, ...args);
|
||||
});
|
||||
};
|
||||
const keyNames = (/* unused pure expression or super */ null && ({
|
||||
const keyNames = {
|
||||
esc: "escape",
|
||||
space: " ",
|
||||
up: "arrow-up",
|
||||
@@ -11763,7 +11769,7 @@ const keyNames = (/* unused pure expression or super */ null && ({
|
||||
right: "arrow-right",
|
||||
down: "arrow-down",
|
||||
delete: "backspace"
|
||||
}));
|
||||
};
|
||||
const withKeys = (fn, modifiers) => {
|
||||
const cache = fn._withKeys || (fn._withKeys = {});
|
||||
const cacheKey = modifiers.join(".");
|
||||
@@ -11771,7 +11777,7 @@ const withKeys = (fn, modifiers) => {
|
||||
if (!("key" in event)) {
|
||||
return;
|
||||
}
|
||||
const eventKey = hyphenate(event.key);
|
||||
const eventKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_21__/* .hyphenate */ .Tg)(event.key);
|
||||
if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) {
|
||||
return fn(event);
|
||||
}
|
||||
@@ -11901,7 +11907,9 @@ const initDirectivesForSSR = () => {
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, [
|
||||
/* harmony export */ "D$", 0, /* binding */ withModifiers,
|
||||
/* harmony export */ "Ef", 0, /* binding */ createApp,
|
||||
/* harmony export */ "Jo", 0, /* binding */ vModelText
|
||||
/* harmony export */ "Jo", 0, /* binding */ vModelText,
|
||||
/* harmony export */ "jR", 0, /* binding */ withKeys,
|
||||
/* harmony export */ "u1", 0, /* binding */ vModelSelect
|
||||
/* harmony export */ ]);
|
||||
|
||||
|
||||
@@ -11912,9 +11920,11 @@ const initDirectivesForSSR = () => {
|
||||
|
||||
"use strict";
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ Y2: function() { return /* binding */ includeBooleanAttr; }
|
||||
/* harmony export */ BX: function() { return /* binding */ looseEqual; },
|
||||
/* harmony export */ Y2: function() { return /* binding */ includeBooleanAttr; },
|
||||
/* harmony export */ u3: function() { return /* binding */ looseIndexOf; }
|
||||
/* harmony export */ });
|
||||
/* unused harmony exports EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, isBooleanAttr, isBuiltInDirective, isDate, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isVoidTag, looseEqual, looseIndexOf, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toRawType, toTypeString */
|
||||
/* unused harmony exports EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, isBooleanAttr, isBuiltInDirective, isDate, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isVoidTag, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toRawType, toTypeString */
|
||||
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4114);
|
||||
/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8111);
|
||||
@@ -12421,7 +12431,8 @@ const stringifySymbol = (v, i = "") => {
|
||||
/* harmony export */ "X$", 0, /* binding */ extend,
|
||||
/* harmony export */ "ZH", 0, /* binding */ capitalize,
|
||||
/* harmony export */ "bB", 0, /* binding */ looseToNumber,
|
||||
/* harmony export */ "cy", 0, /* binding */ isArray
|
||||
/* harmony export */ "cy", 0, /* binding */ isArray,
|
||||
/* harmony export */ "vM", 0, /* binding */ isSet
|
||||
/* harmony export */ ]);
|
||||
|
||||
|
||||
@@ -15965,6 +15976,25 @@ module.exports = function (obj) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8646:
|
||||
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var call = __webpack_require__(9565);
|
||||
var anObject = __webpack_require__(8551);
|
||||
var getIteratorDirect = __webpack_require__(1767);
|
||||
var getIteratorMethod = __webpack_require__(851);
|
||||
|
||||
module.exports = function (obj, stringHandling) {
|
||||
if (!stringHandling || typeof obj !== 'string') anObject(obj);
|
||||
var method = getIteratorMethod(obj);
|
||||
return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 851:
|
||||
@@ -18757,6 +18787,89 @@ $({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEar
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 531:
|
||||
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var $ = __webpack_require__(6518);
|
||||
var call = __webpack_require__(9565);
|
||||
var aCallable = __webpack_require__(9306);
|
||||
var anObject = __webpack_require__(8551);
|
||||
var getIteratorDirect = __webpack_require__(1767);
|
||||
var getIteratorFlattenable = __webpack_require__(8646);
|
||||
var createIteratorProxy = __webpack_require__(9462);
|
||||
var iteratorClose = __webpack_require__(9539);
|
||||
var IS_PURE = __webpack_require__(6395);
|
||||
var iteratorHelperThrowsOnInvalidIterator = __webpack_require__(684);
|
||||
var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__(4549);
|
||||
|
||||
// Should not throw an error for an iterator without `return` method. Fixed in Safari 26.2
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=297532
|
||||
function throwsOnIteratorWithoutReturn() {
|
||||
try {
|
||||
// eslint-disable-next-line es/no-map, es/no-iterator, es/no-iterator-prototype-flatmap -- required for testing
|
||||
var it = Iterator.prototype.flatMap.call(new Map([[4, 5]]).entries(), function (v) { return v; });
|
||||
it.next();
|
||||
it['return']();
|
||||
} catch (error) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
var FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE
|
||||
&& !iteratorHelperThrowsOnInvalidIterator('flatMap', function () { /* empty */ });
|
||||
var flatMapWithoutClosingOnEarlyError = !IS_PURE && !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR
|
||||
&& iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError);
|
||||
|
||||
var FORCED = IS_PURE || FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || flatMapWithoutClosingOnEarlyError
|
||||
|| throwsOnIteratorWithoutReturn();
|
||||
|
||||
var IteratorProxy = createIteratorProxy(function () {
|
||||
var iterator = this.iterator;
|
||||
var mapper = this.mapper;
|
||||
var result, inner;
|
||||
|
||||
while (true) {
|
||||
if (inner = this.inner) try {
|
||||
result = anObject(call(inner.next, inner.iterator));
|
||||
if (!result.done) return result.value;
|
||||
this.inner = null;
|
||||
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
||||
|
||||
result = anObject(call(this.next, iterator));
|
||||
|
||||
if (this.done = !!result.done) return;
|
||||
|
||||
try {
|
||||
this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);
|
||||
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
||||
}
|
||||
});
|
||||
|
||||
// `Iterator.prototype.flatMap` method
|
||||
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap
|
||||
$({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
|
||||
flatMap: function flatMap(mapper) {
|
||||
anObject(this);
|
||||
try {
|
||||
aCallable(mapper);
|
||||
} catch (error) {
|
||||
iteratorClose(this, 'throw', error);
|
||||
}
|
||||
|
||||
if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper);
|
||||
|
||||
return new IteratorProxy(getIteratorDirect(this), {
|
||||
mapper: mapper,
|
||||
inner: null
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7588:
|
||||
@@ -24964,4 +25077,4 @@ function del(target, key) {
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=chunk-vendors.cd0faf68.js.map
|
||||
//# sourceMappingURL=chunk-vendors.d3ec3fbc.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user