chore: 添加 vue-i18n 依赖并更新 package.json
This commit is contained in:
20
node_modules/@intlify/core-base/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/core-base/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 kazuya kawaguchi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
7
node_modules/@intlify/core-base/README.md
generated
vendored
Normal file
7
node_modules/@intlify/core-base/README.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# @intlify/core-base
|
||||
|
||||
The intlify core base module
|
||||
|
||||
## :copyright: License
|
||||
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
1956
node_modules/@intlify/core-base/dist/core-base.cjs
generated
vendored
Normal file
1956
node_modules/@intlify/core-base/dist/core-base.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@intlify/core-base/dist/core-base.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/core-base.cjs')
|
||||
1
node_modules/@intlify/core-base/dist/core-base.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/core-base.prod.cjs')
|
||||
1274
node_modules/@intlify/core-base/dist/core-base.d.ts
generated
vendored
Normal file
1274
node_modules/@intlify/core-base/dist/core-base.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3681
node_modules/@intlify/core-base/dist/core-base.esm-browser.js
generated
vendored
Normal file
3681
node_modules/@intlify/core-base/dist/core-base.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@intlify/core-base/dist/core-base.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../dist/core-base.mjs'
|
||||
3730
node_modules/@intlify/core-base/dist/core-base.global.js
generated
vendored
Normal file
3730
node_modules/@intlify/core-base/dist/core-base.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/core-base/dist/core-base.global.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/core-base/dist/core-base.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1933
node_modules/@intlify/core-base/dist/core-base.mjs
generated
vendored
Normal file
1933
node_modules/@intlify/core-base/dist/core-base.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1677
node_modules/@intlify/core-base/dist/core-base.prod.cjs
generated
vendored
Normal file
1677
node_modules/@intlify/core-base/dist/core-base.prod.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/@intlify/core-base/index.js
generated
vendored
Normal file
7
node_modules/@intlify/core-base/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/core-base.prod.cjs')
|
||||
} else {
|
||||
module.exports = require('./dist/core-base.cjs')
|
||||
}
|
||||
81
node_modules/@intlify/core-base/package.json
generated
vendored
Normal file
81
node_modules/@intlify/core-base/package.json
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "@intlify/core-base",
|
||||
"version": "9.14.5",
|
||||
"description": "@intlify/core-base",
|
||||
"keywords": [
|
||||
"core",
|
||||
"fundamental",
|
||||
"i18n",
|
||||
"internationalization",
|
||||
"intlify"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "kazuya kawaguchi",
|
||||
"email": "kawakazu80@gmail.com"
|
||||
},
|
||||
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/core-base#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||
"directory": "packages/core"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"dist"
|
||||
],
|
||||
"main": "index.js",
|
||||
"module": "dist/core-base.mjs",
|
||||
"unpkg": "dist/core-base.global.js",
|
||||
"jsdelivr": "dist/core-base.global.js",
|
||||
"types": "dist/core-base.d.ts",
|
||||
"dependencies": {
|
||||
"@intlify/shared": "9.14.5",
|
||||
"@intlify/message-compiler": "9.14.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@intlify/devtools-if": "9.14.5",
|
||||
"@intlify/vue-devtools": "9.14.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"buildOptions": {
|
||||
"name": "IntlifyCoreBase",
|
||||
"formats": [
|
||||
"mjs",
|
||||
"browser",
|
||||
"cjs",
|
||||
"global"
|
||||
]
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/core-base.d.ts",
|
||||
"import": "./dist/core-base.mjs",
|
||||
"browser": "./dist/core-base.esm-browser.js",
|
||||
"node": {
|
||||
"import": {
|
||||
"production": "./dist/core-base.prod.cjs",
|
||||
"development": "./dist/core-base.mjs",
|
||||
"default": "./dist/core-base.mjs"
|
||||
},
|
||||
"require": {
|
||||
"production": "./dist/core-base.prod.cjs",
|
||||
"development": "./dist/core-base.cjs",
|
||||
"default": "./index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"./dist/*": "./dist/*",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"funding": "https://github.com/sponsors/kazupon",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
20
node_modules/@intlify/message-compiler/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/message-compiler/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 kazuya kawaguchi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
7
node_modules/@intlify/message-compiler/README.md
generated
vendored
Normal file
7
node_modules/@intlify/message-compiler/README.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# @intlify/message-compiler
|
||||
|
||||
The message compiler for intlify project
|
||||
|
||||
## :copyright: License
|
||||
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
1674
node_modules/@intlify/message-compiler/dist/message-compiler.cjs
generated
vendored
Normal file
1674
node_modules/@intlify/message-compiler/dist/message-compiler.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/message-compiler.cjs')
|
||||
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/message-compiler.prod.cjs')
|
||||
249
node_modules/@intlify/message-compiler/dist/message-compiler.d.ts
generated
vendored
Normal file
249
node_modules/@intlify/message-compiler/dist/message-compiler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,249 @@
|
||||
|
||||
|
||||
import type { BaseError } from '@intlify/shared';
|
||||
import type { RawSourceMap } from 'source-map-js';
|
||||
|
||||
export declare function baseCompile(source: string, options?: CompileOptions): CompilerResult;
|
||||
|
||||
export declare type CacheKeyHandler = (source: string) => string;
|
||||
|
||||
export declare interface CodeGenOptions {
|
||||
location?: boolean;
|
||||
mode?: 'normal' | 'arrow';
|
||||
breakLineCode?: '\n' | ';';
|
||||
needIndent?: boolean;
|
||||
onWarn?: CompileWarnHandler;
|
||||
onError?: CompileErrorHandler;
|
||||
sourceMap?: boolean;
|
||||
filename?: string;
|
||||
}
|
||||
|
||||
declare interface CodeGenResult {
|
||||
code: string;
|
||||
ast: ResourceNode;
|
||||
map?: RawSourceMap;
|
||||
}
|
||||
|
||||
export declare type CompileDomain = 'tokenizer' | 'parser' | 'generator' | 'transformer' | 'optimizer' | 'minifier';
|
||||
|
||||
export declare interface CompileError extends BaseError, SyntaxError {
|
||||
domain?: CompileDomain;
|
||||
location?: SourceLocation;
|
||||
}
|
||||
|
||||
export declare const CompileErrorCodes: {
|
||||
readonly EXPECTED_TOKEN: 1;
|
||||
readonly INVALID_TOKEN_IN_PLACEHOLDER: 2;
|
||||
readonly UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3;
|
||||
readonly UNKNOWN_ESCAPE_SEQUENCE: 4;
|
||||
readonly INVALID_UNICODE_ESCAPE_SEQUENCE: 5;
|
||||
readonly UNBALANCED_CLOSING_BRACE: 6;
|
||||
readonly UNTERMINATED_CLOSING_BRACE: 7;
|
||||
readonly EMPTY_PLACEHOLDER: 8;
|
||||
readonly NOT_ALLOW_NEST_PLACEHOLDER: 9;
|
||||
readonly INVALID_LINKED_FORMAT: 10;
|
||||
readonly MUST_HAVE_MESSAGES_IN_PLURAL: 11;
|
||||
readonly UNEXPECTED_EMPTY_LINKED_MODIFIER: 12;
|
||||
readonly UNEXPECTED_EMPTY_LINKED_KEY: 13;
|
||||
readonly UNEXPECTED_LEXICAL_ANALYSIS: 14;
|
||||
readonly UNHANDLED_CODEGEN_NODE_TYPE: 15;
|
||||
readonly UNHANDLED_MINIFIER_NODE_TYPE: 16;
|
||||
readonly __EXTEND_POINT__: 17;
|
||||
};
|
||||
|
||||
export declare type CompileErrorCodes = (typeof CompileErrorCodes)[keyof typeof CompileErrorCodes];
|
||||
|
||||
export declare type CompileErrorHandler = (error: CompileError) => void;
|
||||
|
||||
export declare interface CompileErrorOptions {
|
||||
domain?: CompileDomain;
|
||||
messages?: {
|
||||
[code: number]: string;
|
||||
};
|
||||
args?: unknown[];
|
||||
}
|
||||
|
||||
export declare type CompileOptions = {
|
||||
optimize?: boolean;
|
||||
minify?: boolean;
|
||||
jit?: boolean;
|
||||
} & TransformOptions & CodeGenOptions & ParserOptions & TokenizeOptions;
|
||||
|
||||
export declare type CompilerResult = CodeGenResult;
|
||||
|
||||
export declare interface CompileWarn {
|
||||
message: string;
|
||||
code: number;
|
||||
location?: SourceLocation;
|
||||
}
|
||||
|
||||
export declare const CompileWarnCodes: {
|
||||
readonly USE_MODULO_SYNTAX: 1;
|
||||
readonly __EXTEND_POINT__: 2;
|
||||
};
|
||||
|
||||
export declare type CompileWarnCodes = (typeof CompileWarnCodes)[keyof typeof CompileWarnCodes];
|
||||
|
||||
export declare type CompileWarnHandler = (warn: CompileWarn) => void;
|
||||
|
||||
export declare function createCompileError<T extends number>(code: T, loc: SourceLocation | null, options?: CompileErrorOptions): CompileError;
|
||||
|
||||
export declare function createCompileWarn<T extends number>(code: T, loc: SourceLocation | null, ...args: unknown[]): CompileWarn;
|
||||
|
||||
export declare function createLocation(start: Position, end: Position, source?: string): SourceLocation;
|
||||
|
||||
export declare function createParser(options?: ParserOptions): Parser;
|
||||
|
||||
export declare function createPosition(line: number, column: number, offset: number): Position;
|
||||
|
||||
/* Excluded from this release type: defaultOnError */
|
||||
|
||||
export declare const detectHtmlTag: (source: string) => boolean;
|
||||
|
||||
export declare const ERROR_DOMAIN = "parser";
|
||||
|
||||
/* Excluded from this release type: errorMessages */
|
||||
|
||||
export declare const enum HelperNameMap {
|
||||
LIST = "list",
|
||||
NAMED = "named",
|
||||
PLURAL = "plural",
|
||||
LINKED = "linked",
|
||||
MESSAGE = "message",
|
||||
TYPE = "type",
|
||||
INTERPOLATE = "interpolate",
|
||||
NORMALIZE = "normalize",
|
||||
VALUES = "values"
|
||||
}
|
||||
|
||||
export declare type Identifier = string;
|
||||
|
||||
export declare interface LinkedKeyNode extends Node_2 {
|
||||
type: NodeTypes.LinkedKey;
|
||||
value: string;
|
||||
/* Excluded from this release type: v */
|
||||
}
|
||||
|
||||
export declare interface LinkedModifierNode extends Node_2 {
|
||||
type: NodeTypes.LinkedModifier;
|
||||
value: Identifier;
|
||||
/* Excluded from this release type: v */
|
||||
}
|
||||
|
||||
export declare interface LinkedNode extends Node_2 {
|
||||
type: NodeTypes.Linked;
|
||||
modifier?: LinkedModifierNode;
|
||||
/* Excluded from this release type: m */
|
||||
key: LinkedKeyNode | NamedNode | ListNode | LiteralNode;
|
||||
/* Excluded from this release type: k */
|
||||
}
|
||||
|
||||
export declare interface ListNode extends Node_2 {
|
||||
type: NodeTypes.List;
|
||||
index: number;
|
||||
/* Excluded from this release type: i */
|
||||
}
|
||||
|
||||
export declare interface LiteralNode extends Node_2 {
|
||||
type: NodeTypes.Literal;
|
||||
value?: string;
|
||||
/* Excluded from this release type: v */
|
||||
}
|
||||
|
||||
export declare const LOCATION_STUB: SourceLocation;
|
||||
|
||||
declare type MessageElementNode = TextNode | NamedNode | ListNode | LiteralNode | LinkedNode;
|
||||
|
||||
export declare interface MessageNode extends Node_2 {
|
||||
type: NodeTypes.Message;
|
||||
static?: string;
|
||||
/* Excluded from this release type: s */
|
||||
items: MessageElementNode[];
|
||||
/* Excluded from this release type: i */
|
||||
}
|
||||
|
||||
export declare interface NamedNode extends Node_2 {
|
||||
type: NodeTypes.Named;
|
||||
key: Identifier;
|
||||
modulo?: boolean;
|
||||
/* Excluded from this release type: k */
|
||||
}
|
||||
|
||||
declare interface Node_2 {
|
||||
type: NodeTypes;
|
||||
/* Excluded from this release type: t */
|
||||
start?: number;
|
||||
end?: number;
|
||||
loc?: SourceLocation;
|
||||
}
|
||||
export { Node_2 as Node }
|
||||
|
||||
export declare const enum NodeTypes {
|
||||
Resource = 0,// 0
|
||||
Plural = 1,
|
||||
Message = 2,
|
||||
Text = 3,
|
||||
Named = 4,
|
||||
List = 5,// 5
|
||||
Linked = 6,
|
||||
LinkedKey = 7,
|
||||
LinkedModifier = 8,
|
||||
Literal = 9
|
||||
}
|
||||
|
||||
export declare interface Parser {
|
||||
parse(source: string): ResourceNode;
|
||||
}
|
||||
|
||||
export declare interface ParserOptions {
|
||||
location?: boolean;
|
||||
onCacheKey?: (source: string) => string;
|
||||
onWarn?: CompileWarnHandler;
|
||||
onError?: CompileErrorHandler;
|
||||
}
|
||||
|
||||
export declare interface PluralNode extends Node_2 {
|
||||
type: NodeTypes.Plural;
|
||||
cases: MessageNode[];
|
||||
/* Excluded from this release type: c */
|
||||
}
|
||||
|
||||
export declare interface Position {
|
||||
offset: number;
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
|
||||
export declare interface ResourceNode extends Node_2 {
|
||||
type: NodeTypes.Resource;
|
||||
body: MessageNode | PluralNode;
|
||||
/* Excluded from this release type: b */
|
||||
cacheKey?: string;
|
||||
helpers?: string[];
|
||||
}
|
||||
|
||||
export declare interface SourceLocation {
|
||||
start: Position;
|
||||
end: Position;
|
||||
source?: string;
|
||||
}
|
||||
|
||||
export declare interface TextNode extends Node_2 {
|
||||
type: NodeTypes.Text;
|
||||
value?: string;
|
||||
/* Excluded from this release type: v */
|
||||
}
|
||||
|
||||
export declare interface TokenizeOptions {
|
||||
location?: boolean;
|
||||
onError?: CompileErrorHandler;
|
||||
}
|
||||
|
||||
export declare interface TransformOptions {
|
||||
onWarn?: CompileWarnHandler;
|
||||
onError?: CompileErrorHandler;
|
||||
}
|
||||
|
||||
/* Excluded from this release type: warnMessages */
|
||||
|
||||
export { }
|
||||
1625
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js
generated
vendored
Normal file
1625
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../dist/message-compiler.mjs'
|
||||
1645
node_modules/@intlify/message-compiler/dist/message-compiler.global.js
generated
vendored
Normal file
1645
node_modules/@intlify/message-compiler/dist/message-compiler.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1603
node_modules/@intlify/message-compiler/dist/message-compiler.mjs
generated
vendored
Normal file
1603
node_modules/@intlify/message-compiler/dist/message-compiler.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1660
node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs
generated
vendored
Normal file
1660
node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1657
node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs
generated
vendored
Normal file
1657
node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/@intlify/message-compiler/index.js
generated
vendored
Normal file
7
node_modules/@intlify/message-compiler/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/message-compiler.prod.cjs')
|
||||
} else {
|
||||
module.exports = require('./dist/message-compiler.cjs')
|
||||
}
|
||||
79
node_modules/@intlify/message-compiler/package.json
generated
vendored
Normal file
79
node_modules/@intlify/message-compiler/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"name": "@intlify/message-compiler",
|
||||
"version": "9.14.5",
|
||||
"description": "@intlify/message-compiler",
|
||||
"keywords": [
|
||||
"compiler",
|
||||
"i18n",
|
||||
"internationalization",
|
||||
"intlify",
|
||||
"message-format"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "kazuya kawaguchi",
|
||||
"email": "kawakazu80@gmail.com"
|
||||
},
|
||||
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/message-compiler#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||
"directory": "packages/message-compiler"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"dist"
|
||||
],
|
||||
"main": "index.js",
|
||||
"module": "dist/message-compiler.mjs",
|
||||
"unpkg": "dist/message-compiler.global.js",
|
||||
"jsdelivr": "dist/message-compiler.global.js",
|
||||
"types": "dist/message-compiler.d.ts",
|
||||
"dependencies": {
|
||||
"source-map-js": "^1.0.2",
|
||||
"@intlify/shared": "9.14.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"buildOptions": {
|
||||
"name": "IntlifyMessageCompiler",
|
||||
"formats": [
|
||||
"mjs",
|
||||
"mjs-node",
|
||||
"browser",
|
||||
"cjs",
|
||||
"global"
|
||||
],
|
||||
"enableFullBundleForEsmBrowser": true
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/message-compiler.d.ts",
|
||||
"browser": "./dist/message-compiler.esm-browser.js",
|
||||
"node": {
|
||||
"import": {
|
||||
"production": "./dist/message-compiler.node.mjs",
|
||||
"development": "./dist/message-compiler.node.mjs",
|
||||
"default": "./dist/message-compiler.node.mjs"
|
||||
},
|
||||
"require": {
|
||||
"production": "./dist/message-compiler.prod.cjs",
|
||||
"development": "./dist/message-compiler.cjs",
|
||||
"default": "./index.js"
|
||||
}
|
||||
},
|
||||
"import": "./dist/message-compiler.mjs"
|
||||
},
|
||||
"./dist/*": "./dist/*",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"funding": "https://github.com/sponsors/kazupon",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
20
node_modules/@intlify/shared/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/shared/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 kazuya kawaguchi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
18
node_modules/@intlify/shared/README.md
generated
vendored
Normal file
18
node_modules/@intlify/shared/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# @intlify/shared
|
||||
|
||||
The shared utility package for intlify project
|
||||
|
||||
## Forks
|
||||
The implementation of this module is contains code forked from other packages or projects:
|
||||
|
||||
- [@vue/shared](https://github.com/vuejs/vue-next/tree/master/packages/shared)
|
||||
- Useful Utilities at `utils.ts`
|
||||
- Author: Evan You
|
||||
- License: MIT
|
||||
- Event Emitter at `emitter.ts` and `emittable.ts`
|
||||
- Author: Jason Miller
|
||||
- License: MIT
|
||||
|
||||
## :copyright: License
|
||||
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
324
node_modules/@intlify/shared/dist/shared.cjs
generated
vendored
Normal file
324
node_modules/@intlify/shared/dist/shared.cjs
generated
vendored
Normal file
@@ -0,0 +1,324 @@
|
||||
/*!
|
||||
* shared v9.14.5
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
function warn(msg, err) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(`[intlify] ` + msg);
|
||||
/* istanbul ignore if */
|
||||
if (err) {
|
||||
console.warn(err.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
const hasWarned = {};
|
||||
function warnOnce(msg) {
|
||||
if (!hasWarned[msg]) {
|
||||
hasWarned[msg] = true;
|
||||
warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Original Utilities
|
||||
* written by kazuya kawaguchi
|
||||
*/
|
||||
const inBrowser = typeof window !== 'undefined';
|
||||
exports.mark = void 0;
|
||||
exports.measure = void 0;
|
||||
{
|
||||
const perf = inBrowser && window.performance;
|
||||
if (perf &&
|
||||
perf.mark &&
|
||||
perf.measure &&
|
||||
perf.clearMarks &&
|
||||
// @ts-ignore browser compat
|
||||
perf.clearMeasures) {
|
||||
exports.mark = (tag) => {
|
||||
perf.mark(tag);
|
||||
};
|
||||
exports.measure = (name, startTag, endTag) => {
|
||||
perf.measure(name, startTag, endTag);
|
||||
perf.clearMarks(startTag);
|
||||
perf.clearMarks(endTag);
|
||||
};
|
||||
}
|
||||
}
|
||||
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||
/* eslint-disable */
|
||||
function format(message, ...args) {
|
||||
if (args.length === 1 && isObject(args[0])) {
|
||||
args = args[0];
|
||||
}
|
||||
if (!args || !args.hasOwnProperty) {
|
||||
args = {};
|
||||
}
|
||||
return message.replace(RE_ARGS, (match, identifier) => {
|
||||
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||
});
|
||||
}
|
||||
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||
.replace(/\u2028/g, '\\u2028')
|
||||
.replace(/\u2029/g, '\\u2029')
|
||||
.replace(/\u0027/g, '\\u0027');
|
||||
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||
const assign = Object.assign;
|
||||
const _create = Object.create;
|
||||
const create = (obj = null) => _create(obj);
|
||||
let _globalThis;
|
||||
const getGlobalThis = () => {
|
||||
// prettier-ignore
|
||||
return (_globalThis ||
|
||||
(_globalThis =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: create()));
|
||||
};
|
||||
function escapeHtml(rawText) {
|
||||
return rawText
|
||||
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||
}
|
||||
function escapeAttributeValue(value) {
|
||||
return value
|
||||
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
function sanitizeTranslatedHtml(html) {
|
||||
// Escape dangerous characters in attribute values
|
||||
// Process attributes with double quotes
|
||||
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||
// Process attributes with single quotes
|
||||
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||
// Detect and neutralize event handler attributes
|
||||
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||
if (eventHandlerPattern.test(html)) {
|
||||
{
|
||||
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||
}
|
||||
// Neutralize event handler attributes by escaping 'on'
|
||||
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||
}
|
||||
// Disable javascript: URLs in various contexts
|
||||
const javascriptUrlPattern = [
|
||||
// In href, src, action, formaction attributes
|
||||
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||
// In style attributes within url()
|
||||
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||
];
|
||||
javascriptUrlPattern.forEach(pattern => {
|
||||
html = html.replace(pattern, '$1javascript:');
|
||||
});
|
||||
return html;
|
||||
}
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function hasOwn(obj, key) {
|
||||
return hasOwnProperty.call(obj, key);
|
||||
}
|
||||
/* eslint-enable */
|
||||
/**
|
||||
* Useful Utilities By Evan you
|
||||
* Modified by kazuya kawaguchi
|
||||
* MIT License
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||
*/
|
||||
const isArray = Array.isArray;
|
||||
const isFunction = (val) => typeof val === 'function';
|
||||
const isString = (val) => typeof val === 'string';
|
||||
const isBoolean = (val) => typeof val === 'boolean';
|
||||
const isSymbol = (val) => typeof val === 'symbol';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isObject = (val) => val !== null && typeof val === 'object';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isPromise = (val) => {
|
||||
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||
};
|
||||
const objectToString = Object.prototype.toString;
|
||||
const toTypeString = (value) => objectToString.call(value);
|
||||
const isPlainObject = (val) => {
|
||||
if (!isObject(val))
|
||||
return false;
|
||||
const proto = Object.getPrototypeOf(val);
|
||||
return proto === null || proto.constructor === Object;
|
||||
};
|
||||
// for converting list and named values to displayed strings.
|
||||
const toDisplayString = (val) => {
|
||||
return val == null
|
||||
? ''
|
||||
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||
? JSON.stringify(val, null, 2)
|
||||
: String(val);
|
||||
};
|
||||
function join(items, separator = '') {
|
||||
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||
}
|
||||
const RANGE = 2;
|
||||
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||
const lines = source.split(/\r?\n/);
|
||||
let count = 0;
|
||||
const res = [];
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
count += lines[i].length + 1;
|
||||
if (count >= start) {
|
||||
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||
if (j < 0 || j >= lines.length)
|
||||
continue;
|
||||
const line = j + 1;
|
||||
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||
const lineLength = lines[j].length;
|
||||
if (j === i) {
|
||||
// push underline
|
||||
const pad = start - (count - lineLength) + 1;
|
||||
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||
}
|
||||
else if (j > i) {
|
||||
if (end > count) {
|
||||
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||
res.push(` | ` + '^'.repeat(length));
|
||||
}
|
||||
count += lineLength + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res.join('\n');
|
||||
}
|
||||
function incrementer(code) {
|
||||
let current = code;
|
||||
return () => ++current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitter, forked from the below:
|
||||
* - original repository url: https://github.com/developit/mitt
|
||||
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||
* - author: Jason Miller (https://github.com/developit)
|
||||
* - license: MIT
|
||||
*/
|
||||
/**
|
||||
* Create a event emitter
|
||||
*
|
||||
* @returns An event emitter
|
||||
*/
|
||||
function createEmitter() {
|
||||
const events = new Map();
|
||||
const emitter = {
|
||||
events,
|
||||
on(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
const added = handlers && handlers.push(handler);
|
||||
if (!added) {
|
||||
events.set(event, [handler]);
|
||||
}
|
||||
},
|
||||
off(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
if (handlers) {
|
||||
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||
}
|
||||
},
|
||||
emit(event, payload) {
|
||||
(events.get(event) || [])
|
||||
.slice()
|
||||
.map(handler => handler(payload));
|
||||
(events.get('*') || [])
|
||||
.slice()
|
||||
.map(handler => handler(event, payload));
|
||||
}
|
||||
};
|
||||
return emitter;
|
||||
}
|
||||
|
||||
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
function deepCopy(src, des) {
|
||||
// src and des should both be objects, and none of them can be a array
|
||||
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||
throw new Error('Invalid value');
|
||||
}
|
||||
const stack = [{ src, des }];
|
||||
while (stack.length) {
|
||||
const { src, des } = stack.pop();
|
||||
// using `Object.keys` which skips prototype properties
|
||||
Object.keys(src).forEach(key => {
|
||||
if (key === '__proto__') {
|
||||
return;
|
||||
}
|
||||
// if src[key] is an object/array, set des[key]
|
||||
// to empty object/array to prevent setting by reference
|
||||
if (isObject(src[key]) && !isObject(des[key])) {
|
||||
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||
}
|
||||
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||
// replace with src[key] when:
|
||||
// src[key] or des[key] is not an object, or
|
||||
// src[key] or des[key] is an array
|
||||
des[key] = src[key];
|
||||
}
|
||||
else {
|
||||
// src[key] and des[key] are both objects, merge them
|
||||
stack.push({ src: src[key], des: des[key] });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports.assign = assign;
|
||||
exports.create = create;
|
||||
exports.createEmitter = createEmitter;
|
||||
exports.deepCopy = deepCopy;
|
||||
exports.escapeHtml = escapeHtml;
|
||||
exports.format = format;
|
||||
exports.friendlyJSONstringify = friendlyJSONstringify;
|
||||
exports.generateCodeFrame = generateCodeFrame;
|
||||
exports.generateFormatCacheKey = generateFormatCacheKey;
|
||||
exports.getGlobalThis = getGlobalThis;
|
||||
exports.hasOwn = hasOwn;
|
||||
exports.inBrowser = inBrowser;
|
||||
exports.incrementer = incrementer;
|
||||
exports.isArray = isArray;
|
||||
exports.isBoolean = isBoolean;
|
||||
exports.isDate = isDate;
|
||||
exports.isEmptyObject = isEmptyObject;
|
||||
exports.isFunction = isFunction;
|
||||
exports.isNumber = isNumber;
|
||||
exports.isObject = isObject;
|
||||
exports.isPlainObject = isPlainObject;
|
||||
exports.isPromise = isPromise;
|
||||
exports.isRegExp = isRegExp;
|
||||
exports.isString = isString;
|
||||
exports.isSymbol = isSymbol;
|
||||
exports.join = join;
|
||||
exports.makeSymbol = makeSymbol;
|
||||
exports.objectToString = objectToString;
|
||||
exports.sanitizeTranslatedHtml = sanitizeTranslatedHtml;
|
||||
exports.toDisplayString = toDisplayString;
|
||||
exports.toTypeString = toTypeString;
|
||||
exports.warn = warn;
|
||||
exports.warnOnce = warnOnce;
|
||||
1
node_modules/@intlify/shared/dist/shared.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/shared.cjs')
|
||||
1
node_modules/@intlify/shared/dist/shared.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/shared.prod.cjs')
|
||||
161
node_modules/@intlify/shared/dist/shared.d.ts
generated
vendored
Normal file
161
node_modules/@intlify/shared/dist/shared.d.ts
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
|
||||
export declare const assign: {
|
||||
<T extends {}, U>(target: T, source: U): T & U;
|
||||
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
||||
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
||||
(target: object, ...sources: any[]): any;
|
||||
};
|
||||
|
||||
export declare interface BaseError {
|
||||
code: number;
|
||||
}
|
||||
|
||||
export declare const create: (obj?: object | null) => object;
|
||||
|
||||
/**
|
||||
* Create a event emitter
|
||||
*
|
||||
* @returns An event emitter
|
||||
*/
|
||||
export declare function createEmitter<Events extends Record<EventType, unknown>>(): Emittable<Events>;
|
||||
|
||||
export declare function deepCopy(src: any, des: any): void;
|
||||
|
||||
/**
|
||||
* Event emitter interface
|
||||
*/
|
||||
export declare interface Emittable<Events extends Record<EventType, unknown> = {}> {
|
||||
/**
|
||||
* A map of event names of registered event handlers
|
||||
*/
|
||||
events: EventHandlerMap<Events>;
|
||||
/**
|
||||
* Register an event handler with the event type
|
||||
*
|
||||
* @param event - An {@link EventType}
|
||||
* @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
|
||||
*/
|
||||
on<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
|
||||
/**
|
||||
* Unregister an event handler for the event type
|
||||
*
|
||||
* @param event - An {@link EventType}
|
||||
* @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
|
||||
*/
|
||||
off<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
|
||||
/**
|
||||
* Invoke all handlers with the event type
|
||||
*
|
||||
* @remarks
|
||||
* Note Manually firing "*" handlers should be not supported
|
||||
*
|
||||
* @param event - An {@link EventType}
|
||||
* @param payload - An event payload, optional
|
||||
*/
|
||||
emit<Key extends keyof Events>(event: Key, payload?: Events[keyof Events]): void;
|
||||
}
|
||||
|
||||
export declare function escapeHtml(rawText: string): string;
|
||||
|
||||
/**
|
||||
* Event handler
|
||||
*/
|
||||
export declare type EventHandler<T = unknown> = (payload?: T) => void;
|
||||
|
||||
/**
|
||||
* Event handler list
|
||||
*/
|
||||
export declare type EventHandlerList<T = unknown> = Array<EventHandler<T>>;
|
||||
|
||||
/**
|
||||
* Event handler map
|
||||
*/
|
||||
export declare type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildcardEventHandlerList<Events>>;
|
||||
|
||||
/**
|
||||
* Event type
|
||||
*/
|
||||
export declare type EventType = string | symbol;
|
||||
|
||||
export declare function format(message: string, ...args: any): string;
|
||||
|
||||
export declare const friendlyJSONstringify: (json: unknown) => string;
|
||||
|
||||
export declare function generateCodeFrame(source: string, start?: number, end?: number): string;
|
||||
|
||||
export declare const generateFormatCacheKey: (locale: string, key: string, source: string) => string;
|
||||
|
||||
export declare const getGlobalThis: () => any;
|
||||
|
||||
export declare function hasOwn(obj: object | Array<any>, key: string): boolean;
|
||||
|
||||
/**
|
||||
* Original Utilities
|
||||
* written by kazuya kawaguchi
|
||||
*/
|
||||
export declare const inBrowser: boolean;
|
||||
|
||||
export declare function incrementer(code: number): () => number;
|
||||
|
||||
/**
|
||||
* Useful Utilities By Evan you
|
||||
* Modified by kazuya kawaguchi
|
||||
* MIT License
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||
*/
|
||||
export declare const isArray: (arg: any) => arg is any[];
|
||||
|
||||
export declare const isBoolean: (val: unknown) => val is boolean;
|
||||
|
||||
export declare const isDate: (val: unknown) => val is Date;
|
||||
|
||||
export declare const isEmptyObject: (val: unknown) => val is boolean;
|
||||
|
||||
export declare const isFunction: (val: unknown) => val is Function;
|
||||
|
||||
export declare const isNumber: (val: unknown) => val is number;
|
||||
|
||||
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
||||
|
||||
export declare const isPlainObject: (val: unknown) => val is object;
|
||||
|
||||
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
||||
|
||||
export declare const isRegExp: (val: unknown) => val is RegExp;
|
||||
|
||||
export declare const isString: (val: unknown) => val is string;
|
||||
|
||||
export declare const isSymbol: (val: unknown) => val is symbol;
|
||||
|
||||
export declare function join(items: string[], separator?: string): string;
|
||||
|
||||
export declare const makeSymbol: (name: string, shareable?: boolean) => symbol;
|
||||
|
||||
export declare let mark: (tag: string) => void | undefined;
|
||||
|
||||
export declare let measure: (name: string, startTag: string, endTag: string) => void | undefined;
|
||||
|
||||
export declare const objectToString: () => string;
|
||||
|
||||
export declare function sanitizeTranslatedHtml(html: string): string;
|
||||
|
||||
export declare const toDisplayString: (val: unknown) => string;
|
||||
|
||||
export declare const toTypeString: (value: unknown) => string;
|
||||
|
||||
export declare function warn(msg: string, err?: Error): void;
|
||||
|
||||
export declare function warnOnce(msg: string): void;
|
||||
|
||||
/**
|
||||
* Wildcard event handler
|
||||
*/
|
||||
export declare type WildcardEventHandler<T = Record<string, unknown>> = (event: keyof T, payload?: T[keyof T]) => void;
|
||||
|
||||
/**
|
||||
* Wildcard event handler list
|
||||
*/
|
||||
export declare type WildcardEventHandlerList<T = Record<string, unknown>> = Array<WildcardEventHandler<T>>;
|
||||
|
||||
export { }
|
||||
290
node_modules/@intlify/shared/dist/shared.esm-browser.js
generated
vendored
Normal file
290
node_modules/@intlify/shared/dist/shared.esm-browser.js
generated
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
/*!
|
||||
* shared v9.14.5
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
function warn(msg, err) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(`[intlify] ` + msg);
|
||||
/* istanbul ignore if */
|
||||
if (err) {
|
||||
console.warn(err.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
const hasWarned = {};
|
||||
function warnOnce(msg) {
|
||||
if (!hasWarned[msg]) {
|
||||
hasWarned[msg] = true;
|
||||
warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Original Utilities
|
||||
* written by kazuya kawaguchi
|
||||
*/
|
||||
const inBrowser = typeof window !== 'undefined';
|
||||
let mark;
|
||||
let measure;
|
||||
{
|
||||
const perf = inBrowser && window.performance;
|
||||
if (perf &&
|
||||
perf.mark &&
|
||||
perf.measure &&
|
||||
perf.clearMarks &&
|
||||
// @ts-ignore browser compat
|
||||
perf.clearMeasures) {
|
||||
mark = (tag) => {
|
||||
perf.mark(tag);
|
||||
};
|
||||
measure = (name, startTag, endTag) => {
|
||||
perf.measure(name, startTag, endTag);
|
||||
perf.clearMarks(startTag);
|
||||
perf.clearMarks(endTag);
|
||||
};
|
||||
}
|
||||
}
|
||||
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||
/* eslint-disable */
|
||||
function format(message, ...args) {
|
||||
if (args.length === 1 && isObject(args[0])) {
|
||||
args = args[0];
|
||||
}
|
||||
if (!args || !args.hasOwnProperty) {
|
||||
args = {};
|
||||
}
|
||||
return message.replace(RE_ARGS, (match, identifier) => {
|
||||
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||
});
|
||||
}
|
||||
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||
.replace(/\u2028/g, '\\u2028')
|
||||
.replace(/\u2029/g, '\\u2029')
|
||||
.replace(/\u0027/g, '\\u0027');
|
||||
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||
const assign = Object.assign;
|
||||
const _create = Object.create;
|
||||
const create = (obj = null) => _create(obj);
|
||||
let _globalThis;
|
||||
const getGlobalThis = () => {
|
||||
// prettier-ignore
|
||||
return (_globalThis ||
|
||||
(_globalThis =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: create()));
|
||||
};
|
||||
function escapeHtml(rawText) {
|
||||
return rawText
|
||||
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||
}
|
||||
function escapeAttributeValue(value) {
|
||||
return value
|
||||
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
function sanitizeTranslatedHtml(html) {
|
||||
// Escape dangerous characters in attribute values
|
||||
// Process attributes with double quotes
|
||||
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||
// Process attributes with single quotes
|
||||
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||
// Detect and neutralize event handler attributes
|
||||
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||
if (eventHandlerPattern.test(html)) {
|
||||
{
|
||||
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||
}
|
||||
// Neutralize event handler attributes by escaping 'on'
|
||||
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||
}
|
||||
// Disable javascript: URLs in various contexts
|
||||
const javascriptUrlPattern = [
|
||||
// In href, src, action, formaction attributes
|
||||
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||
// In style attributes within url()
|
||||
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||
];
|
||||
javascriptUrlPattern.forEach(pattern => {
|
||||
html = html.replace(pattern, '$1javascript:');
|
||||
});
|
||||
return html;
|
||||
}
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function hasOwn(obj, key) {
|
||||
return hasOwnProperty.call(obj, key);
|
||||
}
|
||||
/* eslint-enable */
|
||||
/**
|
||||
* Useful Utilities By Evan you
|
||||
* Modified by kazuya kawaguchi
|
||||
* MIT License
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||
*/
|
||||
const isArray = Array.isArray;
|
||||
const isFunction = (val) => typeof val === 'function';
|
||||
const isString = (val) => typeof val === 'string';
|
||||
const isBoolean = (val) => typeof val === 'boolean';
|
||||
const isSymbol = (val) => typeof val === 'symbol';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isObject = (val) => val !== null && typeof val === 'object';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isPromise = (val) => {
|
||||
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||
};
|
||||
const objectToString = Object.prototype.toString;
|
||||
const toTypeString = (value) => objectToString.call(value);
|
||||
const isPlainObject = (val) => {
|
||||
if (!isObject(val))
|
||||
return false;
|
||||
const proto = Object.getPrototypeOf(val);
|
||||
return proto === null || proto.constructor === Object;
|
||||
};
|
||||
// for converting list and named values to displayed strings.
|
||||
const toDisplayString = (val) => {
|
||||
return val == null
|
||||
? ''
|
||||
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||
? JSON.stringify(val, null, 2)
|
||||
: String(val);
|
||||
};
|
||||
function join(items, separator = '') {
|
||||
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||
}
|
||||
const RANGE = 2;
|
||||
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||
const lines = source.split(/\r?\n/);
|
||||
let count = 0;
|
||||
const res = [];
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
count += lines[i].length + 1;
|
||||
if (count >= start) {
|
||||
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||
if (j < 0 || j >= lines.length)
|
||||
continue;
|
||||
const line = j + 1;
|
||||
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||
const lineLength = lines[j].length;
|
||||
if (j === i) {
|
||||
// push underline
|
||||
const pad = start - (count - lineLength) + 1;
|
||||
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||
}
|
||||
else if (j > i) {
|
||||
if (end > count) {
|
||||
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||
res.push(` | ` + '^'.repeat(length));
|
||||
}
|
||||
count += lineLength + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res.join('\n');
|
||||
}
|
||||
function incrementer(code) {
|
||||
let current = code;
|
||||
return () => ++current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitter, forked from the below:
|
||||
* - original repository url: https://github.com/developit/mitt
|
||||
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||
* - author: Jason Miller (https://github.com/developit)
|
||||
* - license: MIT
|
||||
*/
|
||||
/**
|
||||
* Create a event emitter
|
||||
*
|
||||
* @returns An event emitter
|
||||
*/
|
||||
function createEmitter() {
|
||||
const events = new Map();
|
||||
const emitter = {
|
||||
events,
|
||||
on(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
const added = handlers && handlers.push(handler);
|
||||
if (!added) {
|
||||
events.set(event, [handler]);
|
||||
}
|
||||
},
|
||||
off(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
if (handlers) {
|
||||
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||
}
|
||||
},
|
||||
emit(event, payload) {
|
||||
(events.get(event) || [])
|
||||
.slice()
|
||||
.map(handler => handler(payload));
|
||||
(events.get('*') || [])
|
||||
.slice()
|
||||
.map(handler => handler(event, payload));
|
||||
}
|
||||
};
|
||||
return emitter;
|
||||
}
|
||||
|
||||
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
function deepCopy(src, des) {
|
||||
// src and des should both be objects, and none of them can be a array
|
||||
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||
throw new Error('Invalid value');
|
||||
}
|
||||
const stack = [{ src, des }];
|
||||
while (stack.length) {
|
||||
const { src, des } = stack.pop();
|
||||
// using `Object.keys` which skips prototype properties
|
||||
Object.keys(src).forEach(key => {
|
||||
if (key === '__proto__') {
|
||||
return;
|
||||
}
|
||||
// if src[key] is an object/array, set des[key]
|
||||
// to empty object/array to prevent setting by reference
|
||||
if (isObject(src[key]) && !isObject(des[key])) {
|
||||
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||
}
|
||||
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||
// replace with src[key] when:
|
||||
// src[key] or des[key] is not an object, or
|
||||
// src[key] or des[key] is an array
|
||||
des[key] = src[key];
|
||||
}
|
||||
else {
|
||||
// src[key] and des[key] are both objects, merge them
|
||||
stack.push({ src: src[key], des: des[key] });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { assign, create, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, sanitizeTranslatedHtml, toDisplayString, toTypeString, warn, warnOnce };
|
||||
6
node_modules/@intlify/shared/dist/shared.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/shared/dist/shared.esm-browser.prod.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* shared v9.14.5
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const hasWarned={};function warnOnce(e){hasWarned[e]||(hasWarned[e]=!0,warn(e))}const inBrowser="undefined"!=typeof window;let mark,measure;const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign,_create=Object.create,create=(e=null)=>_create(e);let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:create());function escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function escapeAttributeValue(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function sanitizeTranslatedHtml(e){e=(e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,((e,t,r)=>`${t}="${escapeAttributeValue(r)}"`))).replace(/(\w+)\s*=\s*'([^']*)'/g,((e,t,r)=>`${t}='${escapeAttributeValue(r)}'`));/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3"));return[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach((t=>{e=e.replace(t,"$1javascript:")})),e}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isSymbol=e=>"symbol"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}const RANGE=2;function generateCodeFrame(e,t=0,r=e.length){const n=e.split(/\r?\n/);let s=0;const i=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=t){for(let e=o-2;e<=o+2||r>s;e++){if(e<0||e>=n.length)continue;const a=e+1;i.push(`${a}${" ".repeat(3-String(a).length)}| ${n[e]}`);const c=n[e].length;if(e===o){const e=t-(s-c)+1,n=Math.max(1,r>s?c-e:r-t);i.push(" | "+" ".repeat(e)+"^".repeat(n))}else if(e>o){if(r>s){const e=Math.max(Math.min(r-s,c),1);i.push(" | "+"^".repeat(e))}s+=c+1}}break}return i.join("\n")}function incrementer(e){let t=e;return()=>++t}function createEmitter(){const e=new Map;return{events:e,on(t,r){const n=e.get(t);n&&n.push(r)||e.set(t,[r])},off(t,r){const n=e.get(t);n&&n.splice(n.indexOf(r)>>>0,1)},emit(t,r){(e.get(t)||[]).slice().map((e=>e(r))),(e.get("*")||[]).slice().map((e=>e(t,r)))}}}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw new Error("Invalid value");const r=[{src:e,des:t}];for(;r.length;){const{src:e,des:t}=r.pop();Object.keys(e).forEach((n=>{"__proto__"!==n&&(isObject(e[n])&&!isObject(t[n])&&(t[n]=Array.isArray(e[n])?[]:create()),isNotObjectOrIsArray(t[n])||isNotObjectOrIsArray(e[n])?t[n]=e[n]:r.push({src:e[n],des:t[n]}))}))}}export{assign,create,createEmitter,deepCopy,escapeHtml,format,friendlyJSONstringify,generateCodeFrame,generateFormatCacheKey,getGlobalThis,hasOwn,inBrowser,incrementer,isArray,isBoolean,isDate,isEmptyObject,isFunction,isNumber,isObject,isPlainObject,isPromise,isRegExp,isString,isSymbol,join,makeSymbol,mark,measure,objectToString,sanitizeTranslatedHtml,toDisplayString,toTypeString,warn,warnOnce};
|
||||
1
node_modules/@intlify/shared/dist/shared.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../dist/shared.mjs'
|
||||
290
node_modules/@intlify/shared/dist/shared.mjs
generated
vendored
Normal file
290
node_modules/@intlify/shared/dist/shared.mjs
generated
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
/*!
|
||||
* shared v9.14.5
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
function warn(msg, err) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(`[intlify] ` + msg);
|
||||
/* istanbul ignore if */
|
||||
if (err) {
|
||||
console.warn(err.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
const hasWarned = {};
|
||||
function warnOnce(msg) {
|
||||
if (!hasWarned[msg]) {
|
||||
hasWarned[msg] = true;
|
||||
warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Original Utilities
|
||||
* written by kazuya kawaguchi
|
||||
*/
|
||||
const inBrowser = typeof window !== 'undefined';
|
||||
let mark;
|
||||
let measure;
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
const perf = inBrowser && window.performance;
|
||||
if (perf &&
|
||||
perf.mark &&
|
||||
perf.measure &&
|
||||
perf.clearMarks &&
|
||||
// @ts-ignore browser compat
|
||||
perf.clearMeasures) {
|
||||
mark = (tag) => {
|
||||
perf.mark(tag);
|
||||
};
|
||||
measure = (name, startTag, endTag) => {
|
||||
perf.measure(name, startTag, endTag);
|
||||
perf.clearMarks(startTag);
|
||||
perf.clearMarks(endTag);
|
||||
};
|
||||
}
|
||||
}
|
||||
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||
/* eslint-disable */
|
||||
function format(message, ...args) {
|
||||
if (args.length === 1 && isObject(args[0])) {
|
||||
args = args[0];
|
||||
}
|
||||
if (!args || !args.hasOwnProperty) {
|
||||
args = {};
|
||||
}
|
||||
return message.replace(RE_ARGS, (match, identifier) => {
|
||||
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||
});
|
||||
}
|
||||
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||
.replace(/\u2028/g, '\\u2028')
|
||||
.replace(/\u2029/g, '\\u2029')
|
||||
.replace(/\u0027/g, '\\u0027');
|
||||
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||
const assign = Object.assign;
|
||||
const _create = Object.create;
|
||||
const create = (obj = null) => _create(obj);
|
||||
let _globalThis;
|
||||
const getGlobalThis = () => {
|
||||
// prettier-ignore
|
||||
return (_globalThis ||
|
||||
(_globalThis =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: create()));
|
||||
};
|
||||
function escapeHtml(rawText) {
|
||||
return rawText
|
||||
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||
}
|
||||
function escapeAttributeValue(value) {
|
||||
return value
|
||||
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
function sanitizeTranslatedHtml(html) {
|
||||
// Escape dangerous characters in attribute values
|
||||
// Process attributes with double quotes
|
||||
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||
// Process attributes with single quotes
|
||||
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||
// Detect and neutralize event handler attributes
|
||||
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||
if (eventHandlerPattern.test(html)) {
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||
}
|
||||
// Neutralize event handler attributes by escaping 'on'
|
||||
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||
}
|
||||
// Disable javascript: URLs in various contexts
|
||||
const javascriptUrlPattern = [
|
||||
// In href, src, action, formaction attributes
|
||||
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||
// In style attributes within url()
|
||||
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||
];
|
||||
javascriptUrlPattern.forEach(pattern => {
|
||||
html = html.replace(pattern, '$1javascript:');
|
||||
});
|
||||
return html;
|
||||
}
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function hasOwn(obj, key) {
|
||||
return hasOwnProperty.call(obj, key);
|
||||
}
|
||||
/* eslint-enable */
|
||||
/**
|
||||
* Useful Utilities By Evan you
|
||||
* Modified by kazuya kawaguchi
|
||||
* MIT License
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||
*/
|
||||
const isArray = Array.isArray;
|
||||
const isFunction = (val) => typeof val === 'function';
|
||||
const isString = (val) => typeof val === 'string';
|
||||
const isBoolean = (val) => typeof val === 'boolean';
|
||||
const isSymbol = (val) => typeof val === 'symbol';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isObject = (val) => val !== null && typeof val === 'object';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isPromise = (val) => {
|
||||
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||
};
|
||||
const objectToString = Object.prototype.toString;
|
||||
const toTypeString = (value) => objectToString.call(value);
|
||||
const isPlainObject = (val) => {
|
||||
if (!isObject(val))
|
||||
return false;
|
||||
const proto = Object.getPrototypeOf(val);
|
||||
return proto === null || proto.constructor === Object;
|
||||
};
|
||||
// for converting list and named values to displayed strings.
|
||||
const toDisplayString = (val) => {
|
||||
return val == null
|
||||
? ''
|
||||
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||
? JSON.stringify(val, null, 2)
|
||||
: String(val);
|
||||
};
|
||||
function join(items, separator = '') {
|
||||
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||
}
|
||||
const RANGE = 2;
|
||||
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||
const lines = source.split(/\r?\n/);
|
||||
let count = 0;
|
||||
const res = [];
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
count += lines[i].length + 1;
|
||||
if (count >= start) {
|
||||
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||
if (j < 0 || j >= lines.length)
|
||||
continue;
|
||||
const line = j + 1;
|
||||
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||
const lineLength = lines[j].length;
|
||||
if (j === i) {
|
||||
// push underline
|
||||
const pad = start - (count - lineLength) + 1;
|
||||
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||
}
|
||||
else if (j > i) {
|
||||
if (end > count) {
|
||||
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||
res.push(` | ` + '^'.repeat(length));
|
||||
}
|
||||
count += lineLength + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res.join('\n');
|
||||
}
|
||||
function incrementer(code) {
|
||||
let current = code;
|
||||
return () => ++current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitter, forked from the below:
|
||||
* - original repository url: https://github.com/developit/mitt
|
||||
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||
* - author: Jason Miller (https://github.com/developit)
|
||||
* - license: MIT
|
||||
*/
|
||||
/**
|
||||
* Create a event emitter
|
||||
*
|
||||
* @returns An event emitter
|
||||
*/
|
||||
function createEmitter() {
|
||||
const events = new Map();
|
||||
const emitter = {
|
||||
events,
|
||||
on(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
const added = handlers && handlers.push(handler);
|
||||
if (!added) {
|
||||
events.set(event, [handler]);
|
||||
}
|
||||
},
|
||||
off(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
if (handlers) {
|
||||
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||
}
|
||||
},
|
||||
emit(event, payload) {
|
||||
(events.get(event) || [])
|
||||
.slice()
|
||||
.map(handler => handler(payload));
|
||||
(events.get('*') || [])
|
||||
.slice()
|
||||
.map(handler => handler(event, payload));
|
||||
}
|
||||
};
|
||||
return emitter;
|
||||
}
|
||||
|
||||
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
function deepCopy(src, des) {
|
||||
// src and des should both be objects, and none of them can be a array
|
||||
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||
throw new Error('Invalid value');
|
||||
}
|
||||
const stack = [{ src, des }];
|
||||
while (stack.length) {
|
||||
const { src, des } = stack.pop();
|
||||
// using `Object.keys` which skips prototype properties
|
||||
Object.keys(src).forEach(key => {
|
||||
if (key === '__proto__') {
|
||||
return;
|
||||
}
|
||||
// if src[key] is an object/array, set des[key]
|
||||
// to empty object/array to prevent setting by reference
|
||||
if (isObject(src[key]) && !isObject(des[key])) {
|
||||
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||
}
|
||||
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||
// replace with src[key] when:
|
||||
// src[key] or des[key] is not an object, or
|
||||
// src[key] or des[key] is an array
|
||||
des[key] = src[key];
|
||||
}
|
||||
else {
|
||||
// src[key] and des[key] are both objects, merge them
|
||||
stack.push({ src: src[key], des: des[key] });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { assign, create, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, sanitizeTranslatedHtml, toDisplayString, toTypeString, warn, warnOnce };
|
||||
304
node_modules/@intlify/shared/dist/shared.prod.cjs
generated
vendored
Normal file
304
node_modules/@intlify/shared/dist/shared.prod.cjs
generated
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
/*!
|
||||
* shared v9.14.5
|
||||
* (c) 2025 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
function warn(msg, err) {
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(`[intlify] ` + msg);
|
||||
/* istanbul ignore if */
|
||||
if (err) {
|
||||
console.warn(err.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
const hasWarned = {};
|
||||
function warnOnce(msg) {
|
||||
if (!hasWarned[msg]) {
|
||||
hasWarned[msg] = true;
|
||||
warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Original Utilities
|
||||
* written by kazuya kawaguchi
|
||||
*/
|
||||
const inBrowser = typeof window !== 'undefined';
|
||||
let mark;
|
||||
let measure;
|
||||
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||
/* eslint-disable */
|
||||
function format(message, ...args) {
|
||||
if (args.length === 1 && isObject(args[0])) {
|
||||
args = args[0];
|
||||
}
|
||||
if (!args || !args.hasOwnProperty) {
|
||||
args = {};
|
||||
}
|
||||
return message.replace(RE_ARGS, (match, identifier) => {
|
||||
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||
});
|
||||
}
|
||||
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||
.replace(/\u2028/g, '\\u2028')
|
||||
.replace(/\u2029/g, '\\u2029')
|
||||
.replace(/\u0027/g, '\\u0027');
|
||||
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||
const assign = Object.assign;
|
||||
const _create = Object.create;
|
||||
const create = (obj = null) => _create(obj);
|
||||
let _globalThis;
|
||||
const getGlobalThis = () => {
|
||||
// prettier-ignore
|
||||
return (_globalThis ||
|
||||
(_globalThis =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: create()));
|
||||
};
|
||||
function escapeHtml(rawText) {
|
||||
return rawText
|
||||
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||
}
|
||||
function escapeAttributeValue(value) {
|
||||
return value
|
||||
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
function sanitizeTranslatedHtml(html) {
|
||||
// Escape dangerous characters in attribute values
|
||||
// Process attributes with double quotes
|
||||
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||
// Process attributes with single quotes
|
||||
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||
// Detect and neutralize event handler attributes
|
||||
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||
if (eventHandlerPattern.test(html)) {
|
||||
// Neutralize event handler attributes by escaping 'on'
|
||||
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||
}
|
||||
// Disable javascript: URLs in various contexts
|
||||
const javascriptUrlPattern = [
|
||||
// In href, src, action, formaction attributes
|
||||
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||
// In style attributes within url()
|
||||
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||
];
|
||||
javascriptUrlPattern.forEach(pattern => {
|
||||
html = html.replace(pattern, '$1javascript:');
|
||||
});
|
||||
return html;
|
||||
}
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
function hasOwn(obj, key) {
|
||||
return hasOwnProperty.call(obj, key);
|
||||
}
|
||||
/* eslint-enable */
|
||||
/**
|
||||
* Useful Utilities By Evan you
|
||||
* Modified by kazuya kawaguchi
|
||||
* MIT License
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||
*/
|
||||
const isArray = Array.isArray;
|
||||
const isFunction = (val) => typeof val === 'function';
|
||||
const isString = (val) => typeof val === 'string';
|
||||
const isBoolean = (val) => typeof val === 'boolean';
|
||||
const isSymbol = (val) => typeof val === 'symbol';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isObject = (val) => val !== null && typeof val === 'object';
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const isPromise = (val) => {
|
||||
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||
};
|
||||
const objectToString = Object.prototype.toString;
|
||||
const toTypeString = (value) => objectToString.call(value);
|
||||
const isPlainObject = (val) => {
|
||||
if (!isObject(val))
|
||||
return false;
|
||||
const proto = Object.getPrototypeOf(val);
|
||||
return proto === null || proto.constructor === Object;
|
||||
};
|
||||
// for converting list and named values to displayed strings.
|
||||
const toDisplayString = (val) => {
|
||||
return val == null
|
||||
? ''
|
||||
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||
? JSON.stringify(val, null, 2)
|
||||
: String(val);
|
||||
};
|
||||
function join(items, separator = '') {
|
||||
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||
}
|
||||
const RANGE = 2;
|
||||
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||
const lines = source.split(/\r?\n/);
|
||||
let count = 0;
|
||||
const res = [];
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
count += lines[i].length + 1;
|
||||
if (count >= start) {
|
||||
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||
if (j < 0 || j >= lines.length)
|
||||
continue;
|
||||
const line = j + 1;
|
||||
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||
const lineLength = lines[j].length;
|
||||
if (j === i) {
|
||||
// push underline
|
||||
const pad = start - (count - lineLength) + 1;
|
||||
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||
}
|
||||
else if (j > i) {
|
||||
if (end > count) {
|
||||
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||
res.push(` | ` + '^'.repeat(length));
|
||||
}
|
||||
count += lineLength + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return res.join('\n');
|
||||
}
|
||||
function incrementer(code) {
|
||||
let current = code;
|
||||
return () => ++current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event emitter, forked from the below:
|
||||
* - original repository url: https://github.com/developit/mitt
|
||||
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||
* - author: Jason Miller (https://github.com/developit)
|
||||
* - license: MIT
|
||||
*/
|
||||
/**
|
||||
* Create a event emitter
|
||||
*
|
||||
* @returns An event emitter
|
||||
*/
|
||||
function createEmitter() {
|
||||
const events = new Map();
|
||||
const emitter = {
|
||||
events,
|
||||
on(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
const added = handlers && handlers.push(handler);
|
||||
if (!added) {
|
||||
events.set(event, [handler]);
|
||||
}
|
||||
},
|
||||
off(event, handler) {
|
||||
const handlers = events.get(event);
|
||||
if (handlers) {
|
||||
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||
}
|
||||
},
|
||||
emit(event, payload) {
|
||||
(events.get(event) || [])
|
||||
.slice()
|
||||
.map(handler => handler(payload));
|
||||
(events.get('*') || [])
|
||||
.slice()
|
||||
.map(handler => handler(event, payload));
|
||||
}
|
||||
};
|
||||
return emitter;
|
||||
}
|
||||
|
||||
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||
function deepCopy(src, des) {
|
||||
// src and des should both be objects, and none of them can be a array
|
||||
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||
throw new Error('Invalid value');
|
||||
}
|
||||
const stack = [{ src, des }];
|
||||
while (stack.length) {
|
||||
const { src, des } = stack.pop();
|
||||
// using `Object.keys` which skips prototype properties
|
||||
Object.keys(src).forEach(key => {
|
||||
if (key === '__proto__') {
|
||||
return;
|
||||
}
|
||||
// if src[key] is an object/array, set des[key]
|
||||
// to empty object/array to prevent setting by reference
|
||||
if (isObject(src[key]) && !isObject(des[key])) {
|
||||
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||
}
|
||||
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||
// replace with src[key] when:
|
||||
// src[key] or des[key] is not an object, or
|
||||
// src[key] or des[key] is an array
|
||||
des[key] = src[key];
|
||||
}
|
||||
else {
|
||||
// src[key] and des[key] are both objects, merge them
|
||||
stack.push({ src: src[key], des: des[key] });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports.assign = assign;
|
||||
exports.create = create;
|
||||
exports.createEmitter = createEmitter;
|
||||
exports.deepCopy = deepCopy;
|
||||
exports.escapeHtml = escapeHtml;
|
||||
exports.format = format;
|
||||
exports.friendlyJSONstringify = friendlyJSONstringify;
|
||||
exports.generateCodeFrame = generateCodeFrame;
|
||||
exports.generateFormatCacheKey = generateFormatCacheKey;
|
||||
exports.getGlobalThis = getGlobalThis;
|
||||
exports.hasOwn = hasOwn;
|
||||
exports.inBrowser = inBrowser;
|
||||
exports.incrementer = incrementer;
|
||||
exports.isArray = isArray;
|
||||
exports.isBoolean = isBoolean;
|
||||
exports.isDate = isDate;
|
||||
exports.isEmptyObject = isEmptyObject;
|
||||
exports.isFunction = isFunction;
|
||||
exports.isNumber = isNumber;
|
||||
exports.isObject = isObject;
|
||||
exports.isPlainObject = isPlainObject;
|
||||
exports.isPromise = isPromise;
|
||||
exports.isRegExp = isRegExp;
|
||||
exports.isString = isString;
|
||||
exports.isSymbol = isSymbol;
|
||||
exports.join = join;
|
||||
exports.makeSymbol = makeSymbol;
|
||||
exports.mark = mark;
|
||||
exports.measure = measure;
|
||||
exports.objectToString = objectToString;
|
||||
exports.sanitizeTranslatedHtml = sanitizeTranslatedHtml;
|
||||
exports.toDisplayString = toDisplayString;
|
||||
exports.toTypeString = toTypeString;
|
||||
exports.warn = warn;
|
||||
exports.warnOnce = warnOnce;
|
||||
7
node_modules/@intlify/shared/index.js
generated
vendored
Normal file
7
node_modules/@intlify/shared/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/shared.prod.cjs')
|
||||
} else {
|
||||
module.exports = require('./dist/shared.cjs')
|
||||
}
|
||||
69
node_modules/@intlify/shared/package.json
generated
vendored
Normal file
69
node_modules/@intlify/shared/package.json
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "@intlify/shared",
|
||||
"version": "9.14.5",
|
||||
"description": "@intlify/shared",
|
||||
"keywords": [
|
||||
"i18n",
|
||||
"internationalization",
|
||||
"intlify",
|
||||
"utitlity"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "kazuya kawaguchi",
|
||||
"email": "kawakazu80@gmail.com"
|
||||
},
|
||||
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/shared#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||
"directory": "packages/shared"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"dist"
|
||||
],
|
||||
"main": "index.js",
|
||||
"module": "dist/shared.mjs",
|
||||
"types": "dist/shared.d.ts",
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"buildOptions": {
|
||||
"name": "IntlifyShared",
|
||||
"formats": [
|
||||
"mjs",
|
||||
"browser",
|
||||
"cjs"
|
||||
]
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/shared.d.ts",
|
||||
"import": "./dist/shared.mjs",
|
||||
"browser": "./dist/shared.esm-browser.js",
|
||||
"node": {
|
||||
"import": {
|
||||
"production": "./dist/shared.prod.cjs",
|
||||
"development": "./dist/shared.mjs",
|
||||
"default": "./dist/shared.mjs"
|
||||
},
|
||||
"require": {
|
||||
"production": "./dist/shared.prod.cjs",
|
||||
"development": "./dist/shared.cjs",
|
||||
"default": "./index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"./dist/*": "./dist/*",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"funding": "https://github.com/sponsors/kazupon",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
Reference in New Issue
Block a user