@nuxt/ui 3.0.0-alpha.7 → 3.0.0-alpha.9
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/.nuxt/ui/accordion.ts +20 -0
- package/.nuxt/ui/alert.ts +242 -0
- package/.nuxt/ui/avatar-group.ts +40 -0
- package/.nuxt/ui/avatar.ts +42 -0
- package/.nuxt/ui/badge.ts +194 -0
- package/.nuxt/ui/breadcrumb.ts +45 -0
- package/.nuxt/ui/button-group.ts +16 -0
- package/.nuxt/ui/button.ts +344 -0
- package/.nuxt/ui/card.ts +8 -0
- package/.nuxt/ui/carousel.ts +41 -0
- package/.nuxt/ui/checkbox.ts +105 -0
- package/.nuxt/ui/chip.ts +67 -0
- package/.nuxt/ui/collapsible.ts +6 -0
- package/.nuxt/ui/command-palette.ts +40 -0
- package/.nuxt/ui/container.ts +3 -0
- package/.nuxt/ui/context-menu.ts +198 -0
- package/.nuxt/ui/drawer.ts +55 -0
- package/.nuxt/ui/dropdown-menu.ts +199 -0
- package/.nuxt/ui/form-field.ts +40 -0
- package/.nuxt/ui/form.ts +3 -0
- package/.nuxt/ui/index.ts +45 -0
- package/.nuxt/ui/input-menu.ts +411 -0
- package/.nuxt/ui/input-number.ts +204 -0
- package/.nuxt/ui/input.ts +263 -0
- package/.nuxt/ui/kbd.ts +19 -0
- package/.nuxt/ui/link.ts +15 -0
- package/.nuxt/ui/modal.ts +28 -0
- package/.nuxt/ui/navigation-menu.ts +390 -0
- package/.nuxt/ui/pagination.ts +8 -0
- package/.nuxt/ui/pin-input.ts +145 -0
- package/.nuxt/ui/popover.ts +6 -0
- package/.nuxt/ui/progress.ts +258 -0
- package/.nuxt/ui/radio-group.ts +112 -0
- package/.nuxt/ui/select-menu.ts +316 -0
- package/.nuxt/ui/select.ts +314 -0
- package/.nuxt/ui/separator.ts +143 -0
- package/.nuxt/ui/skeleton.ts +3 -0
- package/.nuxt/ui/slideover.ts +63 -0
- package/.nuxt/ui/slider.ts +148 -0
- package/.nuxt/ui/switch.ts +113 -0
- package/.nuxt/ui/table.ts +129 -0
- package/.nuxt/ui/tabs.ts +227 -0
- package/.nuxt/ui/textarea.ts +263 -0
- package/.nuxt/ui/toast.ts +66 -0
- package/.nuxt/ui/toaster.ts +75 -0
- package/.nuxt/ui/tooltip.ts +9 -0
- package/README.md +52 -12
- package/cli/commands/{init.mjs → make/component.mjs} +4 -4
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +2 -2
- package/cli/templates.mjs +47 -2
- package/cli/utils.mjs +14 -0
- package/dist/chunks/component-meta.cjs +77249 -0
- package/dist/chunks/component-meta.mjs +77247 -0
- package/dist/client/devtools/200.html +1 -0
- package/dist/client/devtools/404.html +1 -0
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
- package/dist/client/devtools/_nuxt/BDC8ywlR.js +1 -0
- package/dist/client/devtools/_nuxt/BT004Uxp.js +53 -0
- package/dist/client/devtools/_nuxt/C1H2Soz3.js +1 -0
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -0
- package/dist/client/devtools/_nuxt/builds/meta/f98c13ea-d751-4b37-8ce3-94e99708745f.json +1 -0
- package/dist/client/devtools/_nuxt/entry.Bx6WJjrx.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.Cq4qshcf.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.ax1aM34m.css +1 -0
- package/dist/client/devtools/favicon.svg +1 -0
- package/dist/client/devtools/index.html +1 -0
- package/dist/devtools/runtime/DevtoolsRenderer.vue +53 -0
- package/dist/devtools/runtime/examples/AvatarGroupExample.vue +7 -0
- package/dist/devtools/runtime/examples/ButtonGroupExample.vue +8 -0
- package/dist/devtools/runtime/examples/CardExample.vue +13 -0
- package/dist/devtools/runtime/examples/CarouselExample.vue +13 -0
- package/dist/devtools/runtime/examples/ChipExample.vue +5 -0
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +8 -0
- package/dist/devtools/runtime/examples/CommandPaletteExample.vue +29 -0
- package/dist/devtools/runtime/examples/ContainerExample.vue +5 -0
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +5 -0
- package/dist/devtools/runtime/examples/DrawerExample.vue +8 -0
- package/dist/devtools/runtime/examples/DropdownMenuExample.vue +5 -0
- package/dist/devtools/runtime/examples/FormExample.vue +30 -0
- package/dist/devtools/runtime/examples/FormFieldExample.vue +5 -0
- package/dist/devtools/runtime/examples/LinkExample.vue +5 -0
- package/dist/devtools/runtime/examples/ModalExample.vue +8 -0
- package/dist/devtools/runtime/examples/PopoverExample.vue +8 -0
- package/dist/devtools/runtime/examples/SkeletonExample.vue +3 -0
- package/dist/devtools/runtime/examples/SlideoverExample.vue +8 -0
- package/dist/devtools/runtime/examples/ToasterExample.vue +11 -0
- package/dist/devtools/runtime/examples/TooltipExample.vue +5 -0
- package/dist/module.cjs +223 -4
- package/dist/module.d.cts +54 -0
- package/dist/module.d.mts +10 -0
- package/dist/module.d.ts +10 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +158 -2763
- package/dist/runtime/components/Accordion.vue +32 -1
- package/dist/runtime/components/Alert.vue +8 -1
- package/dist/runtime/components/App.vue +19 -5
- package/dist/runtime/components/Avatar.vue +23 -5
- package/dist/runtime/components/AvatarGroup.vue +3 -0
- package/dist/runtime/components/Badge.vue +33 -3
- package/dist/runtime/components/Breadcrumb.vue +33 -4
- package/dist/runtime/components/Button.vue +6 -1
- package/dist/runtime/components/ButtonGroup.vue +4 -1
- package/dist/runtime/components/Card.vue +3 -0
- package/dist/runtime/components/Carousel.vue +17 -8
- package/dist/runtime/components/Checkbox.vue +4 -0
- package/dist/runtime/components/Chip.vue +9 -2
- package/dist/runtime/components/Collapsible.vue +3 -0
- package/dist/runtime/components/CommandPalette.vue +8 -4
- package/dist/runtime/components/Container.vue +3 -0
- package/dist/runtime/components/ContextMenu.vue +64 -3
- package/dist/runtime/components/ContextMenuContent.vue +10 -8
- package/dist/runtime/components/Drawer.vue +3 -0
- package/dist/runtime/components/DropdownMenu.vue +52 -3
- package/dist/runtime/components/DropdownMenuContent.vue +10 -8
- package/dist/runtime/components/Form.vue +21 -20
- package/dist/runtime/components/FormField.vue +10 -3
- package/dist/runtime/components/Input.vue +1 -0
- package/dist/runtime/components/InputMenu.vue +118 -31
- package/dist/runtime/components/InputNumber.vue +192 -0
- package/dist/runtime/components/Kbd.vue +2 -0
- package/dist/runtime/components/Link.vue +69 -6
- package/dist/runtime/components/Modal.vue +15 -3
- package/dist/runtime/components/NavigationMenu.vue +95 -46
- package/dist/runtime/components/Pagination.vue +17 -6
- package/dist/runtime/components/PinInput.vue +96 -0
- package/dist/runtime/components/Popover.vue +20 -1
- package/dist/runtime/components/Progress.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue +4 -1
- package/dist/runtime/components/Select.vue +24 -13
- package/dist/runtime/components/SelectMenu.vue +130 -42
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Skeleton.vue +3 -0
- package/dist/runtime/components/Slideover.vue +15 -3
- package/dist/runtime/components/Slider.vue +1 -1
- package/dist/runtime/components/Switch.vue +5 -1
- package/dist/runtime/components/Table.vue +27 -8
- package/dist/runtime/components/Tabs.vue +20 -1
- package/dist/runtime/components/Textarea.vue +1 -1
- package/dist/runtime/components/Toast.vue +8 -1
- package/dist/runtime/components/Toaster.vue +29 -14
- package/dist/runtime/components/Tooltip.vue +3 -0
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.js +0 -6
- package/dist/runtime/composables/extendDevtoolsMeta.d.ts +7 -0
- package/dist/runtime/composables/extendDevtoolsMeta.js +2 -0
- package/dist/runtime/composables/useFormField.d.ts +4 -1
- package/dist/runtime/composables/useFormField.js +1 -1
- package/dist/runtime/composables/useKbd.d.ts +10 -3
- package/dist/runtime/composables/useKbd.js +14 -8
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/ar.d.ts +2 -0
- package/dist/runtime/locale/ar.js +47 -0
- package/dist/runtime/locale/cs.d.ts +2 -0
- package/dist/runtime/locale/cs.js +46 -0
- package/dist/runtime/locale/de.d.ts +2 -0
- package/dist/runtime/locale/de.js +46 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +46 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +46 -0
- package/dist/runtime/locale/fa_ir.d.ts +2 -0
- package/dist/runtime/locale/fa_ir.js +47 -0
- package/dist/runtime/locale/fr.d.ts +2 -0
- package/dist/runtime/locale/fr.js +46 -0
- package/dist/runtime/locale/index.d.ts +12 -0
- package/dist/runtime/locale/index.js +12 -0
- package/dist/runtime/locale/it.d.ts +2 -0
- package/dist/runtime/locale/it.js +46 -0
- package/dist/runtime/locale/pl.d.ts +2 -0
- package/dist/runtime/locale/pl.js +46 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +46 -0
- package/dist/runtime/locale/zh_hans.d.ts +2 -0
- package/dist/runtime/locale/zh_hans.js +46 -0
- package/dist/runtime/locale/zh_hant.d.ts +2 -0
- package/dist/runtime/locale/zh_hant.js +46 -0
- package/dist/runtime/types/form.d.ts +7 -2
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/locale.d.ts +48 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +7 -0
- package/dist/runtime/utils/form.d.ts +5 -9
- package/dist/runtime/utils/form.js +115 -50
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/utils/link.d.ts +2 -2
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/vue/components/Icon.vue +15 -0
- package/dist/runtime/vue/components/Link.vue +195 -0
- package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
- package/dist/runtime/vue/plugins/color-mode.js +6 -0
- package/dist/runtime/vue/plugins/head.d.ts +4 -0
- package/dist/runtime/vue/plugins/head.js +6 -0
- package/dist/runtime/vue/stubs.d.ts +15 -0
- package/dist/runtime/vue/stubs.js +27 -0
- package/dist/shared/ui.BPnAe4QS.cjs +3030 -0
- package/dist/shared/ui.d52SSCwA.mjs +3023 -0
- package/dist/unplugin.cjs +192 -0
- package/dist/unplugin.d.cts +49 -0
- package/dist/unplugin.d.mts +49 -0
- package/dist/unplugin.d.ts +49 -0
- package/dist/unplugin.mjs +181 -0
- package/dist/vite.cjs +22 -0
- package/dist/vite.d.cts +13 -0
- package/dist/vite.d.mts +13 -0
- package/dist/vite.d.ts +13 -0
- package/dist/vite.mjs +20 -0
- package/package.json +78 -33
- package/vue-plugin.d.ts +5 -0
- package/cli/node_modules/.ignored/citty/LICENSE +0 -36
- package/cli/node_modules/.ignored/citty/README.md +0 -134
- package/cli/node_modules/.ignored/citty/dist/index.cjs +0 -475
- package/cli/node_modules/.ignored/citty/dist/index.d.cts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.d.mts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.d.ts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.mjs +0 -463
- package/cli/node_modules/.ignored/citty/package.json +0 -49
- package/cli/node_modules/.ignored/consola/LICENSE +0 -47
- package/cli/node_modules/.ignored/consola/README.md +0 -318
- package/cli/node_modules/.ignored/consola/core.d.ts +0 -1
- package/cli/node_modules/.ignored/consola/dist/basic.cjs +0 -32
- package/cli/node_modules/.ignored/consola/dist/basic.d.ts +0 -9
- package/cli/node_modules/.ignored/consola/dist/basic.mjs +0 -24
- package/cli/node_modules/.ignored/consola/dist/browser.cjs +0 -80
- package/cli/node_modules/.ignored/consola/dist/browser.d.ts +0 -7
- package/cli/node_modules/.ignored/consola/dist/browser.mjs +0 -72
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +0 -436
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +0 -429
- package/cli/node_modules/.ignored/consola/dist/core.cjs +0 -415
- package/cli/node_modules/.ignored/consola/dist/core.d.ts +0 -124
- package/cli/node_modules/.ignored/consola/dist/core.mjs +0 -410
- package/cli/node_modules/.ignored/consola/dist/index.cjs +0 -21
- package/cli/node_modules/.ignored/consola/dist/index.d.ts +0 -9
- package/cli/node_modules/.ignored/consola/dist/index.mjs +0 -8
- package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +0 -62
- package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +0 -636
- package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +0 -645
- package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +0 -65
- package/cli/node_modules/.ignored/consola/dist/utils.cjs +0 -308
- package/cli/node_modules/.ignored/consola/dist/utils.d.ts +0 -169
- package/cli/node_modules/.ignored/consola/dist/utils.mjs +0 -284
- package/cli/node_modules/.ignored/consola/lib/index.cjs +0 -9
- package/cli/node_modules/.ignored/consola/package.json +0 -101
- package/cli/node_modules/.ignored/consola/utils.d.ts +0 -1
- package/cli/node_modules/.ignored/pathe/LICENSE +0 -44
- package/cli/node_modules/.ignored/pathe/README.md +0 -69
- package/cli/node_modules/.ignored/pathe/dist/index.cjs +0 -23
- package/cli/node_modules/.ignored/pathe/dist/index.d.cts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.d.mts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.d.ts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.mjs +0 -1
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +0 -238
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +0 -221
- package/cli/node_modules/.ignored/pathe/dist/utils.cjs +0 -58
- package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.mjs +0 -54
- package/cli/node_modules/.ignored/pathe/package.json +0 -48
- package/cli/node_modules/.ignored/pathe/utils.d.ts +0 -1
- package/cli/node_modules/.ignored/scule/LICENSE +0 -21
- package/cli/node_modules/.ignored/scule/README.md +0 -149
- package/cli/node_modules/.ignored/scule/dist/index.cjs +0 -92
- package/cli/node_modules/.ignored/scule/dist/index.d.cts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.d.mts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.d.ts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.mjs +0 -80
- package/cli/node_modules/.ignored/scule/package.json +0 -43
- package/cli/node_modules/.package-lock.json +0 -33
|
@@ -1,636 +0,0 @@
|
|
|
1
|
-
import { createConsola as createConsola$1, LogLevels } from '../core.mjs';
|
|
2
|
-
import { B as BasicReporter, p as parseStack } from './consola.06ad8a64.mjs';
|
|
3
|
-
import process$1 from 'node:process';
|
|
4
|
-
import { colors, box, stripAnsi as stripAnsi$1 } from '../utils.mjs';
|
|
5
|
-
|
|
6
|
-
const providers = [
|
|
7
|
-
["APPVEYOR"],
|
|
8
|
-
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
9
|
-
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
10
|
-
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
11
|
-
["BAMBOO", "bamboo_planKey"],
|
|
12
|
-
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
13
|
-
["BITRISE", "BITRISE_IO"],
|
|
14
|
-
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
15
|
-
["BUILDKITE"],
|
|
16
|
-
["CIRCLE", "CIRCLECI"],
|
|
17
|
-
["CIRRUS", "CIRRUS_CI"],
|
|
18
|
-
["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
|
|
19
|
-
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
20
|
-
["CODEFRESH", "CF_BUILD_ID"],
|
|
21
|
-
["DRONE"],
|
|
22
|
-
["DRONE", "DRONE_BUILD_EVENT"],
|
|
23
|
-
["DSARI"],
|
|
24
|
-
["GITHUB_ACTIONS"],
|
|
25
|
-
["GITLAB", "GITLAB_CI"],
|
|
26
|
-
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
27
|
-
["GOCD", "GO_PIPELINE_LABEL"],
|
|
28
|
-
["LAYERCI"],
|
|
29
|
-
["HUDSON", "HUDSON_URL"],
|
|
30
|
-
["JENKINS", "JENKINS_URL"],
|
|
31
|
-
["MAGNUM"],
|
|
32
|
-
["NETLIFY"],
|
|
33
|
-
["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
|
|
34
|
-
["NEVERCODE"],
|
|
35
|
-
["RENDER"],
|
|
36
|
-
["SAIL", "SAILCI"],
|
|
37
|
-
["SEMAPHORE"],
|
|
38
|
-
["SCREWDRIVER"],
|
|
39
|
-
["SHIPPABLE"],
|
|
40
|
-
["SOLANO", "TDDIUM"],
|
|
41
|
-
["STRIDER"],
|
|
42
|
-
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
43
|
-
["TRAVIS"],
|
|
44
|
-
["VERCEL", "NOW_BUILDER"],
|
|
45
|
-
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
46
|
-
["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
|
|
47
|
-
["STACKBLITZ"],
|
|
48
|
-
["STORMKIT"],
|
|
49
|
-
["CLEAVR"]
|
|
50
|
-
];
|
|
51
|
-
function detectProvider(env) {
|
|
52
|
-
for (const provider of providers) {
|
|
53
|
-
const envName = provider[1] || provider[0];
|
|
54
|
-
if (env[envName]) {
|
|
55
|
-
return {
|
|
56
|
-
name: provider[0].toLowerCase(),
|
|
57
|
-
...provider[2]
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (env.SHELL && env.SHELL === "/bin/jsh") {
|
|
62
|
-
return {
|
|
63
|
-
name: "stackblitz",
|
|
64
|
-
ci: false
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
name: "",
|
|
69
|
-
ci: false
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const processShim = typeof process !== "undefined" ? process : {};
|
|
74
|
-
const envShim = processShim.env || {};
|
|
75
|
-
const providerInfo = detectProvider(envShim);
|
|
76
|
-
const nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || "";
|
|
77
|
-
processShim.platform;
|
|
78
|
-
providerInfo.name;
|
|
79
|
-
const isCI = toBoolean(envShim.CI) || providerInfo.ci !== false;
|
|
80
|
-
const hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
|
|
81
|
-
const isDebug = toBoolean(envShim.DEBUG);
|
|
82
|
-
const isTest = nodeENV === "test" || toBoolean(envShim.TEST);
|
|
83
|
-
toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY;
|
|
84
|
-
function toBoolean(val) {
|
|
85
|
-
return val ? val !== "false" : false;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function ansiRegex({onlyFirst = false} = {}) {
|
|
89
|
-
const pattern = [
|
|
90
|
-
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
91
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
|
92
|
-
].join('|');
|
|
93
|
-
|
|
94
|
-
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const regex = ansiRegex();
|
|
98
|
-
|
|
99
|
-
function stripAnsi(string) {
|
|
100
|
-
if (typeof string !== 'string') {
|
|
101
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Even though the regex is global, we don't need to reset the `.lastIndex`
|
|
105
|
-
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
|
|
106
|
-
// and doing it manually has a performance penalty.
|
|
107
|
-
return string.replace(regex, '');
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function getDefaultExportFromCjs (x) {
|
|
111
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var eastasianwidth = {exports: {}};
|
|
115
|
-
|
|
116
|
-
(function (module) {
|
|
117
|
-
var eaw = {};
|
|
118
|
-
|
|
119
|
-
{
|
|
120
|
-
module.exports = eaw;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
eaw.eastAsianWidth = function(character) {
|
|
124
|
-
var x = character.charCodeAt(0);
|
|
125
|
-
var y = (character.length == 2) ? character.charCodeAt(1) : 0;
|
|
126
|
-
var codePoint = x;
|
|
127
|
-
if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) {
|
|
128
|
-
x &= 0x3FF;
|
|
129
|
-
y &= 0x3FF;
|
|
130
|
-
codePoint = (x << 10) | y;
|
|
131
|
-
codePoint += 0x10000;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if ((0x3000 == codePoint) ||
|
|
135
|
-
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
|
136
|
-
(0xFFE0 <= codePoint && codePoint <= 0xFFE6)) {
|
|
137
|
-
return 'F';
|
|
138
|
-
}
|
|
139
|
-
if ((0x20A9 == codePoint) ||
|
|
140
|
-
(0xFF61 <= codePoint && codePoint <= 0xFFBE) ||
|
|
141
|
-
(0xFFC2 <= codePoint && codePoint <= 0xFFC7) ||
|
|
142
|
-
(0xFFCA <= codePoint && codePoint <= 0xFFCF) ||
|
|
143
|
-
(0xFFD2 <= codePoint && codePoint <= 0xFFD7) ||
|
|
144
|
-
(0xFFDA <= codePoint && codePoint <= 0xFFDC) ||
|
|
145
|
-
(0xFFE8 <= codePoint && codePoint <= 0xFFEE)) {
|
|
146
|
-
return 'H';
|
|
147
|
-
}
|
|
148
|
-
if ((0x1100 <= codePoint && codePoint <= 0x115F) ||
|
|
149
|
-
(0x11A3 <= codePoint && codePoint <= 0x11A7) ||
|
|
150
|
-
(0x11FA <= codePoint && codePoint <= 0x11FF) ||
|
|
151
|
-
(0x2329 <= codePoint && codePoint <= 0x232A) ||
|
|
152
|
-
(0x2E80 <= codePoint && codePoint <= 0x2E99) ||
|
|
153
|
-
(0x2E9B <= codePoint && codePoint <= 0x2EF3) ||
|
|
154
|
-
(0x2F00 <= codePoint && codePoint <= 0x2FD5) ||
|
|
155
|
-
(0x2FF0 <= codePoint && codePoint <= 0x2FFB) ||
|
|
156
|
-
(0x3001 <= codePoint && codePoint <= 0x303E) ||
|
|
157
|
-
(0x3041 <= codePoint && codePoint <= 0x3096) ||
|
|
158
|
-
(0x3099 <= codePoint && codePoint <= 0x30FF) ||
|
|
159
|
-
(0x3105 <= codePoint && codePoint <= 0x312D) ||
|
|
160
|
-
(0x3131 <= codePoint && codePoint <= 0x318E) ||
|
|
161
|
-
(0x3190 <= codePoint && codePoint <= 0x31BA) ||
|
|
162
|
-
(0x31C0 <= codePoint && codePoint <= 0x31E3) ||
|
|
163
|
-
(0x31F0 <= codePoint && codePoint <= 0x321E) ||
|
|
164
|
-
(0x3220 <= codePoint && codePoint <= 0x3247) ||
|
|
165
|
-
(0x3250 <= codePoint && codePoint <= 0x32FE) ||
|
|
166
|
-
(0x3300 <= codePoint && codePoint <= 0x4DBF) ||
|
|
167
|
-
(0x4E00 <= codePoint && codePoint <= 0xA48C) ||
|
|
168
|
-
(0xA490 <= codePoint && codePoint <= 0xA4C6) ||
|
|
169
|
-
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
|
170
|
-
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
|
171
|
-
(0xD7B0 <= codePoint && codePoint <= 0xD7C6) ||
|
|
172
|
-
(0xD7CB <= codePoint && codePoint <= 0xD7FB) ||
|
|
173
|
-
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
|
174
|
-
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
|
175
|
-
(0xFE30 <= codePoint && codePoint <= 0xFE52) ||
|
|
176
|
-
(0xFE54 <= codePoint && codePoint <= 0xFE66) ||
|
|
177
|
-
(0xFE68 <= codePoint && codePoint <= 0xFE6B) ||
|
|
178
|
-
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
|
179
|
-
(0x1F200 <= codePoint && codePoint <= 0x1F202) ||
|
|
180
|
-
(0x1F210 <= codePoint && codePoint <= 0x1F23A) ||
|
|
181
|
-
(0x1F240 <= codePoint && codePoint <= 0x1F248) ||
|
|
182
|
-
(0x1F250 <= codePoint && codePoint <= 0x1F251) ||
|
|
183
|
-
(0x20000 <= codePoint && codePoint <= 0x2F73F) ||
|
|
184
|
-
(0x2B740 <= codePoint && codePoint <= 0x2FFFD) ||
|
|
185
|
-
(0x30000 <= codePoint && codePoint <= 0x3FFFD)) {
|
|
186
|
-
return 'W';
|
|
187
|
-
}
|
|
188
|
-
if ((0x0020 <= codePoint && codePoint <= 0x007E) ||
|
|
189
|
-
(0x00A2 <= codePoint && codePoint <= 0x00A3) ||
|
|
190
|
-
(0x00A5 <= codePoint && codePoint <= 0x00A6) ||
|
|
191
|
-
(0x00AC == codePoint) ||
|
|
192
|
-
(0x00AF == codePoint) ||
|
|
193
|
-
(0x27E6 <= codePoint && codePoint <= 0x27ED) ||
|
|
194
|
-
(0x2985 <= codePoint && codePoint <= 0x2986)) {
|
|
195
|
-
return 'Na';
|
|
196
|
-
}
|
|
197
|
-
if ((0x00A1 == codePoint) ||
|
|
198
|
-
(0x00A4 == codePoint) ||
|
|
199
|
-
(0x00A7 <= codePoint && codePoint <= 0x00A8) ||
|
|
200
|
-
(0x00AA == codePoint) ||
|
|
201
|
-
(0x00AD <= codePoint && codePoint <= 0x00AE) ||
|
|
202
|
-
(0x00B0 <= codePoint && codePoint <= 0x00B4) ||
|
|
203
|
-
(0x00B6 <= codePoint && codePoint <= 0x00BA) ||
|
|
204
|
-
(0x00BC <= codePoint && codePoint <= 0x00BF) ||
|
|
205
|
-
(0x00C6 == codePoint) ||
|
|
206
|
-
(0x00D0 == codePoint) ||
|
|
207
|
-
(0x00D7 <= codePoint && codePoint <= 0x00D8) ||
|
|
208
|
-
(0x00DE <= codePoint && codePoint <= 0x00E1) ||
|
|
209
|
-
(0x00E6 == codePoint) ||
|
|
210
|
-
(0x00E8 <= codePoint && codePoint <= 0x00EA) ||
|
|
211
|
-
(0x00EC <= codePoint && codePoint <= 0x00ED) ||
|
|
212
|
-
(0x00F0 == codePoint) ||
|
|
213
|
-
(0x00F2 <= codePoint && codePoint <= 0x00F3) ||
|
|
214
|
-
(0x00F7 <= codePoint && codePoint <= 0x00FA) ||
|
|
215
|
-
(0x00FC == codePoint) ||
|
|
216
|
-
(0x00FE == codePoint) ||
|
|
217
|
-
(0x0101 == codePoint) ||
|
|
218
|
-
(0x0111 == codePoint) ||
|
|
219
|
-
(0x0113 == codePoint) ||
|
|
220
|
-
(0x011B == codePoint) ||
|
|
221
|
-
(0x0126 <= codePoint && codePoint <= 0x0127) ||
|
|
222
|
-
(0x012B == codePoint) ||
|
|
223
|
-
(0x0131 <= codePoint && codePoint <= 0x0133) ||
|
|
224
|
-
(0x0138 == codePoint) ||
|
|
225
|
-
(0x013F <= codePoint && codePoint <= 0x0142) ||
|
|
226
|
-
(0x0144 == codePoint) ||
|
|
227
|
-
(0x0148 <= codePoint && codePoint <= 0x014B) ||
|
|
228
|
-
(0x014D == codePoint) ||
|
|
229
|
-
(0x0152 <= codePoint && codePoint <= 0x0153) ||
|
|
230
|
-
(0x0166 <= codePoint && codePoint <= 0x0167) ||
|
|
231
|
-
(0x016B == codePoint) ||
|
|
232
|
-
(0x01CE == codePoint) ||
|
|
233
|
-
(0x01D0 == codePoint) ||
|
|
234
|
-
(0x01D2 == codePoint) ||
|
|
235
|
-
(0x01D4 == codePoint) ||
|
|
236
|
-
(0x01D6 == codePoint) ||
|
|
237
|
-
(0x01D8 == codePoint) ||
|
|
238
|
-
(0x01DA == codePoint) ||
|
|
239
|
-
(0x01DC == codePoint) ||
|
|
240
|
-
(0x0251 == codePoint) ||
|
|
241
|
-
(0x0261 == codePoint) ||
|
|
242
|
-
(0x02C4 == codePoint) ||
|
|
243
|
-
(0x02C7 == codePoint) ||
|
|
244
|
-
(0x02C9 <= codePoint && codePoint <= 0x02CB) ||
|
|
245
|
-
(0x02CD == codePoint) ||
|
|
246
|
-
(0x02D0 == codePoint) ||
|
|
247
|
-
(0x02D8 <= codePoint && codePoint <= 0x02DB) ||
|
|
248
|
-
(0x02DD == codePoint) ||
|
|
249
|
-
(0x02DF == codePoint) ||
|
|
250
|
-
(0x0300 <= codePoint && codePoint <= 0x036F) ||
|
|
251
|
-
(0x0391 <= codePoint && codePoint <= 0x03A1) ||
|
|
252
|
-
(0x03A3 <= codePoint && codePoint <= 0x03A9) ||
|
|
253
|
-
(0x03B1 <= codePoint && codePoint <= 0x03C1) ||
|
|
254
|
-
(0x03C3 <= codePoint && codePoint <= 0x03C9) ||
|
|
255
|
-
(0x0401 == codePoint) ||
|
|
256
|
-
(0x0410 <= codePoint && codePoint <= 0x044F) ||
|
|
257
|
-
(0x0451 == codePoint) ||
|
|
258
|
-
(0x2010 == codePoint) ||
|
|
259
|
-
(0x2013 <= codePoint && codePoint <= 0x2016) ||
|
|
260
|
-
(0x2018 <= codePoint && codePoint <= 0x2019) ||
|
|
261
|
-
(0x201C <= codePoint && codePoint <= 0x201D) ||
|
|
262
|
-
(0x2020 <= codePoint && codePoint <= 0x2022) ||
|
|
263
|
-
(0x2024 <= codePoint && codePoint <= 0x2027) ||
|
|
264
|
-
(0x2030 == codePoint) ||
|
|
265
|
-
(0x2032 <= codePoint && codePoint <= 0x2033) ||
|
|
266
|
-
(0x2035 == codePoint) ||
|
|
267
|
-
(0x203B == codePoint) ||
|
|
268
|
-
(0x203E == codePoint) ||
|
|
269
|
-
(0x2074 == codePoint) ||
|
|
270
|
-
(0x207F == codePoint) ||
|
|
271
|
-
(0x2081 <= codePoint && codePoint <= 0x2084) ||
|
|
272
|
-
(0x20AC == codePoint) ||
|
|
273
|
-
(0x2103 == codePoint) ||
|
|
274
|
-
(0x2105 == codePoint) ||
|
|
275
|
-
(0x2109 == codePoint) ||
|
|
276
|
-
(0x2113 == codePoint) ||
|
|
277
|
-
(0x2116 == codePoint) ||
|
|
278
|
-
(0x2121 <= codePoint && codePoint <= 0x2122) ||
|
|
279
|
-
(0x2126 == codePoint) ||
|
|
280
|
-
(0x212B == codePoint) ||
|
|
281
|
-
(0x2153 <= codePoint && codePoint <= 0x2154) ||
|
|
282
|
-
(0x215B <= codePoint && codePoint <= 0x215E) ||
|
|
283
|
-
(0x2160 <= codePoint && codePoint <= 0x216B) ||
|
|
284
|
-
(0x2170 <= codePoint && codePoint <= 0x2179) ||
|
|
285
|
-
(0x2189 == codePoint) ||
|
|
286
|
-
(0x2190 <= codePoint && codePoint <= 0x2199) ||
|
|
287
|
-
(0x21B8 <= codePoint && codePoint <= 0x21B9) ||
|
|
288
|
-
(0x21D2 == codePoint) ||
|
|
289
|
-
(0x21D4 == codePoint) ||
|
|
290
|
-
(0x21E7 == codePoint) ||
|
|
291
|
-
(0x2200 == codePoint) ||
|
|
292
|
-
(0x2202 <= codePoint && codePoint <= 0x2203) ||
|
|
293
|
-
(0x2207 <= codePoint && codePoint <= 0x2208) ||
|
|
294
|
-
(0x220B == codePoint) ||
|
|
295
|
-
(0x220F == codePoint) ||
|
|
296
|
-
(0x2211 == codePoint) ||
|
|
297
|
-
(0x2215 == codePoint) ||
|
|
298
|
-
(0x221A == codePoint) ||
|
|
299
|
-
(0x221D <= codePoint && codePoint <= 0x2220) ||
|
|
300
|
-
(0x2223 == codePoint) ||
|
|
301
|
-
(0x2225 == codePoint) ||
|
|
302
|
-
(0x2227 <= codePoint && codePoint <= 0x222C) ||
|
|
303
|
-
(0x222E == codePoint) ||
|
|
304
|
-
(0x2234 <= codePoint && codePoint <= 0x2237) ||
|
|
305
|
-
(0x223C <= codePoint && codePoint <= 0x223D) ||
|
|
306
|
-
(0x2248 == codePoint) ||
|
|
307
|
-
(0x224C == codePoint) ||
|
|
308
|
-
(0x2252 == codePoint) ||
|
|
309
|
-
(0x2260 <= codePoint && codePoint <= 0x2261) ||
|
|
310
|
-
(0x2264 <= codePoint && codePoint <= 0x2267) ||
|
|
311
|
-
(0x226A <= codePoint && codePoint <= 0x226B) ||
|
|
312
|
-
(0x226E <= codePoint && codePoint <= 0x226F) ||
|
|
313
|
-
(0x2282 <= codePoint && codePoint <= 0x2283) ||
|
|
314
|
-
(0x2286 <= codePoint && codePoint <= 0x2287) ||
|
|
315
|
-
(0x2295 == codePoint) ||
|
|
316
|
-
(0x2299 == codePoint) ||
|
|
317
|
-
(0x22A5 == codePoint) ||
|
|
318
|
-
(0x22BF == codePoint) ||
|
|
319
|
-
(0x2312 == codePoint) ||
|
|
320
|
-
(0x2460 <= codePoint && codePoint <= 0x24E9) ||
|
|
321
|
-
(0x24EB <= codePoint && codePoint <= 0x254B) ||
|
|
322
|
-
(0x2550 <= codePoint && codePoint <= 0x2573) ||
|
|
323
|
-
(0x2580 <= codePoint && codePoint <= 0x258F) ||
|
|
324
|
-
(0x2592 <= codePoint && codePoint <= 0x2595) ||
|
|
325
|
-
(0x25A0 <= codePoint && codePoint <= 0x25A1) ||
|
|
326
|
-
(0x25A3 <= codePoint && codePoint <= 0x25A9) ||
|
|
327
|
-
(0x25B2 <= codePoint && codePoint <= 0x25B3) ||
|
|
328
|
-
(0x25B6 <= codePoint && codePoint <= 0x25B7) ||
|
|
329
|
-
(0x25BC <= codePoint && codePoint <= 0x25BD) ||
|
|
330
|
-
(0x25C0 <= codePoint && codePoint <= 0x25C1) ||
|
|
331
|
-
(0x25C6 <= codePoint && codePoint <= 0x25C8) ||
|
|
332
|
-
(0x25CB == codePoint) ||
|
|
333
|
-
(0x25CE <= codePoint && codePoint <= 0x25D1) ||
|
|
334
|
-
(0x25E2 <= codePoint && codePoint <= 0x25E5) ||
|
|
335
|
-
(0x25EF == codePoint) ||
|
|
336
|
-
(0x2605 <= codePoint && codePoint <= 0x2606) ||
|
|
337
|
-
(0x2609 == codePoint) ||
|
|
338
|
-
(0x260E <= codePoint && codePoint <= 0x260F) ||
|
|
339
|
-
(0x2614 <= codePoint && codePoint <= 0x2615) ||
|
|
340
|
-
(0x261C == codePoint) ||
|
|
341
|
-
(0x261E == codePoint) ||
|
|
342
|
-
(0x2640 == codePoint) ||
|
|
343
|
-
(0x2642 == codePoint) ||
|
|
344
|
-
(0x2660 <= codePoint && codePoint <= 0x2661) ||
|
|
345
|
-
(0x2663 <= codePoint && codePoint <= 0x2665) ||
|
|
346
|
-
(0x2667 <= codePoint && codePoint <= 0x266A) ||
|
|
347
|
-
(0x266C <= codePoint && codePoint <= 0x266D) ||
|
|
348
|
-
(0x266F == codePoint) ||
|
|
349
|
-
(0x269E <= codePoint && codePoint <= 0x269F) ||
|
|
350
|
-
(0x26BE <= codePoint && codePoint <= 0x26BF) ||
|
|
351
|
-
(0x26C4 <= codePoint && codePoint <= 0x26CD) ||
|
|
352
|
-
(0x26CF <= codePoint && codePoint <= 0x26E1) ||
|
|
353
|
-
(0x26E3 == codePoint) ||
|
|
354
|
-
(0x26E8 <= codePoint && codePoint <= 0x26FF) ||
|
|
355
|
-
(0x273D == codePoint) ||
|
|
356
|
-
(0x2757 == codePoint) ||
|
|
357
|
-
(0x2776 <= codePoint && codePoint <= 0x277F) ||
|
|
358
|
-
(0x2B55 <= codePoint && codePoint <= 0x2B59) ||
|
|
359
|
-
(0x3248 <= codePoint && codePoint <= 0x324F) ||
|
|
360
|
-
(0xE000 <= codePoint && codePoint <= 0xF8FF) ||
|
|
361
|
-
(0xFE00 <= codePoint && codePoint <= 0xFE0F) ||
|
|
362
|
-
(0xFFFD == codePoint) ||
|
|
363
|
-
(0x1F100 <= codePoint && codePoint <= 0x1F10A) ||
|
|
364
|
-
(0x1F110 <= codePoint && codePoint <= 0x1F12D) ||
|
|
365
|
-
(0x1F130 <= codePoint && codePoint <= 0x1F169) ||
|
|
366
|
-
(0x1F170 <= codePoint && codePoint <= 0x1F19A) ||
|
|
367
|
-
(0xE0100 <= codePoint && codePoint <= 0xE01EF) ||
|
|
368
|
-
(0xF0000 <= codePoint && codePoint <= 0xFFFFD) ||
|
|
369
|
-
(0x100000 <= codePoint && codePoint <= 0x10FFFD)) {
|
|
370
|
-
return 'A';
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
return 'N';
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
eaw.characterLength = function(character) {
|
|
377
|
-
var code = this.eastAsianWidth(character);
|
|
378
|
-
if (code == 'F' || code == 'W' || code == 'A') {
|
|
379
|
-
return 2;
|
|
380
|
-
} else {
|
|
381
|
-
return 1;
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
// Split a string considering surrogate-pairs.
|
|
386
|
-
function stringToArray(string) {
|
|
387
|
-
return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
eaw.length = function(string) {
|
|
391
|
-
var characters = stringToArray(string);
|
|
392
|
-
var len = 0;
|
|
393
|
-
for (var i = 0; i < characters.length; i++) {
|
|
394
|
-
len = len + this.characterLength(characters[i]);
|
|
395
|
-
}
|
|
396
|
-
return len;
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
eaw.slice = function(text, start, end) {
|
|
400
|
-
textLen = eaw.length(text);
|
|
401
|
-
start = start ? start : 0;
|
|
402
|
-
end = end ? end : 1;
|
|
403
|
-
if (start < 0) {
|
|
404
|
-
start = textLen + start;
|
|
405
|
-
}
|
|
406
|
-
if (end < 0) {
|
|
407
|
-
end = textLen + end;
|
|
408
|
-
}
|
|
409
|
-
var result = '';
|
|
410
|
-
var eawLen = 0;
|
|
411
|
-
var chars = stringToArray(text);
|
|
412
|
-
for (var i = 0; i < chars.length; i++) {
|
|
413
|
-
var char = chars[i];
|
|
414
|
-
var charLen = eaw.length(char);
|
|
415
|
-
if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
|
|
416
|
-
if (eawLen + charLen <= end) {
|
|
417
|
-
result += char;
|
|
418
|
-
} else {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
eawLen += charLen;
|
|
423
|
-
}
|
|
424
|
-
return result;
|
|
425
|
-
};
|
|
426
|
-
} (eastasianwidth));
|
|
427
|
-
|
|
428
|
-
var eastasianwidthExports = eastasianwidth.exports;
|
|
429
|
-
const eastAsianWidth = /*@__PURE__*/getDefaultExportFromCjs(eastasianwidthExports);
|
|
430
|
-
|
|
431
|
-
const emojiRegex = () => {
|
|
432
|
-
// https://mths.be/emoji
|
|
433
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
function stringWidth$1(string, options) {
|
|
437
|
-
if (typeof string !== 'string' || string.length === 0) {
|
|
438
|
-
return 0;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
options = {
|
|
442
|
-
ambiguousIsNarrow: true,
|
|
443
|
-
countAnsiEscapeCodes: false,
|
|
444
|
-
...options,
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
if (!options.countAnsiEscapeCodes) {
|
|
448
|
-
string = stripAnsi(string);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
if (string.length === 0) {
|
|
452
|
-
return 0;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
|
|
456
|
-
let width = 0;
|
|
457
|
-
|
|
458
|
-
for (const {segment: character} of new Intl.Segmenter().segment(string)) {
|
|
459
|
-
const codePoint = character.codePointAt(0);
|
|
460
|
-
|
|
461
|
-
// Ignore control characters
|
|
462
|
-
if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {
|
|
463
|
-
continue;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
// Ignore combining characters
|
|
467
|
-
if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
|
|
468
|
-
continue;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
if (emojiRegex().test(character)) {
|
|
472
|
-
width += 2;
|
|
473
|
-
continue;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
const code = eastAsianWidth.eastAsianWidth(character);
|
|
477
|
-
switch (code) {
|
|
478
|
-
case 'F':
|
|
479
|
-
case 'W': {
|
|
480
|
-
width += 2;
|
|
481
|
-
break;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
case 'A': {
|
|
485
|
-
width += ambiguousCharacterWidth;
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
default: {
|
|
490
|
-
width += 1;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
return width;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
function isUnicodeSupported() {
|
|
499
|
-
if (process$1.platform !== 'win32') {
|
|
500
|
-
return process$1.env.TERM !== 'linux'; // Linux console (kernel)
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
return Boolean(process$1.env.CI)
|
|
504
|
-
|| Boolean(process$1.env.WT_SESSION) // Windows Terminal
|
|
505
|
-
|| Boolean(process$1.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
|
|
506
|
-
|| process$1.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
|
|
507
|
-
|| process$1.env.TERM_PROGRAM === 'Terminus-Sublime'
|
|
508
|
-
|| process$1.env.TERM_PROGRAM === 'vscode'
|
|
509
|
-
|| process$1.env.TERM === 'xterm-256color'
|
|
510
|
-
|| process$1.env.TERM === 'alacritty'
|
|
511
|
-
|| process$1.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
const TYPE_COLOR_MAP = {
|
|
515
|
-
info: "cyan",
|
|
516
|
-
fail: "red",
|
|
517
|
-
success: "green",
|
|
518
|
-
ready: "green",
|
|
519
|
-
start: "magenta"
|
|
520
|
-
};
|
|
521
|
-
const LEVEL_COLOR_MAP = {
|
|
522
|
-
0: "red",
|
|
523
|
-
1: "yellow"
|
|
524
|
-
};
|
|
525
|
-
const unicode = isUnicodeSupported();
|
|
526
|
-
const s = (c, fallback) => unicode ? c : fallback;
|
|
527
|
-
const TYPE_ICONS = {
|
|
528
|
-
error: s("\u2716", "\xD7"),
|
|
529
|
-
fatal: s("\u2716", "\xD7"),
|
|
530
|
-
ready: s("\u2714", "\u221A"),
|
|
531
|
-
warn: s("\u26A0", "\u203C"),
|
|
532
|
-
info: s("\u2139", "i"),
|
|
533
|
-
success: s("\u2714", "\u221A"),
|
|
534
|
-
debug: s("\u2699", "D"),
|
|
535
|
-
trace: s("\u2192", "\u2192"),
|
|
536
|
-
fail: s("\u2716", "\xD7"),
|
|
537
|
-
start: s("\u25D0", "o"),
|
|
538
|
-
log: ""
|
|
539
|
-
};
|
|
540
|
-
function stringWidth(str) {
|
|
541
|
-
if (!Intl.Segmenter) {
|
|
542
|
-
return stripAnsi$1(str).length;
|
|
543
|
-
}
|
|
544
|
-
return stringWidth$1(str);
|
|
545
|
-
}
|
|
546
|
-
class FancyReporter extends BasicReporter {
|
|
547
|
-
formatStack(stack) {
|
|
548
|
-
return "\n" + parseStack(stack).map(
|
|
549
|
-
(line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)
|
|
550
|
-
).join("\n");
|
|
551
|
-
}
|
|
552
|
-
formatType(logObj, isBadge, opts) {
|
|
553
|
-
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
554
|
-
if (isBadge) {
|
|
555
|
-
return getBgColor(typeColor)(
|
|
556
|
-
colors.black(` ${logObj.type.toUpperCase()} `)
|
|
557
|
-
);
|
|
558
|
-
}
|
|
559
|
-
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
560
|
-
return _type ? getColor(typeColor)(_type) : "";
|
|
561
|
-
}
|
|
562
|
-
formatLogObj(logObj, opts) {
|
|
563
|
-
const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
|
|
564
|
-
"\n"
|
|
565
|
-
);
|
|
566
|
-
if (logObj.type === "box") {
|
|
567
|
-
return box(
|
|
568
|
-
characterFormat(
|
|
569
|
-
message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
|
|
570
|
-
),
|
|
571
|
-
{
|
|
572
|
-
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
573
|
-
style: logObj.style
|
|
574
|
-
}
|
|
575
|
-
);
|
|
576
|
-
}
|
|
577
|
-
const date = this.formatDate(logObj.date, opts);
|
|
578
|
-
const coloredDate = date && colors.gray(date);
|
|
579
|
-
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
580
|
-
const type = this.formatType(logObj, isBadge, opts);
|
|
581
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
582
|
-
let line;
|
|
583
|
-
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
584
|
-
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
585
|
-
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
586
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
587
|
-
line += characterFormat(
|
|
588
|
-
additional.length > 0 ? "\n" + additional.join("\n") : ""
|
|
589
|
-
);
|
|
590
|
-
if (logObj.type === "trace") {
|
|
591
|
-
const _err = new Error("Trace: " + logObj.message);
|
|
592
|
-
line += this.formatStack(_err.stack || "");
|
|
593
|
-
}
|
|
594
|
-
return isBadge ? "\n" + line + "\n" : line;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function characterFormat(str) {
|
|
598
|
-
return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
|
|
599
|
-
}
|
|
600
|
-
function getColor(color = "white") {
|
|
601
|
-
return colors[color] || colors.white;
|
|
602
|
-
}
|
|
603
|
-
function getBgColor(color = "bgWhite") {
|
|
604
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
function createConsola(options = {}) {
|
|
608
|
-
let level = _getDefaultLogLevel();
|
|
609
|
-
if (process.env.CONSOLA_LEVEL) {
|
|
610
|
-
level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
611
|
-
}
|
|
612
|
-
const consola2 = createConsola$1({
|
|
613
|
-
level,
|
|
614
|
-
defaults: { level },
|
|
615
|
-
stdout: process.stdout,
|
|
616
|
-
stderr: process.stderr,
|
|
617
|
-
prompt: (...args) => import('../chunks/prompt.mjs').then((m) => m.prompt(...args)),
|
|
618
|
-
reporters: options.reporters || [
|
|
619
|
-
options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()
|
|
620
|
-
],
|
|
621
|
-
...options
|
|
622
|
-
});
|
|
623
|
-
return consola2;
|
|
624
|
-
}
|
|
625
|
-
function _getDefaultLogLevel() {
|
|
626
|
-
if (isDebug) {
|
|
627
|
-
return LogLevels.debug;
|
|
628
|
-
}
|
|
629
|
-
if (isTest) {
|
|
630
|
-
return LogLevels.warn;
|
|
631
|
-
}
|
|
632
|
-
return LogLevels.info;
|
|
633
|
-
}
|
|
634
|
-
const consola = createConsola();
|
|
635
|
-
|
|
636
|
-
export { consola as a, createConsola as c, getDefaultExportFromCjs as g, isUnicodeSupported as i };
|