@deriv-com/fe-mcp-servers 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -79
- package/dist/shift-ai/README.md +1 -1
- package/node_modules/@modelcontextprotocol/sdk/LICENSE +21 -0
- package/node_modules/@modelcontextprotocol/sdk/README.md +105 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cli.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cli.js +129 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cli.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts +773 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.js +206 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js +393 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/index.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts +22 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/sse.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js +91 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/sse.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts +56 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js +147 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js +51 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/stdio.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts +17 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js +61 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/client/websocket.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts +20 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js +47 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js +74 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/inMemory.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts +112 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.js +182 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js +408 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/index.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts +46 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/sse.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js +116 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/sse.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts +28 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js +69 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js +87 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/server/stdio.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts +157 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js +297 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/protocol.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js +31 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js +27 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/stdio.test.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts +39 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/shared/transport.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts +26425 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/types.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/types.js +997 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/types.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/package.json +61 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/http-errors/HISTORY.md +180 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +289 -0
- package/node_modules/http-errors/package.json +50 -0
- package/node_modules/iconv-lite/.github/dependabot.yml +11 -0
- package/node_modules/iconv-lite/.idea/codeStyles/Project.xml +47 -0
- package/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/node_modules/iconv-lite/.idea/iconv-lite.iml +12 -0
- package/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/node_modules/iconv-lite/.idea/modules.xml +8 -0
- package/node_modules/iconv-lite/.idea/vcs.xml +6 -0
- package/node_modules/iconv-lite/Changelog.md +212 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +130 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +597 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +188 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +198 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +197 -0
- package/node_modules/iconv-lite/encodings/utf32.js +319 -0
- package/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/node_modules/iconv-lite/lib/index.js +180 -0
- package/node_modules/iconv-lite/lib/streams.js +109 -0
- package/node_modules/iconv-lite/package.json +44 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/raw-body/HISTORY.md +325 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/raw-body/index.d.ts +85 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +50 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/statuses/HISTORY.md +82 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +136 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +10 -5
- package/dist/shift-ai/package-lock.json +0 -1053
- package/dist/shift-ai/package.json +0 -19
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Description of supported double byte encodings and aliases.
|
|
4
|
+
// Tables are not require()-d until they are needed to speed up library load.
|
|
5
|
+
// require()-s are direct to support Browserify.
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
|
|
9
|
+
// == Japanese/ShiftJIS ====================================================
|
|
10
|
+
// All japanese encodings are based on JIS X set of standards:
|
|
11
|
+
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
12
|
+
// JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
13
|
+
// Has several variations in 1978, 1983, 1990 and 1997.
|
|
14
|
+
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
|
|
15
|
+
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
|
|
16
|
+
// 2 planes, first is superset of 0208, second - revised 0212.
|
|
17
|
+
// Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
|
|
18
|
+
|
|
19
|
+
// Byte encodings are:
|
|
20
|
+
// * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
|
|
21
|
+
// encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
|
|
22
|
+
// Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
|
|
23
|
+
// * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
|
|
24
|
+
// 0x00-0x7F - lower part of 0201
|
|
25
|
+
// 0x8E, 0xA1-0xDF - upper part of 0201
|
|
26
|
+
// (0xA1-0xFE)x2 - 0208 plane (94x94).
|
|
27
|
+
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
|
|
28
|
+
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
|
|
29
|
+
// Used as-is in ISO2022 family.
|
|
30
|
+
// * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
31
|
+
// 0201-1976 Roman, 0208-1978, 0208-1983.
|
|
32
|
+
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
|
|
33
|
+
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
|
|
34
|
+
// * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
|
|
35
|
+
// * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
|
|
36
|
+
//
|
|
37
|
+
// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
|
|
38
|
+
//
|
|
39
|
+
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
|
|
40
|
+
|
|
41
|
+
'shiftjis': {
|
|
42
|
+
type: '_dbcs',
|
|
43
|
+
table: function() { return require('./tables/shiftjis.json') },
|
|
44
|
+
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
|
|
45
|
+
encodeSkipVals: [{from: 0xED40, to: 0xF940}],
|
|
46
|
+
},
|
|
47
|
+
'csshiftjis': 'shiftjis',
|
|
48
|
+
'mskanji': 'shiftjis',
|
|
49
|
+
'sjis': 'shiftjis',
|
|
50
|
+
'windows31j': 'shiftjis',
|
|
51
|
+
'ms31j': 'shiftjis',
|
|
52
|
+
'xsjis': 'shiftjis',
|
|
53
|
+
'windows932': 'shiftjis',
|
|
54
|
+
'ms932': 'shiftjis',
|
|
55
|
+
'932': 'shiftjis',
|
|
56
|
+
'cp932': 'shiftjis',
|
|
57
|
+
|
|
58
|
+
'eucjp': {
|
|
59
|
+
type: '_dbcs',
|
|
60
|
+
table: function() { return require('./tables/eucjp.json') },
|
|
61
|
+
encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// TODO: KDDI extension to Shift_JIS
|
|
65
|
+
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
|
|
66
|
+
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// == Chinese/GBK ==========================================================
|
|
70
|
+
// http://en.wikipedia.org/wiki/GBK
|
|
71
|
+
// We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
72
|
+
|
|
73
|
+
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
|
|
74
|
+
'gb2312': 'cp936',
|
|
75
|
+
'gb231280': 'cp936',
|
|
76
|
+
'gb23121980': 'cp936',
|
|
77
|
+
'csgb2312': 'cp936',
|
|
78
|
+
'csiso58gb231280': 'cp936',
|
|
79
|
+
'euccn': 'cp936',
|
|
80
|
+
|
|
81
|
+
// Microsoft's CP936 is a subset and approximation of GBK.
|
|
82
|
+
'windows936': 'cp936',
|
|
83
|
+
'ms936': 'cp936',
|
|
84
|
+
'936': 'cp936',
|
|
85
|
+
'cp936': {
|
|
86
|
+
type: '_dbcs',
|
|
87
|
+
table: function() { return require('./tables/cp936.json') },
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
// GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
|
|
91
|
+
'gbk': {
|
|
92
|
+
type: '_dbcs',
|
|
93
|
+
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
|
|
94
|
+
},
|
|
95
|
+
'xgbk': 'gbk',
|
|
96
|
+
'isoir58': 'gbk',
|
|
97
|
+
|
|
98
|
+
// GB18030 is an algorithmic extension of GBK.
|
|
99
|
+
// Main source: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
100
|
+
// http://icu-project.org/docs/papers/gb18030.html
|
|
101
|
+
// http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
|
|
102
|
+
// http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
|
|
103
|
+
'gb18030': {
|
|
104
|
+
type: '_dbcs',
|
|
105
|
+
table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) },
|
|
106
|
+
gb18030: function() { return require('./tables/gb18030-ranges.json') },
|
|
107
|
+
encodeSkipVals: [0x80],
|
|
108
|
+
encodeAdd: {'€': 0xA2E3},
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
'chinese': 'gb18030',
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
// == Korean ===============================================================
|
|
115
|
+
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
|
|
116
|
+
'windows949': 'cp949',
|
|
117
|
+
'ms949': 'cp949',
|
|
118
|
+
'949': 'cp949',
|
|
119
|
+
'cp949': {
|
|
120
|
+
type: '_dbcs',
|
|
121
|
+
table: function() { return require('./tables/cp949.json') },
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
'cseuckr': 'cp949',
|
|
125
|
+
'csksc56011987': 'cp949',
|
|
126
|
+
'euckr': 'cp949',
|
|
127
|
+
'isoir149': 'cp949',
|
|
128
|
+
'korean': 'cp949',
|
|
129
|
+
'ksc56011987': 'cp949',
|
|
130
|
+
'ksc56011989': 'cp949',
|
|
131
|
+
'ksc5601': 'cp949',
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
// == Big5/Taiwan/Hong Kong ================================================
|
|
135
|
+
// There are lots of tables for Big5 and cp950. Please see the following links for history:
|
|
136
|
+
// http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
|
|
137
|
+
// Variations, in roughly number of defined chars:
|
|
138
|
+
// * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
|
|
139
|
+
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
|
|
140
|
+
// * Big5-2003 (Taiwan standard) almost superset of cp950.
|
|
141
|
+
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
|
|
142
|
+
// * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
143
|
+
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
|
|
144
|
+
// Plus, it has 4 combining sequences.
|
|
145
|
+
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
|
|
146
|
+
// because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
|
|
147
|
+
// Implementations are not consistent within browsers; sometimes labeled as just big5.
|
|
148
|
+
// MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
|
|
149
|
+
// Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
|
|
150
|
+
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
|
|
151
|
+
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
|
|
152
|
+
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
|
|
153
|
+
//
|
|
154
|
+
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
|
|
155
|
+
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
|
|
156
|
+
|
|
157
|
+
'windows950': 'cp950',
|
|
158
|
+
'ms950': 'cp950',
|
|
159
|
+
'950': 'cp950',
|
|
160
|
+
'cp950': {
|
|
161
|
+
type: '_dbcs',
|
|
162
|
+
table: function() { return require('./tables/cp950.json') },
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
|
|
166
|
+
'big5': 'big5hkscs',
|
|
167
|
+
'big5hkscs': {
|
|
168
|
+
type: '_dbcs',
|
|
169
|
+
table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
|
|
170
|
+
encodeSkipVals: [
|
|
171
|
+
// Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
|
|
172
|
+
// https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.
|
|
173
|
+
// But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.
|
|
174
|
+
0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,
|
|
175
|
+
0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,
|
|
176
|
+
0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,
|
|
177
|
+
0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,
|
|
178
|
+
0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,
|
|
179
|
+
|
|
180
|
+
// Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345
|
|
181
|
+
0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
'cnbig5': 'big5hkscs',
|
|
186
|
+
'csbig5': 'big5hkscs',
|
|
187
|
+
'xxbig5': 'big5hkscs',
|
|
188
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Update this array if you add/rename/remove files in this directory.
|
|
4
|
+
// We support Browserify by skipping automatic module discovery and requiring modules directly.
|
|
5
|
+
var modules = [
|
|
6
|
+
require("./internal"),
|
|
7
|
+
require("./utf32"),
|
|
8
|
+
require("./utf16"),
|
|
9
|
+
require("./utf7"),
|
|
10
|
+
require("./sbcs-codec"),
|
|
11
|
+
require("./sbcs-data"),
|
|
12
|
+
require("./sbcs-data-generated"),
|
|
13
|
+
require("./dbcs-codec"),
|
|
14
|
+
require("./dbcs-data"),
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
// Put all encoding/alias/codec definitions to single object and export it.
|
|
18
|
+
for (var i = 0; i < modules.length; i++) {
|
|
19
|
+
var module = modules[i];
|
|
20
|
+
for (var enc in module)
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(module, enc))
|
|
22
|
+
exports[enc] = module[enc];
|
|
23
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var Buffer = require("safer-buffer").Buffer;
|
|
3
|
+
|
|
4
|
+
// Export Node.js internal encodings.
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
// Encodings
|
|
8
|
+
utf8: { type: "_internal", bomAware: true},
|
|
9
|
+
cesu8: { type: "_internal", bomAware: true},
|
|
10
|
+
unicode11utf8: "utf8",
|
|
11
|
+
|
|
12
|
+
ucs2: { type: "_internal", bomAware: true},
|
|
13
|
+
utf16le: "ucs2",
|
|
14
|
+
|
|
15
|
+
binary: { type: "_internal" },
|
|
16
|
+
base64: { type: "_internal" },
|
|
17
|
+
hex: { type: "_internal" },
|
|
18
|
+
|
|
19
|
+
// Codec.
|
|
20
|
+
_internal: InternalCodec,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
function InternalCodec(codecOptions, iconv) {
|
|
26
|
+
this.enc = codecOptions.encodingName;
|
|
27
|
+
this.bomAware = codecOptions.bomAware;
|
|
28
|
+
|
|
29
|
+
if (this.enc === "base64")
|
|
30
|
+
this.encoder = InternalEncoderBase64;
|
|
31
|
+
else if (this.enc === "cesu8") {
|
|
32
|
+
this.enc = "utf8"; // Use utf8 for decoding.
|
|
33
|
+
this.encoder = InternalEncoderCesu8;
|
|
34
|
+
|
|
35
|
+
// Add decoder for versions of Node not supporting CESU-8
|
|
36
|
+
if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {
|
|
37
|
+
this.decoder = InternalDecoderCesu8;
|
|
38
|
+
this.defaultCharUnicode = iconv.defaultCharUnicode;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
InternalCodec.prototype.encoder = InternalEncoder;
|
|
44
|
+
InternalCodec.prototype.decoder = InternalDecoder;
|
|
45
|
+
|
|
46
|
+
//------------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
// We use node.js internal decoder. Its signature is the same as ours.
|
|
49
|
+
var StringDecoder = require('string_decoder').StringDecoder;
|
|
50
|
+
|
|
51
|
+
if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
|
|
52
|
+
StringDecoder.prototype.end = function() {};
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
function InternalDecoder(options, codec) {
|
|
56
|
+
this.decoder = new StringDecoder(codec.enc);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
InternalDecoder.prototype.write = function(buf) {
|
|
60
|
+
if (!Buffer.isBuffer(buf)) {
|
|
61
|
+
buf = Buffer.from(buf);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return this.decoder.write(buf);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
InternalDecoder.prototype.end = function() {
|
|
68
|
+
return this.decoder.end();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
//------------------------------------------------------------------------------
|
|
73
|
+
// Encoder is mostly trivial
|
|
74
|
+
|
|
75
|
+
function InternalEncoder(options, codec) {
|
|
76
|
+
this.enc = codec.enc;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
InternalEncoder.prototype.write = function(str) {
|
|
80
|
+
return Buffer.from(str, this.enc);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
InternalEncoder.prototype.end = function() {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
//------------------------------------------------------------------------------
|
|
88
|
+
// Except base64 encoder, which must keep its state.
|
|
89
|
+
|
|
90
|
+
function InternalEncoderBase64(options, codec) {
|
|
91
|
+
this.prevStr = '';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
InternalEncoderBase64.prototype.write = function(str) {
|
|
95
|
+
str = this.prevStr + str;
|
|
96
|
+
var completeQuads = str.length - (str.length % 4);
|
|
97
|
+
this.prevStr = str.slice(completeQuads);
|
|
98
|
+
str = str.slice(0, completeQuads);
|
|
99
|
+
|
|
100
|
+
return Buffer.from(str, "base64");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
InternalEncoderBase64.prototype.end = function() {
|
|
104
|
+
return Buffer.from(this.prevStr, "base64");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
//------------------------------------------------------------------------------
|
|
109
|
+
// CESU-8 encoder is also special.
|
|
110
|
+
|
|
111
|
+
function InternalEncoderCesu8(options, codec) {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
InternalEncoderCesu8.prototype.write = function(str) {
|
|
115
|
+
var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
|
|
116
|
+
for (var i = 0; i < str.length; i++) {
|
|
117
|
+
var charCode = str.charCodeAt(i);
|
|
118
|
+
// Naive implementation, but it works because CESU-8 is especially easy
|
|
119
|
+
// to convert from UTF-16 (which all JS strings are encoded in).
|
|
120
|
+
if (charCode < 0x80)
|
|
121
|
+
buf[bufIdx++] = charCode;
|
|
122
|
+
else if (charCode < 0x800) {
|
|
123
|
+
buf[bufIdx++] = 0xC0 + (charCode >>> 6);
|
|
124
|
+
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
|
|
125
|
+
}
|
|
126
|
+
else { // charCode will always be < 0x10000 in javascript.
|
|
127
|
+
buf[bufIdx++] = 0xE0 + (charCode >>> 12);
|
|
128
|
+
buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
|
|
129
|
+
buf[bufIdx++] = 0x80 + (charCode & 0x3f);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return buf.slice(0, bufIdx);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
InternalEncoderCesu8.prototype.end = function() {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//------------------------------------------------------------------------------
|
|
139
|
+
// CESU-8 decoder is not implemented in Node v4.0+
|
|
140
|
+
|
|
141
|
+
function InternalDecoderCesu8(options, codec) {
|
|
142
|
+
this.acc = 0;
|
|
143
|
+
this.contBytes = 0;
|
|
144
|
+
this.accBytes = 0;
|
|
145
|
+
this.defaultCharUnicode = codec.defaultCharUnicode;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
InternalDecoderCesu8.prototype.write = function(buf) {
|
|
149
|
+
var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
|
|
150
|
+
res = '';
|
|
151
|
+
for (var i = 0; i < buf.length; i++) {
|
|
152
|
+
var curByte = buf[i];
|
|
153
|
+
if ((curByte & 0xC0) !== 0x80) { // Leading byte
|
|
154
|
+
if (contBytes > 0) { // Previous code is invalid
|
|
155
|
+
res += this.defaultCharUnicode;
|
|
156
|
+
contBytes = 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (curByte < 0x80) { // Single-byte code
|
|
160
|
+
res += String.fromCharCode(curByte);
|
|
161
|
+
} else if (curByte < 0xE0) { // Two-byte code
|
|
162
|
+
acc = curByte & 0x1F;
|
|
163
|
+
contBytes = 1; accBytes = 1;
|
|
164
|
+
} else if (curByte < 0xF0) { // Three-byte code
|
|
165
|
+
acc = curByte & 0x0F;
|
|
166
|
+
contBytes = 2; accBytes = 1;
|
|
167
|
+
} else { // Four or more are not supported for CESU-8.
|
|
168
|
+
res += this.defaultCharUnicode;
|
|
169
|
+
}
|
|
170
|
+
} else { // Continuation byte
|
|
171
|
+
if (contBytes > 0) { // We're waiting for it.
|
|
172
|
+
acc = (acc << 6) | (curByte & 0x3f);
|
|
173
|
+
contBytes--; accBytes++;
|
|
174
|
+
if (contBytes === 0) {
|
|
175
|
+
// Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
|
|
176
|
+
if (accBytes === 2 && acc < 0x80 && acc > 0)
|
|
177
|
+
res += this.defaultCharUnicode;
|
|
178
|
+
else if (accBytes === 3 && acc < 0x800)
|
|
179
|
+
res += this.defaultCharUnicode;
|
|
180
|
+
else
|
|
181
|
+
// Actually add character.
|
|
182
|
+
res += String.fromCharCode(acc);
|
|
183
|
+
}
|
|
184
|
+
} else { // Unexpected continuation byte
|
|
185
|
+
res += this.defaultCharUnicode;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
|
|
190
|
+
return res;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
InternalDecoderCesu8.prototype.end = function() {
|
|
194
|
+
var res = 0;
|
|
195
|
+
if (this.contBytes > 0)
|
|
196
|
+
res += this.defaultCharUnicode;
|
|
197
|
+
return res;
|
|
198
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var Buffer = require("safer-buffer").Buffer;
|
|
3
|
+
|
|
4
|
+
// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
|
|
5
|
+
// correspond to encoded bytes (if 128 - then lower half is ASCII).
|
|
6
|
+
|
|
7
|
+
exports._sbcs = SBCSCodec;
|
|
8
|
+
function SBCSCodec(codecOptions, iconv) {
|
|
9
|
+
if (!codecOptions)
|
|
10
|
+
throw new Error("SBCS codec is called without the data.")
|
|
11
|
+
|
|
12
|
+
// Prepare char buffer for decoding.
|
|
13
|
+
if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
|
|
14
|
+
throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
|
|
15
|
+
|
|
16
|
+
if (codecOptions.chars.length === 128) {
|
|
17
|
+
var asciiString = "";
|
|
18
|
+
for (var i = 0; i < 128; i++)
|
|
19
|
+
asciiString += String.fromCharCode(i);
|
|
20
|
+
codecOptions.chars = asciiString + codecOptions.chars;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
|
|
24
|
+
|
|
25
|
+
// Encoding buffer.
|
|
26
|
+
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
|
|
27
|
+
|
|
28
|
+
for (var i = 0; i < codecOptions.chars.length; i++)
|
|
29
|
+
encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
|
|
30
|
+
|
|
31
|
+
this.encodeBuf = encodeBuf;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SBCSCodec.prototype.encoder = SBCSEncoder;
|
|
35
|
+
SBCSCodec.prototype.decoder = SBCSDecoder;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function SBCSEncoder(options, codec) {
|
|
39
|
+
this.encodeBuf = codec.encodeBuf;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
SBCSEncoder.prototype.write = function(str) {
|
|
43
|
+
var buf = Buffer.alloc(str.length);
|
|
44
|
+
for (var i = 0; i < str.length; i++)
|
|
45
|
+
buf[i] = this.encodeBuf[str.charCodeAt(i)];
|
|
46
|
+
|
|
47
|
+
return buf;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
SBCSEncoder.prototype.end = function() {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
function SBCSDecoder(options, codec) {
|
|
55
|
+
this.decodeBuf = codec.decodeBuf;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
SBCSDecoder.prototype.write = function(buf) {
|
|
59
|
+
// Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
|
|
60
|
+
var decodeBuf = this.decodeBuf;
|
|
61
|
+
var newBuf = Buffer.alloc(buf.length*2);
|
|
62
|
+
var idx1 = 0, idx2 = 0;
|
|
63
|
+
for (var i = 0; i < buf.length; i++) {
|
|
64
|
+
idx1 = buf[i]*2; idx2 = i*2;
|
|
65
|
+
newBuf[idx2] = decodeBuf[idx1];
|
|
66
|
+
newBuf[idx2+1] = decodeBuf[idx1+1];
|
|
67
|
+
}
|
|
68
|
+
return newBuf.toString('ucs2');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
SBCSDecoder.prototype.end = function() {
|
|
72
|
+
}
|